Skip to content

Commit e50072f

Browse files
committed
Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x
2 parents 541014e + 2daf032 commit e50072f

File tree

3 files changed

+47
-13
lines changed

3 files changed

+47
-13
lines changed

plugin/bbb/listing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@
353353
) {
354354
$url = api_get_self().'?'.api_get_cidreq(true, false).'&gidReq=';
355355
$htmlHeadXtra[] = '<script>
356-
$(document).ready(function() {
356+
$(function() {
357357
$("#group_select").on("change", function() {
358358
var groupId = $(this).find("option:selected").val();
359359
var url = "'.$url.'";

plugin/zoom/start.php

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
api_protect_course_script(true);
1010

11-
// the section (for the tabs)
1211
$this_section = SECTION_COURSES;
1312
$logInfo = [
1413
'tool' => 'Videoconference Zoom',
@@ -24,7 +23,7 @@
2423
$session = api_get_session_entity();
2524
$plugin = ZoomPlugin::create();
2625

27-
if (api_is_in_group()) {
26+
if (null !== $group) {
2827
$interbreadcrumb[] = [
2928
'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(),
3029
'name' => get_lang('Groups'),
@@ -35,13 +34,44 @@
3534
];
3635
}
3736

37+
$url = api_get_self().'?'.api_get_cidreq(true, false).'&gidReq=';
38+
$htmlHeadXtra[] = '<script>
39+
$(function() {
40+
$("#group_select").on("change", function() {
41+
var groupId = $(this).find("option:selected").val();
42+
var url = "'.$url.'";
43+
window.location.replace(url+groupId);
44+
});
45+
});
46+
</script>';
47+
3848
$tool_name = $plugin->get_lang('ZoomVideoConferences');
3949
$tpl = new Template($tool_name);
4050

4151
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
4252

4353
$isManager = $plugin->userIsCourseConferenceManager();
4454
if ($isManager) {
55+
$groupId = api_get_group_id();
56+
$groups = GroupManager::get_groups();
57+
if (!empty($groups)) {
58+
59+
$form = new FormValidator('group_filter');
60+
$groupList[0] = get_lang('Select');
61+
foreach ($groups as $groupData) {
62+
$itemGroupId = $groupData['iid'];
63+
/*if (isset($meetingsGroup[$itemGroupId]) && $meetingsGroup[$itemGroupId] == 1) {
64+
$groupData['name'] .= ' ('.get_lang('Active').')';
65+
}*/
66+
$groupList[$itemGroupId] = $groupData['name'];
67+
}
68+
$form->addSelect('group_id', get_lang('Groups'), $groupList, ['id' => 'group_select']);
69+
$form->setDefaults(['group_id' => $groupId]);
70+
$formToString = $form->returnForm();
71+
72+
$tpl->assign('group_form', $formToString);
73+
}
74+
4575
switch ($action) {
4676
case 'delete':
4777
$meeting = $plugin->getMeetingRepository()->findOneBy(['meetingId' => $_REQUEST['meetingId']]);
@@ -52,9 +82,9 @@
5282
}
5383

5484
$user = api_get_user_entity(api_get_user_id());
55-
// user can create a new meeting
85+
5686
$tpl->assign(
57-
'createInstantMeetingForm',
87+
'instant_meeting_form',
5888
$plugin->getCreateInstantMeetingForm(
5989
$user,
6090
$course,
@@ -63,7 +93,7 @@
6393
)->returnForm()
6494
);
6595
$tpl->assign(
66-
'scheduleMeetingForm',
96+
'schedule_meeting_form',
6797
$plugin->getScheduleMeetingForm(
6898
$user,
6999
$course,
@@ -75,7 +105,7 @@
75105

76106
try {
77107
$tpl->assign(
78-
'scheduledMeetings',
108+
'meetings',
79109
$plugin->getMeetingRepository()->courseMeetings($course, $group, $session)
80110
);
81111
} catch (Exception $exception) {

plugin/zoom/view/start.tpl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
{% if createInstantMeetingForm %}
2-
{{ createInstantMeetingForm }}
1+
{% if instant_meeting_form %}
2+
{{ instant_meeting_form }}
33
{% endif %}
44

5-
{% if scheduledMeetings.count %}
5+
{% if group_form %}
6+
{{ group_form }}
7+
{% endif %}
8+
9+
{% if meetings.count %}
610
<div class="page-header">
711
<h2>{{ 'ScheduledMeetings'|get_lang }}</h2>
812
</div>
@@ -14,7 +18,7 @@
1418
<th>{{ 'Duration'|get_lang }}</th>
1519
<th>{{ 'Actions'|get_lang }}</th>
1620
</tr>
17-
{% for meeting in scheduledMeetings %}
21+
{% for meeting in meetings %}
1822
<tr>
1923
<td>
2024
{{ meeting.meetingInfoGet.topic }}
@@ -47,6 +51,6 @@
4751
</table>
4852
{% endif %}
4953

50-
{% if scheduleMeetingForm %}
51-
{{ scheduleMeetingForm }}
54+
{% if schedule_meeting_form %}
55+
{{ schedule_meeting_form }}
5256
{% endif %}

0 commit comments

Comments
 (0)