Show Zoom meeting list after update or delete - refs BT#17288

pull/3274/head
Sébastien Ducoulombier 5 years ago
parent 08307a706f
commit 4c55d67a22
  1. 6
      plugin/zoom/lib/DisplayableMeetingTrait.php
  2. 13
      plugin/zoom/meeting.php
  3. 6
      plugin/zoom/meeting_from_admin.php
  4. 6
      plugin/zoom/meeting_from_start.php
  5. 2
      plugin/zoom/view/admin.tpl
  6. 29
      plugin/zoom/view/start.tpl

@ -28,9 +28,6 @@ trait DisplayableMeetingTrait
/** @var string meeting formatted duration */
public $formattedDuration;
/** @var string meeting details URL */
public $detailURL;
/**
* @throws Exception on unexpected start_time or duration
*/
@ -58,8 +55,5 @@ trait DisplayableMeetingTrait
$this->durationInterval = $later->diff($now);
$this->formattedDuration = $this->durationInterval->format(get_lang('%Hh%I'));
}
if (property_exists($this, 'id')) {
$this->detailURL = 'meeting.php?meetingId=' . $this->id;
}
}
}

@ -1,9 +1,11 @@
<?php
/* For license terms, see /license.txt */
$course_plugin = 'zoom'; // needed in order to load the plugin lang variables
if (!isset($returnURL)) {
exit;
}
require_once __DIR__.'/config.php';
$course_plugin = 'zoom'; // needed in order to load the plugin lang variables
$logInfo = [
'tool' => 'Videoconference Zoom',
@ -49,7 +51,10 @@ if ($plugin->userIsConferenceManager()) {
$meeting->agenda = $editMeetingForm->getSubmitValue('agenda');
try {
$plugin->updateMeeting($meeting->id, $meeting);
$meeting = $plugin->getMeeting($meeting->id);
Display::addFlash(
Display::return_message(get_lang('MeetingUpdated'), 'confirm')
);
location($returnURL);
} catch (Exception $exception) {
Display::addFlash(
Display::return_message($exception->getMessage(), 'error')
@ -83,7 +88,7 @@ if ($plugin->userIsConferenceManager()) {
Display::addFlash(
Display::return_message(get_lang('MeetingDeleted'), 'confirm')
);
location(api_get_course_url() ?: (api_is_platform_admin() ? 'admin.php' : api_get_path(WEB_PATH)));
location($returnURL);
} catch (Exception $exception) {
Display::addFlash(
Display::return_message($exception->getMessage(), 'error')

@ -0,0 +1,6 @@
<?php
/* For license terms, see /license.txt */
require_once __DIR__.'/config.php';
$returnURL = 'admin.php';
include "meeting.php";

@ -0,0 +1,6 @@
<?php
/* For license terms, see /license.txt */
require_once __DIR__.'/config.php';
$returnURL = 'start.php?cId='.api_get_course_id().'&sessionId='.api_get_session_id();
include "meeting.php";

@ -17,7 +17,7 @@
<td>{{ meeting.session ? meeting.session.name : '-' }}</td>
<td>{{ meeting.topic }}</td>
<td>
<a class="btn" href="{{ meeting.detailURL }} ">
<a class="btn" href="meeting_from_admin.php?meetingId={{ meeting.id }}">
{{ 'Details'|get_lang }}
</a>
</td>

@ -1,12 +1,11 @@
{% if createInstantMeetingForm %}
{{ createInstantMeetingForm }}
{% endif %}
<div class ="col-md-12">
{% if scheduledMeetings %}
<div class="page-header">
{% if scheduledMeetings %}
<div class="page-header">
<h2>{{ 'ScheduledMeetings'|get_lang }}</h2>
</div>
<table class="table">
</div>
<table class="table">
<tr>
<!-- th>{{ 'CreatedAt'|get_lang }}</th -->
<th>{{ 'StartTime'|get_lang }}</th>
@ -23,23 +22,23 @@
<!-- td>{{ meeting.typeName }}</td -->
<td>
<strong>{{ meeting.topic }}</strong>
<p class="small">{{ meeting.agenda| nl2br }}</p>
<p class="small">{{ meeting.agenda|nl2br }}</p>
</td>
<td>
<a class="btn" href="{{ meeting.detailURL }} ">
<a class="btn" href="meeting_from_start.php?meetingId={{ meeting.id }}">
{{ 'Details'|get_lang }}
</a>
<a class="btn" href="{{ meeting.join_url }} ">
<a class="btn" href="{{ meeting.join_url }}">
{{ 'Join'|get_lang }}
</a>
</td>
</tr>
{% endfor %}
</table>
{% else %}
<!-- p>No scheduled meeting currently</p -->
{% endif %}
{% if scheduleMeetingForm %}
<h3>{{ 'ScheduleMeeting'|get_lang }}</h3>
{{ scheduleMeetingForm }}
</table>
{% else %}
<!-- p>No scheduled meeting currently</p -->
{% endif %}
{% if scheduleMeetingForm %}
<h3>{{ 'ScheduleMeeting'|get_lang }}</h3>
{{ scheduleMeetingForm }}
{% endif %}
Loading…
Cancel
Save