|
|
|
|
@ -9,7 +9,6 @@ require_once __DIR__.'/config.php'; |
|
|
|
|
|
|
|
|
|
$plugin = BBBPlugin::create(); |
|
|
|
|
$tool_name = $plugin->get_lang('Videoconference'); |
|
|
|
|
$tpl = new Template($tool_name); |
|
|
|
|
|
|
|
|
|
$isGlobal = isset($_GET['global']) ? true : false; |
|
|
|
|
|
|
|
|
|
@ -105,7 +104,6 @@ if ($conferenceManager) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$meetings = $bbb->getMeetings(); |
|
|
|
|
if (!empty($meetings)) { |
|
|
|
|
@ -118,16 +116,49 @@ $showJoinButton = false; |
|
|
|
|
if ($meetingExists || $conferenceManager) { |
|
|
|
|
$showJoinButton = true; |
|
|
|
|
} |
|
|
|
|
$conferenceUrl = $bbb->getConferenceUrl(); |
|
|
|
|
|
|
|
|
|
$courseInfo = api_get_course_info(); |
|
|
|
|
$formToString = ''; |
|
|
|
|
|
|
|
|
|
if ($bbb->isGlobalConference() === false && |
|
|
|
|
$conferenceManager && |
|
|
|
|
!empty($courseInfo) && |
|
|
|
|
$plugin->get('enable_conference_in_course_groups') === 'true' |
|
|
|
|
) { |
|
|
|
|
$url = api_get_self().'?'.api_get_cidreq(true, false).'&gidReq='; |
|
|
|
|
$htmlHeadXtra[] = '<script> |
|
|
|
|
$(document).ready(function(){ |
|
|
|
|
$("#group_select").on("change", function() { |
|
|
|
|
var groupId = $(this).find("option:selected").val(); |
|
|
|
|
var url = "'.$url.'"; |
|
|
|
|
window.location.replace(url+groupId); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
</script>'; |
|
|
|
|
|
|
|
|
|
$form = new FormValidator(api_get_self()); |
|
|
|
|
$groupId = api_get_group_id(); |
|
|
|
|
$groups = GroupManager::get_groups(); |
|
|
|
|
if ($groups && !empty($groupId)) { |
|
|
|
|
$groupList[0] = get_lang('Select'); |
|
|
|
|
$groupList = array_merge($groupList, array_column($groups, 'name', 'iid')); |
|
|
|
|
$form->addSelect('group_id', get_lang('Groups'), $groupList, ['id' => 'group_select']); |
|
|
|
|
$form->setDefaults(['group_id' => $groupId]); |
|
|
|
|
$formToString = $form->returnForm(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$tpl = new Template($tool_name); |
|
|
|
|
$tpl->assign('allow_to_edit', $conferenceManager); |
|
|
|
|
$tpl->assign('meetings', $meetings); |
|
|
|
|
$conferenceUrl = $bbb->getConferenceUrl(); |
|
|
|
|
$tpl->assign('conference_url', $conferenceUrl); |
|
|
|
|
$tpl->assign('users_online', $users_online); |
|
|
|
|
$tpl->assign('bbb_status', $status); |
|
|
|
|
$tpl->assign('show_join_button', $showJoinButton); |
|
|
|
|
|
|
|
|
|
$tpl->assign('message', $message); |
|
|
|
|
$tpl->assign('form', $formToString); |
|
|
|
|
|
|
|
|
|
$listing_tpl = 'bbb/listing.tpl'; |
|
|
|
|
$content = $tpl->fetch($listing_tpl); |
|
|
|
|
$tpl->assign('content', $content);$tpl->display_one_col_template(); |
|
|
|
|
|