|
|
|
@ -8,7 +8,6 @@ require_once __DIR__.'/config.php'; |
|
|
|
|
|
|
|
|
|
|
|
api_protect_course_script(true); |
|
|
|
api_protect_course_script(true); |
|
|
|
|
|
|
|
|
|
|
|
// the section (for the tabs) |
|
|
|
|
|
|
|
$this_section = SECTION_COURSES; |
|
|
|
$this_section = SECTION_COURSES; |
|
|
|
$logInfo = [ |
|
|
|
$logInfo = [ |
|
|
|
'tool' => 'Videoconference Zoom', |
|
|
|
'tool' => 'Videoconference Zoom', |
|
|
|
@ -24,7 +23,7 @@ $group = api_get_group_entity(); |
|
|
|
$session = api_get_session_entity(); |
|
|
|
$session = api_get_session_entity(); |
|
|
|
$plugin = ZoomPlugin::create(); |
|
|
|
$plugin = ZoomPlugin::create(); |
|
|
|
|
|
|
|
|
|
|
|
if (api_is_in_group()) { |
|
|
|
if (null !== $group) { |
|
|
|
$interbreadcrumb[] = [ |
|
|
|
$interbreadcrumb[] = [ |
|
|
|
'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(), |
|
|
|
'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(), |
|
|
|
'name' => get_lang('Groups'), |
|
|
|
'name' => get_lang('Groups'), |
|
|
|
@ -35,6 +34,17 @@ if (api_is_in_group()) { |
|
|
|
]; |
|
|
|
]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$url = api_get_self().'?'.api_get_cidreq(true, false).'&gidReq='; |
|
|
|
|
|
|
|
$htmlHeadXtra[] = '<script> |
|
|
|
|
|
|
|
$(function() { |
|
|
|
|
|
|
|
$("#group_select").on("change", function() { |
|
|
|
|
|
|
|
var groupId = $(this).find("option:selected").val(); |
|
|
|
|
|
|
|
var url = "'.$url.'"; |
|
|
|
|
|
|
|
window.location.replace(url+groupId); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
</script>'; |
|
|
|
|
|
|
|
|
|
|
|
$tool_name = $plugin->get_lang('ZoomVideoConferences'); |
|
|
|
$tool_name = $plugin->get_lang('ZoomVideoConferences'); |
|
|
|
$tpl = new Template($tool_name); |
|
|
|
$tpl = new Template($tool_name); |
|
|
|
|
|
|
|
|
|
|
|
@ -42,6 +52,26 @@ $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; |
|
|
|
|
|
|
|
|
|
|
|
$isManager = $plugin->userIsCourseConferenceManager(); |
|
|
|
$isManager = $plugin->userIsCourseConferenceManager(); |
|
|
|
if ($isManager) { |
|
|
|
if ($isManager) { |
|
|
|
|
|
|
|
$groupId = api_get_group_id(); |
|
|
|
|
|
|
|
$groups = GroupManager::get_groups(); |
|
|
|
|
|
|
|
if (!empty($groups)) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form = new FormValidator('group_filter'); |
|
|
|
|
|
|
|
$groupList[0] = get_lang('Select'); |
|
|
|
|
|
|
|
foreach ($groups as $groupData) { |
|
|
|
|
|
|
|
$itemGroupId = $groupData['iid']; |
|
|
|
|
|
|
|
/*if (isset($meetingsGroup[$itemGroupId]) && $meetingsGroup[$itemGroupId] == 1) { |
|
|
|
|
|
|
|
$groupData['name'] .= ' ('.get_lang('Active').')'; |
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
$groupList[$itemGroupId] = $groupData['name']; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$form->addSelect('group_id', get_lang('Groups'), $groupList, ['id' => 'group_select']); |
|
|
|
|
|
|
|
$form->setDefaults(['group_id' => $groupId]); |
|
|
|
|
|
|
|
$formToString = $form->returnForm(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$tpl->assign('group_form', $formToString); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch ($action) { |
|
|
|
switch ($action) { |
|
|
|
case 'delete': |
|
|
|
case 'delete': |
|
|
|
$meeting = $plugin->getMeetingRepository()->findOneBy(['meetingId' => $_REQUEST['meetingId']]); |
|
|
|
$meeting = $plugin->getMeetingRepository()->findOneBy(['meetingId' => $_REQUEST['meetingId']]); |
|
|
|
@ -52,9 +82,9 @@ if ($isManager) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$user = api_get_user_entity(api_get_user_id()); |
|
|
|
$user = api_get_user_entity(api_get_user_id()); |
|
|
|
// user can create a new meeting |
|
|
|
|
|
|
|
$tpl->assign( |
|
|
|
$tpl->assign( |
|
|
|
'createInstantMeetingForm', |
|
|
|
'instant_meeting_form', |
|
|
|
$plugin->getCreateInstantMeetingForm( |
|
|
|
$plugin->getCreateInstantMeetingForm( |
|
|
|
$user, |
|
|
|
$user, |
|
|
|
$course, |
|
|
|
$course, |
|
|
|
@ -63,7 +93,7 @@ if ($isManager) { |
|
|
|
)->returnForm() |
|
|
|
)->returnForm() |
|
|
|
); |
|
|
|
); |
|
|
|
$tpl->assign( |
|
|
|
$tpl->assign( |
|
|
|
'scheduleMeetingForm', |
|
|
|
'schedule_meeting_form', |
|
|
|
$plugin->getScheduleMeetingForm( |
|
|
|
$plugin->getScheduleMeetingForm( |
|
|
|
$user, |
|
|
|
$user, |
|
|
|
$course, |
|
|
|
$course, |
|
|
|
@ -75,7 +105,7 @@ if ($isManager) { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
$tpl->assign( |
|
|
|
$tpl->assign( |
|
|
|
'scheduledMeetings', |
|
|
|
'meetings', |
|
|
|
$plugin->getMeetingRepository()->courseMeetings($course, $group, $session) |
|
|
|
$plugin->getMeetingRepository()->courseMeetings($course, $group, $session) |
|
|
|
); |
|
|
|
); |
|
|
|
} catch (Exception $exception) { |
|
|
|
} catch (Exception $exception) { |
|
|
|
|