|
@@ -9,12 +9,12 @@ discard block |
|
|
block discarded – undo |
|
9
|
9
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
|
10
|
10
|
*/ |
|
11
|
11
|
|
|
12
|
|
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
13
|
|
-require_once(dirname(__FILE__).'/locallib.php'); |
|
|
12
|
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
|
13
|
+require_once(dirname(__FILE__) . '/locallib.php'); |
|
14
|
14
|
|
|
15
|
|
-$id = required_param('id', PARAM_INT); // Course Module ID, or |
|
16
|
|
-$b = optional_param('n', 0, PARAM_INT); // bigbluebuttonbn instance ID |
|
17
|
|
-$group = optional_param('group', 0, PARAM_INT); // group instance ID |
|
|
15
|
+$id = required_param('id', PARAM_INT); // Course Module ID, or |
|
|
16
|
+$b = optional_param('n', 0, PARAM_INT); // bigbluebuttonbn instance ID |
|
|
17
|
+$group = optional_param('group', 0, PARAM_INT); // group instance ID |
|
18
|
18
|
|
|
19
|
19
|
if ($id) { |
|
20
|
20
|
$cm = get_coursemodule_from_id('bigbluebuttonbn', $id, 0, false, MUST_EXIST); |
|
@@ -31,7 +31,7 @@ discard block |
|
|
block discarded – undo |
|
31
|
31
|
require_login($course, true, $cm); |
|
32
|
32
|
|
|
33
|
33
|
$version_major = bigbluebuttonbn_get_moodle_version_major(); |
|
34
|
|
-if ( $version_major < '2013111800' ) { |
|
|
34
|
+if ($version_major < '2013111800') { |
|
35
|
35
|
//This is valid before v2.6 |
|
36
|
36
|
$module = $DB->get_record('modules', array('name' => 'bigbluebuttonbn')); |
|
37
|
37
|
$module_version = $module->version; |
|
@@ -56,7 +56,7 @@ discard block |
|
|
block discarded – undo |
|
56
|
56
|
$bbbsession['roles'] = get_user_roles($context, $USER->id, true); |
|
57
|
57
|
|
|
58
|
58
|
// User roles |
|
59
|
|
-if( $bigbluebuttonbn->participants == null || $bigbluebuttonbn->participants == "" || $bigbluebuttonbn->participants == "[]" ){ |
|
|
59
|
+if ($bigbluebuttonbn->participants == null || $bigbluebuttonbn->participants == "" || $bigbluebuttonbn->participants == "[]") { |
|
60
|
60
|
//The room that is being used comes from a previous version |
|
61
|
61
|
$bbbsession['moderator'] = has_capability('mod/bigbluebuttonbn:moderate', $context); |
|
62
|
62
|
} else { |
|
@@ -76,16 +76,16 @@ discard block |
|
|
block discarded – undo |
|
76
|
76
|
// Database info related to the activity |
|
77
|
77
|
$bbbsession['meetingdescription'] = $bigbluebuttonbn->intro; |
|
78
|
78
|
$bbbsession['welcome'] = $bigbluebuttonbn->welcome; |
|
79
|
|
-if( !isset($bbbsession['welcome']) || $bbbsession['welcome'] == '') { |
|
|
79
|
+if (!isset($bbbsession['welcome']) || $bbbsession['welcome'] == '') { |
|
80
|
80
|
$bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
|
81
|
81
|
} |
|
82
|
82
|
|
|
83
|
|
-$bbbsession['userlimit'] = bigbluebuttonbn_get_cfg_userlimit_editable()? intval($bigbluebuttonbn->userlimit): intval(bigbluebuttonbn_get_cfg_userlimit_default()); |
|
84
|
|
-$bbbsession['voicebridge'] = ($bigbluebuttonbn->voicebridge > 0)? 70000 + $bigbluebuttonbn->voicebridge: $bigbluebuttonbn->voicebridge; |
|
|
83
|
+$bbbsession['userlimit'] = bigbluebuttonbn_get_cfg_userlimit_editable() ? intval($bigbluebuttonbn->userlimit) : intval(bigbluebuttonbn_get_cfg_userlimit_default()); |
|
|
84
|
+$bbbsession['voicebridge'] = ($bigbluebuttonbn->voicebridge > 0) ? 70000 + $bigbluebuttonbn->voicebridge : $bigbluebuttonbn->voicebridge; |
|
85
|
85
|
$bbbsession['wait'] = $bigbluebuttonbn->wait; |
|
86
|
86
|
$bbbsession['record'] = $bigbluebuttonbn->record; |
|
87
|
|
-if( $bigbluebuttonbn->record ) |
|
88
|
|
- $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
|
87
|
+if ($bigbluebuttonbn->record) |
|
|
88
|
+ $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
89
|
89
|
$bbbsession['tagging'] = $bigbluebuttonbn->tagging; |
|
90
|
90
|
|
|
91
|
91
|
$bbbsession['openingtime'] = $bigbluebuttonbn->openingtime; |
|
@@ -104,29 +104,29 @@ discard block |
|
|
block discarded – undo |
|
104
|
104
|
$bbbsession['originServerName'] = $parsedUrl['host']; |
|
105
|
105
|
$bbbsession['originServerUrl'] = $CFG->wwwroot; |
|
106
|
106
|
$bbbsession['originServerCommonName'] = ''; |
|
107
|
|
-$bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.$module_version.')'; |
|
|
107
|
+$bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . $module_version . ')'; |
|
108
|
108
|
//////////////////////////////////////////////// |
|
109
|
109
|
///// BigBlueButton Session Setup Ends ///// |
|
110
|
110
|
//////////////////////////////////////////////// |
|
111
|
111
|
|
|
112
|
112
|
// Validates if the BigBlueButton server is running |
|
113
|
113
|
$serverVersion = bigbluebuttonbn_getServerVersion($bbbsession['endpoint']); |
|
114
|
|
-if ( !isset($serverVersion) ) { //Server is not working |
|
115
|
|
- if ( $bbbsession['administrator'] ) |
|
116
|
|
- print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' ); |
|
117
|
|
- else if ( $bbbsession['moderator'] ) |
|
118
|
|
- print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
|
114
|
+if (!isset($serverVersion)) { //Server is not working |
|
|
115
|
+ if ($bbbsession['administrator']) |
|
|
116
|
+ print_error('view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
|
117
|
+ else if ($bbbsession['moderator']) |
|
|
118
|
+ print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
119
|
119
|
else |
|
120
|
|
- print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
|
120
|
+ print_error('view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
121
|
121
|
} else { |
|
122
|
|
- $xml = bigbluebuttonbn_wrap_xml_load_file( bigbluebuttonbn_getMeetingsURL( $bbbsession['endpoint'], $bbbsession['shared_secret'] ) ); |
|
123
|
|
- if ( !isset($xml) || !isset($xml->returncode) || $xml->returncode == 'FAILED' ){ // The shared secret is wrong |
|
124
|
|
- if ( $bbbsession['administrator'] ) |
|
125
|
|
- print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' ); |
|
126
|
|
- else if ( $bbbsession['moderator'] ) |
|
127
|
|
- print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
|
122
|
+ $xml = bigbluebuttonbn_wrap_xml_load_file(bigbluebuttonbn_getMeetingsURL($bbbsession['endpoint'], $bbbsession['shared_secret'])); |
|
|
123
|
+ if (!isset($xml) || !isset($xml->returncode) || $xml->returncode == 'FAILED') { // The shared secret is wrong |
|
|
124
|
+ if ($bbbsession['administrator']) |
|
|
125
|
+ print_error('view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
|
126
|
+ else if ($bbbsession['moderator']) |
|
|
127
|
+ print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
128
|
128
|
else |
|
129
|
|
- print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
|
129
|
+ print_error('view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
130
|
130
|
} |
|
131
|
131
|
} |
|
132
|
132
|
|
|
@@ -136,12 +136,12 @@ discard block |
|
|
block discarded – undo |
|
136
|
136
|
|
|
137
|
137
|
// Print the page header |
|
138
|
138
|
$PAGE->set_context($context); |
|
139
|
|
-$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
|
139
|
+$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
140
|
140
|
$PAGE->set_title(format_string($bigbluebuttonbn->name)); |
|
141
|
141
|
$PAGE->set_cacheable(false); |
|
142
|
142
|
$PAGE->set_heading($course->fullname); |
|
143
|
143
|
|
|
144
|
|
-if( $bigbluebuttonbn->newwindow == 1 ) { |
|
|
144
|
+if ($bigbluebuttonbn->newwindow == 1) { |
|
145
|
145
|
$PAGE->blocks->show_only_fake_blocks(); |
|
146
|
146
|
|
|
147
|
147
|
} else { |
|
@@ -149,14 +149,14 @@ discard block |
|
|
block discarded – undo |
|
149
|
149
|
} |
|
150
|
150
|
|
|
151
|
151
|
// Validate if the user is in a role allowed to join |
|
152
|
|
-if ( !has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context) ) { |
|
|
152
|
+if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
|
153
|
153
|
echo $OUTPUT->header(); |
|
154
|
154
|
if (isguestuser()) { |
|
155
|
|
- echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
156
|
|
- get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
|
155
|
+ echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
|
156
|
+ get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
157
|
157
|
} else { |
|
158
|
|
- echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
159
|
|
- get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
|
158
|
+ echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
|
159
|
+ get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
160
|
160
|
} |
|
161
|
161
|
|
|
162
|
162
|
echo $OUTPUT->footer(); |
|
@@ -164,10 +164,10 @@ discard block |
|
|
block discarded – undo |
|
164
|
164
|
} |
|
165
|
165
|
|
|
166
|
166
|
// Operation URLs |
|
167
|
|
-$bbbsession['courseURL'] = $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course; |
|
168
|
|
-$bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id.'&bn='.$bbbsession['bigbluebuttonbn']->id; |
|
169
|
|
-$bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_ready'; |
|
170
|
|
-$bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$id.'&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; |
|
|
167
|
+$bbbsession['courseURL'] = $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course; |
|
|
168
|
+$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
|
|
169
|
+$bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_ready'; |
|
|
170
|
+$bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $id . '&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
171
|
171
|
|
|
172
|
172
|
$bigbluebuttonbn_view = ''; |
|
173
|
173
|
|
|
@@ -176,20 +176,20 @@ discard block |
|
|
block discarded – undo |
|
176
|
176
|
|
|
177
|
177
|
/// find out current groups mode |
|
178
|
178
|
$groupmode = groups_get_activity_groupmode($bbbsession['cm']); |
|
179
|
|
-if ($groupmode == NOGROUPS ) { //No groups mode |
|
180
|
|
- $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.$bbbsession['bigbluebuttonbn']->id; |
|
|
179
|
+if ($groupmode == NOGROUPS) { //No groups mode |
|
|
180
|
+ $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . $bbbsession['bigbluebuttonbn']->id; |
|
181
|
181
|
$bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
|
182
|
182
|
|
|
183
|
183
|
} else { // Separate or visible groups mode |
|
184
|
184
|
echo $OUTPUT->box_start('generalbox boxaligncenter'); |
|
185
|
|
- echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn').'</div>'; |
|
|
185
|
+ echo '<br><div class="alert alert-warning">' . get_string('view_groups_selection_warning', 'bigbluebuttonbn') . '</div>'; |
|
186
|
186
|
echo $OUTPUT->box_end(); |
|
187
|
187
|
|
|
188
|
188
|
$bbbsession['group'] = groups_get_activity_group($bbbsession['cm'], true); |
|
189
|
|
- if ($groupmode == SEPARATEGROUPS ) { |
|
190
|
|
- groups_print_activity_menu($cm, $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, true); |
|
191
|
|
- if( $bbbsession['group'] == 0 ) { |
|
192
|
|
- if ( $bbbsession['administrator'] ) { |
|
|
189
|
+ if ($groupmode == SEPARATEGROUPS) { |
|
|
190
|
+ groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id, false, true); |
|
|
191
|
+ if ($bbbsession['group'] == 0) { |
|
|
192
|
+ if ($bbbsession['administrator']) { |
|
193
|
193
|
$my_groups = groups_get_all_groups($bbbsession['course']->id); |
|
194
|
194
|
} else { |
|
195
|
195
|
$my_groups = groups_get_activity_allowed_groups($bbbsession['cm']); |
|
@@ -199,15 +199,15 @@ discard block |
|
|
block discarded – undo |
|
199
|
199
|
} |
|
200
|
200
|
|
|
201
|
201
|
} else { |
|
202
|
|
- groups_print_activity_menu($cm, $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id); |
|
|
202
|
+ groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id); |
|
203
|
203
|
} |
|
204
|
204
|
|
|
205
|
|
- $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.$bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']'; |
|
206
|
|
- if( $bbbsession['group'] > 0 ) |
|
|
205
|
+ $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']'; |
|
|
206
|
+ if ($bbbsession['group'] > 0) |
|
207
|
207
|
$group_name = groups_get_group_name($bbbsession['group']); |
|
208
|
208
|
else |
|
209
|
209
|
$group_name = get_string('allparticipants'); |
|
210
|
|
- $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$group_name.')'; |
|
|
210
|
+ $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $group_name . ')'; |
|
211
|
211
|
} |
|
212
|
212
|
// Metadata (context) |
|
213
|
213
|
$bbbsession['contextActivityName'] = $bbbsession['meetingname']; |
|
@@ -215,7 +215,7 @@ discard block |
|
|
block discarded – undo |
|
215
|
215
|
$bbbsession['contextActivityTags'] = ""; |
|
216
|
216
|
|
|
217
|
217
|
$now = time(); |
|
218
|
|
-if (!empty($bigbluebuttonbn->openingtime) && $now < $bigbluebuttonbn->openingtime ) { |
|
|
218
|
+if (!empty($bigbluebuttonbn->openingtime) && $now < $bigbluebuttonbn->openingtime) { |
|
219
|
219
|
//CALLING BEFORE |
|
220
|
220
|
$bigbluebuttonbn_view = 'before'; |
|
221
|
221
|
|
|
@@ -248,7 +248,7 @@ discard block |
|
|
block discarded – undo |
|
248
|
248
|
'action' => $bigbluebuttonbn_view, |
|
249
|
249
|
'meetingid' => $bbbsession['meetingid'], |
|
250
|
250
|
'bigbluebuttonbnid' => $bbbsession['bigbluebuttonbn']->id, |
|
251
|
|
- 'ping_interval' => ($waitformoderator_ping_interval > 0? $waitformoderator_ping_interval * 1000: 15000), |
|
|
251
|
+ 'ping_interval' => ($waitformoderator_ping_interval > 0 ? $waitformoderator_ping_interval * 1000 : 15000), |
|
252
|
252
|
'userlimit' => $bbbsession['userlimit'], |
|
253
|
253
|
'locales' => bigbluebuttonbn_get_locales_for_ui() |
|
254
|
254
|
); |
|
@@ -265,7 +265,7 @@ discard block |
|
|
block discarded – undo |
|
265
|
265
|
// Finish the page |
|
266
|
266
|
echo $OUTPUT->footer(); |
|
267
|
267
|
|
|
268
|
|
-function bigbluebuttonbn_view_joining($bbbsession){ |
|
|
268
|
+function bigbluebuttonbn_view_joining($bbbsession) { |
|
269
|
269
|
global $CFG, $DB, $OUTPUT; |
|
270
|
270
|
|
|
271
|
271
|
echo $OUTPUT->heading($bbbsession['meetingname'], 3); |
|
@@ -274,29 +274,29 @@ discard block |
|
|
block discarded – undo |
|
274
|
274
|
echo '<br><span id="status_bar"></span><br>'; |
|
275
|
275
|
echo '<span id="control_panel"></span>'; |
|
276
|
276
|
echo $OUTPUT->box_end(); |
|
277
|
|
- if( $bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator']) ){ |
|
278
|
|
- echo ''. |
|
279
|
|
- '<div id="panelContent" class="hidden">'. |
|
280
|
|
- ' <div class="yui3-widget-bd">'. |
|
281
|
|
- ' <form>'. |
|
282
|
|
- ' <fieldset>'. |
|
283
|
|
- ' <input type="hidden" name="join" id="meeting_join_url" value="">'. |
|
284
|
|
- ' <input type="hidden" name="message" id="meeting_message" value="">'. |
|
285
|
|
- ' <div>'. |
|
286
|
|
- ' <label for="name">'.get_string('view_recording_name', 'bigbluebuttonbn').'</label><br/>'. |
|
287
|
|
- ' <input type="text" name="name" id="recording_name" placeholder="">'. |
|
288
|
|
- ' </div><br>'. |
|
289
|
|
- ' <div>'. |
|
290
|
|
- ' <label for="description">'.get_string('view_recording_description', 'bigbluebuttonbn').'</label><br/>'. |
|
291
|
|
- ' <input type="text" name="description" id="recording_description" value="" placeholder="">'. |
|
292
|
|
- ' </div><br>'. |
|
293
|
|
- ' <div>'. |
|
294
|
|
- ' <label for="tags">'.get_string('view_recording_tags', 'bigbluebuttonbn').'</label><br/>'. |
|
295
|
|
- ' <input type="text" name="tags" id="recording_tags" value="" placeholder="">'. |
|
296
|
|
- ' </div>'. |
|
297
|
|
- ' </fieldset>'. |
|
298
|
|
- ' </form>'. |
|
299
|
|
- ' </div>'. |
|
|
277
|
+ if ($bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator'])) { |
|
|
278
|
+ echo '' . |
|
|
279
|
+ '<div id="panelContent" class="hidden">' . |
|
|
280
|
+ ' <div class="yui3-widget-bd">' . |
|
|
281
|
+ ' <form>' . |
|
|
282
|
+ ' <fieldset>' . |
|
|
283
|
+ ' <input type="hidden" name="join" id="meeting_join_url" value="">' . |
|
|
284
|
+ ' <input type="hidden" name="message" id="meeting_message" value="">' . |
|
|
285
|
+ ' <div>' . |
|
|
286
|
+ ' <label for="name">' . get_string('view_recording_name', 'bigbluebuttonbn') . '</label><br/>' . |
|
|
287
|
+ ' <input type="text" name="name" id="recording_name" placeholder="">' . |
|
|
288
|
+ ' </div><br>' . |
|
|
289
|
+ ' <div>' . |
|
|
290
|
+ ' <label for="description">' . get_string('view_recording_description', 'bigbluebuttonbn') . '</label><br/>' . |
|
|
291
|
+ ' <input type="text" name="description" id="recording_description" value="" placeholder="">' . |
|
|
292
|
+ ' </div><br>' . |
|
|
293
|
+ ' <div>' . |
|
|
294
|
+ ' <label for="tags">' . get_string('view_recording_tags', 'bigbluebuttonbn') . '</label><br/>' . |
|
|
295
|
+ ' <input type="text" name="tags" id="recording_tags" value="" placeholder="">' . |
|
|
296
|
+ ' </div>' . |
|
|
297
|
+ ' </fieldset>' . |
|
|
298
|
+ ' </form>' . |
|
|
299
|
+ ' </div>' . |
|
300
|
300
|
'</div>'; |
|
301
|
301
|
} |
|
302
|
302
|
|
|
@@ -307,19 +307,19 @@ discard block |
|
|
block discarded – undo |
|
307
|
307
|
bigbluebuttonbn_view_recordings($bbbsession); |
|
308
|
308
|
} |
|
309
|
309
|
|
|
310
|
|
-function bigbluebuttonbn_view_before( $bbbsession ){ |
|
|
310
|
+function bigbluebuttonbn_view_before($bbbsession) { |
|
311
|
311
|
global $CFG, $DB, $OUTPUT; |
|
312
|
312
|
|
|
313
|
313
|
echo $OUTPUT->heading(get_string('view_message_conference_not_started', 'bigbluebuttonbn'), 3); |
|
314
|
314
|
|
|
315
|
315
|
echo '<table>'; |
|
316
|
316
|
if ($bbbsession['openingtime']) { |
|
317
|
|
- echo '<tr><td class="c0">'.get_string('mod_form_field_openingtime','bigbluebuttonbn').':</td>'; |
|
318
|
|
- echo ' <td class="c1">'.userdate($bbbsession['openingtime']).'</td></tr>'; |
|
|
317
|
+ echo '<tr><td class="c0">' . get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ':</td>'; |
|
|
318
|
+ echo ' <td class="c1">' . userdate($bbbsession['openingtime']) . '</td></tr>'; |
|
319
|
319
|
} |
|
320
|
320
|
if ($bbbsession['closingtime']) { |
|
321
|
|
- echo '<tr><td class="c0">'.get_string('mod_form_field_closingtime','bigbluebuttonbn').':</td>'; |
|
322
|
|
- echo ' <td class="c1">'.userdate($bbbsession['closingtime']).'</td></tr>'; |
|
|
321
|
+ echo '<tr><td class="c0">' . get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ':</td>'; |
|
|
322
|
+ echo ' <td class="c1">' . userdate($bbbsession['closingtime']) . '</td></tr>'; |
|
323
|
323
|
} |
|
324
|
324
|
echo '</table>'; |
|
325
|
325
|
} |
|
@@ -329,13 +329,13 @@ discard block |
|
|
block discarded – undo |
|
329
|
329
|
|
|
330
|
330
|
echo $OUTPUT->heading(get_string('view_message_conference_has_ended', 'bigbluebuttonbn'), 3); |
|
331
|
331
|
|
|
332
|
|
- if( !is_null($bbbsession['presentation']['url']) ) { |
|
|
332
|
+ if (!is_null($bbbsession['presentation']['url'])) { |
|
333
|
333
|
$attributes = array('title' => $bbbsession['presentation']['name']); |
|
334
|
334
|
$icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
|
335
|
335
|
|
|
336
|
|
- echo '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
337
|
|
- ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
|
338
|
|
- ''.$OUTPUT->action_link($bbbsession['presentation']['url'], $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
|
336
|
+ echo '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
|
337
|
+ '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' . |
|
|
338
|
+ '' . $OUTPUT->action_link($bbbsession['presentation']['url'], $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
339
|
339
|
} |
|
340
|
340
|
|
|
341
|
341
|
bigbluebuttonbn_view_recordings($bbbsession); |
|
@@ -344,13 +344,13 @@ discard block |
|
|
block discarded – undo |
|
344
|
344
|
function bigbluebuttonbn_view_recordings($bbbsession) { |
|
345
|
345
|
global $CFG; |
|
346
|
346
|
|
|
347
|
|
- if( isset($bbbsession['record']) && $bbbsession['record'] ) { |
|
348
|
|
- $output = html_writer::tag('h4', get_string('view_section_title_recordings', 'bigbluebuttonbn') ); |
|
|
347
|
+ if (isset($bbbsession['record']) && $bbbsession['record']) { |
|
|
348
|
+ $output = html_writer::tag('h4', get_string('view_section_title_recordings', 'bigbluebuttonbn')); |
|
349
|
349
|
|
|
350
|
|
- $meetingID=''; |
|
|
350
|
+ $meetingID = ''; |
|
351
|
351
|
$results = bigbluebuttonbn_getRecordedMeetings($bbbsession['course']->id, $bbbsession['bigbluebuttonbn']->id); |
|
352
|
352
|
|
|
353
|
|
- if( $results ){ |
|
|
353
|
+ if ($results) { |
|
354
|
354
|
//Eliminates duplicates |
|
355
|
355
|
$mIDs = array(); |
|
356
|
356
|
foreach ($results as $result) { |
|
@@ -364,7 +364,7 @@ discard block |
|
|
block discarded – undo |
|
364
|
364
|
} |
|
365
|
365
|
|
|
366
|
366
|
// Get actual recordings |
|
367
|
|
- if ( $meetingID != '' ) { |
|
|
367
|
+ if ($meetingID != '') { |
|
368
|
368
|
$recordings = bigbluebuttonbn_getRecordingsArray($meetingID, $bbbsession['endpoint'], $bbbsession['shared_secret']); |
|
369
|
369
|
} else { |
|
370
|
370
|
$recordings = Array(); |
|
@@ -372,12 +372,12 @@ discard block |
|
|
block discarded – undo |
|
372
|
372
|
// Get recording links |
|
373
|
373
|
$recordings_imported = bigbluebuttonbn_getRecordingsImportedArray($bbbsession['course']->id, $bbbsession['bigbluebuttonbn']->id); |
|
374
|
374
|
// Merge the recordings |
|
375
|
|
- $recordings = array_merge( $recordings, $recordings_imported ); |
|
|
375
|
+ $recordings = array_merge($recordings, $recordings_imported); |
|
376
|
376
|
// Render the table |
|
377
|
|
- $output .= bigbluebutton_output_recording_table($bbbsession, $recordings)."\n"; |
|
|
377
|
+ $output .= bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n"; |
|
378
|
378
|
|
|
379
|
|
- if ( $bbbsession['managerecordings'] && bigbluebuttonbn_get_cfg_importrecordings_enabled() ) { |
|
380
|
|
- $button_import_recordings = html_writer::tag( 'input', '', array('type' => 'button', 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.$bbbsession['bigbluebuttonbn']->id.'\'') ); |
|
|
379
|
+ if ($bbbsession['managerecordings'] && bigbluebuttonbn_get_cfg_importrecordings_enabled()) { |
|
|
380
|
+ $button_import_recordings = html_writer::tag('input', '', array('type' => 'button', 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
381
|
381
|
$output .= html_writer::start_tag('br'); |
|
382
|
382
|
$output .= html_writer::tag('span', $button_import_recordings, ['id'=>"import_recording_links_button"]); |
|
383
|
383
|
$output .= html_writer::tag('span', '', ['id'=>"import_recording_links_table"]); |