Minor - Plugins: Zoom - add breadcrumb - WIP - BT#17288

pull/3440/head
Julio Montoya 5 years ago
parent cd2df08c23
commit c13bba4e9c
  1. 25
      plugin/zoom/activity.php
  2. 10
      plugin/zoom/join_meeting.php
  3. 10
      plugin/zoom/lib/ZoomPlugin.php
  4. 2
      plugin/zoom/meeting.php
  5. 2
      plugin/zoom/view/activity.tpl

@ -10,8 +10,6 @@ require_once __DIR__.'/config.php';
$plugin = ZoomPlugin::create(); $plugin = ZoomPlugin::create();
$tool_name = $plugin->get_lang('ZoomVideoConferences'); $tool_name = $plugin->get_lang('ZoomVideoConferences');
$tpl = new Template($plugin->get_lang('ZoomVideoConferences'));
$meetingId = isset($_REQUEST['meetingId']) ? (int) $_REQUEST['meetingId'] : 0; $meetingId = isset($_REQUEST['meetingId']) ? (int) $_REQUEST['meetingId'] : 0;
if (empty($meetingId)) { if (empty($meetingId)) {
api_not_allowed(true); api_not_allowed(true);
@ -27,8 +25,31 @@ if (null === $meeting) {
if (!$plugin->userIsConferenceManager($meeting)) { if (!$plugin->userIsConferenceManager($meeting)) {
api_not_allowed(true); api_not_allowed(true);
} }
$returnURL = 'meetings.php';
$urlExtra = '';
if ($meeting->isCourseMeeting()) {
api_protect_course_script(true);
$urlExtra = api_get_cidreq();
$returnURL = 'start.php?'.$urlExtra;
if (api_is_in_group()) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(),
'name' => get_lang('Groups'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$meeting->getGroup()->getName(),
];
}
}
$interbreadcrumb[] = [
'url' => $returnURL,
'name' => $plugin->get_lang('ZoomVideoConferences'),
];
$tpl = new Template($meeting->getMeetingId());
$tpl->assign('actions', $plugin->getToolbar()); $tpl->assign('actions', $plugin->getToolbar());
$tpl->assign('meeting', $meeting); $tpl->assign('meeting', $meeting);
$tpl->assign('url_extra', $urlExtra);
$tpl->assign('content', $tpl->fetch('zoom/view/activity.tpl')); $tpl->assign('content', $tpl->fetch('zoom/view/activity.tpl'));
$tpl->display_one_col_template(); $tpl->display_one_col_template();

@ -24,6 +24,16 @@ if (null === $meeting) {
if ($meeting->isCourseMeeting()) { if ($meeting->isCourseMeeting()) {
api_protect_course_script(true); api_protect_course_script(true);
if (api_is_in_group()) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(),
'name' => get_lang('Groups'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$meeting->getGroup()->getName(),
];
}
} }
try { try {

@ -1282,11 +1282,11 @@ class ZoomPlugin extends Plugin
* Schedules a meeting and returns it. * Schedules a meeting and returns it.
* set $course, $session and $user to null in order to create a global meeting. * set $course, $session and $user to null in order to create a global meeting.
* *
* @param DateTime $startTime meeting local start date-time (configure local timezone on your Zoom account) * @param DateTime $startTime meeting local start date-time (configure local timezone on your Zoom account)
* @param int $duration in minutes * @param int $duration in minutes
* @param string $topic short title of the meeting, required * @param string $topic short title of the meeting, required
* @param string $agenda ordre du jour * @param string $agenda ordre du jour
* @param string $password meeting password * @param string $password meeting password
* *
* @throws Exception * @throws Exception
* *

@ -45,7 +45,7 @@ $logInfo = [
]; ];
Event::registerLog($logInfo); Event::registerLog($logInfo);
$interbreadcrumb[] = [ // used in templates $interbreadcrumb[] = [
'url' => $returnURL, 'url' => $returnURL,
'name' => $plugin->get_lang('ZoomVideoConferences'), 'name' => $plugin->get_lang('ZoomVideoConferences'),
]; ];

@ -2,7 +2,7 @@
{{ meeting.typeName }} {{ meeting.meetingId }} {{ meeting.typeName }} {{ meeting.meetingId }}
</h4> </h4>
<a class="btn btn-primary" href="meeting.php?meetingId={{ meeting.meetingId }}"> <a class="btn btn-primary" href="meeting.php?meetingId={{ meeting.meetingId }}&{{ url_extra }}">
{{ 'Edit'|get_lang }} {{ 'Edit'|get_lang }}
</a> </a>

Loading…
Cancel
Save