Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

pull/3446/head
Yannick Warnier 5 years ago
commit e50072fcc8
  1. 2
      plugin/bbb/listing.php
  2. 42
      plugin/zoom/start.php
  3. 16
      plugin/zoom/view/start.tpl

@ -353,7 +353,7 @@ if ($bbb->isGlobalConference() === false &&
) {
$url = api_get_self().'?'.api_get_cidreq(true, false).'&gidReq=';
$htmlHeadXtra[] = '<script>
$(document).ready(function() {
$(function() {
$("#group_select").on("change", function() {
var groupId = $(this).find("option:selected").val();
var url = "'.$url.'";

@ -8,7 +8,6 @@ require_once __DIR__.'/config.php';
api_protect_course_script(true);
// the section (for the tabs)
$this_section = SECTION_COURSES;
$logInfo = [
'tool' => 'Videoconference Zoom',
@ -24,7 +23,7 @@ $group = api_get_group_entity();
$session = api_get_session_entity();
$plugin = ZoomPlugin::create();
if (api_is_in_group()) {
if (null !== $group) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(),
'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');
$tpl = new Template($tool_name);
@ -42,6 +52,26 @@ $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
$isManager = $plugin->userIsCourseConferenceManager();
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) {
case 'delete':
$meeting = $plugin->getMeetingRepository()->findOneBy(['meetingId' => $_REQUEST['meetingId']]);
@ -52,9 +82,9 @@ if ($isManager) {
}
$user = api_get_user_entity(api_get_user_id());
// user can create a new meeting
$tpl->assign(
'createInstantMeetingForm',
'instant_meeting_form',
$plugin->getCreateInstantMeetingForm(
$user,
$course,
@ -63,7 +93,7 @@ if ($isManager) {
)->returnForm()
);
$tpl->assign(
'scheduleMeetingForm',
'schedule_meeting_form',
$plugin->getScheduleMeetingForm(
$user,
$course,
@ -75,7 +105,7 @@ if ($isManager) {
try {
$tpl->assign(
'scheduledMeetings',
'meetings',
$plugin->getMeetingRepository()->courseMeetings($course, $group, $session)
);
} catch (Exception $exception) {

@ -1,8 +1,12 @@
{% if createInstantMeetingForm %}
{{ createInstantMeetingForm }}
{% if instant_meeting_form %}
{{ instant_meeting_form }}
{% endif %}
{% if scheduledMeetings.count %}
{% if group_form %}
{{ group_form }}
{% endif %}
{% if meetings.count %}
<div class="page-header">
<h2>{{ 'ScheduledMeetings'|get_lang }}</h2>
</div>
@ -14,7 +18,7 @@
<th>{{ 'Duration'|get_lang }}</th>
<th>{{ 'Actions'|get_lang }}</th>
</tr>
{% for meeting in scheduledMeetings %}
{% for meeting in meetings %}
<tr>
<td>
{{ meeting.meetingInfoGet.topic }}
@ -47,6 +51,6 @@
</table>
{% endif %}
{% if scheduleMeetingForm %}
{{ scheduleMeetingForm }}
{% if schedule_meeting_form %}
{{ schedule_meeting_form }}
{% endif %}
Loading…
Cancel
Save