Completed
Pull Request — master (#224)
by
unknown
02:07
created
locallib.php 2 patches
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     }
191 191
     if ($xml) {
192 192
         // Either failure or success without meeting info.
193
-        return (array) $xml;
193
+        return (array)$xml;
194 194
     }
195 195
     // If the server is unreachable, then prompts the user of the necessary action.
196 196
     return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable');
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     $pagecount = 25;
252 252
     $pages = floor(count($meetingidsarray) / $pagecount) + 1;
253 253
 
254
-    if(count($meetingidsarray) > 0 &&  count($meetingidsarray) % $pagecount == 0)
254
+    if (count($meetingidsarray) > 0 && count($meetingidsarray) % $pagecount == 0)
255 255
         $pages--;
256 256
 
257 257
     for ($page = 1; $page <= $pages; ++$page) {
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                 foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) {
285 285
                     $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url(
286 286
                         'getRecordings',
287
-                        ['recordID' => implode(',', (array) $breakoutroom)]
287
+                        ['recordID' => implode(',', (array)$breakoutroom)]
288 288
                     );
289 289
                     $xml = bigbluebuttonbn_wrap_xml_load_file($url);
290 290
                     if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
         // Override imported flag with actual ID.
341 341
         $recording['imported'] = $recordimported->id;
342 342
         if (isset($recordimported->protected)) {
343
-            $recording['protected'] = (string) $recordimported->protected;
343
+            $recording['protected'] = (string)$recordimported->protected;
344 344
         }
345 345
         $recordsimportedarray[$recording['recordID']] = $recording;
346 346
     }
@@ -370,21 +370,21 @@  discard block
 block discarded – undo
370 370
     // Add formats.
371 371
     $playbackarray = array();
372 372
     foreach ($recording->playback->format as $format) {
373
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
374
-            'url' => trim((string) $format->url), 'length' => (string) $format->length);
373
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
374
+            'url' => trim((string)$format->url), 'length' => (string)$format->length);
375 375
         // Add preview per format when existing.
376 376
         if ($format->preview) {
377
-            $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
377
+            $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
378 378
         }
379 379
     }
380 380
     // Add the metadata to the recordings array.
381 381
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
382
-    $recordingarray = array('recordID' => (string) $recording->recordID,
383
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
384
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
385
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
382
+    $recordingarray = array('recordID' => (string)$recording->recordID,
383
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
384
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
385
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
386 386
     if (isset($recording->protected)) {
387
-        $recordingarray['protected'] = (string) $recording->protected;
387
+        $recordingarray['protected'] = (string)$recording->protected;
388 388
     }
389 389
     return $recordingarray + $metadataarray;
390 390
 }
@@ -399,9 +399,9 @@  discard block
 block discarded – undo
399 399
 function bigbluebuttonbn_get_recording_preview_images($preview) {
400 400
     $imagesarray = array();
401 401
     foreach ($preview->images->image as $image) {
402
-        $imagearray = array('url' => trim((string) $image));
402
+        $imagearray = array('url' => trim((string)$image));
403 403
         foreach ($image->attributes() as $attkey => $attvalue) {
404
-            $imagearray[$attkey] = (string) $attvalue;
404
+            $imagearray[$attkey] = (string)$attvalue;
405 405
         }
406 406
         array_push($imagesarray, $imagearray);
407 407
     }
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
     $ids = explode(',', $recordids);
497 497
     foreach ($ids as $id) {
498 498
         $xml = bigbluebuttonbn_wrap_xml_load_file(
499
-            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
499
+            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
500 500
         );
501 501
         if ($xml && $xml->returncode != 'SUCCESS') {
502 502
             return false;
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
  * @return array $users
668 668
  */
669 669
 function bigbluebuttonbn_get_users(context $context = null) {
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] = fullname($value);
673 673
     }
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
 function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) {
687 687
     // CONTRIB-7972, check the group of current user and course group mode.
688 688
     $groups = null;
689
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
689
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
690 690
     $course = get_course($context->instanceid);
691 691
     $groupmode = groups_get_course_groupmode($course);
692 692
     if ($bbactivity) {
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
         $groups = groups_get_all_groups($course->id, $USER->id);
700 700
         $users = [];
701 701
         foreach ($groups as $g) {
702
-            $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true);
702
+            $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true);
703 703
         }
704 704
     }
705 705
     return array_map(
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
  * @return array $roles
718 718
  */
719 719
 function bigbluebuttonbn_get_roles(context $context = null) {
720
-    $roles = (array) role_get_names($context);
720
+    $roles = (array)role_get_names($context);
721 721
     foreach ($roles as $key => $value) {
722 722
         $roles[$key] = $value->localname;
723 723
     }
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
  * @return array $users
733 733
  */
734 734
 function bigbluebuttonbn_get_roles_select(context $context = null) {
735
-    $roles = (array) role_get_names($context);
735
+    $roles = (array)role_get_names($context);
736 736
     foreach ($roles as $key => $value) {
737 737
         $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
738 738
     }
@@ -747,9 +747,9 @@  discard block
 block discarded – undo
747 747
  * @return object $role
748 748
  */
749 749
 function bigbluebuttonbn_get_role($id) {
750
-    $roles = (array) role_get_names();
750
+    $roles = (array)role_get_names();
751 751
     if (is_numeric($id) && isset($roles[$id])) {
752
-        return (object) $roles[$id];
752
+        return (object)$roles[$id];
753 753
     }
754 754
     foreach ($roles as $role) {
755 755
         if ($role->shortname == $id) {
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
830 830
                 $participantlist[] = array(
831 831
                     'selectiontype' => 'user',
832
-                    'selectionid' => (string) $ownerid,
832
+                    'selectionid' => (string)$ownerid,
833 833
                     'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
834 834
             }
835 835
             continue;
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
     $now = time();
1012 1012
     if ($closingtime > 0 && $now < $closingtime) {
1013 1013
         $duration = ceil(($closingtime - $now) / 60);
1014
-        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
1014
+        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
1015 1015
         $duration = intval($duration) + $compensationtime;
1016 1016
     }
1017 1017
     return $duration;
@@ -1213,16 +1213,16 @@  discard block
 block discarded – undo
1213 1213
  * @return array
1214 1214
  */
1215 1215
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1216
-    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1216
+    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1217 1217
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1218 1218
     $result = $cache->get($meetingid);
1219 1219
     $now = time();
1220 1220
     if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) {
1221 1221
         // Use the value in the cache.
1222
-        return (array) json_decode($result['meeting_info']);
1222
+        return (array)json_decode($result['meeting_info']);
1223 1223
     }
1224 1224
     // Ping again and refresh the cache.
1225
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1225
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1226 1226
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1227 1227
     );
1228 1228
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
  */
1370 1370
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1371 1371
     $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml);
1372
-    $configxmlarray = (array) $configxml;
1372
+    $configxmlarray = (array)$configxml;
1373 1373
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1374 1374
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1375 1375
         return '';
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
  * @return boolean
1423 1423
  */
1424 1424
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1425
-    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1425
+    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1426 1426
 }
1427 1427
 
1428 1428
 /**
@@ -1433,7 +1433,7 @@  discard block
 block discarded – undo
1433 1433
  * @return boolean
1434 1434
  */
1435 1435
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1436
-    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1436
+    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1437 1437
 }
1438 1438
 
1439 1439
 /**
@@ -1858,7 +1858,7 @@  discard block
 block discarded – undo
1858 1858
     }
1859 1859
     $id = 'recording-' . $target . '-' . $recording['recordID'];
1860 1860
     $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;';
1861
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1861
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1862 1862
         // With icon for $manageaction.
1863 1863
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1864 1864
         $linkattributes = array(
@@ -2117,7 +2117,7 @@  discard block
 block discarded – undo
2117 2117
         // Enqueue it.
2118 2118
         \core\task\manager::queue_adhoc_task($task);
2119 2119
     } catch (Exception $e) {
2120
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2120
+        mtrace("Error while enqueuing completion_update_state task. " . (string)$e);
2121 2121
     }
2122 2122
 }
2123 2123
 
@@ -2131,7 +2131,7 @@  discard block
 block discarded – undo
2131 2131
  */
2132 2132
 function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) {
2133 2133
     global $CFG;
2134
-    require_once($CFG->libdir.'/completionlib.php');
2134
+    require_once($CFG->libdir . '/completionlib.php');
2135 2135
     list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn');
2136 2136
     $completion = new completion_info($course);
2137 2137
     if (!$completion->is_enabled($cm)) {
@@ -2560,7 +2560,7 @@  discard block
 block discarded – undo
2560 2560
  */
2561 2561
 function bigbluebuttonbn_format_activity_time($time) {
2562 2562
     global $CFG;
2563
-    require_once($CFG->dirroot.'/calendar/lib.php');
2563
+    require_once($CFG->dirroot . '/calendar/lib.php');
2564 2564
     $activitytime = '';
2565 2565
     if ($time) {
2566 2566
         $activitytime = calendar_day_representation($time) . ' ' .
@@ -2658,7 +2658,7 @@  discard block
 block discarded – undo
2658 2658
  */
2659 2659
 function bigbluebuttonbn_settings_general(&$renderer) {
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',
@@ -2680,7 +2680,7 @@  discard block
 block discarded – undo
2680 2680
  */
2681 2681
 function bigbluebuttonbn_settings_record(&$renderer) {
2682 2682
     // Configuration for 'recording' feature.
2683
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2683
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2684 2684
         $renderer->render_group_header('recording');
2685 2685
         $renderer->render_group_element(
2686 2686
             'recording_default',
@@ -2724,7 +2724,7 @@  discard block
 block discarded – undo
2724 2724
  */
2725 2725
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2726 2726
     // Configuration for 'import recordings' feature.
2727
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2727
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2728 2728
         $renderer->render_group_header('importrecordings');
2729 2729
         $renderer->render_group_element(
2730 2730
             'importrecordings_enabled',
@@ -2746,7 +2746,7 @@  discard block
 block discarded – undo
2746 2746
  */
2747 2747
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2748 2748
     // Configuration for 'show recordings' feature.
2749
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2749
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2750 2750
         $renderer->render_group_header('recordings');
2751 2751
         $renderer->render_group_element(
2752 2752
             'recordings_html_default',
@@ -2800,7 +2800,7 @@  discard block
 block discarded – undo
2800 2800
  */
2801 2801
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
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',
@@ -2830,7 +2830,7 @@  discard block
 block discarded – undo
2830 2830
  */
2831 2831
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2832 2832
     // Configuration for "static voice bridge" feature.
2833
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2833
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2834 2834
         $renderer->render_group_header('voicebridge');
2835 2835
         $renderer->render_group_element(
2836 2836
             'voicebridge_editable',
@@ -2848,7 +2848,7 @@  discard block
 block discarded – undo
2848 2848
  */
2849 2849
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2850 2850
     // Configuration for "preupload presentation" feature.
2851
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2851
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2852 2852
         // This feature only works if curl is installed.
2853 2853
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2854 2854
         if (!extension_loaded('curl')) {
@@ -2876,7 +2876,7 @@  discard block
 block discarded – undo
2876 2876
  */
2877 2877
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2878 2878
     // Configuration for "preupload presentation" feature.
2879
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2879
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2880 2880
         if (extension_loaded('curl')) {
2881 2881
             // This feature only works if curl is installed.
2882 2882
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2893,7 +2893,7 @@  discard block
 block discarded – undo
2893 2893
  */
2894 2894
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2895 2895
     // Configuration for "user limit" feature.
2896
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2896
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2897 2897
         $renderer->render_group_header('userlimit');
2898 2898
         $renderer->render_group_element(
2899 2899
             'userlimit_default',
@@ -2915,7 +2915,7 @@  discard block
 block discarded – undo
2915 2915
  */
2916 2916
 function bigbluebuttonbn_settings_duration(&$renderer) {
2917 2917
     // Configuration for "scheduled duration" feature.
2918
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2918
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2919 2919
         $renderer->render_group_header('scheduled');
2920 2920
         $renderer->render_group_element(
2921 2921
             'scheduled_duration_enabled',
@@ -2941,7 +2941,7 @@  discard block
 block discarded – undo
2941 2941
  */
2942 2942
 function bigbluebuttonbn_settings_participants(&$renderer) {
2943 2943
     // Configuration for defining the default role/user that will be moderator on new activities.
2944
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2944
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2945 2945
         $renderer->render_group_header('participant');
2946 2946
         // UI for 'participants' feature.
2947 2947
         $roles = bigbluebuttonbn_get_roles();
@@ -2966,7 +2966,7 @@  discard block
 block discarded – undo
2966 2966
  */
2967 2967
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2968 2968
     // Configuration for "send notifications" feature.
2969
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2969
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2970 2970
         $renderer->render_group_header('sendnotifications');
2971 2971
         $renderer->render_group_element(
2972 2972
             'sendnotifications_enabled',
@@ -2984,14 +2984,14 @@  discard block
 block discarded – undo
2984 2984
  */
2985 2985
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
2986 2986
     // Configuration for "clienttype" feature.
2987
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2987
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2988 2988
         $renderer->render_group_header('clienttype');
2989 2989
         $renderer->render_group_element(
2990 2990
             'clienttype_editable',
2991 2991
             $renderer->render_group_element_checkbox('clienttype_editable', 0)
2992 2992
         );
2993 2993
         // Web Client default.
2994
-        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2994
+        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2995 2995
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2996 2996
             BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2997 2997
         $renderer->render_group_element(
@@ -3014,7 +3014,7 @@  discard block
 block discarded – undo
3014 3014
  */
3015 3015
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
3016 3016
     // Configuration for BigBlueButton.
3017
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3017
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3018 3018
         $renderer->render_group_header('muteonstart');
3019 3019
         $renderer->render_group_element(
3020 3020
             'muteonstart_default',
@@ -3036,7 +3036,7 @@  discard block
 block discarded – undo
3036 3036
  */
3037 3037
 function bigbluebuttonbn_settings_extended(&$renderer) {
3038 3038
     // Configuration for 'notify users when recording ready' feature.
3039
-    if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3039
+    if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3040 3040
         return;
3041 3041
     }
3042 3042
     $renderer->render_group_header('extended_capabilities');
@@ -3064,7 +3064,7 @@  discard block
 block discarded – undo
3064 3064
     global $DB;
3065 3065
     do {
3066 3066
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
3067
-        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3067
+        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3068 3068
     } while ($meetingid == $encodedseed);
3069 3069
     return $encodedseed;
3070 3070
 }
@@ -3277,7 +3277,7 @@  discard block
 block discarded – undo
3277 3277
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3278 3278
     global $DB;
3279 3279
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3280
-    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3280
+    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3281 3281
     return $ownerid;
3282 3282
 }
3283 3283
 
@@ -3320,8 +3320,8 @@  discard block
 block discarded – undo
3320 3320
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3321 3321
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3322 3322
     // Extra data for setting up the Meeting.
3323
-    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3324
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3323
+    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3324
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3325 3325
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3326 3326
     }
3327 3327
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3471,7 +3471,7 @@  discard block
 block discarded – undo
3471 3471
         'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
3472 3472
     ];
3473 3473
     // Special metadata for recording processing.
3474
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3474
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3475 3475
         $metadata["bn-recording-status"] = json_encode(
3476 3476
             array(
3477 3477
                 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
@@ -3479,10 +3479,10 @@  discard block
 block discarded – undo
3479 3479
             )
3480 3480
         );
3481 3481
     }
3482
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3482
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3483 3483
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
3484 3484
     }
3485
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3485
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3486 3486
         $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL'];
3487 3487
     }
3488 3488
     return $metadata;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -251,8 +251,9 @@
 block discarded – undo
251 251
     $pagecount = 25;
252 252
     $pages = floor(count($meetingidsarray) / $pagecount) + 1;
253 253
 
254
-    if(count($meetingidsarray) > 0 &&  count($meetingidsarray) % $pagecount == 0)
255
-        $pages--;
254
+    if(count($meetingidsarray) > 0 &&  count($meetingidsarray) % $pagecount == 0) {
255
+            $pages--;
256
+    }
256 257
 
257 258
     for ($page = 1; $page <= $pages; ++$page) {
258 259
         $mids = array_slice($meetingidsarray, ($page - 1) * $pagecount, $pagecount);
Please login to merge, or discard this patch.