|
|
|
@ -7,7 +7,7 @@ |
|
|
|
|
* Initialization |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
$course_plugin = 'bbb'; //needed in order to load the plugin lang variables |
|
|
|
|
$course_plugin = 'bbb'; //needed in order to load the plugin lang variables |
|
|
|
|
require_once dirname(__FILE__).'/config.php'; |
|
|
|
|
$tool_name = get_lang('Videoconference'); |
|
|
|
|
$tpl = new Template($tool_name); |
|
|
|
@ -20,23 +20,23 @@ $teacher = api_is_course_admin() || api_is_coach() || api_is_platform_admin(); |
|
|
|
|
if ($teacher) { |
|
|
|
|
switch ($action) { |
|
|
|
|
case 'add_to_calendar': |
|
|
|
|
$course_info = api_get_course_info(); |
|
|
|
|
$course_info = api_get_course_info(); |
|
|
|
|
$agenda = new Agenda(); |
|
|
|
|
$agenda->type = 'course'; |
|
|
|
|
|
|
|
|
|
$id = intval($_GET['id']); |
|
|
|
|
$id = intval($_GET['id']); |
|
|
|
|
$title = sprintf(get_lang('VideoConferenceXCourseX'), $id, $course_info['name']); |
|
|
|
|
$content = Display::url(get_lang('GoToTheVideoConference'), $_GET['url']); |
|
|
|
|
|
|
|
|
|
$event_id = $agenda->add_event($_REQUEST['start'], null, 'true', null, $title, $content, array('everyone')); |
|
|
|
|
if (!empty($event_id)) { |
|
|
|
|
if (!empty($event_id)) { |
|
|
|
|
$message = Display::return_message(get_lang('VideoConferenceAddedToTheCalendar'), 'success'); |
|
|
|
|
} else { |
|
|
|
|
$message = Display::return_message(get_lang('Error'), 'error'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case 'copy_record_to_link_tool': |
|
|
|
|
$result = $bbb->copy_record_to_link_tool($_GET['id'], $_GET['record_id']); |
|
|
|
|
$result = $bbb->copy_record_to_link_tool($_GET['id'], $_GET['record_id']); |
|
|
|
|
if ($result) { |
|
|
|
|
$message = Display::return_message(get_lang('VideoConferenceAddedToTheLinkTool'), 'success'); |
|
|
|
|
} else { |
|
|
|
@ -54,7 +54,7 @@ if ($teacher) { |
|
|
|
|
case 'end': |
|
|
|
|
$bbb->end_meeting($_GET['id']); |
|
|
|
|
$message = Display::return_message(get_lang('MeetingClosed'), 'success'); |
|
|
|
|
break; |
|
|
|
|
break; |
|
|
|
|
case 'publish': |
|
|
|
|
//$result = $bbb->publish_meeting($_GET['id']); |
|
|
|
|
break; |
|
|
|
@ -83,4 +83,4 @@ $tpl->assign('message', $message); |
|
|
|
|
$listing_tpl = 'bbb/listing.tpl'; |
|
|
|
|
$content = $tpl->fetch($listing_tpl); |
|
|
|
|
$tpl->assign('content', $content); |
|
|
|
|
$tpl->display_one_col_template(); |
|
|
|
|
$tpl->display_one_col_template(); |