Completed
Pull Request — master (#339)
by
unknown
02:39
created
classes/locallib/config.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -191,64 +191,64 @@
 block discarded – undo
191 191
      */
192 192
     public static function get_options() {
193 193
         return array(
194
-               'version_major' => self::get_moodle_version_major(),
195
-               'voicebridge_editable' => self::get('voicebridge_editable'),
196
-               'importrecordings_enabled' => self::get('importrecordings_enabled'),
197
-               'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'),
198
-               'waitformoderator_default' => self::get('waitformoderator_default'),
199
-               'waitformoderator_editable' => self::get('waitformoderator_editable'),
200
-               'userlimit_default' => self::get('userlimit_default'),
201
-               'userlimit_editable' => self::get('userlimit_editable'),
202
-               'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
203
-               'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
204
-               'recordings_enabled' => self::get('recordings_enabled'),
205
-               'meetingevents_enabled' => self::get('meetingevents_enabled'),
206
-               'recordings_html_default' => self::get('recordings_html_default'),
207
-               'recordings_html_editable' => self::get('recordings_html_editable'),
208
-               'recordings_deleted_default' => self::get('recordings_deleted_default'),
209
-               'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
210
-               'recordings_imported_default' => self::get('recordings_imported_default'),
211
-               'recordings_imported_editable' => self::get('recordings_imported_editable'),
212
-               'recordings_preview_default' => self::get('recordings_preview_default'),
213
-               'recordings_preview_editable' => self::get('recordings_preview_editable'),
214
-               'recordings_validate_url' => self::get('recordings_validate_url'),
215
-               'recording_default' => self::get('recording_default'),
216
-               'oc_recording' => self::get('oc_recording'),
217
-               'recording_editable' => self::get('recording_editable'),
218
-               'recording_icons_enabled' => self::get('recording_icons_enabled'),
219
-               'recording_all_from_start_default' => self::get('recording_all_from_start_default'),
220
-               'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'),
221
-               'recording_hide_button_default' => self::get('recording_hide_button_default'),
222
-               'recording_hide_button_editable' => self::get('recording_hide_button_editable'),
223
-               'general_warning_message' => self::get('general_warning_message'),
224
-               'general_warning_box_type' => self::get('general_warning_box_type'),
225
-               'general_warning_button_text' => self::get('general_warning_button_text'),
226
-               'general_warning_button_href' => self::get('general_warning_button_href'),
227
-               'general_warning_button_class' => self::get('general_warning_button_class'),
228
-               'clienttype_enabled' => self::get('clienttype_enabled'),
229
-               'clienttype_editable' => self::get('clienttype_editable'),
230
-               'clienttype_default' => self::get('clienttype_default'),
231
-               'muteonstart_editable' => self::get('muteonstart_editable'),
232
-               'muteonstart_default' => self::get('muteonstart_default'),
233
-               'disablecam_editable' => self::get('disablecam_editable'),
234
-               'disablecam_default' => self::get('disablecam_default'),
235
-               'disablemic_editable' => self::get('disablemic_editable'),
236
-               'disablemic_default' => self::get('disablemic_default'),
237
-               'disableprivatechat_editable' => self::get('disableprivatechat_editable'),
238
-               'disableprivatechat_default' => self::get('disableprivatechat_default'),
239
-               'disablepublicchat_editable' => self::get('disablepublicchat_editable'),
240
-               'disablepublicchat_default' => self::get('disablepublicchat_default'),
241
-               'disablenote_editable' => self::get('disablenote_editable'),
242
-               'disablenote_default' => self::get('disablenote_default'),
243
-               'hideuserlist_editable' => self::get('hideuserlist_editable'),
244
-               'hideuserlist_default' => self::get('hideuserlist_default'),
245
-               'lockedlayout_editable' => self::get('lockedlayout_editable'),
246
-               'lockedlayout_default' => self::get('lockedlayout_default'),
247
-               'lockonjoin_editable' => self::get('lockonjoin_editable'),
248
-               'lockonjoin_default' => self::get('lockonjoin_default'),
249
-               'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'),
250
-               'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'),
251
-               'welcome_default' => self::get('welcome_default'),
252
-          );
194
+                'version_major' => self::get_moodle_version_major(),
195
+                'voicebridge_editable' => self::get('voicebridge_editable'),
196
+                'importrecordings_enabled' => self::get('importrecordings_enabled'),
197
+                'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'),
198
+                'waitformoderator_default' => self::get('waitformoderator_default'),
199
+                'waitformoderator_editable' => self::get('waitformoderator_editable'),
200
+                'userlimit_default' => self::get('userlimit_default'),
201
+                'userlimit_editable' => self::get('userlimit_editable'),
202
+                'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
203
+                'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
204
+                'recordings_enabled' => self::get('recordings_enabled'),
205
+                'meetingevents_enabled' => self::get('meetingevents_enabled'),
206
+                'recordings_html_default' => self::get('recordings_html_default'),
207
+                'recordings_html_editable' => self::get('recordings_html_editable'),
208
+                'recordings_deleted_default' => self::get('recordings_deleted_default'),
209
+                'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
210
+                'recordings_imported_default' => self::get('recordings_imported_default'),
211
+                'recordings_imported_editable' => self::get('recordings_imported_editable'),
212
+                'recordings_preview_default' => self::get('recordings_preview_default'),
213
+                'recordings_preview_editable' => self::get('recordings_preview_editable'),
214
+                'recordings_validate_url' => self::get('recordings_validate_url'),
215
+                'recording_default' => self::get('recording_default'),
216
+                'oc_recording' => self::get('oc_recording'),
217
+                'recording_editable' => self::get('recording_editable'),
218
+                'recording_icons_enabled' => self::get('recording_icons_enabled'),
219
+                'recording_all_from_start_default' => self::get('recording_all_from_start_default'),
220
+                'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'),
221
+                'recording_hide_button_default' => self::get('recording_hide_button_default'),
222
+                'recording_hide_button_editable' => self::get('recording_hide_button_editable'),
223
+                'general_warning_message' => self::get('general_warning_message'),
224
+                'general_warning_box_type' => self::get('general_warning_box_type'),
225
+                'general_warning_button_text' => self::get('general_warning_button_text'),
226
+                'general_warning_button_href' => self::get('general_warning_button_href'),
227
+                'general_warning_button_class' => self::get('general_warning_button_class'),
228
+                'clienttype_enabled' => self::get('clienttype_enabled'),
229
+                'clienttype_editable' => self::get('clienttype_editable'),
230
+                'clienttype_default' => self::get('clienttype_default'),
231
+                'muteonstart_editable' => self::get('muteonstart_editable'),
232
+                'muteonstart_default' => self::get('muteonstart_default'),
233
+                'disablecam_editable' => self::get('disablecam_editable'),
234
+                'disablecam_default' => self::get('disablecam_default'),
235
+                'disablemic_editable' => self::get('disablemic_editable'),
236
+                'disablemic_default' => self::get('disablemic_default'),
237
+                'disableprivatechat_editable' => self::get('disableprivatechat_editable'),
238
+                'disableprivatechat_default' => self::get('disableprivatechat_default'),
239
+                'disablepublicchat_editable' => self::get('disablepublicchat_editable'),
240
+                'disablepublicchat_default' => self::get('disablepublicchat_default'),
241
+                'disablenote_editable' => self::get('disablenote_editable'),
242
+                'disablenote_default' => self::get('disablenote_default'),
243
+                'hideuserlist_editable' => self::get('hideuserlist_editable'),
244
+                'hideuserlist_default' => self::get('hideuserlist_default'),
245
+                'lockedlayout_editable' => self::get('lockedlayout_editable'),
246
+                'lockedlayout_default' => self::get('lockedlayout_default'),
247
+                'lockonjoin_editable' => self::get('lockonjoin_editable'),
248
+                'lockonjoin_default' => self::get('lockonjoin_default'),
249
+                'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'),
250
+                'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'),
251
+                'welcome_default' => self::get('welcome_default'),
252
+            );
253 253
     }
254 254
 }
Please login to merge, or discard this patch.
locallib.php 3 patches
Doc Comments   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
  * Helper function to retrieve imported recordings from the Moodle database.
327 327
  * The references are stored as events in bigbluebuttonbn_logs.
328 328
  *
329
- * @param string $courseid
329
+ * @param integer $courseid
330 330
  * @param string $bigbluebuttonbnid
331 331
  * @param bool   $subset
332 332
  *
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 /**
355 355
  * Helper function to retrive the default config.xml file.
356 356
  *
357
- * @return string
357
+ * @return null|SimpleXMLElement
358 358
  */
359 359
 function bigbluebuttonbn_get_default_config_xml() {
360 360
     $xml = bigbluebuttonbn_wrap_xml_load_file(
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
  * @param object $a
437 437
  * @param object $b
438 438
  *
439
- * @return array
439
+ * @return integer
440 440
  */
441 441
 function bigbluebuttonbn_recording_build_sorter($a, $b) {
442 442
     global $CFG;
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
  * @param string $data
551 551
  * @param string $contenttype
552 552
  *
553
- * @return object
553
+ * @return null|SimpleXMLElement
554 554
  */
555 555
 function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
556 556
     if (extension_loaded('curl')) {
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
  * @param string $data
592 592
  * @param string $contenttype
593 593
  *
594
- * @return object
594
+ * @return string
595 595
  */
596 596
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
597 597
     global $CFG;
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
  * @param integer $instance
1009 1009
  * @param integer $voicebridge
1010 1010
  *
1011
- * @return string
1011
+ * @return boolean
1012 1012
  */
1013 1013
 function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) {
1014 1014
     global $DB;
@@ -1356,7 +1356,7 @@  discard block
 block discarded – undo
1356 1356
  * @param string $meetingid
1357 1357
  * @param string $configxml
1358 1358
  *
1359
- * @return object
1359
+ * @return null|SimpleXMLElement
1360 1360
  */
1361 1361
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1362 1362
     $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
@@ -1410,7 +1410,7 @@  discard block
 block discarded – undo
1410 1410
  * @param array $recording
1411 1411
  * @param array $tools
1412 1412
  *
1413
- * @return array
1413
+ * @return null|stdClass
1414 1414
  */
1415 1415
 function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) {
1416 1416
     if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
@@ -1994,7 +1994,7 @@  discard block
 block discarded – undo
1994 1994
  *
1995 1995
  * @param array $bbbsession
1996 1996
  * @param array $recording
1997
- * @param object $rowdata
1997
+ * @param stdClass $rowdata
1998 1998
  *
1999 1999
  * @return object
2000 2000
  */
@@ -2224,7 +2224,7 @@  discard block
 block discarded – undo
2224 2224
  *
2225 2225
  * @param array $bbbsession
2226 2226
  * @param array $recordings
2227
- * @param array $tools
2227
+ * @param string[] $tools
2228 2228
  *
2229 2229
  * @return array
2230 2230
  */
@@ -2340,7 +2340,7 @@  discard block
 block discarded – undo
2340 2340
  * @param array $bbbsession
2341 2341
  * @param array $ocrecording
2342 2342
  *
2343
- * @return array
2343
+ * @return stdClass
2344 2344
  */
2345 2345
 function bigbluebuttonbn_get_opencast_recording_data_row($bbbsession, $ocrecording) {
2346 2346
     $rowdata = new stdClass();
@@ -2521,7 +2521,7 @@  discard block
 block discarded – undo
2521 2521
  *
2522 2522
  * @param array $bbbsession
2523 2523
  * @param object $ocrecording
2524
- * @param object $rowdata
2524
+ * @param stdClass $rowdata
2525 2525
  *
2526 2526
  * @return object
2527 2527
  */
@@ -2670,7 +2670,7 @@  discard block
 block discarded – undo
2670 2670
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2671 2671
  * in the getRecordings request considering only those that belong to deleted activities.
2672 2672
  *
2673
- * @param string $courseid
2673
+ * @param integer $courseid
2674 2674
  * @param string $bigbluebuttonbnid
2675 2675
  * @param bool   $subset
2676 2676
  *
@@ -2694,7 +2694,7 @@  discard block
 block discarded – undo
2694 2694
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2695 2695
  * in the getRecordings request considering only those that belong to imported recordings.
2696 2696
  *
2697
- * @param string $courseid
2697
+ * @param integer $courseid
2698 2698
  * @param string $bigbluebuttonbnid
2699 2699
  * @param bool   $subset
2700 2700
  *
@@ -2717,7 +2717,7 @@  discard block
 block discarded – undo
2717 2717
 /**
2718 2718
  * Helper function to get recordings and imported recordings together.
2719 2719
  *
2720
- * @param string $courseid
2720
+ * @param integer $courseid
2721 2721
  * @param string $bigbluebuttonbnid
2722 2722
  * @param bool   $subset
2723 2723
  * @param bool   $includedeleted
@@ -2735,7 +2735,7 @@  discard block
 block discarded – undo
2735 2735
  * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events
2736 2736
  * in bigbluebuttonbn_logs.
2737 2737
  *
2738
- * @param string $courseid
2738
+ * @param integer $courseid
2739 2739
  * @param string $bigbluebuttonbnid
2740 2740
  * @param bool   $subset
2741 2741
  * @param bool   $includedeleted
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
     $data['role'] = array(
802 802
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
803 803
         'children' => bigbluebuttonbn_get_roles_select($context, true)
804
-      );
804
+        );
805 805
     $data['user'] = array(
806 806
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
807 807
         'children' => bigbluebuttonbn_get_users_select($context, $bbactivity),
@@ -1709,7 +1709,7 @@  discard block
 block discarded – undo
1709 1709
         'data-action' => 'play',
1710 1710
         'data-target' => $playback['type'],
1711 1711
         'data-href' => $href,
1712
-      );
1712
+        );
1713 1713
     if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server()
1714 1714
             && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1715 1715
         $linkattributes['class'] = 'btn btn-sm btn-warning';
@@ -2396,7 +2396,7 @@  discard block
 block discarded – undo
2396 2396
         'id' => 'opencast-player-redirect-' . $ocrecording['identifier'],
2397 2397
         'class' => 'btn btn-sm btn-default',
2398 2398
         'target' => '_blank'
2399
-      );
2399
+        );
2400 2400
     if ($href == '#' || empty($href)) {
2401 2401
         $linkattributes['class'] = 'btn btn-sm btn-warning';
2402 2402
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
Please login to merge, or discard this patch.
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
     $payload = null;
151 151
     if (!is_null($pname) && !is_null($purl)) {
152 152
         $method = 'POST';
153
-        $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
154
-            $purl."' /></module></modules>";
153
+        $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
154
+            $purl . "' /></module></modules>";
155 155
     }
156 156
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $payload);
157 157
     if ($xml) {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     }
196 196
     if ($xml) {
197 197
         // Either failure or success without meeting info.
198
-        return (array) $xml;
198
+        return (array)$xml;
199 199
     }
200 200
     // If the server is unreachable, then prompts the user of the necessary action.
201 201
     return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable');
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                 foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) {
289 289
                     $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url(
290 290
                         'getRecordings',
291
-                        ['recordID' => implode(',', (array) $breakoutroom)]
291
+                        ['recordID' => implode(',', (array)$breakoutroom)]
292 292
                     );
293 293
                     $xml = bigbluebuttonbn_wrap_xml_load_file($url);
294 294
                     if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
         // Override imported flag with actual ID.
345 345
         $recording['imported'] = $recordimported->id;
346 346
         if (isset($recordimported->protected)) {
347
-            $recording['protected'] = (string) $recordimported->protected;
347
+            $recording['protected'] = (string)$recordimported->protected;
348 348
         }
349 349
         $recordsimportedarray[$recording['recordID']] = $recording;
350 350
     }
@@ -374,21 +374,21 @@  discard block
 block discarded – undo
374 374
     // Add formats.
375 375
     $playbackarray = array();
376 376
     foreach ($recording->playback->format as $format) {
377
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
378
-            'url' => trim((string) $format->url), 'length' => (string) $format->length);
377
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
378
+            'url' => trim((string)$format->url), 'length' => (string)$format->length);
379 379
         // Add preview per format when existing.
380 380
         if ($format->preview) {
381
-            $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
381
+            $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
382 382
         }
383 383
     }
384 384
     // Add the metadata to the recordings array.
385 385
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
386
-    $recordingarray = array('recordID' => (string) $recording->recordID,
387
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
388
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
389
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
386
+    $recordingarray = array('recordID' => (string)$recording->recordID,
387
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
388
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
389
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
390 390
     if (isset($recording->protected)) {
391
-        $recordingarray['protected'] = (string) $recording->protected;
391
+        $recordingarray['protected'] = (string)$recording->protected;
392 392
     }
393 393
     return $recordingarray + $metadataarray;
394 394
 }
@@ -403,9 +403,9 @@  discard block
 block discarded – undo
403 403
 function bigbluebuttonbn_get_recording_preview_images($preview) {
404 404
     $imagesarray = array();
405 405
     foreach ($preview->images->image as $image) {
406
-        $imagearray = array('url' => trim((string) $image));
406
+        $imagearray = array('url' => trim((string)$image));
407 407
         foreach ($image->attributes() as $attkey => $attvalue) {
408
-            $imagearray[$attkey] = (string) $attvalue;
408
+            $imagearray[$attkey] = (string)$attvalue;
409 409
         }
410 410
         array_push($imagesarray, $imagearray);
411 411
     }
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
     $ids = explode(',', $recordids);
501 501
     foreach ($ids as $id) {
502 502
         $xml = bigbluebuttonbn_wrap_xml_load_file(
503
-            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
503
+            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
504 504
         );
505 505
         if ($xml && $xml->returncode != 'SUCCESS') {
506 506
             return false;
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
  * @return array $users
672 672
  */
673 673
 function bigbluebuttonbn_get_users(context $context = null) {
674
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
674
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
675 675
     foreach ($users as $key => $value) {
676 676
         $users[$key] = fullname($value);
677 677
     }
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) {
691 691
     // CONTRIB-7972, check the group of current user and course group mode.
692 692
     $groups = null;
693
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
693
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
694 694
     $course = get_course($context->instanceid);
695 695
     $groupmode = groups_get_course_groupmode($course);
696 696
     if ($bbactivity) {
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
         $groups = groups_get_all_groups($course->id, $USER->id);
704 704
         $users = [];
705 705
         foreach ($groups as $g) {
706
-            $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true);
706
+            $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true);
707 707
         }
708 708
     }
709 709
     return array_map(
@@ -725,12 +725,12 @@  discard block
 block discarded – undo
725 725
     global $CFG;
726 726
 
727 727
     if ($onlyviewableroles == true && $CFG->branch >= 35) {
728
-        $roles = (array) get_viewable_roles($context);
728
+        $roles = (array)get_viewable_roles($context);
729 729
         foreach ($roles as $key => $value) {
730 730
             $roles[$key] = $value;
731 731
         }
732 732
     } else {
733
-        $roles = (array) role_get_names($context);
733
+        $roles = (array)role_get_names($context);
734 734
         foreach ($roles as $key => $value) {
735 735
             $roles[$key] = $value->localname;
736 736
         }
@@ -751,12 +751,12 @@  discard block
 block discarded – undo
751 751
     global $CFG;
752 752
 
753 753
     if ($onlyviewableroles == true && $CFG->branch >= 35) {
754
-        $roles = (array) get_viewable_roles($context);
754
+        $roles = (array)get_viewable_roles($context);
755 755
         foreach ($roles as $key => $value) {
756 756
             $roles[$key] = array('id' => $key, 'name' => $value);
757 757
         }
758 758
     } else {
759
-        $roles = (array) role_get_names($context);
759
+        $roles = (array)role_get_names($context);
760 760
         foreach ($roles as $key => $value) {
761 761
             $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
762 762
         }
@@ -773,9 +773,9 @@  discard block
 block discarded – undo
773 773
  * @return object $role
774 774
  */
775 775
 function bigbluebuttonbn_get_role($id) {
776
-    $roles = (array) role_get_names();
776
+    $roles = (array)role_get_names();
777 777
     if (is_numeric($id) && isset($roles[$id])) {
778
-        return (object) $roles[$id];
778
+        return (object)$roles[$id];
779 779
     }
780 780
     foreach ($roles as $role) {
781 781
         if ($role->shortname == $id) {
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
856 856
                 $participantlist[] = array(
857 857
                     'selectiontype' => 'user',
858
-                    'selectionid' => (string) $ownerid,
858
+                    'selectionid' => (string)$ownerid,
859 859
                     'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
860 860
             }
861 861
             continue;
@@ -1037,7 +1037,7 @@  discard block
 block discarded – undo
1037 1037
     $now = time();
1038 1038
     if ($closingtime > 0 && $now < $closingtime) {
1039 1039
         $duration = ceil(($closingtime - $now) / 60);
1040
-        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
1040
+        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
1041 1041
         $duration = intval($duration) + $compensationtime;
1042 1042
     }
1043 1043
     return $duration;
@@ -1239,16 +1239,16 @@  discard block
 block discarded – undo
1239 1239
  * @return array
1240 1240
  */
1241 1241
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1242
-    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1242
+    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1243 1243
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1244 1244
     $result = $cache->get($meetingid);
1245 1245
     $now = time();
1246 1246
     if (!$updatecache && !empty($result) && $now < ($result['creation_time'] + $cachettl)) {
1247 1247
         // Use the value in the cache.
1248
-        return (array) json_decode($result['meeting_info']);
1248
+        return (array)json_decode($result['meeting_info']);
1249 1249
     }
1250 1250
     // Ping again and refresh the cache.
1251
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1251
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1252 1252
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1253 1253
     );
1254 1254
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1395,7 +1395,7 @@  discard block
 block discarded – undo
1395 1395
  */
1396 1396
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1397 1397
     $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml);
1398
-    $configxmlarray = (array) $configxml;
1398
+    $configxmlarray = (array)$configxml;
1399 1399
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1400 1400
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1401 1401
         return '';
@@ -1448,7 +1448,7 @@  discard block
 block discarded – undo
1448 1448
  * @return boolean
1449 1449
  */
1450 1450
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1451
-    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1451
+    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1452 1452
 }
1453 1453
 
1454 1454
 /**
@@ -1459,7 +1459,7 @@  discard block
 block discarded – undo
1459 1459
  * @return boolean
1460 1460
  */
1461 1461
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1462
-    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1462
+    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1463 1463
 }
1464 1464
 
1465 1465
 /**
@@ -1885,7 +1885,7 @@  discard block
 block discarded – undo
1885 1885
     }
1886 1886
     $id = 'recording-' . $target . '-' . $recording['recordID'];
1887 1887
     $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;';
1888
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1888
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1889 1889
         // With icon for $manageaction.
1890 1890
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1891 1891
         $linkattributes = array(
@@ -2148,7 +2148,7 @@  discard block
 block discarded – undo
2148 2148
         // Enqueue it.
2149 2149
         \core\task\manager::queue_adhoc_task($task);
2150 2150
     } catch (Exception $e) {
2151
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2151
+        mtrace("Error while enqueuing completion_update_state task. " . (string)$e);
2152 2152
     }
2153 2153
 }
2154 2154
 
@@ -2162,7 +2162,7 @@  discard block
 block discarded – undo
2162 2162
  */
2163 2163
 function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) {
2164 2164
     global $CFG;
2165
-    require_once($CFG->libdir.'/completionlib.php');
2165
+    require_once($CFG->libdir . '/completionlib.php');
2166 2166
     list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn');
2167 2167
     $completion = new completion_info($course);
2168 2168
     if (!$completion->is_enabled($cm)) {
@@ -2952,7 +2952,7 @@  discard block
 block discarded – undo
2952 2952
  */
2953 2953
 function bigbluebuttonbn_format_activity_time($time) {
2954 2954
     global $CFG;
2955
-    require_once($CFG->dirroot.'/calendar/lib.php');
2955
+    require_once($CFG->dirroot . '/calendar/lib.php');
2956 2956
     $activitytime = '';
2957 2957
     if ($time) {
2958 2958
         $activitytime = calendar_day_representation($time) . ' ' .
@@ -3050,7 +3050,7 @@  discard block
 block discarded – undo
3050 3050
  */
3051 3051
 function bigbluebuttonbn_settings_general(&$renderer) {
3052 3052
     // Configuration for BigBlueButton.
3053
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
3053
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
3054 3054
         $renderer->render_group_header('general');
3055 3055
         $renderer->render_group_element(
3056 3056
             'server_url',
@@ -3072,7 +3072,7 @@  discard block
 block discarded – undo
3072 3072
  */
3073 3073
 function bigbluebuttonbn_settings_record(&$renderer) {
3074 3074
     // Configuration for 'recording' feature.
3075
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
3075
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
3076 3076
         $renderer->render_group_header('recording');
3077 3077
         $renderer->render_group_element(
3078 3078
             'recording_default',
@@ -3116,7 +3116,7 @@  discard block
 block discarded – undo
3116 3116
  */
3117 3117
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
3118 3118
     // Configuration for 'import recordings' feature.
3119
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
3119
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
3120 3120
         $renderer->render_group_header('importrecordings');
3121 3121
         $renderer->render_group_element(
3122 3122
             'importrecordings_enabled',
@@ -3138,7 +3138,7 @@  discard block
 block discarded – undo
3138 3138
  */
3139 3139
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
3140 3140
     // Configuration for 'show recordings' feature.
3141
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
3141
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
3142 3142
         $renderer->render_group_header('recordings');
3143 3143
         $renderer->render_group_element(
3144 3144
             'recordings_html_default',
@@ -3192,7 +3192,7 @@  discard block
 block discarded – undo
3192 3192
  */
3193 3193
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
3194 3194
     // Configuration for wait for moderator feature.
3195
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
3195
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
3196 3196
         $renderer->render_group_header('waitformoderator');
3197 3197
         $renderer->render_group_element(
3198 3198
             'waitformoderator_default',
@@ -3222,7 +3222,7 @@  discard block
 block discarded – undo
3222 3222
  */
3223 3223
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
3224 3224
     // Configuration for "static voice bridge" feature.
3225
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
3225
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
3226 3226
         $renderer->render_group_header('voicebridge');
3227 3227
         $renderer->render_group_element(
3228 3228
             'voicebridge_editable',
@@ -3240,7 +3240,7 @@  discard block
 block discarded – undo
3240 3240
  */
3241 3241
 function bigbluebuttonbn_settings_preupload(&$renderer) {
3242 3242
     // Configuration for "preupload presentation" feature.
3243
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
3243
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
3244 3244
         // This feature only works if curl is installed.
3245 3245
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
3246 3246
         if (!extension_loaded('curl')) {
@@ -3268,7 +3268,7 @@  discard block
 block discarded – undo
3268 3268
  */
3269 3269
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
3270 3270
     // Configuration for "preupload presentation" feature.
3271
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
3271
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
3272 3272
         if (extension_loaded('curl')) {
3273 3273
             // This feature only works if curl is installed.
3274 3274
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -3285,7 +3285,7 @@  discard block
 block discarded – undo
3285 3285
  */
3286 3286
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
3287 3287
     // Configuration for "user limit" feature.
3288
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
3288
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
3289 3289
         $renderer->render_group_header('userlimit');
3290 3290
         $renderer->render_group_element(
3291 3291
             'userlimit_default',
@@ -3307,7 +3307,7 @@  discard block
 block discarded – undo
3307 3307
  */
3308 3308
 function bigbluebuttonbn_settings_duration(&$renderer) {
3309 3309
     // Configuration for "scheduled duration" feature.
3310
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
3310
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
3311 3311
         $renderer->render_group_header('scheduled');
3312 3312
         $renderer->render_group_element(
3313 3313
             'scheduled_duration_enabled',
@@ -3333,7 +3333,7 @@  discard block
 block discarded – undo
3333 3333
  */
3334 3334
 function bigbluebuttonbn_settings_participants(&$renderer) {
3335 3335
     // Configuration for defining the default role/user that will be moderator on new activities.
3336
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
3336
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
3337 3337
         $renderer->render_group_header('participant');
3338 3338
         // UI for 'participants' feature.
3339 3339
         $roles = bigbluebuttonbn_get_roles(null, false);
@@ -3358,7 +3358,7 @@  discard block
 block discarded – undo
3358 3358
  */
3359 3359
 function bigbluebuttonbn_settings_notifications(&$renderer) {
3360 3360
     // Configuration for "send notifications" feature.
3361
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
3361
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
3362 3362
         $renderer->render_group_header('sendnotifications');
3363 3363
         $renderer->render_group_element(
3364 3364
             'sendnotifications_enabled',
@@ -3376,14 +3376,14 @@  discard block
 block discarded – undo
3376 3376
  */
3377 3377
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
3378 3378
     // Configuration for "clienttype" feature.
3379
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
3379
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
3380 3380
         $renderer->render_group_header('clienttype');
3381 3381
         $renderer->render_group_element(
3382 3382
             'clienttype_editable',
3383 3383
             $renderer->render_group_element_checkbox('clienttype_editable', 0)
3384 3384
         );
3385 3385
         // Web Client default.
3386
-        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
3386
+        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
3387 3387
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
3388 3388
             BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
3389 3389
         $renderer->render_group_element(
@@ -3406,7 +3406,7 @@  discard block
 block discarded – undo
3406 3406
  */
3407 3407
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
3408 3408
     // Configuration for BigBlueButton.
3409
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3409
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3410 3410
         $renderer->render_group_header('muteonstart');
3411 3411
         $renderer->render_group_element(
3412 3412
             'muteonstart_default',
@@ -3449,7 +3449,7 @@  discard block
 block discarded – undo
3449 3449
  */
3450 3450
 function bigbluebuttonbn_settings_disablecam(&$renderer) {
3451 3451
     // Configuration for BigBlueButton.
3452
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) {
3452
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) {
3453 3453
         $renderer->render_group_element(
3454 3454
             'disablecam_default',
3455 3455
             $renderer->render_group_element_checkbox('disablecam_default', 0)
@@ -3470,7 +3470,7 @@  discard block
 block discarded – undo
3470 3470
  */
3471 3471
 function bigbluebuttonbn_settings_disablemic(&$renderer) {
3472 3472
     // Configuration for BigBlueButton.
3473
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) {
3473
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) {
3474 3474
         $renderer->render_group_element(
3475 3475
             'disablemic_default',
3476 3476
             $renderer->render_group_element_checkbox('disablemic_default', 0)
@@ -3491,7 +3491,7 @@  discard block
 block discarded – undo
3491 3491
  */
3492 3492
 function bigbluebuttonbn_settings_disableprivatechat(&$renderer) {
3493 3493
     // Configuration for BigBlueButton.
3494
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) {
3494
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) {
3495 3495
         $renderer->render_group_element(
3496 3496
             'disableprivatechat_default',
3497 3497
             $renderer->render_group_element_checkbox('disableprivatechat_default', 0)
@@ -3512,7 +3512,7 @@  discard block
 block discarded – undo
3512 3512
  */
3513 3513
 function bigbluebuttonbn_settings_disablepublicchat(&$renderer) {
3514 3514
     // Configuration for BigBlueButton.
3515
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) {
3515
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) {
3516 3516
         $renderer->render_group_element(
3517 3517
             'disablepublicchat_default',
3518 3518
             $renderer->render_group_element_checkbox('disablepublicchat_default', 0)
@@ -3533,7 +3533,7 @@  discard block
 block discarded – undo
3533 3533
  */
3534 3534
 function bigbluebuttonbn_settings_disablenote(&$renderer) {
3535 3535
     // Configuration for BigBlueButton.
3536
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) {
3536
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) {
3537 3537
         $renderer->render_group_element(
3538 3538
             'disablenote_default',
3539 3539
             $renderer->render_group_element_checkbox('disablenote_default', 0)
@@ -3554,7 +3554,7 @@  discard block
 block discarded – undo
3554 3554
  */
3555 3555
 function bigbluebuttonbn_settings_hideuserlist(&$renderer) {
3556 3556
     // Configuration for BigBlueButton.
3557
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) {
3557
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) {
3558 3558
         $renderer->render_group_element(
3559 3559
             'hideuserlist_default',
3560 3560
             $renderer->render_group_element_checkbox('hideuserlist_default', 0)
@@ -3575,7 +3575,7 @@  discard block
 block discarded – undo
3575 3575
  */
3576 3576
 function bigbluebuttonbn_settings_lockedlayout(&$renderer) {
3577 3577
     // Configuration for BigBlueButton.
3578
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) {
3578
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) {
3579 3579
         $renderer->render_group_element(
3580 3580
             'lockedlayout_default',
3581 3581
             $renderer->render_group_element_checkbox('lockedlayout_default', 0)
@@ -3596,7 +3596,7 @@  discard block
 block discarded – undo
3596 3596
  */
3597 3597
 function bigbluebuttonbn_settings_lockonjoin(&$renderer) {
3598 3598
     // Configuration for BigBlueButton.
3599
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) {
3599
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) {
3600 3600
         $renderer->render_group_element(
3601 3601
             'lockonjoin_default',
3602 3602
             $renderer->render_group_element_checkbox('lockonjoin_default', 0)
@@ -3617,7 +3617,7 @@  discard block
 block discarded – undo
3617 3617
  */
3618 3618
 function bigbluebuttonbn_settings_lockonjoinconfigurable(&$renderer) {
3619 3619
     // Configuration for BigBlueButton.
3620
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) {
3620
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) {
3621 3621
         $renderer->render_group_element(
3622 3622
             'lockonjoinconfigurable_default',
3623 3623
             $renderer->render_group_element_checkbox('lockonjoinconfigurable_default', 0)
@@ -3653,7 +3653,7 @@  discard block
 block discarded – undo
3653 3653
  */
3654 3654
 function bigbluebuttonbn_settings_extended(&$renderer) {
3655 3655
     // Configuration for extended capabilities.
3656
-    if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3656
+    if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3657 3657
         return;
3658 3658
     }
3659 3659
     $renderer->render_group_header('extended_capabilities');
@@ -3691,7 +3691,7 @@  discard block
 block discarded – undo
3691 3691
     global $DB;
3692 3692
     do {
3693 3693
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
3694
-        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3694
+        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3695 3695
     } while ($meetingid == $encodedseed);
3696 3696
     return $encodedseed;
3697 3697
 }
@@ -3904,7 +3904,7 @@  discard block
 block discarded – undo
3904 3904
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3905 3905
     global $DB;
3906 3906
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3907
-    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3907
+    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3908 3908
     return $ownerid;
3909 3909
 }
3910 3910
 
@@ -4011,7 +4011,7 @@  discard block
 block discarded – undo
4011 4011
         'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
4012 4012
     ];
4013 4013
     // Special metadata for recording processing.
4014
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
4014
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
4015 4015
         $metadata["bn-recording-status"] = json_encode(
4016 4016
             array(
4017 4017
                 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
@@ -4019,14 +4019,14 @@  discard block
 block discarded – undo
4019 4019
             )
4020 4020
         );
4021 4021
     }
4022
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
4022
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
4023 4023
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
4024 4024
     }
4025
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
4025
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
4026 4026
         $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL'];
4027 4027
     }
4028 4028
     // Special metadata for Opencast recordings (passing opencast seriesid of the course as opencast-dc-isPartOf as metadata).
4029
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('oc_recording')) {
4029
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('oc_recording')) {
4030 4030
         $ocseriesid = bigbluebuttonbn_check_opencast($bbbsession['course']->id);
4031 4031
         if ($ocseriesid != false) {
4032 4032
             $metadata['opencast-dc-isPartOf'] = $ocseriesid;
@@ -4083,7 +4083,7 @@  discard block
 block discarded – undo
4083 4083
  */
4084 4084
 function bigbluebuttonbn_settings_opencastintegration(&$renderer) {
4085 4085
     // Configuration for 'Opencast integration' feature when Opencast plugins are installed.
4086
-    if ((boolean) bigbluebuttonbn_check_opencast()) {
4086
+    if ((boolean)bigbluebuttonbn_check_opencast()) {
4087 4087
         $renderer->render_group_header('opencast');
4088 4088
         $renderer->render_group_element(
4089 4089
             'oc_recording',
Please login to merge, or discard this patch.
oc_player.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
 
26 26
 global $PAGE, $OUTPUT, $CFG;
27 27
 
28
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
29
-require_once(dirname(__FILE__).'/locallib.php');
28
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
29
+require_once(dirname(__FILE__) . '/locallib.php');
30 30
 
31 31
 require_once($CFG->dirroot . '/mod/lti/locallib.php');
32 32
 require_once($CFG->dirroot . '/lib/oauthlib.php');
Please login to merge, or discard this patch.
viewlib.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         $groupname = groups_get_group_name($bbbsession['group']);
55 55
     }
56 56
     // Assign group default values.
57
-    $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
58
-    $bbbsession['meetingname'] .= ' ('.$groupname.')';
57
+    $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
58
+    $bbbsession['meetingname'] .= ' (' . $groupname . ')';
59 59
     if (count($groups) == 0) {
60 60
         // Only the All participants group exists.
61 61
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info');
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     if (has_capability('moodle/site:accessallgroups', $context)) {
66 66
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'));
67 67
     }
68
-    $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
68
+    $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
69 69
     groups_print_activity_menu($bbbsession['cm'], $urltoroot);
70 70
     echo '<br><br>';
71 71
 }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
139 139
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
140 140
     }
141
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
141
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
142 142
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
143 143
 }
144 144
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     // Repeating the above conditions to show Opencast Recordings, when Opencast series id is available in the current course and
173 173
     // bigbluebuttonbn_oc_show_recording config is enabled.
174 174
     $seriesid = bigbluebuttonbn_check_opencast($bbbsession['course']->id);
175
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('oc_show_recording') && !empty($seriesid)) {
175
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('oc_show_recording') && !empty($seriesid)) {
176 176
         if ($type == BIGBLUEBUTTONBN_TYPE_ALL && $bbbsession['record']) {
177 177
             $output .= html_writer::start_tag('div', array('id' => 'bigbluebuttonbn_view_opencast_recordings_header', 'class' => 'mt-3'));
178 178
             $output .= html_writer::tag('h4', get_string('view_section_title_opencast_recordings', 'bigbluebuttonbn'));
@@ -223,12 +223,12 @@  discard block
 block discarded – undo
223 223
     // JavaScript variables for room.
224 224
     $openingtime = '';
225 225
     if ($bbbsession['openingtime']) {
226
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
226
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
227 227
             userdate($bbbsession['openingtime']);
228 228
     }
229 229
     $closingtime = '';
230 230
     if ($bbbsession['closingtime']) {
231
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
231
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
232 232
             userdate($bbbsession['closingtime']);
233 233
     }
234 234
     $jsvars += array(
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     $output .= $OUTPUT->box_end();
246 246
     // Action button box.
247 247
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
248
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
248
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
249 249
     $output .= $OUTPUT->box_end();
250 250
     if ($activity == 'ended') {
251 251
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     // If there are meetings with recordings load the data to the table.
279 279
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
280 280
         // Render a plain html table.
281
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
281
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
282 282
     }
283 283
     // JavaScript variables for recordings with YUI.
284 284
     $jsvars += array(
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
         array('type' => 'button',
336 336
             'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
337 337
             'class' => 'btn btn-secondary',
338
-            'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
339
-                $bbbsession['bigbluebuttonbn']->id.'\''));
338
+            'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
339
+                $bbbsession['bigbluebuttonbn']->id . '\''));
340 340
     $output  = html_writer::empty_tag('br');
341 341
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
342 342
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -355,10 +355,10 @@  discard block
 block discarded – undo
355 355
     if (!is_null($bbbsession['presentation']['url'])) {
356 356
         $attributes = array('title' => $bbbsession['presentation']['name']);
357 357
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
358
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
359
-            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
358
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
359
+            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
360 360
             $OUTPUT->action_link($bbbsession['presentation']['url'],
361
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
361
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
362 362
     }
363 363
     return '';
364 364
 }
Please login to merge, or discard this patch.