Completed
Pull Request — master (#257)
by
unknown
01:56
created
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
 }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
137 137
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
138 138
     }
139
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
139
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
140 140
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
141 141
 }
142 142
 
@@ -205,12 +205,12 @@  discard block
 block discarded – undo
205 205
     // JavaScript variables for room.
206 206
     $openingtime = '';
207 207
     if ($bbbsession['openingtime']) {
208
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
208
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
209 209
             userdate($bbbsession['openingtime']);
210 210
     }
211 211
     $closingtime = '';
212 212
     if ($bbbsession['closingtime']) {
213
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
213
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
214 214
             userdate($bbbsession['closingtime']);
215 215
     }
216 216
     $jsvars += array(
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     $output .= '<br><span id="control_panel"></span>';
227 227
     $output .= $OUTPUT->box_end();
228 228
     // Guest name input box.
229
-    if(isguestuser($USER)){
229
+    if (isguestuser($USER)) {
230 230
         $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_guestnameinput_box');
231 231
         $output .= '<br><span>Name eingeben:</span>';
232 232
         //added script
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     }
237 237
     // Action button box.
238 238
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
239
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
239
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
240 240
     $output .= $OUTPUT->box_end();
241 241
     if ($activity == 'ended') {
242 242
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     // If there are meetings with recordings load the data to the table.
270 270
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
271 271
         // Render a plain html table.
272
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
272
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
273 273
     }
274 274
     // JavaScript variables for recordings with YUI.
275 275
     $jsvars += array(
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
         array('type' => 'button',
306 306
             'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
307 307
             'class' => 'btn btn-secondary',
308
-            'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
309
-                $bbbsession['bigbluebuttonbn']->id.'\''));
308
+            'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
309
+                $bbbsession['bigbluebuttonbn']->id . '\''));
310 310
     $output  = html_writer::empty_tag('br');
311 311
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
312 312
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -325,10 +325,10 @@  discard block
 block discarded – undo
325 325
     if (!is_null($bbbsession['presentation']['url'])) {
326 326
         $attributes = array('title' => $bbbsession['presentation']['name']);
327 327
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
328
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
329
-            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
328
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
329
+            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
330 330
             $OUTPUT->action_link($bbbsession['presentation']['url'],
331
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
331
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
332 332
     }
333 333
     return '';
334 334
 }
Please login to merge, or discard this patch.
locallib.php 1 patch
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
     $createtime = null
115 115
 ) {
116 116
     //check if guest and entered a custom username
117
-    $username2=$username;
118
-    if(!empty($_GET['usernamecustom'])&&isguestuser($USER)){
119
-        $username2=$_GET['usernamecustom'];
117
+    $username2 = $username;
118
+    if (!empty($_GET['usernamecustom']) && isguestuser($USER)) {
119
+        $username2 = $_GET['usernamecustom'];
120 120
     }
121 121
     $data = ['meetingID' => $meetingid,
122 122
         'fullName' => $username2,
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
     $payload = null;
156 156
     if (!is_null($pname) && !is_null($purl)) {
157 157
         $method = 'POST';
158
-        $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
159
-            $purl."' /></module></modules>";
158
+        $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
159
+            $purl . "' /></module></modules>";
160 160
     }
161 161
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $payload);
162 162
     if ($xml) {
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     }
201 201
     if ($xml) {
202 202
         // Either failure or success without meeting info.
203
-        return (array) $xml;
203
+        return (array)$xml;
204 204
     }
205 205
     // If the server is unreachable, then prompts the user of the necessary action.
206 206
     return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable');
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
                 foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) {
294 294
                     $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url(
295 295
                         'getRecordings',
296
-                        ['recordID' => implode(',', (array) $breakoutroom)]
296
+                        ['recordID' => implode(',', (array)$breakoutroom)]
297 297
                     );
298 298
                     $xml = bigbluebuttonbn_wrap_xml_load_file($url);
299 299
                     if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         // Override imported flag with actual ID.
350 350
         $recording['imported'] = $recordimported->id;
351 351
         if (isset($recordimported->protected)) {
352
-            $recording['protected'] = (string) $recordimported->protected;
352
+            $recording['protected'] = (string)$recordimported->protected;
353 353
         }
354 354
         $recordsimportedarray[$recording['recordID']] = $recording;
355 355
     }
@@ -379,21 +379,21 @@  discard block
 block discarded – undo
379 379
     // Add formats.
380 380
     $playbackarray = array();
381 381
     foreach ($recording->playback->format as $format) {
382
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
383
-            'url' => trim((string) $format->url), 'length' => (string) $format->length);
382
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
383
+            'url' => trim((string)$format->url), 'length' => (string)$format->length);
384 384
         // Add preview per format when existing.
385 385
         if ($format->preview) {
386
-            $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
386
+            $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
387 387
         }
388 388
     }
389 389
     // Add the metadata to the recordings array.
390 390
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
391
-    $recordingarray = array('recordID' => (string) $recording->recordID,
392
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
393
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
394
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
391
+    $recordingarray = array('recordID' => (string)$recording->recordID,
392
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
393
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
394
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
395 395
     if (isset($recording->protected)) {
396
-        $recordingarray['protected'] = (string) $recording->protected;
396
+        $recordingarray['protected'] = (string)$recording->protected;
397 397
     }
398 398
     return $recordingarray + $metadataarray;
399 399
 }
@@ -408,9 +408,9 @@  discard block
 block discarded – undo
408 408
 function bigbluebuttonbn_get_recording_preview_images($preview) {
409 409
     $imagesarray = array();
410 410
     foreach ($preview->images->image as $image) {
411
-        $imagearray = array('url' => trim((string) $image));
411
+        $imagearray = array('url' => trim((string)$image));
412 412
         foreach ($image->attributes() as $attkey => $attvalue) {
413
-            $imagearray[$attkey] = (string) $attvalue;
413
+            $imagearray[$attkey] = (string)$attvalue;
414 414
         }
415 415
         array_push($imagesarray, $imagearray);
416 416
     }
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
     $ids = explode(',', $recordids);
506 506
     foreach ($ids as $id) {
507 507
         $xml = bigbluebuttonbn_wrap_xml_load_file(
508
-            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
508
+            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
509 509
         );
510 510
         if ($xml && $xml->returncode != 'SUCCESS') {
511 511
             return false;
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
  * @return array $users
677 677
  */
678 678
 function bigbluebuttonbn_get_users(context $context = null) {
679
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
679
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
680 680
     foreach ($users as $key => $value) {
681 681
         $users[$key] = fullname($value);
682 682
     }
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) {
696 696
     // CONTRIB-7972, check the group of current user and course group mode.
697 697
     $groups = null;
698
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
698
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
699 699
     $course = get_course($context->instanceid);
700 700
     $groupmode = groups_get_course_groupmode($course);
701 701
     if ($bbactivity) {
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
         $groups = groups_get_all_groups($course->id, $USER->id);
709 709
         $users = [];
710 710
         foreach ($groups as $g) {
711
-            $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true);
711
+            $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true);
712 712
         }
713 713
     }
714 714
     return array_map(
@@ -730,12 +730,12 @@  discard block
 block discarded – undo
730 730
     global $CFG;
731 731
 
732 732
     if ($onlyviewableroles == true && $CFG->branch >= 35) {
733
-        $roles = (array) get_viewable_roles($context);
733
+        $roles = (array)get_viewable_roles($context);
734 734
         foreach ($roles as $key => $value) {
735 735
             $roles[$key] = $value;
736 736
         }
737 737
     } else {
738
-        $roles = (array) role_get_names($context);
738
+        $roles = (array)role_get_names($context);
739 739
         foreach ($roles as $key => $value) {
740 740
             $roles[$key] = $value->localname;
741 741
         }
@@ -756,12 +756,12 @@  discard block
 block discarded – undo
756 756
     global $CFG;
757 757
 
758 758
     if ($onlyviewableroles == true && $CFG->branch >= 35) {
759
-        $roles = (array) get_viewable_roles($context);
759
+        $roles = (array)get_viewable_roles($context);
760 760
         foreach ($roles as $key => $value) {
761 761
             $roles[$key] = array('id' => $key, 'name' => $value);
762 762
         }
763 763
     } else {
764
-        $roles = (array) role_get_names($context);
764
+        $roles = (array)role_get_names($context);
765 765
         foreach ($roles as $key => $value) {
766 766
             $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
767 767
         }
@@ -778,9 +778,9 @@  discard block
 block discarded – undo
778 778
  * @return object $role
779 779
  */
780 780
 function bigbluebuttonbn_get_role($id) {
781
-    $roles = (array) role_get_names();
781
+    $roles = (array)role_get_names();
782 782
     if (is_numeric($id) && isset($roles[$id])) {
783
-        return (object) $roles[$id];
783
+        return (object)$roles[$id];
784 784
     }
785 785
     foreach ($roles as $role) {
786 786
         if ($role->shortname == $id) {
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
861 861
                 $participantlist[] = array(
862 862
                     'selectiontype' => 'user',
863
-                    'selectionid' => (string) $ownerid,
863
+                    'selectionid' => (string)$ownerid,
864 864
                     'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
865 865
             }
866 866
             continue;
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
     $now = time();
1043 1043
     if ($closingtime > 0 && $now < $closingtime) {
1044 1044
         $duration = ceil(($closingtime - $now) / 60);
1045
-        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
1045
+        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
1046 1046
         $duration = intval($duration) + $compensationtime;
1047 1047
     }
1048 1048
     return $duration;
@@ -1244,16 +1244,16 @@  discard block
 block discarded – undo
1244 1244
  * @return array
1245 1245
  */
1246 1246
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1247
-    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1247
+    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1248 1248
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1249 1249
     $result = $cache->get($meetingid);
1250 1250
     $now = time();
1251 1251
     if (!$updatecache && !empty($result) && $now < ($result['creation_time'] + $cachettl)) {
1252 1252
         // Use the value in the cache.
1253
-        return (array) json_decode($result['meeting_info']);
1253
+        return (array)json_decode($result['meeting_info']);
1254 1254
     }
1255 1255
     // Ping again and refresh the cache.
1256
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1256
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1257 1257
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1258 1258
     );
1259 1259
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1400,7 +1400,7 @@  discard block
 block discarded – undo
1400 1400
  */
1401 1401
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1402 1402
     $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml);
1403
-    $configxmlarray = (array) $configxml;
1403
+    $configxmlarray = (array)$configxml;
1404 1404
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1405 1405
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1406 1406
         return '';
@@ -1453,7 +1453,7 @@  discard block
 block discarded – undo
1453 1453
  * @return boolean
1454 1454
  */
1455 1455
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1456
-    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1456
+    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1457 1457
 }
1458 1458
 
1459 1459
 /**
@@ -1464,7 +1464,7 @@  discard block
 block discarded – undo
1464 1464
  * @return boolean
1465 1465
  */
1466 1466
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1467
-    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1467
+    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1468 1468
 }
1469 1469
 
1470 1470
 /**
@@ -1890,7 +1890,7 @@  discard block
 block discarded – undo
1890 1890
     }
1891 1891
     $id = 'recording-' . $target . '-' . $recording['recordID'];
1892 1892
     $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;';
1893
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1893
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1894 1894
         // With icon for $manageaction.
1895 1895
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1896 1896
         $linkattributes = array(
@@ -2153,7 +2153,7 @@  discard block
 block discarded – undo
2153 2153
         // Enqueue it.
2154 2154
         \core\task\manager::queue_adhoc_task($task);
2155 2155
     } catch (Exception $e) {
2156
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2156
+        mtrace("Error while enqueuing completion_update_state task. " . (string)$e);
2157 2157
     }
2158 2158
 }
2159 2159
 
@@ -2167,7 +2167,7 @@  discard block
 block discarded – undo
2167 2167
  */
2168 2168
 function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) {
2169 2169
     global $CFG;
2170
-    require_once($CFG->libdir.'/completionlib.php');
2170
+    require_once($CFG->libdir . '/completionlib.php');
2171 2171
     list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn');
2172 2172
     $completion = new completion_info($course);
2173 2173
     if (!$completion->is_enabled($cm)) {
@@ -2592,7 +2592,7 @@  discard block
 block discarded – undo
2592 2592
  */
2593 2593
 function bigbluebuttonbn_format_activity_time($time) {
2594 2594
     global $CFG;
2595
-    require_once($CFG->dirroot.'/calendar/lib.php');
2595
+    require_once($CFG->dirroot . '/calendar/lib.php');
2596 2596
     $activitytime = '';
2597 2597
     if ($time) {
2598 2598
         $activitytime = calendar_day_representation($time) . ' ' .
@@ -2690,7 +2690,7 @@  discard block
 block discarded – undo
2690 2690
  */
2691 2691
 function bigbluebuttonbn_settings_general(&$renderer) {
2692 2692
     // Configuration for BigBlueButton.
2693
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2693
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2694 2694
         $renderer->render_group_header('general');
2695 2695
         $renderer->render_group_element(
2696 2696
             'server_url',
@@ -2712,7 +2712,7 @@  discard block
 block discarded – undo
2712 2712
  */
2713 2713
 function bigbluebuttonbn_settings_record(&$renderer) {
2714 2714
     // Configuration for 'recording' feature.
2715
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2715
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2716 2716
         $renderer->render_group_header('recording');
2717 2717
         $renderer->render_group_element(
2718 2718
             'recording_default',
@@ -2756,7 +2756,7 @@  discard block
 block discarded – undo
2756 2756
  */
2757 2757
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2758 2758
     // Configuration for 'import recordings' feature.
2759
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2759
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2760 2760
         $renderer->render_group_header('importrecordings');
2761 2761
         $renderer->render_group_element(
2762 2762
             'importrecordings_enabled',
@@ -2778,7 +2778,7 @@  discard block
 block discarded – undo
2778 2778
  */
2779 2779
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2780 2780
     // Configuration for 'show recordings' feature.
2781
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2781
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2782 2782
         $renderer->render_group_header('recordings');
2783 2783
         $renderer->render_group_element(
2784 2784
             'recordings_html_default',
@@ -2832,7 +2832,7 @@  discard block
 block discarded – undo
2832 2832
  */
2833 2833
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2834 2834
     // Configuration for wait for moderator feature.
2835
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2835
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2836 2836
         $renderer->render_group_header('waitformoderator');
2837 2837
         $renderer->render_group_element(
2838 2838
             'waitformoderator_default',
@@ -2862,7 +2862,7 @@  discard block
 block discarded – undo
2862 2862
  */
2863 2863
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2864 2864
     // Configuration for "static voice bridge" feature.
2865
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2865
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2866 2866
         $renderer->render_group_header('voicebridge');
2867 2867
         $renderer->render_group_element(
2868 2868
             'voicebridge_editable',
@@ -2880,7 +2880,7 @@  discard block
 block discarded – undo
2880 2880
  */
2881 2881
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2882 2882
     // Configuration for "preupload presentation" feature.
2883
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2883
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2884 2884
         // This feature only works if curl is installed.
2885 2885
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2886 2886
         if (!extension_loaded('curl')) {
@@ -2908,7 +2908,7 @@  discard block
 block discarded – undo
2908 2908
  */
2909 2909
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2910 2910
     // Configuration for "preupload presentation" feature.
2911
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2911
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2912 2912
         if (extension_loaded('curl')) {
2913 2913
             // This feature only works if curl is installed.
2914 2914
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2925,7 +2925,7 @@  discard block
 block discarded – undo
2925 2925
  */
2926 2926
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2927 2927
     // Configuration for "user limit" feature.
2928
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2928
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2929 2929
         $renderer->render_group_header('userlimit');
2930 2930
         $renderer->render_group_element(
2931 2931
             'userlimit_default',
@@ -2947,7 +2947,7 @@  discard block
 block discarded – undo
2947 2947
  */
2948 2948
 function bigbluebuttonbn_settings_duration(&$renderer) {
2949 2949
     // Configuration for "scheduled duration" feature.
2950
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2950
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2951 2951
         $renderer->render_group_header('scheduled');
2952 2952
         $renderer->render_group_element(
2953 2953
             'scheduled_duration_enabled',
@@ -2973,7 +2973,7 @@  discard block
 block discarded – undo
2973 2973
  */
2974 2974
 function bigbluebuttonbn_settings_participants(&$renderer) {
2975 2975
     // Configuration for defining the default role/user that will be moderator on new activities.
2976
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2976
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2977 2977
         $renderer->render_group_header('participant');
2978 2978
         // UI for 'participants' feature.
2979 2979
         $roles = bigbluebuttonbn_get_roles(null, false);
@@ -2998,7 +2998,7 @@  discard block
 block discarded – undo
2998 2998
  */
2999 2999
 function bigbluebuttonbn_settings_notifications(&$renderer) {
3000 3000
     // Configuration for "send notifications" feature.
3001
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
3001
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
3002 3002
         $renderer->render_group_header('sendnotifications');
3003 3003
         $renderer->render_group_element(
3004 3004
             'sendnotifications_enabled',
@@ -3016,14 +3016,14 @@  discard block
 block discarded – undo
3016 3016
  */
3017 3017
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
3018 3018
     // Configuration for "clienttype" feature.
3019
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
3019
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
3020 3020
         $renderer->render_group_header('clienttype');
3021 3021
         $renderer->render_group_element(
3022 3022
             'clienttype_editable',
3023 3023
             $renderer->render_group_element_checkbox('clienttype_editable', 0)
3024 3024
         );
3025 3025
         // Web Client default.
3026
-        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
3026
+        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
3027 3027
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
3028 3028
             BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
3029 3029
         $renderer->render_group_element(
@@ -3046,7 +3046,7 @@  discard block
 block discarded – undo
3046 3046
  */
3047 3047
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
3048 3048
     // Configuration for BigBlueButton.
3049
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3049
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3050 3050
         $renderer->render_group_header('muteonstart');
3051 3051
         $renderer->render_group_element(
3052 3052
             'muteonstart_default',
@@ -3089,7 +3089,7 @@  discard block
 block discarded – undo
3089 3089
  */
3090 3090
 function bigbluebuttonbn_settings_disablecam(&$renderer) {
3091 3091
     // Configuration for BigBlueButton.
3092
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) {
3092
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) {
3093 3093
         $renderer->render_group_element(
3094 3094
             'disablecam_default',
3095 3095
             $renderer->render_group_element_checkbox('disablecam_default', 0)
@@ -3110,7 +3110,7 @@  discard block
 block discarded – undo
3110 3110
  */
3111 3111
 function bigbluebuttonbn_settings_disablemic(&$renderer) {
3112 3112
     // Configuration for BigBlueButton.
3113
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) {
3113
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) {
3114 3114
         $renderer->render_group_element(
3115 3115
             'disablemic_default',
3116 3116
             $renderer->render_group_element_checkbox('disablemic_default', 0)
@@ -3131,7 +3131,7 @@  discard block
 block discarded – undo
3131 3131
  */
3132 3132
 function bigbluebuttonbn_settings_disableprivatechat(&$renderer) {
3133 3133
     // Configuration for BigBlueButton.
3134
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) {
3134
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) {
3135 3135
         $renderer->render_group_element(
3136 3136
             'disableprivatechat_default',
3137 3137
             $renderer->render_group_element_checkbox('disableprivatechat_default', 0)
@@ -3152,7 +3152,7 @@  discard block
 block discarded – undo
3152 3152
  */
3153 3153
 function bigbluebuttonbn_settings_disablepublicchat(&$renderer) {
3154 3154
     // Configuration for BigBlueButton.
3155
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) {
3155
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) {
3156 3156
         $renderer->render_group_element(
3157 3157
             'disablepublicchat_default',
3158 3158
             $renderer->render_group_element_checkbox('disablepublicchat_default', 0)
@@ -3173,7 +3173,7 @@  discard block
 block discarded – undo
3173 3173
  */
3174 3174
 function bigbluebuttonbn_settings_disablenote(&$renderer) {
3175 3175
     // Configuration for BigBlueButton.
3176
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) {
3176
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) {
3177 3177
         $renderer->render_group_element(
3178 3178
             'disablenote_default',
3179 3179
             $renderer->render_group_element_checkbox('disablenote_default', 0)
@@ -3194,7 +3194,7 @@  discard block
 block discarded – undo
3194 3194
  */
3195 3195
 function bigbluebuttonbn_settings_hideuserlist(&$renderer) {
3196 3196
     // Configuration for BigBlueButton.
3197
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) {
3197
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) {
3198 3198
         $renderer->render_group_element(
3199 3199
             'hideuserlist_default',
3200 3200
             $renderer->render_group_element_checkbox('hideuserlist_default', 0)
@@ -3215,7 +3215,7 @@  discard block
 block discarded – undo
3215 3215
  */
3216 3216
 function bigbluebuttonbn_settings_lockedlayout(&$renderer) {
3217 3217
     // Configuration for BigBlueButton.
3218
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) {
3218
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) {
3219 3219
         $renderer->render_group_element(
3220 3220
             'lockedlayout_default',
3221 3221
             $renderer->render_group_element_checkbox('lockedlayout_default', 0)
@@ -3236,7 +3236,7 @@  discard block
 block discarded – undo
3236 3236
  */
3237 3237
 function bigbluebuttonbn_settings_lockonjoin(&$renderer) {
3238 3238
     // Configuration for BigBlueButton.
3239
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) {
3239
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) {
3240 3240
         $renderer->render_group_element(
3241 3241
             'lockonjoin_default',
3242 3242
             $renderer->render_group_element_checkbox('lockonjoin_default', 0)
@@ -3257,7 +3257,7 @@  discard block
 block discarded – undo
3257 3257
  */
3258 3258
 function bigbluebuttonbn_settings_lockonjoinconfigurable(&$renderer) {
3259 3259
     // Configuration for BigBlueButton.
3260
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) {
3260
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) {
3261 3261
         $renderer->render_group_element(
3262 3262
             'lockonjoinconfigurable_default',
3263 3263
             $renderer->render_group_element_checkbox('lockonjoinconfigurable_default', 0)
@@ -3293,7 +3293,7 @@  discard block
 block discarded – undo
3293 3293
  */
3294 3294
 function bigbluebuttonbn_settings_extended(&$renderer) {
3295 3295
     // Configuration for extended capabilities.
3296
-    if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3296
+    if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3297 3297
         return;
3298 3298
     }
3299 3299
     $renderer->render_group_header('extended_capabilities');
@@ -3331,7 +3331,7 @@  discard block
 block discarded – undo
3331 3331
     global $DB;
3332 3332
     do {
3333 3333
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
3334
-        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3334
+        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3335 3335
     } while ($meetingid == $encodedseed);
3336 3336
     return $encodedseed;
3337 3337
 }
@@ -3544,7 +3544,7 @@  discard block
 block discarded – undo
3544 3544
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3545 3545
     global $DB;
3546 3546
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3547
-    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3547
+    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3548 3548
     return $ownerid;
3549 3549
 }
3550 3550
 
@@ -3651,7 +3651,7 @@  discard block
 block discarded – undo
3651 3651
         'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
3652 3652
     ];
3653 3653
     // Special metadata for recording processing.
3654
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3654
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3655 3655
         $metadata["bn-recording-status"] = json_encode(
3656 3656
             array(
3657 3657
                 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
@@ -3659,10 +3659,10 @@  discard block
 block discarded – undo
3659 3659
             )
3660 3660
         );
3661 3661
     }
3662
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3662
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3663 3663
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
3664 3664
     }
3665
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3665
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3666 3666
         $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL'];
3667 3667
     }
3668 3668
     return $metadata;
Please login to merge, or discard this patch.