@@ -198,10 +198,10 @@ discard block |
||
198 | 198 | */ |
199 | 199 | function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession) { |
200 | 200 | $data = ['meetingID' => $bbbsession['meetingid'], |
201 | - 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
202 | - 'attendeePW' => $bbbsession['viewerPW'], |
|
203 | - 'moderatorPW' => $bbbsession['modPW'], |
|
204 | - 'logoutURL' => $bbbsession['logoutURL'], |
|
201 | + 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
202 | + 'attendeePW' => $bbbsession['viewerPW'], |
|
203 | + 'moderatorPW' => $bbbsession['modPW'], |
|
204 | + 'logoutURL' => $bbbsession['logoutURL'], |
|
205 | 205 | ]; |
206 | 206 | $data['record'] = bigbluebutton_bbb_view_create_meeting_data_record($bbbsession['record']); |
207 | 207 | $data['welcome'] = trim($bbbsession['welcome']); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | '%duration%', |
215 | 215 | (string) $durationtime, |
216 | 216 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
217 | - ); |
|
217 | + ); |
|
218 | 218 | } |
219 | 219 | $voicebridge = intval($bbbsession['voicebridge']); |
220 | 220 | if ($voicebridge > 0 && $voicebridge < 79999) { |
@@ -253,22 +253,22 @@ discard block |
||
253 | 253 | function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) { |
254 | 254 | global $USER; |
255 | 255 | $metadata = ['bbb-origin' => $bbbsession['origin'], |
256 | - 'bbb-origin-version' => $bbbsession['originVersion'], |
|
257 | - 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
258 | - 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
259 | - 'bbb-origin-tag' => $bbbsession['originTag'], |
|
260 | - 'bbb-context' => $bbbsession['course']->fullname, |
|
261 | - 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
262 | - 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
263 | - 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
256 | + 'bbb-origin-version' => $bbbsession['originVersion'], |
|
257 | + 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
258 | + 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
259 | + 'bbb-origin-tag' => $bbbsession['originTag'], |
|
260 | + 'bbb-context' => $bbbsession['course']->fullname, |
|
261 | + 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
262 | + 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
263 | + 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
264 | 264 | ]; |
265 | 265 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
266 | 266 | $metadata["bn-recording-status"] = json_encode( |
267 | 267 | array( |
268 | 268 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
269 | 269 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
270 | - ) |
|
271 | - ); |
|
270 | + ) |
|
271 | + ); |
|
272 | 272 | } |
273 | 273 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
274 | 274 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
@@ -77,8 +77,8 @@ |
||
77 | 77 | $body .= html_writer::start_tag('br'); |
78 | 78 | $body .= html_writer::tag('input', '', |
79 | 79 | array('type' => 'button', 'class' => 'btn btn-secondary', |
80 | - 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
81 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
80 | + 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
81 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
82 | 82 | // JavaScript for locales. |
83 | 83 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
84 | 84 | // Require JavaScript modules. |
@@ -152,31 +152,31 @@ |
||
152 | 152 | */ |
153 | 153 | public static function get_options() { |
154 | 154 | return array( |
155 | - 'version_major' => self::get_moodle_version_major(), |
|
156 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
157 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
158 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
159 | - 'userlimit_default' => self::get('userlimit_default'), |
|
160 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
161 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
162 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
163 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
164 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
165 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
166 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
167 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
168 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
169 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
170 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
171 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
172 | - 'recording_default' => self::get('recording_default'), |
|
173 | - 'recording_editable' => self::get('recording_editable'), |
|
174 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
175 | - 'general_warning_message' => self::get('general_warning_message'), |
|
176 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
177 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
178 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
179 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
180 | - ); |
|
155 | + 'version_major' => self::get_moodle_version_major(), |
|
156 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
157 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
158 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
159 | + 'userlimit_default' => self::get('userlimit_default'), |
|
160 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
161 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
162 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
163 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
164 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
165 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
166 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
167 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
168 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
169 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
170 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
171 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
172 | + 'recording_default' => self::get('recording_default'), |
|
173 | + 'recording_editable' => self::get('recording_editable'), |
|
174 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
175 | + 'general_warning_message' => self::get('general_warning_message'), |
|
176 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
177 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
178 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
179 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
180 | + ); |
|
181 | 181 | } |
182 | 182 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * recordings from a different activity even from a different course. |
99 | 99 | **/ |
100 | 100 | |
101 | - /* |
|
101 | + /* |
|
102 | 102 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
103 | 103 | * activities will have the 'import recordings' capability enabled. |
104 | 104 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * 'Join session' button enabled |
120 | 120 | **/ |
121 | 121 | |
122 | - /* |
|
122 | + /* |
|
123 | 123 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
124 | 124 | * activities will have the 'wait for moderator' capability enabled by |
125 | 125 | * default. |
@@ -259,13 +259,13 @@ discard block |
||
259 | 259 | * $CFG->bigbluebuttonbn['recordings_imported_editable'] = 1; |
260 | 260 | */ |
261 | 261 | |
262 | - /* |
|
262 | + /* |
|
263 | 263 | * When the value is set to 1 (checked) the bigbluebuttonbn resources |
264 | 264 | * will show the recodings with thumbnails. |
265 | 265 | * $CFG->bigbluebuttonbn['recordings_preview_default'] = 1; |
266 | 266 | */ |
267 | 267 | |
268 | - /* |
|
268 | + /* |
|
269 | 269 | * When the value is set to 1 (checked) the 'preview ui' capability can be |
270 | 270 | * enabled/disabled by the user creating or editing the resource. |
271 | 271 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
@@ -310,27 +310,27 @@ discard block |
||
310 | 310 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
311 | 311 | */ |
312 | 312 | |
313 | - /* |
|
313 | + /* |
|
314 | 314 | * The warning box is always shown to administrators, but it is also possible to define other roles |
315 | 315 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
316 | 316 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
317 | 317 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
318 | 318 | */ |
319 | 319 | |
320 | - /* |
|
320 | + /* |
|
321 | 321 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
322 | 322 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
323 | 323 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
324 | 324 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
325 | 325 | */ |
326 | 326 | |
327 | - /* |
|
327 | + /* |
|
328 | 328 | * Additionally, when general_warning_button_href value is different than "", a button |
329 | 329 | * can also be shown right after the message. |
330 | 330 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
331 | 331 | */ |
332 | 332 | |
333 | - /* |
|
333 | + /* |
|
334 | 334 | * Finally, the text and class for the button can be modified |
335 | 335 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
336 | 336 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |
@@ -213,8 +213,8 @@ discard block |
||
213 | 213 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
214 | 214 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
215 | 215 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
216 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
217 | - ); |
|
216 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
217 | + ); |
|
218 | 218 | } else { |
219 | 219 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
220 | 220 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | */ |
253 | 253 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
254 | 254 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
255 | - 'description_key' => null]; |
|
255 | + 'description_key' => null]; |
|
256 | 256 | if ($cfg['recordings_html_editable']) { |
257 | 257 | $field['type'] = 'checkbox'; |
258 | 258 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
261 | 261 | $field['description_key'], $cfg['recordings_html_default']); |
262 | 262 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
263 | - 'description_key' => null]; |
|
263 | + 'description_key' => null]; |
|
264 | 264 | if ($cfg['recordings_deleted_editable']) { |
265 | 265 | $field['type'] = 'checkbox'; |
266 | 266 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
269 | 269 | $field['description_key'], $cfg['recordings_deleted_default']); |
270 | 270 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
271 | - 'description_key' => null]; |
|
271 | + 'description_key' => null]; |
|
272 | 272 | if ($cfg['recordings_imported_editable']) { |
273 | 273 | $field['type'] = 'checkbox'; |
274 | 274 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
277 | 277 | $field['description_key'], $cfg['recordings_imported_default']); |
278 | 278 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
279 | - 'description_key' => null]; |
|
279 | + 'description_key' => null]; |
|
280 | 280 | if ($cfg['recordings_preview_editable']) { |
281 | 281 | $field['type'] = 'checkbox'; |
282 | 282 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
348 | 348 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
349 | 349 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
350 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
350 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
351 | 351 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
352 | 352 | $participantselection['selected'], array(), |
353 | 353 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | 'type' => 'button', 'class' => 'btn btn-secondary', |
356 | 356 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
357 | 357 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
358 | - )); |
|
358 | + )); |
|
359 | 359 | $htmladdparticipant = html_writer::tag('div', |
360 | 360 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
361 | 361 | $mform->addElement('html', "\n\n"); |
@@ -123,9 +123,9 @@ discard block |
||
123 | 123 | */ |
124 | 124 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
125 | 125 | $data = ['meetingID' => $meetingid, |
126 | - 'fullName' => $username, |
|
127 | - 'password' => $pw, |
|
128 | - 'logoutURL' => $logouturl, |
|
126 | + 'fullName' => $username, |
|
127 | + 'password' => $pw, |
|
128 | + 'logoutURL' => $logouturl, |
|
129 | 129 | ]; |
130 | 130 | if (!is_null($configtoken)) { |
131 | 131 | $data['configToken'] = $configtoken; |
@@ -177,23 +177,23 @@ discard block |
||
177 | 177 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
178 | 178 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
179 | 179 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
180 | - ); |
|
180 | + ); |
|
181 | 181 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
182 | 182 | // Meeting info was returned. |
183 | 183 | return array('returncode' => $xml->returncode, |
184 | - 'meetingID' => $xml->meetingID, |
|
185 | - 'moderatorPW' => $xml->moderatorPW, |
|
186 | - 'attendeePW' => $xml->attendeePW, |
|
187 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
188 | - 'running' => $xml->running, |
|
189 | - 'recording' => $xml->recording, |
|
190 | - 'startTime' => $xml->startTime, |
|
191 | - 'endTime' => $xml->endTime, |
|
192 | - 'participantCount' => $xml->participantCount, |
|
193 | - 'moderatorCount' => $xml->moderatorCount, |
|
194 | - 'attendees' => $xml->attendees, |
|
195 | - 'metadata' => $xml->metadata, |
|
196 | - ); |
|
184 | + 'meetingID' => $xml->meetingID, |
|
185 | + 'moderatorPW' => $xml->moderatorPW, |
|
186 | + 'attendeePW' => $xml->attendeePW, |
|
187 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
188 | + 'running' => $xml->running, |
|
189 | + 'recording' => $xml->recording, |
|
190 | + 'startTime' => $xml->startTime, |
|
191 | + 'endTime' => $xml->endTime, |
|
192 | + 'participantCount' => $xml->participantCount, |
|
193 | + 'moderatorCount' => $xml->moderatorCount, |
|
194 | + 'attendees' => $xml->attendees, |
|
195 | + 'metadata' => $xml->metadata, |
|
196 | + ); |
|
197 | 197 | } |
198 | 198 | if ($xml) { |
199 | 199 | // Either failure or success without meeting info. |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | function bigbluebuttonbn_get_default_config_xml() { |
330 | 330 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
331 | 331 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
332 | - ); |
|
332 | + ); |
|
333 | 333 | return $xml; |
334 | 334 | } |
335 | 335 | |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | foreach ($ids as $id) { |
431 | 431 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
432 | 432 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
433 | - ); |
|
433 | + ); |
|
434 | 434 | if ($xml && $xml->returncode != 'SUCCESS') { |
435 | 435 | return false; |
436 | 436 | } |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | foreach ($ids as $id) { |
450 | 450 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
451 | 451 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
452 | - ); |
|
452 | + ); |
|
453 | 453 | if ($xml && $xml->returncode != 'SUCCESS') { |
454 | 454 | return false; |
455 | 455 | } |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | foreach ($ids as $id) { |
469 | 469 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
470 | 470 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
471 | - ); |
|
471 | + ); |
|
472 | 472 | if ($xml && $xml->returncode != 'SUCCESS') { |
473 | 473 | return false; |
474 | 474 | } |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
486 | 486 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
487 | 487 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
488 | - ); |
|
488 | + ); |
|
489 | 489 | if ($xml) { |
490 | 490 | // If the xml packet returned failure it displays the message to the user. |
491 | 491 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | */ |
506 | 506 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
507 | 507 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
508 | - ); |
|
508 | + ); |
|
509 | 509 | return ($xml && $xml->returncode == 'SUCCESS'); |
510 | 510 | } |
511 | 511 | |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | function bigbluebuttonbn_get_server_version() { |
518 | 518 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
519 | 519 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
520 | - ); |
|
520 | + ); |
|
521 | 521 | if ($xml && $xml->returncode == 'SUCCESS') { |
522 | 522 | return $xml->version; |
523 | 523 | } |
@@ -585,10 +585,10 @@ discard block |
||
585 | 585 | |
586 | 586 | $options = array(); |
587 | 587 | $options['CURLOPT_HTTPHEADER'] = array( |
588 | - 'Content-Type: '.$contenttype, |
|
589 | - 'Content-Length: '.strlen($data), |
|
590 | - 'Content-Language: en-US', |
|
591 | - ); |
|
588 | + 'Content-Type: '.$contenttype, |
|
589 | + 'Content-Length: '.strlen($data), |
|
590 | + 'Content-Language: en-US', |
|
591 | + ); |
|
592 | 592 | |
593 | 593 | return $c->post($url, $data, $options); |
594 | 594 | } |
@@ -731,16 +731,16 @@ discard block |
||
731 | 731 | 'all' => array( |
732 | 732 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
733 | 733 | 'children' => [] |
734 | - ) |
|
735 | - ); |
|
734 | + ) |
|
735 | + ); |
|
736 | 736 | $data['role'] = array( |
737 | 737 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
738 | 738 | 'children' => bigbluebuttonbn_get_roles_select($context) |
739 | - ); |
|
739 | + ); |
|
740 | 740 | $data['user'] = array( |
741 | 741 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
742 | 742 | 'children' => bigbluebuttonbn_get_users_select($context) |
743 | - ); |
|
743 | + ); |
|
744 | 744 | return $data; |
745 | 745 | } |
746 | 746 | |
@@ -785,9 +785,9 @@ discard block |
||
785 | 785 | continue; |
786 | 786 | } |
787 | 787 | $participantlistarray[] = array( |
788 | - 'selectiontype' => 'role', |
|
789 | - 'selectionid' => $moderatordefault, |
|
790 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
788 | + 'selectiontype' => 'role', |
|
789 | + 'selectionid' => $moderatordefault, |
|
790 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
791 | 791 | } |
792 | 792 | return $participantlistarray; |
793 | 793 | } |
@@ -830,11 +830,11 @@ discard block |
||
830 | 830 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
831 | 831 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
832 | 832 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
833 | - ], |
|
833 | + ], |
|
834 | 834 | 'type_selected' => 'all', |
835 | 835 | 'options' => ['all' => '---------------'], |
836 | 836 | 'selected' => 'all', |
837 | - ]; |
|
837 | + ]; |
|
838 | 838 | } |
839 | 839 | |
840 | 840 | /** |
@@ -1120,7 +1120,7 @@ discard block |
||
1120 | 1120 | $eventproperties['other'] = $options['other']; |
1121 | 1121 | } |
1122 | 1122 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
1123 | - array($eventproperties)); |
|
1123 | + array($eventproperties)); |
|
1124 | 1124 | $event->trigger(); |
1125 | 1125 | } |
1126 | 1126 | |
@@ -1164,7 +1164,7 @@ discard block |
||
1164 | 1164 | // Ping again and refresh the cache. |
1165 | 1165 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
1166 | 1166 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1167 | - ); |
|
1167 | + ); |
|
1168 | 1168 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
1169 | 1169 | return $meetinginfo; |
1170 | 1170 | } |
@@ -1534,8 +1534,8 @@ discard block |
||
1534 | 1534 | } |
1535 | 1535 | $id = 'playbacks-'.$recording['recordID']; |
1536 | 1536 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1537 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1538 | - 'title' => $title, $visibility => $visibility)); |
|
1537 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1538 | + 'title' => $title, $visibility => $visibility)); |
|
1539 | 1539 | foreach ($recording['playbacks'] as $playback) { |
1540 | 1540 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
1541 | 1541 | } |
@@ -1560,7 +1560,7 @@ discard block |
||
1560 | 1560 | $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
1561 | 1561 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
1562 | 1562 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1563 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1563 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1564 | 1564 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1565 | 1565 | $href .= '&href='.urlencode(trim($playback['url'])); |
1566 | 1566 | } |
@@ -1572,7 +1572,7 @@ discard block |
||
1572 | 1572 | 'data-target' => $playback['type'], |
1573 | 1573 | 'data-href' => $href, |
1574 | 1574 | 'class' => 'btn btn-sm btn-default' |
1575 | - ); |
|
1575 | + ); |
|
1576 | 1576 | return $OUTPUT->action_link('#', $title, null, $linkattributes) . ' '; |
1577 | 1577 | } |
1578 | 1578 | |
@@ -1686,10 +1686,10 @@ discard block |
||
1686 | 1686 | 'id' => $id, |
1687 | 1687 | 'onclick' => $onclick, |
1688 | 1688 | 'data-action' => $data['action'] |
1689 | - ); |
|
1689 | + ); |
|
1690 | 1690 | if (!isset($recording['imported'])) { |
1691 | 1691 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
1692 | - $recording['recordID']); |
|
1692 | + $recording['recordID']); |
|
1693 | 1693 | } |
1694 | 1694 | if (isset($data['disabled'])) { |
1695 | 1695 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2234,8 +2234,8 @@ discard block |
||
2234 | 2234 | $activitytime = ''; |
2235 | 2235 | if ($time) { |
2236 | 2236 | $activitytime = calendar_day_representation($time).' '. |
2237 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2238 | - calendar_time_representation($time); |
|
2237 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2238 | + calendar_time_representation($time); |
|
2239 | 2239 | } |
2240 | 2240 | return $activitytime; |
2241 | 2241 | } |
@@ -2535,7 +2535,7 @@ discard block |
||
2535 | 2535 | $renderer->render_group_element('participant_moderator_default', |
2536 | 2536 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
2537 | 2537 | array_keys($owner), array_merge($owner, $roles)) |
2538 | - ); |
|
2538 | + ); |
|
2539 | 2539 | } |
2540 | 2540 | } |
2541 | 2541 | |
@@ -2635,7 +2635,7 @@ discard block |
||
2635 | 2635 | return $output; |
2636 | 2636 | } |
2637 | 2637 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
2638 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2638 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2639 | 2639 | $output .= ' ' . $message . "\n"; |
2640 | 2640 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
2641 | 2641 | if (!empty($href)) { |
@@ -437,26 +437,26 @@ discard block |
||
437 | 437 | return array( |
438 | 438 | 'status' => false, |
439 | 439 | 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn') |
440 | - ); |
|
440 | + ); |
|
441 | 441 | } |
442 | 442 | if ($realrecordings[$params['id']]['published'] !== 'true') { |
443 | 443 | return array( |
444 | 444 | 'status' => false, |
445 | 445 | 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn') |
446 | - ); |
|
446 | + ); |
|
447 | 447 | } |
448 | 448 | return array( |
449 | 449 | 'status' => bigbluebuttonbn_publish_recording_imported( |
450 | 450 | $recordings[$params['id']]['imported'], true |
451 | 451 | ) |
452 | - ); |
|
452 | + ); |
|
453 | 453 | } |
454 | 454 | // As the recordingid was not identified as imported recording link, execute actual publish. |
455 | 455 | return array( |
456 | 456 | 'status' => bigbluebuttonbn_publish_recordings( |
457 | 457 | $params['id'], 'true' |
458 | 458 | ) |
459 | - ); |
|
459 | + ); |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | /** |
@@ -477,26 +477,26 @@ discard block |
||
477 | 477 | return array( |
478 | 478 | 'status' => false, |
479 | 479 | 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn') |
480 | - ); |
|
480 | + ); |
|
481 | 481 | } |
482 | 482 | if ($realrecordings[$params['id']]['protected'] === 'true') { |
483 | 483 | return array( |
484 | 484 | 'status' => false, |
485 | 485 | 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn') |
486 | - ); |
|
486 | + ); |
|
487 | 487 | } |
488 | 488 | return array( |
489 | 489 | 'status' => bigbluebuttonbn_protect_recording_imported( |
490 | 490 | $recordings[$params['id']]['imported'], false |
491 | 491 | ) |
492 | - ); |
|
492 | + ); |
|
493 | 493 | } |
494 | 494 | // As the recordingid was not identified as imported recording link, execute actual uprotect. |
495 | 495 | return array( |
496 | 496 | 'status' => bigbluebuttonbn_update_recordings( |
497 | 497 | $params['id'], array('protect' => 'false') |
498 | 498 | ) |
499 | - ); |
|
499 | + ); |
|
500 | 500 | } |
501 | 501 | |
502 | 502 | /** |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | 'status' => bigbluebuttonbn_publish_recording_imported( |
516 | 516 | $recordings[$params['id']]['imported'], false |
517 | 517 | ) |
518 | - ); |
|
518 | + ); |
|
519 | 519 | } |
520 | 520 | // As the recordingid was not identified as imported recording link, execute unpublish on a real recording. |
521 | 521 | // First: Unpublish imported links associated to the recording. |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | 'status' => bigbluebuttonbn_publish_recordings( |
534 | 534 | $params['id'], 'false' |
535 | 535 | ) |
536 | - ); |
|
536 | + ); |
|
537 | 537 | } |
538 | 538 | |
539 | 539 | /** |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | 'status' => bigbluebuttonbn_protect_recording_imported( |
553 | 553 | $recordings[$params['id']]['imported'], true |
554 | 554 | ) |
555 | - ); |
|
555 | + ); |
|
556 | 556 | } |
557 | 557 | // As the recordingid was not identified as imported recording link, execute protect on a real recording. |
558 | 558 | // First: Protect imported links associated to the recording. |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | 'status' => bigbluebuttonbn_update_recordings( |
571 | 571 | $params['id'], array('protect' => 'true') |
572 | 572 | ) |
573 | - ); |
|
573 | + ); |
|
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | 'status' => bigbluebuttonbn_delete_recording_imported( |
590 | 590 | $recordings[$params['id']]['imported'] |
591 | 591 | ) |
592 | - ); |
|
592 | + ); |
|
593 | 593 | } |
594 | 594 | // As the recordingid was not identified as imported recording link, execute delete on a real recording. |
595 | 595 | // First: Delete imported links associated to the recording. |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | // Second: Execute the actual delete. |
604 | 604 | return array( |
605 | 605 | 'status' => bigbluebuttonbn_delete_recordings($params['id']) |
606 | - ); |
|
606 | + ); |
|
607 | 607 | } |
608 | 608 | |
609 | 609 | /** |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | 'status' => bigbluebuttonbn_update_recording_imported( |
622 | 622 | $recordings[$params['id']]['imported'], json_decode($params['meta'], true) |
623 | 623 | ) |
624 | - ); |
|
624 | + ); |
|
625 | 625 | } |
626 | 626 | |
627 | 627 | // As the recordingid was not identified as imported recording link, execute update on a real recording. |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | 'status' => bigbluebuttonbn_update_recordings( |
632 | 632 | $params['id'], json_decode($params['meta']) |
633 | 633 | ) |
634 | - ); |
|
634 | + ); |
|
635 | 635 | } |
636 | 636 | |
637 | 637 | /** |
@@ -802,10 +802,10 @@ discard block |
||
802 | 802 | $params['recording_import'] = ['id' => 'The recordingID must be specified.']; |
803 | 803 | $params['recording_ready'] = [ |
804 | 804 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
805 | - ]; |
|
805 | + ]; |
|
806 | 806 | $params['live_session_events'] = [ |
807 | 807 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
808 | - ]; |
|
808 | + ]; |
|
809 | 809 | return $params; |
810 | 810 | } |
811 | 811 |
@@ -205,7 +205,7 @@ |
||
205 | 205 | !isset($CFG->bigbluebuttonbn['recordings_imported_editable']) || |
206 | 206 | !isset($CFG->bigbluebuttonbn['recordings_preview_default']) || |
207 | 207 | !isset($CFG->bigbluebuttonbn['recordings_preview_editable']) |
208 | - ); |
|
208 | + ); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -444,12 +444,12 @@ discard block |
||
444 | 444 | $recordings = bigbluebuttonbn_get_recordings( |
445 | 445 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'], |
446 | 446 | $bbbsession['bigbluebuttonbn']->recordings_deleted |
447 | - ); |
|
447 | + ); |
|
448 | 448 | if ($enabledfeatures['importrecordings']) { |
449 | 449 | // Get recording links. |
450 | 450 | $recordingsimported = bigbluebuttonbn_get_recordings_imported_array( |
451 | 451 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'] |
452 | - ); |
|
452 | + ); |
|
453 | 453 | /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent |
454 | 454 | * recordings are not included. */ |
455 | 455 | $recordings += $recordingsimported; |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | // JavaScript variables for recordings. |
464 | 464 | $jsvars += array( |
465 | 465 | 'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1', |
466 | - ); |
|
466 | + ); |
|
467 | 467 | // If there are meetings with recordings load the data to the table. |
468 | 468 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
469 | 469 | // Render a plain html table. |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | $jsvars += array( |
474 | 474 | 'columns' => bigbluebuttonbn_get_recording_columns($bbbsession), |
475 | 475 | 'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings), |
476 | - ); |
|
476 | + ); |
|
477 | 477 | // Render a YUI table. |
478 | 478 | return html_writer::div('', '', array('id' => 'bigbluebuttonbn_recordings_table')); |
479 | 479 | } |
@@ -493,10 +493,10 @@ discard block |
||
493 | 493 | } |
494 | 494 | $button = html_writer::tag('input', '', |
495 | 495 | array('type' => 'button', |
496 | - 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
497 | - 'class' => 'btn btn-secondary', |
|
498 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
499 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
496 | + 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
497 | + 'class' => 'btn btn-secondary', |
|
498 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
499 | + $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
500 | 500 | $output = html_writer::empty_tag('br'); |
501 | 501 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
502 | 502 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |