Completed
Pull Request — master (#164)
by Jesus
02:06
created
brokerlib.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 function bigbluebuttonbn_broker_recording_info_current($recording, $params) {
209 209
     $callbackresponse['status'] = true;
210 210
     $callbackresponse['found'] = true;
211
-    $callbackresponse['published'] = (string) $recording['published'];
211
+    $callbackresponse['published'] = (string)$recording['published'];
212 212
     if (!isset($params['meta']) || empty($params['meta'])) {
213 213
         return $callbackresponse;
214 214
     }
@@ -559,8 +559,8 @@  discard block
 block discarded – undo
559 559
             array('HS256')
560 560
         );
561 561
     } catch (Exception $e) {
562
-        $error = 'Caught exception: '.$e->getMessage();
563
-        header('HTTP/1.0 400 Bad Request. '.$error);
562
+        $error = 'Caught exception: ' . $e->getMessage();
563
+        header('HTTP/1.0 400 Bad Request. ' . $error);
564 564
         return;
565 565
     }
566 566
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -590,8 +590,8 @@  discard block
 block discarded – undo
590 590
         bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, json_encode($meta));
591 591
         header('HTTP/1.0 202 Accepted');
592 592
     } catch (Exception $e) {
593
-        $error = 'Caught exception: '.$e->getMessage();
594
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
593
+        $error = 'Caught exception: ' . $e->getMessage();
594
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
595 595
     }
596 596
 }
597 597
 
@@ -612,13 +612,13 @@  discard block
 block discarded – undo
612 612
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
613 613
     if (!isset($importrecordings[$params['id']])) {
614 614
         $error = "Recording {$params['id']} could not be found. It can not be imported";
615
-        header('HTTP/1.0 404 Not found. '.$error);
615
+        header('HTTP/1.0 404 Not found. ' . $error);
616 616
         return;
617 617
     }
618 618
     $callbackresponse = array('status' => true);
619 619
     $importrecordings[$params['id']]['imported'] = true;
620 620
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
621
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
621
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
622 622
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
623 623
     // Moodle event logger: Create an event for recording imported.
624 624
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
     $action = strtolower($params['action']);
713 713
     $requiredparams = bigbluebuttonbn_broker_required_parameters();
714 714
     if (!array_key_exists($action, $requiredparams)) {
715
-        return 'Action '.$params['action'].' can not be performed.';
715
+        return 'Action ' . $params['action'] . ' can not be performed.';
716 716
     }
717 717
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
718 718
 }
Please login to merge, or discard this patch.
classes/locallib/notifier.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -44,29 +44,29 @@  discard block
 block discarded – undo
44 44
      * @return string
45 45
      */
46 46
     public static function htmlmsg_instance_updated($msg) {
47
-        $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '.
48
-            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n";
49
-        $messagetext .= '<p><b>'.$msg->activity_title.'</b> '.
50
-            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n";
51
-        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n";
52
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
53
-            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n";
54
-        $messagetext .= $msg->activity_title.'</td></tr>'."\n";
55
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
56
-            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n";
57
-        $messagetext .= $msg->activity_description.'</td></tr>'."\n";
58
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
59
-            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n";
60
-        $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n";
61
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
62
-            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n";
63
-        $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n";
64
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '.
65
-            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n";
66
-        $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n";
67
-        $messagetext .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '.
68
-            $msg->user_name.'('.$msg->user_email.') ';
69
-        $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>';
47
+        $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' .
48
+            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n";
49
+        $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' .
50
+            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n";
51
+        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n";
52
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
53
+            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n";
54
+        $messagetext .= $msg->activity_title . '</td></tr>' . "\n";
55
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
56
+            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n";
57
+        $messagetext .= $msg->activity_description . '</td></tr>' . "\n";
58
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
59
+            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
60
+        $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n";
61
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
62
+            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
63
+        $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n";
64
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' .
65
+            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n";
66
+        $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n";
67
+        $messagetext .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' .
68
+            $msg->user_name . '(' . $msg->user_email . ') ';
69
+        $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>';
70 70
         return $messagetext;
71 71
     }
72 72
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $course = $coursemodinfo->get_course($bigbluebuttonbn->course);
84 84
         $sender = $USER;
85 85
         // Prepare message.
86
-        $msg = (object) array();
86
+        $msg = (object)array();
87 87
         // Build the message_body.
88 88
         $msg->action = $action;
89 89
         $msg->activity_type = '';
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
      * @return void
115 115
      */
116 116
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
117
-        return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
118
-            ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
119
-            get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
117
+        return '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') .
118
+            ' &quot;' . $bigbluebuttonbn->name . '&quot; ' .
119
+            get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>';
120 120
     }
121 121
 
122 122
     /**
Please login to merge, or discard this patch.
locallib.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     }
190 190
     if ($xml) {
191 191
         // Either failure or success without meeting info.
192
-        return (array) $xml;
192
+        return (array)$xml;
193 193
     }
194 194
     // If the server is unreachable, then prompts the user of the necessary action.
195 195
     return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable');
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
                 foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) {
269 269
                     $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url(
270 270
                         'getRecordings',
271
-                        ['recordID' => implode(',', (array) $breakoutroom)]
271
+                        ['recordID' => implode(',', (array)$breakoutroom)]
272 272
                     );
273 273
                     $xml = bigbluebuttonbn_wrap_xml_load_file($url);
274 274
                     if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
         // Override imported flag with actual ID.
325 325
         $recording['imported'] = $recordimported->id;
326 326
         if (isset($recordimported->protected)) {
327
-            $recording['protected'] = (string) $recordimported->protected;
327
+            $recording['protected'] = (string)$recordimported->protected;
328 328
         }
329 329
         $recordsimportedarray[$recording['recordID']] = $recording;
330 330
     }
@@ -354,21 +354,21 @@  discard block
 block discarded – undo
354 354
     // Add formats.
355 355
     $playbackarray = array();
356 356
     foreach ($recording->playback->format as $format) {
357
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
358
-            'url' => trim((string) $format->url), 'length' => (string) $format->length);
357
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
358
+            'url' => trim((string)$format->url), 'length' => (string)$format->length);
359 359
         // Add preview per format when existing.
360 360
         if ($format->preview) {
361
-            $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
361
+            $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
362 362
         }
363 363
     }
364 364
     // Add the metadata to the recordings array.
365 365
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
366
-    $recordingarray = array('recordID' => (string) $recording->recordID,
367
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
368
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
369
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
366
+    $recordingarray = array('recordID' => (string)$recording->recordID,
367
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
368
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
369
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
370 370
     if (isset($recording->protected)) {
371
-        $recordingarray['protected'] = (string) $recording->protected;
371
+        $recordingarray['protected'] = (string)$recording->protected;
372 372
     }
373 373
     return $recordingarray + $metadataarray;
374 374
 }
@@ -383,9 +383,9 @@  discard block
 block discarded – undo
383 383
 function bigbluebuttonbn_get_recording_preview_images($preview) {
384 384
     $imagesarray = array();
385 385
     foreach ($preview->images->image as $image) {
386
-        $imagearray = array('url' => trim((string) $image));
386
+        $imagearray = array('url' => trim((string)$image));
387 387
         foreach ($image->attributes() as $attkey => $attvalue) {
388
-            $imagearray[$attkey] = (string) $attvalue;
388
+            $imagearray[$attkey] = (string)$attvalue;
389 389
         }
390 390
         array_push($imagesarray, $imagearray);
391 391
     }
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
     $ids = explode(',', $recordids);
481 481
     foreach ($ids as $id) {
482 482
         $xml = bigbluebuttonbn_wrap_xml_load_file(
483
-            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
483
+            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
484 484
         );
485 485
         if ($xml && $xml->returncode != 'SUCCESS') {
486 486
             return false;
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
  */
652 652
 function bigbluebuttonbn_get_users(context $context = null) {
653 653
 
654
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
654
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
655 655
     foreach ($users as $key => $value) {
656 656
         $users[$key] = fullname($value);
657 657
     }
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
  */
668 668
 function bigbluebuttonbn_get_users_select(context $context = null) {
669 669
 
670
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
670
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
671 671
     foreach ($users as $key => $value) {
672 672
         $users[$key] = array('id' => $value->id, 'name' => fullname($value));
673 673
     }
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
  */
684 684
 function bigbluebuttonbn_get_roles(context $context = null) {
685 685
 
686
-    $roles = (array) role_get_names($context);
686
+    $roles = (array)role_get_names($context);
687 687
     foreach ($roles as $key => $value) {
688 688
         $roles[$key] = $value->localname;
689 689
     }
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
  */
700 700
 function bigbluebuttonbn_get_roles_select(context $context = null) {
701 701
 
702
-    $roles = (array) role_get_names($context);
702
+    $roles = (array)role_get_names($context);
703 703
     foreach ($roles as $key => $value) {
704 704
         $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
705 705
     }
@@ -715,9 +715,9 @@  discard block
 block discarded – undo
715 715
  */
716 716
 function bigbluebuttonbn_get_role($id) {
717 717
 
718
-    $roles = (array) role_get_names();
718
+    $roles = (array)role_get_names();
719 719
     if (is_numeric($id) && isset($roles[$id])) {
720
-        return (object) $roles[$id];
720
+        return (object)$roles[$id];
721 721
     }
722 722
     foreach ($roles as $role) {
723 723
         if ($role->shortname == $id) {
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
801 801
                 $participantlist[] = array(
802 802
                     'selectiontype' => 'user',
803
-                    'selectionid' => (string) $ownerid,
803
+                    'selectionid' => (string)$ownerid,
804 804
                     'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
805 805
             }
806 806
             continue;
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
     $now = time();
987 987
     if ($closingtime > 0 && $now < $closingtime) {
988 988
         $duration = ceil(($closingtime - $now) / 60);
989
-        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
989
+        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
990 990
         $duration = intval($duration) + $compensationtime;
991 991
     }
992 992
     return $duration;
@@ -1189,16 +1189,16 @@  discard block
 block discarded – undo
1189 1189
  * @return array
1190 1190
  */
1191 1191
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1192
-    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1192
+    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1193 1193
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1194 1194
     $result = $cache->get($meetingid);
1195 1195
     $now = time();
1196 1196
     if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) {
1197 1197
         // Use the value in the cache.
1198
-        return (array) json_decode($result['meeting_info']);
1198
+        return (array)json_decode($result['meeting_info']);
1199 1199
     }
1200 1200
     // Ping again and refresh the cache.
1201
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1201
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1202 1202
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1203 1203
     );
1204 1204
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1344,7 +1344,7 @@  discard block
 block discarded – undo
1344 1344
  */
1345 1345
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1346 1346
     $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml);
1347
-    $configxmlarray = (array) $configxml;
1347
+    $configxmlarray = (array)$configxml;
1348 1348
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1349 1349
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1350 1350
         return '';
@@ -1399,7 +1399,7 @@  discard block
 block discarded – undo
1399 1399
  * @return boolean
1400 1400
  */
1401 1401
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1402
-    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1402
+    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1403 1403
 }
1404 1404
 
1405 1405
 /**
@@ -1410,7 +1410,7 @@  discard block
 block discarded – undo
1410 1410
  * @return boolean
1411 1411
  */
1412 1412
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1413
-    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1413
+    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1414 1414
 }
1415 1415
 
1416 1416
 /**
@@ -1817,7 +1817,7 @@  discard block
 block discarded – undo
1817 1817
     }
1818 1818
     $id = 'recording-' . $target . '-' . $recording['recordID'];
1819 1819
     $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1820
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1820
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1821 1821
         // With icon for $manageaction.
1822 1822
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1823 1823
         $linkattributes = array(
@@ -1961,7 +1961,7 @@  discard block
 block discarded – undo
1961 1961
         $groupmode = $DB->get_record_sql($sql, $params, IGNORE_MULTIPLE);
1962 1962
 
1963 1963
         $displayrow = true;
1964
-        if ((isset($groupmode->groupmode) && (int) $groupmode->groupmode != VISIBLEGROUPS)
1964
+        if ((isset($groupmode->groupmode) && (int)$groupmode->groupmode != VISIBLEGROUPS)
1965 1965
             && !$bbbsession['administrator'] && !$bbbsession['moderator']) {
1966 1966
             $groupid = explode('[', $recording['meetingID']);
1967 1967
             if (isset($groupid[1])) {
@@ -2111,7 +2111,7 @@  discard block
 block discarded – undo
2111 2111
         // Enqueue it.
2112 2112
         \core\task\manager::queue_adhoc_task($task);
2113 2113
     } catch (Exception $e) {
2114
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2114
+        mtrace("Error while enqueuing completion_update_state task. " . (string)$e);
2115 2115
     }
2116 2116
 }
2117 2117
 
@@ -2658,7 +2658,7 @@  discard block
 block discarded – undo
2658 2658
 function bigbluebuttonbn_settings_general(&$renderer) {
2659 2659
 
2660 2660
     // Configuration for BigBlueButton.
2661
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2661
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2662 2662
         $renderer->render_group_header('general');
2663 2663
         $renderer->render_group_element(
2664 2664
             'server_url',
@@ -2681,7 +2681,7 @@  discard block
 block discarded – undo
2681 2681
 function bigbluebuttonbn_settings_record(&$renderer) {
2682 2682
 
2683 2683
     // Configuration for 'recording' feature.
2684
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2684
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2685 2685
         $renderer->render_group_header('recording');
2686 2686
         $renderer->render_group_element(
2687 2687
             'recording_default',
@@ -2726,7 +2726,7 @@  discard block
 block discarded – undo
2726 2726
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2727 2727
 
2728 2728
     // Configuration for 'import recordings' feature.
2729
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2729
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2730 2730
         $renderer->render_group_header('importrecordings');
2731 2731
         $renderer->render_group_element(
2732 2732
             'importrecordings_enabled',
@@ -2749,7 +2749,7 @@  discard block
 block discarded – undo
2749 2749
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2750 2750
 
2751 2751
     // Configuration for 'show recordings' feature.
2752
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2752
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2753 2753
         $renderer->render_group_header('recordings');
2754 2754
         $renderer->render_group_element(
2755 2755
             'recordings_html_default',
@@ -2800,7 +2800,7 @@  discard block
 block discarded – undo
2800 2800
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2801 2801
 
2802 2802
     // Configuration for wait for moderator feature.
2803
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2803
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2804 2804
         $renderer->render_group_header('waitformoderator');
2805 2805
         $renderer->render_group_element(
2806 2806
             'waitformoderator_default',
@@ -2831,7 +2831,7 @@  discard block
 block discarded – undo
2831 2831
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2832 2832
 
2833 2833
     // Configuration for "static voice bridge" feature.
2834
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2834
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2835 2835
         $renderer->render_group_header('voicebridge');
2836 2836
         $renderer->render_group_element(
2837 2837
             'voicebridge_editable',
@@ -2850,7 +2850,7 @@  discard block
 block discarded – undo
2850 2850
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2851 2851
 
2852 2852
     // Configuration for "preupload presentation" feature.
2853
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2853
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2854 2854
         // This feature only works if curl is installed.
2855 2855
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2856 2856
         if (!extension_loaded('curl')) {
@@ -2879,7 +2879,7 @@  discard block
 block discarded – undo
2879 2879
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2880 2880
 
2881 2881
     // Configuration for "preupload presentation" feature.
2882
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2882
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2883 2883
         if (extension_loaded('curl')) {
2884 2884
             // This feature only works if curl is installed.
2885 2885
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2897,7 +2897,7 @@  discard block
 block discarded – undo
2897 2897
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2898 2898
 
2899 2899
     // Configuration for "user limit" feature.
2900
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2900
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2901 2901
         $renderer->render_group_header('userlimit');
2902 2902
         $renderer->render_group_element(
2903 2903
             'userlimit_default',
@@ -2920,7 +2920,7 @@  discard block
 block discarded – undo
2920 2920
 function bigbluebuttonbn_settings_duration(&$renderer) {
2921 2921
 
2922 2922
     // Configuration for "scheduled duration" feature.
2923
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2923
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2924 2924
         $renderer->render_group_header('scheduled');
2925 2925
         $renderer->render_group_element(
2926 2926
             'scheduled_duration_enabled',
@@ -2947,7 +2947,7 @@  discard block
 block discarded – undo
2947 2947
 function bigbluebuttonbn_settings_participants(&$renderer) {
2948 2948
 
2949 2949
     // Configuration for defining the default role/user that will be moderator on new activities.
2950
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2950
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2951 2951
         $renderer->render_group_header('participant');
2952 2952
         // UI for 'participants' feature.
2953 2953
         $roles = bigbluebuttonbn_get_roles();
@@ -2973,7 +2973,7 @@  discard block
 block discarded – undo
2973 2973
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2974 2974
 
2975 2975
     // Configuration for "send notifications" feature.
2976
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2976
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2977 2977
         $renderer->render_group_header('sendnotifications');
2978 2978
         $renderer->render_group_element(
2979 2979
             'sendnotifications_enabled',
@@ -2992,14 +2992,14 @@  discard block
 block discarded – undo
2992 2992
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
2993 2993
 
2994 2994
     // Configuration for "clienttype" feature.
2995
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2995
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2996 2996
         $renderer->render_group_header('clienttype');
2997 2997
         $renderer->render_group_element(
2998 2998
             'clienttype_editable',
2999 2999
             $renderer->render_group_element_checkbox('clienttype_editable', 0)
3000 3000
         );
3001 3001
         // Web Client default.
3002
-        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
3002
+        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
3003 3003
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
3004 3004
             BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
3005 3005
         $renderer->render_group_element(
@@ -3023,7 +3023,7 @@  discard block
 block discarded – undo
3023 3023
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
3024 3024
 
3025 3025
     // Configuration for BigBlueButton.
3026
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3026
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3027 3027
         $renderer->render_group_header('muteonstart');
3028 3028
         $renderer->render_group_element(
3029 3029
             'muteonstart_default',
@@ -3046,7 +3046,7 @@  discard block
 block discarded – undo
3046 3046
 function bigbluebuttonbn_settings_extended(&$renderer) {
3047 3047
 
3048 3048
     // Configuration for 'notify users when recording ready' feature.
3049
-    if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3049
+    if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3050 3050
         return;
3051 3051
     }
3052 3052
     $renderer->render_group_header('extended_capabilities');
@@ -3075,7 +3075,7 @@  discard block
 block discarded – undo
3075 3075
     global $DB;
3076 3076
     do {
3077 3077
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
3078
-        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3078
+        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3079 3079
     } while ($meetingid == $encodedseed);
3080 3080
     return $encodedseed;
3081 3081
 }
@@ -3301,7 +3301,7 @@  discard block
 block discarded – undo
3301 3301
 
3302 3302
     global $DB;
3303 3303
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3304
-    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3304
+    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3305 3305
     return $ownerid;
3306 3306
 }
3307 3307
 
@@ -3346,8 +3346,8 @@  discard block
 block discarded – undo
3346 3346
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3347 3347
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3348 3348
     // Extra data for setting up the Meeting.
3349
-    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3350
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3349
+    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3350
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3351 3351
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3352 3352
     }
3353 3353
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3500,7 +3500,7 @@  discard block
 block discarded – undo
3500 3500
         'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
3501 3501
     ];
3502 3502
     // Special metadata for recording processing.
3503
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3503
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3504 3504
         $metadata["bn-recording-status"] = json_encode(
3505 3505
             array(
3506 3506
                 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
@@ -3508,10 +3508,10 @@  discard block
 block discarded – undo
3508 3508
             )
3509 3509
         );
3510 3510
     }
3511
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3511
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3512 3512
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
3513 3513
     }
3514
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3514
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3515 3515
         $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL'];
3516 3516
     }
3517 3517
     return $metadata;
Please login to merge, or discard this patch.