@@ -189,64 +189,64 @@ |
||
189 | 189 | */ |
190 | 190 | public static function get_options() { |
191 | 191 | return array( |
192 | - 'version_major' => self::get_moodle_version_major(), |
|
193 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
194 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
195 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
196 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
197 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
198 | - 'userlimit_default' => self::get('userlimit_default'), |
|
199 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
200 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
201 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
202 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
203 | - 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
204 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
205 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
206 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
207 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
208 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
209 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
210 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
211 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
212 | - 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
213 | - 'recording_default' => self::get('recording_default'), |
|
214 | - 'recording_editable' => self::get('recording_editable'), |
|
215 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
216 | - 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
217 | - 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
218 | - 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
219 | - 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
220 | - 'general_warning_message' => self::get('general_warning_message'), |
|
221 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
222 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
223 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
224 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
225 | - 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
226 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
227 | - 'clienttype_default' => self::get('clienttype_default'), |
|
228 | - 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
229 | - 'muteonstart_default' => self::get('muteonstart_default'), |
|
192 | + 'version_major' => self::get_moodle_version_major(), |
|
193 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
194 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
195 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
196 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
197 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
198 | + 'userlimit_default' => self::get('userlimit_default'), |
|
199 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
200 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
201 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
202 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
203 | + 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
204 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
205 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
206 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
207 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
208 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
209 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
210 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
211 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
212 | + 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
213 | + 'recording_default' => self::get('recording_default'), |
|
214 | + 'recording_editable' => self::get('recording_editable'), |
|
215 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
216 | + 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
217 | + 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
218 | + 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
219 | + 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
220 | + 'general_warning_message' => self::get('general_warning_message'), |
|
221 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
222 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
223 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
224 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
225 | + 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
226 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
227 | + 'clienttype_default' => self::get('clienttype_default'), |
|
228 | + 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
229 | + 'muteonstart_default' => self::get('muteonstart_default'), |
|
230 | 230 | |
231 | - 'disablecam_editable' => self::get('disablecam_editable'), |
|
232 | - 'disablecam_default' => self::get('disablecam_default'), |
|
233 | - 'disablemic_editable' => self::get('disablemic_editable'), |
|
234 | - 'disablemic_default' => self::get('disablemic_default'), |
|
235 | - 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
236 | - 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
237 | - 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
238 | - 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
239 | - 'disablenote_editable' => self::get('disablenote_editable'), |
|
240 | - 'disablenote_default' => self::get('disablenote_default'), |
|
241 | - 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
242 | - 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
243 | - 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
244 | - 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
245 | - 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
246 | - 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
247 | - 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
248 | - 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
231 | + 'disablecam_editable' => self::get('disablecam_editable'), |
|
232 | + 'disablecam_default' => self::get('disablecam_default'), |
|
233 | + 'disablemic_editable' => self::get('disablemic_editable'), |
|
234 | + 'disablemic_default' => self::get('disablemic_default'), |
|
235 | + 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
236 | + 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
237 | + 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
238 | + 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
239 | + 'disablenote_editable' => self::get('disablenote_editable'), |
|
240 | + 'disablenote_default' => self::get('disablenote_default'), |
|
241 | + 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
242 | + 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
243 | + 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
244 | + 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
245 | + 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
246 | + 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
247 | + 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
248 | + 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
249 | 249 | |
250 | - ); |
|
250 | + ); |
|
251 | 251 | } |
252 | 252 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * recordings from a different activity even from a different course. |
104 | 104 | **/ |
105 | 105 | |
106 | - /* |
|
106 | + /* |
|
107 | 107 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
108 | 108 | * activities will have the 'import recordings' capability enabled. |
109 | 109 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | * 'Join session' button enabled |
125 | 125 | **/ |
126 | 126 | |
127 | - /* |
|
127 | + /* |
|
128 | 128 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
129 | 129 | * activities will have the 'wait for moderator' capability enabled by |
130 | 130 | * default. |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
277 | 277 | */ |
278 | 278 | |
279 | - /* When the value is set to 1 (checked) the playback URLs will be validated |
|
279 | + /* When the value is set to 1 (checked) the playback URLs will be validated |
|
280 | 280 | * before the user access it. |
281 | 281 | * $CFG->bigbluebuttonbn['recordings_validate_url'] = 1; |
282 | 282 | */ |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | * $CFG->bigbluebuttonbn['disablecam_editable'] = 0; |
348 | 348 | */ |
349 | 349 | |
350 | - /* |
|
350 | + /* |
|
351 | 351 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
352 | 352 | * activities will have user microphones disabled. |
353 | 353 | * default. |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | * $CFG->bigbluebuttonbn['disablemic_editable'] = 0; |
361 | 361 | */ |
362 | 362 | |
363 | - /* |
|
363 | + /* |
|
364 | 364 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
365 | 365 | * activities will have private chat disabled. |
366 | 366 | * default. |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * $CFG->bigbluebuttonbn['disableprivatechat_editable'] = 0; |
374 | 374 | */ |
375 | 375 | |
376 | - /* |
|
376 | + /* |
|
377 | 377 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
378 | 378 | * activities will have public chat disabled. |
379 | 379 | * default. |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | * $CFG->bigbluebuttonbn['disablepublicchat_editable'] = 0; |
387 | 387 | */ |
388 | 388 | |
389 | - /* |
|
389 | + /* |
|
390 | 390 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
391 | 391 | * activities will have shared notes disabled. |
392 | 392 | * default. |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | * $CFG->bigbluebuttonbn['disablenote_editable'] = 0; |
400 | 400 | */ |
401 | 401 | |
402 | - /* |
|
402 | + /* |
|
403 | 403 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
404 | 404 | * activities will have the user list hidden. |
405 | 405 | * default. |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | * $CFG->bigbluebuttonbn['hideuserlist_editable'] = 0; |
413 | 413 | */ |
414 | 414 | |
415 | - /* |
|
415 | + /* |
|
416 | 416 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
417 | 417 | * activities will have a locked layout. |
418 | 418 | * default. |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | * $CFG->bigbluebuttonbn['lockedlayout_editable'] = 0; |
426 | 426 | */ |
427 | 427 | |
428 | - /* |
|
428 | + /* |
|
429 | 429 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
430 | 430 | * activities will ignore the locking settings. |
431 | 431 | * default. |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | * $CFG->bigbluebuttonbn['lockonjoin_editable'] = 0; |
439 | 439 | */ |
440 | 440 | |
441 | - /* |
|
441 | + /* |
|
442 | 442 | * When the value is set to 1 (checked) the capability to ignore |
443 | 443 | * locking settings is enabled. |
444 | 444 | * $CFG->bigbluebuttonbn['lockonjoinconfigurable_default'] = 0; |
@@ -489,27 +489,27 @@ discard block |
||
489 | 489 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
490 | 490 | */ |
491 | 491 | |
492 | - /* |
|
492 | + /* |
|
493 | 493 | * The warning box is always shown to administrators, but it is also possible to define other roles |
494 | 494 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
495 | 495 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
496 | 496 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
497 | 497 | */ |
498 | 498 | |
499 | - /* |
|
499 | + /* |
|
500 | 500 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
501 | 501 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
502 | 502 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
503 | 503 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
504 | 504 | */ |
505 | 505 | |
506 | - /* |
|
506 | + /* |
|
507 | 507 | * Additionally, when general_warning_button_href value is different than "", a button |
508 | 508 | * can also be shown right after the message. |
509 | 509 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
510 | 510 | */ |
511 | 511 | |
512 | - /* |
|
512 | + /* |
|
513 | 513 | * Finally, the text and class for the button can be modified |
514 | 514 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
515 | 515 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |
@@ -145,8 +145,8 @@ discard block |
||
145 | 145 | $payload = null; |
146 | 146 | if (!is_null($pname) && !is_null($purl)) { |
147 | 147 | $method = 'POST'; |
148 | - $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
149 | - $purl."' /></module></modules>"; |
|
148 | + $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
149 | + $purl . "' /></module></modules>"; |
|
150 | 150 | } |
151 | 151 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $payload); |
152 | 152 | if ($xml) { |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | } |
191 | 191 | if ($xml) { |
192 | 192 | // Either failure or success without meeting info. |
193 | - return (array) $xml; |
|
193 | + return (array)$xml; |
|
194 | 194 | } |
195 | 195 | // If the server is unreachable, then prompts the user of the necessary action. |
196 | 196 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
284 | 284 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
285 | 285 | 'getRecordings', |
286 | - ['recordID' => implode(',', (array) $breakoutroom)] |
|
286 | + ['recordID' => implode(',', (array)$breakoutroom)] |
|
287 | 287 | ); |
288 | 288 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
289 | 289 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | // Override imported flag with actual ID. |
340 | 340 | $recording['imported'] = $recordimported->id; |
341 | 341 | if (isset($recordimported->protected)) { |
342 | - $recording['protected'] = (string) $recordimported->protected; |
|
342 | + $recording['protected'] = (string)$recordimported->protected; |
|
343 | 343 | } |
344 | 344 | $recordsimportedarray[$recording['recordID']] = $recording; |
345 | 345 | } |
@@ -369,21 +369,21 @@ discard block |
||
369 | 369 | // Add formats. |
370 | 370 | $playbackarray = array(); |
371 | 371 | foreach ($recording->playback->format as $format) { |
372 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
373 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
372 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
373 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
374 | 374 | // Add preview per format when existing. |
375 | 375 | if ($format->preview) { |
376 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
376 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
377 | 377 | } |
378 | 378 | } |
379 | 379 | // Add the metadata to the recordings array. |
380 | 380 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
381 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
382 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
383 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
384 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
381 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
382 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
383 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
384 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
385 | 385 | if (isset($recording->protected)) { |
386 | - $recordingarray['protected'] = (string) $recording->protected; |
|
386 | + $recordingarray['protected'] = (string)$recording->protected; |
|
387 | 387 | } |
388 | 388 | return $recordingarray + $metadataarray; |
389 | 389 | } |
@@ -398,9 +398,9 @@ discard block |
||
398 | 398 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
399 | 399 | $imagesarray = array(); |
400 | 400 | foreach ($preview->images->image as $image) { |
401 | - $imagearray = array('url' => trim((string) $image)); |
|
401 | + $imagearray = array('url' => trim((string)$image)); |
|
402 | 402 | foreach ($image->attributes() as $attkey => $attvalue) { |
403 | - $imagearray[$attkey] = (string) $attvalue; |
|
403 | + $imagearray[$attkey] = (string)$attvalue; |
|
404 | 404 | } |
405 | 405 | array_push($imagesarray, $imagearray); |
406 | 406 | } |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | $ids = explode(',', $recordids); |
496 | 496 | foreach ($ids as $id) { |
497 | 497 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
498 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
498 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
499 | 499 | ); |
500 | 500 | if ($xml && $xml->returncode != 'SUCCESS') { |
501 | 501 | return false; |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | * @return array $users |
667 | 667 | */ |
668 | 668 | function bigbluebuttonbn_get_users(context $context = null) { |
669 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
669 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
670 | 670 | foreach ($users as $key => $value) { |
671 | 671 | $users[$key] = fullname($value); |
672 | 672 | } |
@@ -685,7 +685,7 @@ discard block |
||
685 | 685 | function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) { |
686 | 686 | // CONTRIB-7972, check the group of current user and course group mode. |
687 | 687 | $groups = null; |
688 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
688 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
689 | 689 | $course = get_course($context->instanceid); |
690 | 690 | $groupmode = groups_get_course_groupmode($course); |
691 | 691 | if ($bbactivity) { |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | $groups = groups_get_all_groups($course->id, $USER->id); |
699 | 699 | $users = []; |
700 | 700 | foreach ($groups as $g) { |
701 | - $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
701 | + $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
702 | 702 | } |
703 | 703 | } |
704 | 704 | return array_map( |
@@ -720,12 +720,12 @@ discard block |
||
720 | 720 | global $CFG; |
721 | 721 | |
722 | 722 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
723 | - $roles = (array) get_viewable_roles($context); |
|
723 | + $roles = (array)get_viewable_roles($context); |
|
724 | 724 | foreach ($roles as $key => $value) { |
725 | 725 | $roles[$key] = $value; |
726 | 726 | } |
727 | 727 | } else { |
728 | - $roles = (array) role_get_names($context); |
|
728 | + $roles = (array)role_get_names($context); |
|
729 | 729 | foreach ($roles as $key => $value) { |
730 | 730 | $roles[$key] = $value->localname; |
731 | 731 | } |
@@ -746,12 +746,12 @@ discard block |
||
746 | 746 | global $CFG; |
747 | 747 | |
748 | 748 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
749 | - $roles = (array) get_viewable_roles($context); |
|
749 | + $roles = (array)get_viewable_roles($context); |
|
750 | 750 | foreach ($roles as $key => $value) { |
751 | 751 | $roles[$key] = array('id' => $key, 'name' => $value); |
752 | 752 | } |
753 | 753 | } else { |
754 | - $roles = (array) role_get_names($context); |
|
754 | + $roles = (array)role_get_names($context); |
|
755 | 755 | foreach ($roles as $key => $value) { |
756 | 756 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
757 | 757 | } |
@@ -768,9 +768,9 @@ discard block |
||
768 | 768 | * @return object $role |
769 | 769 | */ |
770 | 770 | function bigbluebuttonbn_get_role($id) { |
771 | - $roles = (array) role_get_names(); |
|
771 | + $roles = (array)role_get_names(); |
|
772 | 772 | if (is_numeric($id) && isset($roles[$id])) { |
773 | - return (object) $roles[$id]; |
|
773 | + return (object)$roles[$id]; |
|
774 | 774 | } |
775 | 775 | foreach ($roles as $role) { |
776 | 776 | if ($role->shortname == $id) { |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
851 | 851 | $participantlist[] = array( |
852 | 852 | 'selectiontype' => 'user', |
853 | - 'selectionid' => (string) $ownerid, |
|
853 | + 'selectionid' => (string)$ownerid, |
|
854 | 854 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
855 | 855 | } |
856 | 856 | continue; |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | $now = time(); |
1033 | 1033 | if ($closingtime > 0 && $now < $closingtime) { |
1034 | 1034 | $duration = ceil(($closingtime - $now) / 60); |
1035 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1035 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1036 | 1036 | $duration = intval($duration) + $compensationtime; |
1037 | 1037 | } |
1038 | 1038 | return $duration; |
@@ -1234,16 +1234,16 @@ discard block |
||
1234 | 1234 | * @return array |
1235 | 1235 | */ |
1236 | 1236 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
1237 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1237 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1238 | 1238 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
1239 | 1239 | $result = $cache->get($meetingid); |
1240 | 1240 | $now = time(); |
1241 | 1241 | if (!$updatecache && !empty($result) && $now < ($result['creation_time'] + $cachettl)) { |
1242 | 1242 | // Use the value in the cache. |
1243 | - return (array) json_decode($result['meeting_info']); |
|
1243 | + return (array)json_decode($result['meeting_info']); |
|
1244 | 1244 | } |
1245 | 1245 | // Ping again and refresh the cache. |
1246 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1246 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1247 | 1247 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1248 | 1248 | ); |
1249 | 1249 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1390,7 +1390,7 @@ discard block |
||
1390 | 1390 | */ |
1391 | 1391 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1392 | 1392 | $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml); |
1393 | - $configxmlarray = (array) $configxml; |
|
1393 | + $configxmlarray = (array)$configxml; |
|
1394 | 1394 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1395 | 1395 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1396 | 1396 | return ''; |
@@ -1443,7 +1443,7 @@ discard block |
||
1443 | 1443 | * @return boolean |
1444 | 1444 | */ |
1445 | 1445 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
1446 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1446 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1447 | 1447 | } |
1448 | 1448 | |
1449 | 1449 | /** |
@@ -1454,7 +1454,7 @@ discard block |
||
1454 | 1454 | * @return boolean |
1455 | 1455 | */ |
1456 | 1456 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
1457 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1457 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1458 | 1458 | } |
1459 | 1459 | |
1460 | 1460 | /** |
@@ -1880,7 +1880,7 @@ discard block |
||
1880 | 1880 | } |
1881 | 1881 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
1882 | 1882 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
1883 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1883 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1884 | 1884 | // With icon for $manageaction. |
1885 | 1885 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
1886 | 1886 | $linkattributes = array( |
@@ -2143,7 +2143,7 @@ discard block |
||
2143 | 2143 | // Enqueue it. |
2144 | 2144 | \core\task\manager::queue_adhoc_task($task); |
2145 | 2145 | } catch (Exception $e) { |
2146 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
2146 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
2147 | 2147 | } |
2148 | 2148 | } |
2149 | 2149 | |
@@ -2157,7 +2157,7 @@ discard block |
||
2157 | 2157 | */ |
2158 | 2158 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
2159 | 2159 | global $CFG; |
2160 | - require_once($CFG->libdir.'/completionlib.php'); |
|
2160 | + require_once($CFG->libdir . '/completionlib.php'); |
|
2161 | 2161 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
2162 | 2162 | $completion = new completion_info($course); |
2163 | 2163 | if (!$completion->is_enabled($cm)) { |
@@ -2582,7 +2582,7 @@ discard block |
||
2582 | 2582 | */ |
2583 | 2583 | function bigbluebuttonbn_format_activity_time($time) { |
2584 | 2584 | global $CFG; |
2585 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
2585 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
2586 | 2586 | $activitytime = ''; |
2587 | 2587 | if ($time) { |
2588 | 2588 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2680,7 +2680,7 @@ discard block |
||
2680 | 2680 | */ |
2681 | 2681 | function bigbluebuttonbn_settings_general(&$renderer) { |
2682 | 2682 | // Configuration for BigBlueButton. |
2683 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2683 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2684 | 2684 | $renderer->render_group_header('general'); |
2685 | 2685 | $renderer->render_group_element( |
2686 | 2686 | 'server_url', |
@@ -2702,7 +2702,7 @@ discard block |
||
2702 | 2702 | */ |
2703 | 2703 | function bigbluebuttonbn_settings_record(&$renderer) { |
2704 | 2704 | // Configuration for 'recording' feature. |
2705 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2705 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2706 | 2706 | $renderer->render_group_header('recording'); |
2707 | 2707 | $renderer->render_group_element( |
2708 | 2708 | 'recording_default', |
@@ -2746,7 +2746,7 @@ discard block |
||
2746 | 2746 | */ |
2747 | 2747 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
2748 | 2748 | // Configuration for 'import recordings' feature. |
2749 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2749 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2750 | 2750 | $renderer->render_group_header('importrecordings'); |
2751 | 2751 | $renderer->render_group_element( |
2752 | 2752 | 'importrecordings_enabled', |
@@ -2768,7 +2768,7 @@ discard block |
||
2768 | 2768 | */ |
2769 | 2769 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
2770 | 2770 | // Configuration for 'show recordings' feature. |
2771 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2771 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2772 | 2772 | $renderer->render_group_header('recordings'); |
2773 | 2773 | $renderer->render_group_element( |
2774 | 2774 | 'recordings_html_default', |
@@ -2822,7 +2822,7 @@ discard block |
||
2822 | 2822 | */ |
2823 | 2823 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
2824 | 2824 | // Configuration for wait for moderator feature. |
2825 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2825 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2826 | 2826 | $renderer->render_group_header('waitformoderator'); |
2827 | 2827 | $renderer->render_group_element( |
2828 | 2828 | 'waitformoderator_default', |
@@ -2852,7 +2852,7 @@ discard block |
||
2852 | 2852 | */ |
2853 | 2853 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
2854 | 2854 | // Configuration for "static voice bridge" feature. |
2855 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2855 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2856 | 2856 | $renderer->render_group_header('voicebridge'); |
2857 | 2857 | $renderer->render_group_element( |
2858 | 2858 | 'voicebridge_editable', |
@@ -2870,7 +2870,7 @@ discard block |
||
2870 | 2870 | */ |
2871 | 2871 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
2872 | 2872 | // Configuration for "preupload presentation" feature. |
2873 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2873 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2874 | 2874 | // This feature only works if curl is installed. |
2875 | 2875 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
2876 | 2876 | if (!extension_loaded('curl')) { |
@@ -2898,7 +2898,7 @@ discard block |
||
2898 | 2898 | */ |
2899 | 2899 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
2900 | 2900 | // Configuration for "preupload presentation" feature. |
2901 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2901 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2902 | 2902 | if (extension_loaded('curl')) { |
2903 | 2903 | // This feature only works if curl is installed. |
2904 | 2904 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2915,7 +2915,7 @@ discard block |
||
2915 | 2915 | */ |
2916 | 2916 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
2917 | 2917 | // Configuration for "user limit" feature. |
2918 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2918 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2919 | 2919 | $renderer->render_group_header('userlimit'); |
2920 | 2920 | $renderer->render_group_element( |
2921 | 2921 | 'userlimit_default', |
@@ -2937,7 +2937,7 @@ discard block |
||
2937 | 2937 | */ |
2938 | 2938 | function bigbluebuttonbn_settings_duration(&$renderer) { |
2939 | 2939 | // Configuration for "scheduled duration" feature. |
2940 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2940 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2941 | 2941 | $renderer->render_group_header('scheduled'); |
2942 | 2942 | $renderer->render_group_element( |
2943 | 2943 | 'scheduled_duration_enabled', |
@@ -2963,7 +2963,7 @@ discard block |
||
2963 | 2963 | */ |
2964 | 2964 | function bigbluebuttonbn_settings_participants(&$renderer) { |
2965 | 2965 | // Configuration for defining the default role/user that will be moderator on new activities. |
2966 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2966 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2967 | 2967 | $renderer->render_group_header('participant'); |
2968 | 2968 | // UI for 'participants' feature. |
2969 | 2969 | $roles = bigbluebuttonbn_get_roles(null, false); |
@@ -2988,7 +2988,7 @@ discard block |
||
2988 | 2988 | */ |
2989 | 2989 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
2990 | 2990 | // Configuration for "send notifications" feature. |
2991 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
2991 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
2992 | 2992 | $renderer->render_group_header('sendnotifications'); |
2993 | 2993 | $renderer->render_group_element( |
2994 | 2994 | 'sendnotifications_enabled', |
@@ -3006,14 +3006,14 @@ discard block |
||
3006 | 3006 | */ |
3007 | 3007 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
3008 | 3008 | // Configuration for "clienttype" feature. |
3009 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
3009 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
3010 | 3010 | $renderer->render_group_header('clienttype'); |
3011 | 3011 | $renderer->render_group_element( |
3012 | 3012 | 'clienttype_editable', |
3013 | 3013 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
3014 | 3014 | ); |
3015 | 3015 | // Web Client default. |
3016 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
3016 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
3017 | 3017 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
3018 | 3018 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
3019 | 3019 | $renderer->render_group_element( |
@@ -3036,7 +3036,7 @@ discard block |
||
3036 | 3036 | */ |
3037 | 3037 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
3038 | 3038 | // Configuration for BigBlueButton. |
3039 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
3039 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
3040 | 3040 | $renderer->render_group_header('muteonstart'); |
3041 | 3041 | $renderer->render_group_element( |
3042 | 3042 | 'muteonstart_default', |
@@ -3079,7 +3079,7 @@ discard block |
||
3079 | 3079 | */ |
3080 | 3080 | function bigbluebuttonbn_settings_disablecam(&$renderer) { |
3081 | 3081 | // Configuration for BigBlueButton. |
3082 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
3082 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
3083 | 3083 | $renderer->render_group_element( |
3084 | 3084 | 'disablecam_default', |
3085 | 3085 | $renderer->render_group_element_checkbox('disablecam_default', 0) |
@@ -3100,7 +3100,7 @@ discard block |
||
3100 | 3100 | */ |
3101 | 3101 | function bigbluebuttonbn_settings_disablemic(&$renderer) { |
3102 | 3102 | // Configuration for BigBlueButton. |
3103 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
3103 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
3104 | 3104 | $renderer->render_group_element( |
3105 | 3105 | 'disablemic_default', |
3106 | 3106 | $renderer->render_group_element_checkbox('disablemic_default', 0) |
@@ -3121,7 +3121,7 @@ discard block |
||
3121 | 3121 | */ |
3122 | 3122 | function bigbluebuttonbn_settings_disableprivatechat(&$renderer) { |
3123 | 3123 | // Configuration for BigBlueButton. |
3124 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
3124 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
3125 | 3125 | $renderer->render_group_element( |
3126 | 3126 | 'disableprivatechat_default', |
3127 | 3127 | $renderer->render_group_element_checkbox('disableprivatechat_default', 0) |
@@ -3142,7 +3142,7 @@ discard block |
||
3142 | 3142 | */ |
3143 | 3143 | function bigbluebuttonbn_settings_disablepublicchat(&$renderer) { |
3144 | 3144 | // Configuration for BigBlueButton. |
3145 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
3145 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
3146 | 3146 | $renderer->render_group_element( |
3147 | 3147 | 'disablepublicchat_default', |
3148 | 3148 | $renderer->render_group_element_checkbox('disablepublicchat_default', 0) |
@@ -3163,7 +3163,7 @@ discard block |
||
3163 | 3163 | */ |
3164 | 3164 | function bigbluebuttonbn_settings_disablenote(&$renderer) { |
3165 | 3165 | // Configuration for BigBlueButton. |
3166 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
3166 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
3167 | 3167 | $renderer->render_group_element( |
3168 | 3168 | 'disablenote_default', |
3169 | 3169 | $renderer->render_group_element_checkbox('disablenote_default', 0) |
@@ -3184,7 +3184,7 @@ discard block |
||
3184 | 3184 | */ |
3185 | 3185 | function bigbluebuttonbn_settings_hideuserlist(&$renderer) { |
3186 | 3186 | // Configuration for BigBlueButton. |
3187 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
3187 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
3188 | 3188 | $renderer->render_group_element( |
3189 | 3189 | 'hideuserlist_default', |
3190 | 3190 | $renderer->render_group_element_checkbox('hideuserlist_default', 0) |
@@ -3205,7 +3205,7 @@ discard block |
||
3205 | 3205 | */ |
3206 | 3206 | function bigbluebuttonbn_settings_lockedlayout(&$renderer) { |
3207 | 3207 | // Configuration for BigBlueButton. |
3208 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
3208 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
3209 | 3209 | $renderer->render_group_element( |
3210 | 3210 | 'lockedlayout_default', |
3211 | 3211 | $renderer->render_group_element_checkbox('lockedlayout_default', 0) |
@@ -3226,7 +3226,7 @@ discard block |
||
3226 | 3226 | */ |
3227 | 3227 | function bigbluebuttonbn_settings_lockonjoin(&$renderer) { |
3228 | 3228 | // Configuration for BigBlueButton. |
3229 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
3229 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
3230 | 3230 | $renderer->render_group_element( |
3231 | 3231 | 'lockonjoin_default', |
3232 | 3232 | $renderer->render_group_element_checkbox('lockonjoin_default', 0) |
@@ -3247,7 +3247,7 @@ discard block |
||
3247 | 3247 | */ |
3248 | 3248 | function bigbluebuttonbn_settings_lockonjoinconfigurable(&$renderer) { |
3249 | 3249 | // Configuration for BigBlueButton. |
3250 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
3250 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
3251 | 3251 | $renderer->render_group_element( |
3252 | 3252 | 'lockonjoinconfigurable_default', |
3253 | 3253 | $renderer->render_group_element_checkbox('lockonjoinconfigurable_default', 0) |
@@ -3268,7 +3268,7 @@ discard block |
||
3268 | 3268 | */ |
3269 | 3269 | function bigbluebuttonbn_settings_extended(&$renderer) { |
3270 | 3270 | // Configuration for 'notify users when recording ready' feature. |
3271 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
3271 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
3272 | 3272 | return; |
3273 | 3273 | } |
3274 | 3274 | $renderer->render_group_header('extended_capabilities'); |
@@ -3294,7 +3294,7 @@ discard block |
||
3294 | 3294 | global $DB; |
3295 | 3295 | do { |
3296 | 3296 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
3297 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
3297 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
3298 | 3298 | } while ($meetingid == $encodedseed); |
3299 | 3299 | return $encodedseed; |
3300 | 3300 | } |
@@ -3507,7 +3507,7 @@ discard block |
||
3507 | 3507 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
3508 | 3508 | global $DB; |
3509 | 3509 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
3510 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3510 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3511 | 3511 | return $ownerid; |
3512 | 3512 | } |
3513 | 3513 | |
@@ -3614,7 +3614,7 @@ discard block |
||
3614 | 3614 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
3615 | 3615 | ]; |
3616 | 3616 | // Special metadata for recording processing. |
3617 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
3617 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
3618 | 3618 | $metadata["bn-recording-status"] = json_encode( |
3619 | 3619 | array( |
3620 | 3620 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3622,10 +3622,10 @@ discard block |
||
3622 | 3622 | ) |
3623 | 3623 | ); |
3624 | 3624 | } |
3625 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
3625 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
3626 | 3626 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
3627 | 3627 | } |
3628 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
3628 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
3629 | 3629 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
3630 | 3630 | } |
3631 | 3631 | return $metadata; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | self::view_bbbsession_set($context, $bbbsession); |
150 | 150 | |
151 | 151 | $serverversion = bigbluebuttonbn_get_server_version(); |
152 | - $bbbsession['serverversion'] = (string) $serverversion; |
|
152 | + $bbbsession['serverversion'] = (string)$serverversion; |
|
153 | 153 | |
154 | 154 | // Operation URLs. |
155 | 155 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id; |
@@ -187,12 +187,12 @@ discard block |
||
187 | 187 | $bbbsession['importrecordings'] = ($bbbsession['managerecordings']); |
188 | 188 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
189 | 189 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
190 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
190 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
191 | 191 | $bbbsession['bigbluebuttonbn']->id; |
192 | 192 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
193 | 193 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
194 | - $bbbsession['userlimit'] = intval((int) config::get('userlimit_default')); |
|
195 | - if ((boolean) config::get('userlimit_editable')) { |
|
194 | + $bbbsession['userlimit'] = intval((int)config::get('userlimit_default')); |
|
195 | + if ((boolean)config::get('userlimit_editable')) { |
|
196 | 196 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
197 | 197 | } |
198 | 198 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -216,10 +216,10 @@ discard block |
||
216 | 216 | if ($bbbsession['bigbluebuttonbn']->record) { |
217 | 217 | // Check if is enable record all from start. |
218 | 218 | if ($bbbsession['recordallfromstart']) { |
219 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning', |
|
219 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning', |
|
220 | 220 | 'bigbluebuttonbn'); |
221 | 221 | } else { |
222 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
222 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $bbbsession['originServerName'] = $parsedurl['host']; |
245 | 245 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
246 | 246 | $bbbsession['originServerCommonName'] = ''; |
247 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
247 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
248 | 248 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
249 | 249 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
250 | 250 | $bbbsession['clienttype'] = config::get('clienttype_default'); |