bbb: update from 1.11.x

pull/4017/head
Julio 4 years ago
parent babc4ee810
commit e3bf4bff2d
  1. 5
      public/plugin/bbb/admin.php
  2. 9
      public/plugin/bbb/lang/english.php
  3. 9
      public/plugin/bbb/lang/french.php
  4. 9
      public/plugin/bbb/lang/german.php
  5. 12
      public/plugin/bbb/lang/spanish.php
  6. 77
      public/plugin/bbb/lib/bbb.lib.php
  7. 12
      public/plugin/bbb/lib/bbb_api.php
  8. 85
      public/plugin/bbb/lib/bbb_plugin.class.php
  9. 93
      public/plugin/bbb/listing.php
  10. 11
      public/plugin/bbb/start.php
  11. 89
      public/plugin/bbb/view/listing.tpl

@ -16,7 +16,6 @@ api_protect_admin_script();
$plugin = BBBPlugin::create();
$tool_name = $plugin->get_lang('Videoconference');
$isGlobal = isset($_GET['global']) ? true : false;
$bbb = new bbb('', '', $isGlobal);
@ -73,8 +72,8 @@ if ($action) {
foreach ($meetings as $meeting) {
$dataToExport[] = [
$meeting['created_at'],
1 == $meeting['status'] ? $plugin->get_lang('MeetingOpened') : $plugin->get_lang('MeetingClosed'),
1 == $meeting['record'] ? get_lang('Yes') : get_lang('No'),
$meeting['status'] == 1 ? $plugin->get_lang('MeetingOpened') : $plugin->get_lang('MeetingClosed'),
$meeting['record'] == 1 ? get_lang('Yes') : get_lang('No'),
$meeting['course'] ? $meeting['course']->getTitle() : '-',
$meeting['session'] ? $meeting['session']->getName() : '-',
isset($meeting['participants']) ? implode(PHP_EOL, $meeting['participants']) : null,

@ -63,14 +63,6 @@ $strings['MaxXUsersReachedManager'] = 'The limit of %s simultaneous users has be
$strings['MaxUsersInConferenceRoom'] = 'Max simultaneous users in a conference room';
$strings['global_conference_allow_roles'] = "Global conference link only visible for these user roles";
$strings['CreatedAt'] = 'Created at';
$strings['interface'] = 'Default Interface';
$strings['launch_type'] = 'Client launch choice';
$strings['EnterConferenceFlash'] = 'Enter the videoconference (Flash client)';
$strings['EnterConferenceHTML5'] = 'Enter the videoconference (HTML5 client)';
$strings['ParticipantsWillUseSameInterface'] = 'Participants will use the same interface as you';
$strings['SetByStudent'] = 'Set by student';
$strings['SetByTeacher'] = 'Set by teacher';
$strings['SetByDefault'] = 'Set to default interface';
$strings['allow_regenerate_recording'] = 'Allow regenerate recording';
$strings['bbb_force_record_generation'] = 'Force record generation at the end of the meeting';
$strings['disable_course_settings'] = 'Disable course settings';
@ -81,3 +73,4 @@ $strings['ThereIsNoVideoConferenceActive'] = 'There is no videoconference curren
$strings['RoomClosed'] = 'Room closed';
$strings['RoomClosedComment'] = ' ';
$strings['meeting_duration'] = 'Meeting duration (in minutes)';
$strings['big_blue_button_students_start_conference_in_groups'] = 'Allow students to start conference in their groups.';

@ -65,14 +65,7 @@ $strings['MaxUsersInConferenceRoom'] = 'Nombre max d\'utilisateurs simultanés d
$strings['global_conference_allow_roles'] = "Visibilité du lien de vidéo conférence global pour les profils suivant";
$strings['CreatedAt'] = "Créé à";
$strings['interface'] = 'Interface par défaut';
$strings['launch_type'] = 'Type d\'interface au lancement';
$strings['EnterConferenceFlash'] = 'Entrer dans la salle de conférence (Flash)';
$strings['EnterConferenceHTML5'] = 'Entrer dans la salle de conférence (HTML5)';
$strings['ParticipantsWillUseSameInterface'] = 'Les apprenants utiliseront la même interface que vous';
$strings['SetByDefault'] = 'Lancement de l\'interface par défaut';
$strings['SetByTeacher'] = 'Choisi par le professeur';
$strings['SetByStudent'] = 'Choisi par l\'apprenant';
$strings['bbb_force_record_generation'] = 'Forcer la génération de l\'enregistrement à la fin de la session';
$strings['ThereIsNoVideoConferenceActive'] = "Il n'y a aucune vidéoconférence actuellement active";
$strings['meeting_duration'] = 'Durée de la conférence (en minutes)';
$strings['big_blue_button_students_start_conference_in_groups'] = 'Permettre aux apprenants de démarrer les vidéoconferénces de leurs groupes';

@ -63,12 +63,3 @@ $strings['MaxXUsersReachedManager'] = 'The limit of %s simultaneous users has be
$strings['MaxUsersInConferenceRoom'] = 'Max simultaneous users in a conference room';
$strings['global_conference_allow_roles'] = "Globaler Konferenz-Link nur für diese Benutzerrollen sichtbar";
$strings['CreatedAt'] = "Erstellt am";
$strings['interface'] = 'Standardbenutzeroberfläche';
$strings['launch_type'] = 'Wahl der Benutzeroberfläche beim Start';
$strings['EnterConferenceFlash'] = 'Videokonferenz starten (Flash-Client)';
$strings['EnterConferenceHTML5'] = 'Videokonferenz starten (HTML5-Client)';
$strings['ParticipantsWillUseSameInterface'] = 'Die Teilnehmer verwenden dieselbe Benutzeroberfläche wie Sie';
$strings['SetByDefault'] = 'Auf die Standardbenutzeroberfläche einstellen';
$strings['SetByTeacher'] = 'Set von Lehrer';
$strings['SetByStudent'] = 'Set von Teilnehmer';

@ -44,7 +44,7 @@ $strings['big_blue_button_welcome_message'] = 'Mensaje de bienvenida de BigBlueB
$strings['enable_global_conference'] = 'Activar la conferencia global';
$strings['enable_global_conference_per_user'] = 'Activar la conferencia global por usuario';
$strings['enable_conference_in_course_groups'] = 'Activar las conferencias en grupos';
$strings['enable_global_conference_link'] = 'Actvivar el enlace hacia la conferencia global desde la página principal';
$strings['enable_global_conference_link'] = 'Activar el enlace hacia la conferencia global desde la página principal';
$strings['big_blue_button_record_and_store'] = 'Grabar las sesiones de videoconferencia.';
$strings['bbb_enable_conference_in_groups'] = 'Activar la creación de videoconferencia en los grupos.';
@ -64,14 +64,6 @@ $strings['MaxXUsersReachedManager'] = 'El límite de %s usuarios simultáneos ha
$strings['MaxUsersInConferenceRoom'] = 'Número máximo de usuarios simultáneos en una sala de conferencia';
$strings['global_conference_allow_roles'] = 'El enlace de videoconferencia global es disponible para estos perfiles';
$strings['CreatedAt'] = 'Creado el';
$strings['interface'] = 'Interfaz por defecto';
$strings['launch_type'] = 'Elección de la interfaz en el lanzamiento';
$strings['EnterConferenceFlash'] = 'Ingresar a la conferencia (con Flash)';
$strings['EnterConferenceHTML5'] = 'Ingresar a la conferencia (con HTML5)';
$strings['ParticipantsWillUseSameInterface'] = 'Los participantes usarán la misma interfaz que Ud';
$strings['SetByDefault'] = 'Lanzamiento con la interfaz por defecto';
$strings['SetByTeacher'] = 'Elegido por el profesor';
$strings['SetByStudent'] = 'Elegido por el alumno';
$strings['ThereIsNoVideoConferenceActive'] = "No hay una videoconferencia actualmente activa";
$strings['meeting_duration'] = 'Duración de la reunión (en minutos)';
$strings['big_blue_button_students_start_conference_in_groups'] = 'Permitir a los estudiantes iniciar una videoconferencia en sus grupos.';

@ -78,7 +78,7 @@ class bbb
$this->groupSupport = $this->plugin->get('enable_conference_in_course_groups') === 'true' ? true : false;
if ($this->groupSupport) {
// Platform check
$bbbSetting = api_get_plugin_setting('bbb', 'enable_conference_in_course_groups');
$bbbSetting = api_get_setting('bbb_enable_conference_in_course_groups');
$bbbSetting = isset($bbbSetting['bbb']) ? $bbbSetting['bbb'] === 'true' : false;
if ($bbbSetting) {
@ -386,13 +386,6 @@ class bbb
$params['access_url'] = $this->accessUrl;
$params['closed_at'] = '';
// Check interface feature is installed
$interfaceFeature = $this->plugin->get('interface');
if ($interfaceFeature === false) {
if (isset($params['interface'])) {
unset($params['interface']);
}
}
$id = Database::insert($this->table, $params);
@ -636,8 +629,6 @@ class bbb
'userID' => api_get_user_id(),
//-- OPTIONAL - string
'webVoiceConf' => '',
// -- OPTIONAL - string
'interface' => $this->checkInterface($meetingData),
];
$url = $this->api->getJoinMeetingURL($joinParams);
$url = $this->protocol.$url;
@ -656,7 +647,7 @@ class bbb
*/
public function isConferenceManager()
{
if (api_is_coach() || api_is_platform_admin()) {
if (api_is_coach() || api_is_platform_admin(false, true)) {
return true;
}
@ -670,6 +661,26 @@ class bbb
}
$courseInfo = api_get_course_info();
$groupId = api_get_group_id();
if (!empty($groupId) && !empty($courseInfo)) {
$groupEnabled = api_get_course_plugin_setting('bbb', 'bbb_enable_conference_in_groups') === '1';
if ($groupEnabled) {
$studentCanStartConference = api_get_course_plugin_setting(
'bbb',
'big_blue_button_students_start_conference_in_groups'
) === '1';
if ($studentCanStartConference) {
$isSubscribed = GroupManager::is_user_in_group(
api_get_user_id(),
GroupManager::get_group_properties($groupId)
);
if ($isSubscribed) {
return true;
}
}
}
}
if (!empty($courseInfo)) {
return api_is_course_admin();
@ -706,41 +717,6 @@ class bbb
return false;
}
/**
* @param $meetingInfo
*
* @return int
*/
public function checkInterface($meetingInfo)
{
$interface = BBBPlugin::LAUNCH_TYPE_DEFAULT;
$type = $this->plugin->get('launch_type');
switch ($type) {
case BBBPlugin::LAUNCH_TYPE_DEFAULT:
$interface = $this->plugin->get('interface');
break;
case BBBPlugin::LAUNCH_TYPE_SET_BY_TEACHER:
if (isset($meetingInfo['interface'])) {
$interface = $meetingInfo['interface'];
}
break;
case BBBPlugin::LAUNCH_TYPE_SET_BY_STUDENT:
if (isset($meetingInfo['id'])) {
$roomInfo = $this->getMeetingParticipantInfo($meetingInfo['id'], api_get_user_id());
if (!empty($roomInfo) && isset($roomInfo['interface'])) {
$interface = $roomInfo['interface'];
} else {
if (isset($_REQUEST['interface'])) {
$interface = isset($_REQUEST['interface']) ? (int) $_REQUEST['interface'] : 0;
}
}
}
break;
}
return $interface;
}
/**
* @param int $meetingId
@ -769,11 +745,10 @@ class bbb
*
* @param int $meetingId
* @param int $participantId
* @param int $interface
*
* @return false|int The last inserted ID. Otherwise return false
*/
public function saveParticipant($meetingId, $participantId, $interface = 0)
public function saveParticipant($meetingId, $participantId)
{
$meetingData = Database::select(
'*',
@ -818,10 +793,6 @@ class bbb
'close' => BBBPlugin::ROOM_OPEN,
];
if ($this->plugin->get('interface') !== false) {
$params['interface'] = $interface;
}
return Database::insert(
'plugin_bbb_room',
$params
@ -1141,8 +1112,6 @@ class bbb
'userID' => '',
// -- OPTIONAL - string
'webVoiceConf' => '',
// -- OPTIONAL - string
'interface' => $this->checkInterface($meetingDB),
];
$item['go_url'] = $this->protocol.$this->api->getJoinMeetingURL($joinParams);
}

@ -167,7 +167,7 @@ class BigBlueButtonBN
if ($xml) {
if ($xml->meetingID) {
return array(
return [
'returncode' => $xml->returncode->__toString(),
'message' => $xml->message->__toString(),
'messageKey' => $xml->messageKey->__toString(),
@ -176,14 +176,14 @@ class BigBlueButtonBN
'moderatorPw' => $xml->moderatorPW->__toString(),
'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded->__toString(),
'createTime' => $xml->createTime->__toString(),
'internalMeetingID' => $xml->internalMeetingID->__toString()
);
'internalMeetingID' => $xml->internalMeetingID->__toString(),
];
} else {
return array(
return [
'returncode' => $xml->returncode->__toString(),
'message' => $xml->message->__toString(),
'messageKey' => $xml->messageKey->__toString(),
);
];
}
} else {
return null;
@ -279,7 +279,6 @@ class BigBlueButtonBN
-- getMeetings
-- getMeetingInfo
*/
public function getIsMeetingRunningUrl($meetingId) {
/* USAGE:
$meetingId = '1234' -- REQUIRED - The unique id for the meeting
@ -305,7 +304,6 @@ class BigBlueButtonBN
else {
return null;
}
}
public function getGetMeetingsUrl() {

@ -9,18 +9,10 @@
*/
/**
* Class BBBPlugin
* Videoconference plugin with BBB
*/
class BBBPlugin extends Plugin
{
const INTERFACE_FLASH = 0;
const INTERFACE_HTML5 = 1;
const LAUNCH_TYPE_DEFAULT = 0;
const LAUNCH_TYPE_SET_BY_TEACHER = 1;
const LAUNCH_TYPE_SET_BY_STUDENT = 2;
const ROOM_OPEN = 0;
const ROOM_CLOSE = 1;
const ROOM_CHECK = 2;
@ -41,6 +33,10 @@ class BBBPlugin extends Plugin
'name' => 'bbb_force_record_generation',
'type' => 'checkbox',
],
[
'name' => 'big_blue_button_students_start_conference_in_groups',
'type' => 'checkbox',
],
];
/**
@ -49,7 +45,7 @@ class BBBPlugin extends Plugin
protected function __construct()
{
parent::__construct(
'2.8.2',
'2.9',
'Julio Montoya, Yannick Warnier, Angel Fernando Quiroz Campos, Jose Angel Ruiz',
[
'tool_enable' => 'boolean',
@ -71,22 +67,6 @@ class BBBPlugin extends Plugin
],
'attributes' => ['multiple' => 'multiple'],
],
'interface' => [
'type' => 'select',
'options' => [
self::INTERFACE_HTML5 => 'HTML5',
self::INTERFACE_FLASH => 'Flash',
],
],
'launch_type' => [
'type' => 'select',
'options' => [
self::LAUNCH_TYPE_DEFAULT => 'SetByDefault',
self::LAUNCH_TYPE_SET_BY_TEACHER => 'SetByTeacher',
self::LAUNCH_TYPE_SET_BY_STUDENT => 'SetByStudent',
],
'translate_options' => true, // variables will be translated using the plugin->get_lang
],
'allow_regenerate_recording' => 'boolean',
// Default course settings, must be the same as $course_settings
'big_blue_button_record_and_store' => 'checkbox',
@ -196,8 +176,7 @@ class BBBPlugin extends Plugin
voice_bridge INT NOT NULL DEFAULT 1,
access_url INT NOT NULL DEFAULT 1,
video_url TEXT NULL,
has_video_m4v TINYINT NOT NULL DEFAULT 0,
interface INT NOT NULL DEFAULT 0
has_video_m4v TINYINT NOT NULL DEFAULT 0
)";
Database::query($sql);
@ -208,7 +187,6 @@ class BBBPlugin extends Plugin
participant_id int(11) NOT NULL,
in_at datetime,
out_at datetime,
interface int NOT NULL DEFAULT 0,
close INT NOT NULL DEFAULT 0
);"
);
@ -278,9 +256,7 @@ class BBBPlugin extends Plugin
'bbb_plugin_host',
'bbb_plugin_salt',
'max_users_limit',
'global_conference_allow_roles',
'interface',
'launch_type',
'global_conference_allow_roles'
];
$urlId = api_get_current_access_url_id();
@ -354,53 +330,6 @@ class BBBPlugin extends Plugin
}
}
/**
* Return an array with URL
*
* @param string $conferenceUrl
*
* @return array
*/
public function getUrlInterfaceLinks($conferenceUrl)
{
$urlList[] = $this->getFlashUrl($conferenceUrl);
$urlList[] = $this->getHtmlUrl($conferenceUrl);
return $urlList;
}
/**
* @param string $conferenceUrl
*
* @return array
*/
public function getFlashUrl($conferenceUrl)
{
$data = [
'text' => $this->get_lang('EnterConferenceFlash'),
'url' => $conferenceUrl.'&interface='.self::INTERFACE_FLASH,
'icon' => 'resources/img/64/videoconference_flash.png',
];
return $data;
}
/**
* @param string $conferenceUrl
*
* @return array
*/
public function getHtmlUrl($conferenceUrl)
{
$data = [
'text' => $this->get_lang('EnterConferenceHTML5'),
'url' => $conferenceUrl.'&interface='.self::INTERFACE_HTML5,
'icon' => 'resources/img/64/videoconference_html5.png',
];
return $data;
}
/**
* Set the course setting in all courses
*

@ -21,8 +21,11 @@ $roomTable = Database::get_main_table('plugin_bbb_room');
$htmlHeadXtra[] = api_get_js_simple(api_get_path(WEB_PLUGIN_PATH).'bbb/resources/utils.js');
$action = isset($_GET['action']) ? $_GET['action'] : '';
$action = $_GET['action'] ?? '';
$userId = api_get_user_id();
$groupId = api_get_group_id();
$sessionId = api_get_session_id();
$courseInfo = api_get_course_info();
$bbb = new bbb('', '', $isGlobal, $isGlobalPerUser);
@ -33,11 +36,35 @@ if ($bbb->isGlobalConference()) {
api_protect_course_script(true);
}
$courseInfo = api_get_course_info();
$courseCode = isset($courseInfo['code']) ? $courseInfo['code'] : '';
$allowStudentAsConferenceManager = false;
if (!empty($courseInfo) && !empty($groupId) && !api_is_allowed_to_edit()) {
$groupEnabled = api_get_course_plugin_setting(
'bbb',
'bbb_enable_conference_in_groups',
$courseInfo
) === '1';
if ($groupEnabled) {
$isSubscribed = GroupManager::is_user_in_group(api_get_user_id(), GroupManager::get_group_properties($groupId));
if ($isSubscribed) {
$allowStudentAsConferenceManager = api_get_course_plugin_setting(
'bbb',
'big_blue_button_students_start_conference_in_groups',
$courseInfo
) === '1';
}
}
}
$allowToEdit = $conferenceManager;
// Disable students edit permissions.
if ($allowStudentAsConferenceManager) {
$allowToEdit = false;
}
$courseCode = $courseInfo['code'] ?? '';
$message = '';
if ($conferenceManager) {
if ($conferenceManager && $allowToEdit) {
switch ($action) {
case 'add_to_calendar':
if ($bbb->isGlobalConference()) {
@ -284,7 +311,6 @@ if ($conferenceManager) {
error_log("meeting does not exist - remote_id: $remoteId");
} else {
$meetingId = $meetingData['id'];
$roomData = Database::select(
'*',
$roomTable,
@ -332,7 +358,7 @@ if ($conferenceManager) {
$meetings = $bbb->getMeetings(
api_get_course_int_id(),
api_get_session_id(),
api_get_group_id()
$groupId
);
if (!empty($meetings)) {
$meetings = array_reverse($meetings);
@ -375,9 +401,8 @@ if (false === $bbb->isGlobalConference() &&
</script>';
$form = new FormValidator(api_get_self().'?'.api_get_cidreq());
$groupId = api_get_group_id();
if ($conferenceManager) {
$groups = GroupManager::get_groups();
if ($conferenceManager && false === $allowStudentAsConferenceManager) {
$groups = GroupManager::get_group_list(null, $courseInfo, null, $sessionId);
} else {
if (!empty($groupId)) {
$group = api_get_group_entity($groupId);
@ -388,6 +413,7 @@ if (false === $bbb->isGlobalConference() &&
}
}
}
$groups = GroupManager::getAllGroupPerUserSubscription(
api_get_user_id(),
api_get_course_int_id(),
@ -398,7 +424,6 @@ if (false === $bbb->isGlobalConference() &&
if ($groups) {
$meetingsInGroup = $bbb->getAllMeetingsInCourse(api_get_course_int_id(), api_get_session_id(), 1);
$meetingsGroup = array_column($meetingsInGroup, 'status', 'group_id');
$groupList[0] = get_lang('Select');
foreach ($groups as $groupData) {
if ($groupData instanceof \Chamilo\CourseBundle\Entity\CGroup) {
@ -427,51 +452,9 @@ $urlList[] = Display::url(
['target' => '_blank', 'class' => 'btn btn-primary btn-large']
);
$type = $plugin->get('launch_type');
$warningInterfaceMessage = '';
$showClientOptions = false;
switch ($type) {
case BBBPlugin::LAUNCH_TYPE_DEFAULT:
$urlList = [];
$urlList[] = Display::url(
$plugin->get_lang('EnterConference'),
$conferenceUrl.'&interface='.$plugin->get('interface'),
['target' => '_blank', 'class' => 'btn btn-primary btn-large']
);
break;
case BBBPlugin::LAUNCH_TYPE_SET_BY_TEACHER:
if ($conferenceManager) {
$urlList = $plugin->getUrlInterfaceLinks($conferenceUrl);
$warningInterfaceMessage = Display::return_message($plugin->get_lang('ParticipantsWillUseSameInterface'));
$showClientOptions = true;
} else {
$meetingInfo = $bbb->getMeetingByName($videoConferenceName);
switch ($meetingInfo['interface']) {
case BBBPlugin::INTERFACE_FLASH:
$url = $plugin->getFlashUrl($conferenceUrl);
break;
case BBBPlugin::INTERFACE_HTML5:
$url = $plugin->getHtmlUrl($conferenceUrl);
break;
}
}
break;
case BBBPlugin::LAUNCH_TYPE_SET_BY_STUDENT:
if ($conferenceManager) {
$urlList = $plugin->getUrlInterfaceLinks($conferenceUrl);
$showClientOptions = true;
} else {
if ($meetingExists) {
$urlList = $plugin->getUrlInterfaceLinks($conferenceUrl);
$showClientOptions = true;
}
}
break;
}
$tpl = new Template($tool_name);
$tpl->assign('allow_to_edit', $conferenceManager);
$tpl->assign('allow_to_edit', $allowToEdit);
$tpl->assign('meetings', $meetings);
$tpl->assign('conference_url', $conferenceUrl);
$tpl->assign('users_online', $usersOnline);
@ -482,8 +465,6 @@ $tpl->assign('show_join_button', $showJoinButton);
$tpl->assign('message', $message);
$tpl->assign('form', $formToString);
$tpl->assign('enter_conference_links', $urlList);
$tpl->assign('warning_inteface_msg', $warningInterfaceMessage);
$tpl->assign('show_client_options', $showClientOptions);
$content = $tpl->fetch('bbb/view/listing.tpl');

@ -8,13 +8,15 @@
require_once __DIR__.'/../../../vendor/autoload.php';
$course_plugin = 'bbb'; //needed in order to load the plugin lang variables
$isGlobal = isset($_GET['global']) ? true : false;
$isGlobal = isset($_GET['global']);
$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false;
// If global setting is used then we delete the course sessions (cidReq/id_session)
if ($isGlobalPerUser || $isGlobal) {
$cidReset = true;
}
require_once __DIR__.'/config.php';
$logInfo = [
@ -28,8 +30,6 @@ $tpl = new Template($tool_name);
$vmIsEnabled = false;
$host = '';
$salt = '';
$interface = isset($_GET['interface']) ? (int) $_GET['interface'] : 0;
$bbb = new bbb('', '', $isGlobal, $isGlobalPerUser);
$conferenceManager = $bbb->isConferenceManager();
@ -39,6 +39,7 @@ if ($bbb->isGlobalConference()) {
api_protect_course_script(true);
}
$message = null;
if ($bbb->pluginEnabled) {
if ($bbb->isServerConfigured()) {
if ($bbb->isServerRunning()) {
@ -68,7 +69,6 @@ if ($bbb->pluginEnabled) {
$meetingParams = [];
$meetingParams['meeting_name'] = $bbb->getCurrentVideoConferenceName();
$meetingParams['interface'] = $interface;
$url = null;
if ($bbb->meetingExists($meetingParams['meeting_name'])) {
$joinUrl = $bbb->joinMeeting($meetingParams['meeting_name']);
@ -83,7 +83,7 @@ if ($bbb->pluginEnabled) {
$meetingInfo = $bbb->findMeetingByName($meetingParams['meeting_name']);
if (!empty($meetingInfo) && $url) {
$bbb->saveParticipant($meetingInfo['id'], api_get_user_id(), $interface);
$bbb->saveParticipant($meetingInfo['id'], api_get_user_id());
$bbb->redirectToBBB($url);
} else {
Display::addFlash(
@ -107,5 +107,6 @@ if ($bbb->pluginEnabled) {
} else {
$message = Display::return_message(get_lang('ServerIsNotConfigured'), 'warning');
}
$tpl->assign('message', $message);
$tpl->display_one_col_template();

@ -17,84 +17,29 @@
<div class ="col-md-12" style="text-align:center">
{{ form }}
{% if show_join_button == true %}
{% if show_client_options %}
<div class="row">
<div class="col-md-6">
<div class="panel panel-default conference">
<div class="panel-body">
<div class="url">
<a class="btn btn-default" href="{{ enter_conference_links.0.url }}">
<img src="{{ enter_conference_links.0.icon }}" /><br>
{{ enter_conference_links.0.text }}
</a>
</div>
<div class="share">
{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}
</div>
<div class="form-inline">
<div class="form-group">
<input id="share_button_flash" type="text"
style="width:300px"
class="form-control" readonly value="{{ conference_url }}&interface=0">
<button onclick="copyTextToClipBoard('share_button_flash');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default conference">
<div class="panel-body">
<div class="url">
<a class="btn btn-default" href="{{ enter_conference_links.1.url }}">
<img src="{{ enter_conference_links.1.icon }}" /><br>
{{ enter_conference_links.1.text }}
</a>
</div>
<div class="share">
{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}
</div>
<div class="form-inline">
<div class="form-group">
<input id="share_button_html" type="text"
style="width:300px"
class="form-control" readonly value="{{ conference_url }}&interface=1">
<button onclick="copyTextToClipBoard('share_button_html');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
{% else %}
{{ enter_conference_links.0 }}
<br />
<strong>{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}</strong>
<div class="well">
<div class="form-inline">
<div class="form-group">
<input id="share_button"
type="text"
style="width:600px"
class="form-control" readonly value="{{ conference_url }}">
<button onclick="copyTextToClipBoard('share_button');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
{{ enter_conference_links.0 }}
<br />
<strong>{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}</strong>
<div class="well">
<div class="form-inline">
<div class="form-group">
<input id="share_button"
type="text"
style="width:600px"
class="form-control" readonly value="{{ conference_url }}">
<button onclick="copyTextToClipBoard('share_button');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
{% endif %}
</div>
<p>
<span id="users_online" class="label label-warning">
{{ 'XUsersOnLine'| get_plugin_lang('BBBPlugin') | format(users_online) }}
</span>
</p>
{{ warning_inteface_msg }}
{% if max_users_limit > 0 %}
{% if conference_manager == true %}
<p>{{ 'MaxXUsersWarning' | get_plugin_lang('BBBPlugin') | format(max_users_limit) }}</p>
@ -170,4 +115,4 @@
{% endif %}
</div>
{% endautoescape %}
{% endautoescape %}

Loading…
Cancel
Save