Completed
Push — v2.3-stable ( a39ba1...8e4d2e )
by Jesus
01:59
created
locallib.php 2 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null,
104 104
         $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) {
105 105
     $data = ['meetingID' => $meetingid,
106
-              'fullName' => $username,
107
-              'password' => $pw,
108
-              'logoutURL' => $logouturl,
106
+                'fullName' => $username,
107
+                'password' => $pw,
108
+                'logoutURL' => $logouturl,
109 109
             ];
110 110
     // Choose between Adobe Flash or HTML5 Client.
111 111
     if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) {
@@ -161,23 +161,23 @@  discard block
 block discarded – undo
161 161
 function bigbluebuttonbn_get_meeting_info_array($meetingid) {
162 162
     $xml = bigbluebuttonbn_wrap_xml_load_file(
163 163
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
164
-      );
164
+        );
165 165
     if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) {
166 166
         // Meeting info was returned.
167 167
         return array('returncode' => $xml->returncode,
168
-                     'meetingID' => $xml->meetingID,
169
-                     'moderatorPW' => $xml->moderatorPW,
170
-                     'attendeePW' => $xml->attendeePW,
171
-                     'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
172
-                     'running' => $xml->running,
173
-                     'recording' => $xml->recording,
174
-                     'startTime' => $xml->startTime,
175
-                     'endTime' => $xml->endTime,
176
-                     'participantCount' => $xml->participantCount,
177
-                     'moderatorCount' => $xml->moderatorCount,
178
-                     'attendees' => $xml->attendees,
179
-                     'metadata' => $xml->metadata,
180
-                   );
168
+                        'meetingID' => $xml->meetingID,
169
+                        'moderatorPW' => $xml->moderatorPW,
170
+                        'attendeePW' => $xml->attendeePW,
171
+                        'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
172
+                        'running' => $xml->running,
173
+                        'recording' => $xml->recording,
174
+                        'startTime' => $xml->startTime,
175
+                        'endTime' => $xml->endTime,
176
+                        'participantCount' => $xml->participantCount,
177
+                        'moderatorCount' => $xml->moderatorCount,
178
+                        'attendees' => $xml->attendees,
179
+                        'metadata' => $xml->metadata,
180
+                    );
181 181
     }
182 182
     if ($xml) {
183 183
         // Either failure or success without meeting info.
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 function bigbluebuttonbn_get_default_config_xml() {
334 334
     $xml = bigbluebuttonbn_wrap_xml_load_file(
335 335
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML')
336
-      );
336
+        );
337 337
     return $xml;
338 338
 }
339 339
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
     foreach ($ids as $id) {
438 438
         $xml = bigbluebuttonbn_wrap_xml_load_file(
439 439
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id])
440
-          );
440
+            );
441 441
         if ($xml && $xml->returncode != 'SUCCESS') {
442 442
             return false;
443 443
         }
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
     foreach ($ids as $id) {
457 457
         $xml = bigbluebuttonbn_wrap_xml_load_file(
458 458
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
459
-          );
459
+            );
460 460
         if ($xml && $xml->returncode != 'SUCCESS') {
461 461
             return false;
462 462
         }
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
     foreach ($ids as $id) {
476 476
         $xml = bigbluebuttonbn_wrap_xml_load_file(
477 477
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
478
-          );
478
+            );
479 479
         if ($xml && $xml->returncode != 'SUCCESS') {
480 480
             return false;
481 481
         }
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
493 493
     $xml = bigbluebuttonbn_wrap_xml_load_file(
494 494
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
495
-      );
495
+        );
496 496
     if ($xml) {
497 497
         // If the xml packet returned failure it displays the message to the user.
498 498
         return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 function bigbluebuttonbn_get_server_version() {
510 510
     $xml = bigbluebuttonbn_wrap_xml_load_file(
511 511
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url()
512
-      );
512
+        );
513 513
     if ($xml && $xml->returncode == 'SUCCESS') {
514 514
         return $xml->version;
515 515
     }
@@ -578,10 +578,10 @@  discard block
 block discarded – undo
578 578
         }
579 579
         $options = array();
580 580
         $options['CURLOPT_HTTPHEADER'] = array(
581
-                 'Content-Type: '.$contenttype,
582
-                 'Content-Length: '.strlen($data),
583
-                 'Content-Language: en-US',
584
-               );
581
+                    'Content-Type: '.$contenttype,
582
+                    'Content-Length: '.strlen($data),
583
+                    'Content-Language: en-US',
584
+                );
585 585
 
586 586
         return $c->post($url, $data, $options);
587 587
     }
@@ -770,12 +770,12 @@  discard block
 block discarded – undo
770 770
         'all' => array(
771 771
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
772 772
             'children' => []
773
-          )
774
-      );
773
+            )
774
+        );
775 775
     $data['role'] = array(
776 776
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
777 777
         'children' => bigbluebuttonbn_get_roles_select($context, true)
778
-      );
778
+        );
779 779
     $data['user'] = array(
780 780
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
781 781
         'children' => bigbluebuttonbn_get_users_select($context, $bbactivity),
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
         'selectiontype' => 'all',
823 823
         'selectionid' => 'all',
824 824
         'role' => BIGBLUEBUTTONBN_ROLE_VIEWER
825
-      );
825
+        );
826 826
     $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default'));
827 827
     foreach ($defaultrules as $defaultrule) {
828 828
         if ($defaultrule == '0') {
@@ -835,9 +835,9 @@  discard block
 block discarded – undo
835 835
             continue;
836 836
         }
837 837
         $participantlist[] = array(
838
-              'selectiontype' => 'role',
839
-              'selectionid' => $defaultrule,
840
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
838
+                'selectiontype' => 'role',
839
+                'selectionid' => $defaultrule,
840
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
841 841
     }
842 842
     return $participantlist;
843 843
 }
@@ -876,11 +876,11 @@  discard block
 block discarded – undo
876 876
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
877 877
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
878 878
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
879
-          ],
879
+            ],
880 880
         'type_selected' => 'all',
881 881
         'options' => ['all' => '---------------'],
882 882
         'selected' => 'all',
883
-      ];
883
+        ];
884 884
 }
885 885
 
886 886
 /**
@@ -1199,7 +1199,7 @@  discard block
 block discarded – undo
1199 1199
     // Ping again and refresh the cache.
1200 1200
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1201 1201
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1202
-      );
1202
+        );
1203 1203
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
1204 1204
     return $meetinginfo;
1205 1205
 }
@@ -1614,8 +1614,8 @@  discard block
 block discarded – undo
1614 1614
     }
1615 1615
     $id = 'playbacks-'.$recording['recordID'];
1616 1616
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1617
-          'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1618
-          'title' => $title, $visibility => $visibility));
1617
+            'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1618
+            'title' => $title, $visibility => $visibility));
1619 1619
     foreach ($recording['playbacks'] as $playback) {
1620 1620
         $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback);
1621 1621
     }
@@ -1650,7 +1650,7 @@  discard block
 block discarded – undo
1650 1650
         'data-action' => 'play',
1651 1651
         'data-target' => $playback['type'],
1652 1652
         'data-href' => $href,
1653
-      );
1653
+        );
1654 1654
     if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1655 1655
         $linkattributes['class'] = 'btn btn-sm btn-warning';
1656 1656
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
@@ -1832,10 +1832,10 @@  discard block
 block discarded – undo
1832 1832
             'id' => $id,
1833 1833
             'onclick' => $onclick,
1834 1834
             'data-action' => $data['action']
1835
-          );
1835
+            );
1836 1836
         if (!isset($recording['imported'])) {
1837 1837
             $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances(
1838
-              $recording['recordID']);
1838
+                $recording['recordID']);
1839 1839
         }
1840 1840
         if (isset($data['disabled'])) {
1841 1841
             $iconattributes['class'] .= ' fa-' . $data['disabled'];
@@ -2358,17 +2358,17 @@  discard block
 block discarded – undo
2358 2358
 function bigbluebuttonbn_get_instance_type_profiles() {
2359 2359
     $instanceprofiles = array(
2360 2360
         BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL,
2361
-                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2362
-                  'features' => array('all')),
2361
+                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2362
+                    'features' => array('all')),
2363 2363
         BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY,
2364
-                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2365
-                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2366
-                      'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2367
-                      'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2368
-                      'clienttype', 'availabilityconditionsheader')),
2364
+                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2365
+                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2366
+                        'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2367
+                        'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2368
+                        'clienttype', 'availabilityconditionsheader')),
2369 2369
         BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY,
2370
-                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2371
-                  'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2370
+                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2371
+                    'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2372 2372
     );
2373 2373
     return $instanceprofiles;
2374 2374
 }
@@ -2457,8 +2457,8 @@  discard block
 block discarded – undo
2457 2457
     $activitytime = '';
2458 2458
     if ($time) {
2459 2459
         $activitytime = calendar_day_representation($time).' '.
2460
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2461
-          calendar_time_representation($time);
2460
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2461
+            calendar_time_representation($time);
2462 2462
     }
2463 2463
     return $activitytime;
2464 2464
 }
@@ -2779,7 +2779,7 @@  discard block
 block discarded – undo
2779 2779
         $renderer->render_group_element('participant_moderator_default',
2780 2780
             $renderer->render_group_element_configmultiselect('participant_moderator_default',
2781 2781
                 array_keys($owner), $owner + $roles)
2782
-          );
2782
+            );
2783 2783
     }
2784 2784
 }
2785 2785
 
@@ -2815,7 +2815,7 @@  discard block
 block discarded – undo
2815 2815
         // Web Client default.
2816 2816
         $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2817 2817
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2818
-                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2818
+                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2819 2819
         $renderer->render_group_element('clienttype_default',
2820 2820
             $renderer->render_group_element_configselect('clienttype_default',
2821 2821
                 $default, $choices));
@@ -2926,7 +2926,7 @@  discard block
 block discarded – undo
2926 2926
         return $output;
2927 2927
     }
2928 2928
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2929
-      'bigbluebuttonbn_view_general_warning') . "\n";
2929
+        'bigbluebuttonbn_view_general_warning') . "\n";
2930 2930
     $output .= '    ' . $message . "\n";
2931 2931
     $output .= '  <div class="singlebutton pull-right">' . "\n";
2932 2932
     if (!empty($href)) {
Please login to merge, or discard this patch.
Spacing   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
               'logoutURL' => $logouturl,
109 109
             ];
110 110
     // Choose between Adobe Flash or HTML5 Client.
111
-    if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) {
111
+    if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) {
112 112
         $data['joinViaHtml5'] = 'true';
113 113
     }
114 114
     if (!is_null($configtoken)) {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     }
182 182
     if ($xml) {
183 183
         // Either failure or success without meeting info.
184
-        return (array)$xml;
184
+        return (array) $xml;
185 185
     }
186 186
     // If the server is unreachable, then prompts the user of the necessary action.
187 187
     return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable');
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
  */
570 570
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
571 571
     global $CFG;
572
-    require_once($CFG->libdir . '/filelib.php');
572
+    require_once($CFG->libdir.'/filelib.php');
573 573
     $c = new curl();
574 574
     $c->setopt(array('SSL_VERIFYPEER' => true));
575 575
     if ($method == 'POST') {
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
     if ($userroles) {
621 621
         $where = '';
622 622
         foreach ($userroles as $userrole) {
623
-            $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid;
623
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
624 624
         }
625 625
         $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
626 626
     }
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 function bigbluebuttonbn_get_role($id) {
750 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;
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
     if (!isguestuser()) {
905 905
         $userroles = bigbluebuttonbn_get_user_roles($context, $userid);
906 906
     }
907
-    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles);
907
+    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles);
908 908
 }
909 909
 
910 910
 /**
@@ -989,9 +989,9 @@  discard block
 block discarded – undo
989 989
     if ($voicebridge == 0) {
990 990
         return true;
991 991
     }
992
-    $select = 'voicebridge = ' . $voicebridge;
992
+    $select = 'voicebridge = '.$voicebridge;
993 993
     if ($instance != 0) {
994
-        $select .= ' AND id <>' . $instance;
994
+        $select .= ' AND id <>'.$instance;
995 995
     }
996 996
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
997 997
         return true;
@@ -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;
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
     if (array_key_exists('other', $options)) {
1152 1152
         $params['other'] = $options['other'];
1153 1153
     }
1154
-    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create',
1154
+    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create',
1155 1155
         array($params));
1156 1156
     $event->add_record_snapshot('course_modules', $cm);
1157 1157
     $event->add_record_snapshot('course', $course);
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
  * @return array
1189 1189
  */
1190 1190
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1191
-    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1191
+    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1192 1192
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1193 1193
     $result = $cache->get($meetingid);
1194 1194
     $now = time();
@@ -1394,7 +1394,7 @@  discard block
 block discarded – undo
1394 1394
  * @return boolean
1395 1395
  */
1396 1396
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1397
-    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1397
+    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1398 1398
 }
1399 1399
 
1400 1400
 /**
@@ -1405,7 +1405,7 @@  discard block
 block discarded – undo
1405 1405
  * @return boolean
1406 1406
  */
1407 1407
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1408
-    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1408
+    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1409 1409
 }
1410 1410
 
1411 1411
 /**
@@ -1481,11 +1481,11 @@  discard block
 block discarded – undo
1481 1481
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1482 1482
     }
1483 1483
     $head = html_writer::start_tag('div', array(
1484
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1484
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1485 1485
         'data-recordingid' => $recording['recordID'],
1486 1486
         'data-meetingid' => $recording['meetingID']));
1487 1487
     $tail = html_writer::end_tag('div');
1488
-    return $head . $actionbar . $tail;
1488
+    return $head.$actionbar.$tail;
1489 1489
 }
1490 1490
 
1491 1491
 /**
@@ -1581,7 +1581,7 @@  discard block
 block discarded – undo
1581 1581
         }
1582 1582
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1583 1583
         $recordingpreview .= html_writer::empty_tag('img',
1584
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left'));
1584
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left'));
1585 1585
         $recordingpreview .= html_writer::end_tag('div');
1586 1586
     }
1587 1587
     $recordingpreview .= html_writer::end_tag('div');
@@ -1638,13 +1638,13 @@  discard block
 block discarded – undo
1638 1638
         return '';
1639 1639
     }
1640 1640
     $text = bigbluebuttonbn_get_recording_type_text($playback['type']);
1641
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1642
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1641
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1642
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1643 1643
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1644
-        $href .= '&href=' . urlencode(trim($playback['url']));
1644
+        $href .= '&href='.urlencode(trim($playback['url']));
1645 1645
     }
1646 1646
     $linkattributes = array(
1647
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1647
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1648 1648
         'class' => 'btn btn-sm btn-default',
1649 1649
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1650 1650
         'data-action' => 'play',
@@ -1656,7 +1656,7 @@  discard block
 block discarded – undo
1656 1656
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1657 1657
         unset($linkattributes['data-href']);
1658 1658
     }
1659
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1659
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1660 1660
 }
1661 1661
 
1662 1662
 /**
@@ -1669,7 +1669,7 @@  discard block
 block discarded – undo
1669 1669
 function bigbluebuttonbn_get_recording_type_text($playbacktype) {
1670 1670
     // Check first if string exists, and if it does'nt just default to the capitalised version of the string.
1671 1671
     $text = ucwords($playbacktype);
1672
-    $typestringid = 'view_recording_format_' . $playbacktype;
1672
+    $typestringid = 'view_recording_format_'.$playbacktype;
1673 1673
     if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) {
1674 1674
         $text = get_string($typestringid, 'bigbluebuttonbn');
1675 1675
     }
@@ -1699,7 +1699,7 @@  discard block
 block discarded – undo
1699 1699
     $validatedurls[$urlhost] = true;
1700 1700
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1701 1701
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1702
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1702
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1703 1703
         debugging($error, DEBUG_DEVELOPER);
1704 1704
         $validatedurls[$urlhost] = false;
1705 1705
     }
@@ -1790,12 +1790,12 @@  discard block
 block discarded – undo
1790 1790
  * @return string
1791 1791
  */
1792 1792
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1793
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1793
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1794 1794
     if (empty($data)) {
1795 1795
         return $htmltext;
1796 1796
     }
1797
-    $target = $data['action'] . '-' . $data['target'];
1798
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1797
+    $target = $data['action'].'-'.$data['target'];
1798
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1799 1799
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1800 1800
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1801 1801
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1803,7 +1803,7 @@  discard block
 block discarded – undo
1803 1803
     $tail = html_writer::end_tag('div');
1804 1804
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1805 1805
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1806
-    return $head . $htmltext . $htmllink . $tail;
1806
+    return $head.$htmltext.$htmllink.$tail;
1807 1807
 }
1808 1808
 
1809 1809
 /**
@@ -1821,10 +1821,10 @@  discard block
 block discarded – undo
1821 1821
     }
1822 1822
     $target = $data['action'];
1823 1823
     if (isset($data['target'])) {
1824
-        $target .= '-' . $data['target'];
1824
+        $target .= '-'.$data['target'];
1825 1825
     }
1826
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1827
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;';
1826
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1827
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;';
1828 1828
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1829 1829
         // With icon for $manageaction.
1830 1830
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
@@ -1838,12 +1838,12 @@  discard block
 block discarded – undo
1838 1838
               $recording['recordID']);
1839 1839
         }
1840 1840
         if (isset($data['disabled'])) {
1841
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1841
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1842 1842
             $linkattributes['class'] = 'disabled';
1843 1843
             unset($linkattributes['onclick']);
1844 1844
         }
1845 1845
         $icon = new pix_icon('i/'.$data['tag'],
1846
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1846
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1847 1847
             'moodle', $iconattributes);
1848 1848
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1849 1849
     }
@@ -1939,7 +1939,7 @@  discard block
 block discarded – undo
1939 1939
     if ($bbbsession['managerecordings']) {
1940 1940
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1941 1941
         $table->align[] = 'left';
1942
-        $table->size[] = (count($tools) * 40) . 'px';
1942
+        $table->size[] = (count($tools) * 40).'px';
1943 1943
     }
1944 1944
     // Get the groups of the user.
1945 1945
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -2007,14 +2007,14 @@  discard block
 block discarded – undo
2007 2007
     }
2008 2008
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
2009 2009
     $row->cells = array();
2010
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
2011
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;;
2012
-    $row->cells[] = $texthead . $rowdata->activity . $texttail;
2013
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
2010
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
2011
+    $row->cells[] = $texthead.$rowdata->meeting.$texttail; ;
2012
+    $row->cells[] = $texthead.$rowdata->activity.$texttail;
2013
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
2014 2014
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
2015 2015
         $row->cells[] = $rowdata->preview;
2016 2016
     }
2017
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
2017
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
2018 2018
     $row->cells[] = $rowdata->duration_formatted;
2019 2019
     if ($bbbsession['managerecordings']) {
2020 2020
         $row->cells[] = $rowdata->actionbar;
@@ -2057,7 +2057,7 @@  discard block
 block discarded – undo
2057 2057
     $sender = get_admin();
2058 2058
     // Prepare message.
2059 2059
     $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
2060
-        ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
2060
+        ' &quot;'.$bigbluebuttonbn->name.'&quot; '.
2061 2061
         get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
2062 2062
     $context = context_course::instance($bigbluebuttonbn->course);
2063 2063
     \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext);
@@ -2097,7 +2097,7 @@  discard block
 block discarded – undo
2097 2097
     }
2098 2098
     $coursesforselect = [];
2099 2099
     foreach ($courses as $course) {
2100
-        $coursesforselect[$course->id] = $course->fullname . " (" . $course->shortname . ")";
2100
+        $coursesforselect[$course->id] = $course->fullname." (".$course->shortname.")";
2101 2101
     }
2102 2102
     return $coursesforselect;
2103 2103
 }
@@ -2192,17 +2192,17 @@  discard block
 block discarded – undo
2192 2192
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2193 2193
  */
2194 2194
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2195
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2195
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2196 2196
     if (empty($courseid)) {
2197 2197
         $courseid = 0;
2198 2198
     }
2199 2199
     if (empty($bigbluebuttonbnid)) {
2200
-        return $sql . " AND courseid = {$courseid}";
2200
+        return $sql." AND courseid = {$courseid}";
2201 2201
     }
2202 2202
     if ($subset) {
2203
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2203
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2204 2204
     }
2205
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2205
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2206 2206
 }
2207 2207
 
2208 2208
 /**
@@ -2216,17 +2216,17 @@  discard block
 block discarded – undo
2216 2216
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2217 2217
  */
2218 2218
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2219
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2219
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2220 2220
     if (empty($courseid)) {
2221 2221
         $courseid = 0;
2222 2222
     }
2223 2223
     if (empty($bigbluebuttonbnid)) {
2224
-        return $sql . " AND courseid = '{$courseid}'";
2224
+        return $sql." AND courseid = '{$courseid}'";
2225 2225
     }
2226 2226
     if ($subset) {
2227
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2227
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2228 2228
     }
2229
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2229
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2230 2230
 }
2231 2231
 
2232 2232
 /**
@@ -2552,7 +2552,7 @@  discard block
 block discarded – undo
2552 2552
  */
2553 2553
 function bigbluebuttonbn_settings_general(&$renderer) {
2554 2554
     // Configuration for BigBlueButton.
2555
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2555
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2556 2556
         $renderer->render_group_header('general');
2557 2557
         $renderer->render_group_element('server_url',
2558 2558
             $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL));
@@ -2570,7 +2570,7 @@  discard block
 block discarded – undo
2570 2570
  */
2571 2571
 function bigbluebuttonbn_settings_record(&$renderer) {
2572 2572
     // Configuration for 'recording' feature.
2573
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2573
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2574 2574
         $renderer->render_group_header('recording');
2575 2575
         $renderer->render_group_element('recording_default',
2576 2576
             $renderer->render_group_element_checkbox('recording_default', 1));
@@ -2600,7 +2600,7 @@  discard block
 block discarded – undo
2600 2600
  */
2601 2601
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2602 2602
     // Configuration for 'import recordings' feature.
2603
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2603
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2604 2604
         $renderer->render_group_header('importrecordings');
2605 2605
         $renderer->render_group_element('importrecordings_enabled',
2606 2606
             $renderer->render_group_element_checkbox('importrecordings_enabled', 0));
@@ -2618,7 +2618,7 @@  discard block
 block discarded – undo
2618 2618
  */
2619 2619
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2620 2620
     // Configuration for 'show recordings' feature.
2621
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2621
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2622 2622
         $renderer->render_group_header('recordings');
2623 2623
         $renderer->render_group_element('recordings_html_default',
2624 2624
             $renderer->render_group_element_checkbox('recordings_html_default', 1));
@@ -2652,7 +2652,7 @@  discard block
 block discarded – undo
2652 2652
  */
2653 2653
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2654 2654
     // Configuration for wait for moderator feature.
2655
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2655
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2656 2656
         $renderer->render_group_header('waitformoderator');
2657 2657
         $renderer->render_group_element('waitformoderator_default',
2658 2658
             $renderer->render_group_element_checkbox('waitformoderator_default', 0));
@@ -2674,7 +2674,7 @@  discard block
 block discarded – undo
2674 2674
  */
2675 2675
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2676 2676
     // Configuration for "static voice bridge" feature.
2677
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2677
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2678 2678
         $renderer->render_group_header('voicebridge');
2679 2679
         $renderer->render_group_element('voicebridge_editable',
2680 2680
             $renderer->render_group_element_checkbox('voicebridge_editable', 0));
@@ -2690,7 +2690,7 @@  discard block
 block discarded – undo
2690 2690
  */
2691 2691
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2692 2692
     // Configuration for "preupload presentation" feature.
2693
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2693
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2694 2694
         // This feature only works if curl is installed.
2695 2695
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2696 2696
         if (!extension_loaded('curl')) {
@@ -2716,7 +2716,7 @@  discard block
 block discarded – undo
2716 2716
  */
2717 2717
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2718 2718
     // Configuration for "preupload presentation" feature.
2719
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2719
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2720 2720
         if (extension_loaded('curl')) {
2721 2721
             // This feature only works if curl is installed.
2722 2722
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2733,7 +2733,7 @@  discard block
 block discarded – undo
2733 2733
  */
2734 2734
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2735 2735
     // Configuration for "user limit" feature.
2736
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2736
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2737 2737
         $renderer->render_group_header('userlimit');
2738 2738
         $renderer->render_group_element('userlimit_default',
2739 2739
             $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT));
@@ -2751,7 +2751,7 @@  discard block
 block discarded – undo
2751 2751
  */
2752 2752
 function bigbluebuttonbn_settings_duration(&$renderer) {
2753 2753
     // Configuration for "scheduled duration" feature.
2754
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2754
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2755 2755
         $renderer->render_group_header('scheduled');
2756 2756
         $renderer->render_group_element('scheduled_duration_enabled',
2757 2757
             $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1));
@@ -2771,7 +2771,7 @@  discard block
 block discarded – undo
2771 2771
  */
2772 2772
 function bigbluebuttonbn_settings_participants(&$renderer) {
2773 2773
     // Configuration for defining the default role/user that will be moderator on new activities.
2774
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2774
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2775 2775
         $renderer->render_group_header('participant');
2776 2776
         // UI for 'participants' feature.
2777 2777
         $roles = bigbluebuttonbn_get_roles(null, false);
@@ -2792,7 +2792,7 @@  discard block
 block discarded – undo
2792 2792
  */
2793 2793
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2794 2794
     // Configuration for "send notifications" feature.
2795
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2795
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2796 2796
         $renderer->render_group_header('sendnotifications');
2797 2797
         $renderer->render_group_element('sendnotifications_enabled',
2798 2798
             $renderer->render_group_element_checkbox('sendnotifications_enabled', 1));
@@ -2808,12 +2808,12 @@  discard block
 block discarded – undo
2808 2808
  */
2809 2809
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
2810 2810
     // Configuration for "clienttype" feature.
2811
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2811
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2812 2812
         $renderer->render_group_header('clienttype');
2813 2813
         $renderer->render_group_element('clienttype_editable',
2814 2814
             $renderer->render_group_element_checkbox('clienttype_editable', 0));
2815 2815
         // Web Client default.
2816
-        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2816
+        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2817 2817
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2818 2818
                          BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2819 2819
         $renderer->render_group_element('clienttype_default',
@@ -2831,7 +2831,7 @@  discard block
 block discarded – undo
2831 2831
  */
2832 2832
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
2833 2833
     // Configuration for BigBlueButton.
2834
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2834
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2835 2835
         $renderer->render_group_header('muteonstart');
2836 2836
         $renderer->render_group_element('muteonstart_default',
2837 2837
             $renderer->render_group_element_checkbox('muteonstart_default', 0));
@@ -2853,7 +2853,7 @@  discard block
 block discarded – undo
2853 2853
         return;
2854 2854
     }
2855 2855
     // Configuration for 'notify users when recording ready' feature.
2856
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2856
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2857 2857
         $renderer->render_group_header('extended_capabilities');
2858 2858
         // UI for 'notify users when recording ready' feature.
2859 2859
         $renderer->render_group_element('recordingready_enabled',
@@ -2873,7 +2873,7 @@  discard block
 block discarded – undo
2873 2873
     global $DB;
2874 2874
     do {
2875 2875
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
2876
-        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2876
+        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2877 2877
     } while ($meetingid == $encodedseed);
2878 2878
     return $encodedseed;
2879 2879
 }
@@ -2918,22 +2918,22 @@  discard block
 block discarded – undo
2918 2918
  *
2919 2919
  * @return string
2920 2920
  */
2921
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') {
2921
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
2922 2922
     global $OUTPUT;
2923 2923
     $output = "\n";
2924 2924
     // Evaluates if config_warning is enabled.
2925 2925
     if (empty($message)) {
2926 2926
         return $output;
2927 2927
     }
2928
-    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2929
-      'bigbluebuttonbn_view_general_warning') . "\n";
2930
-    $output .= '    ' . $message . "\n";
2931
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
2928
+    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
2929
+      'bigbluebuttonbn_view_general_warning')."\n";
2930
+    $output .= '    '.$message."\n";
2931
+    $output .= '  <div class="singlebutton pull-right">'."\n";
2932 2932
     if (!empty($href)) {
2933 2933
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
2934 2934
     }
2935
-    $output .= '  </div>' . "\n";
2936
-    $output .= $OUTPUT->box_end() . "\n";
2935
+    $output .= '  </div>'."\n";
2936
+    $output .= $OUTPUT->box_end()."\n";
2937 2937
     return $output;
2938 2938
 }
2939 2939
 
@@ -2957,10 +2957,10 @@  discard block
 block discarded – undo
2957 2957
     if ($class == '') {
2958 2958
         $class = 'btn btn-secondary';
2959 2959
     }
2960
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
2961
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
2962
-    $output .= '          title="' . $title . '"'."\n";
2963
-    $output .= '          >' . $text . '</button>'."\n";
2960
+    $output  = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
2961
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
2962
+    $output .= '          title="'.$title.'"'."\n";
2963
+    $output .= '          >'.$text.'</button>'."\n";
2964 2964
     $output .= '  </form>'."\n";
2965 2965
     return $output;
2966 2966
 }
@@ -3027,7 +3027,7 @@  discard block
 block discarded – undo
3027 3027
 
3028 3028
     // By default, use a meetingid without groups.
3029 3029
     if (empty($mid)) {
3030
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
3030
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
3031 3031
     }
3032 3032
 
3033 3033
     // When meeting is running, all authorized users can join right in.
@@ -3088,7 +3088,7 @@  discard block
 block discarded – undo
3088 3088
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3089 3089
     global $DB;
3090 3090
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3091
-    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3091
+    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3092 3092
     return $ownerid;
3093 3093
 }
3094 3094
 
@@ -3098,7 +3098,7 @@  discard block
 block discarded – undo
3098 3098
  * @return boolean
3099 3099
  */
3100 3100
 function bigbluebuttonbn_has_html5_client() {
3101
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3101
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3102 3102
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3103 3103
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3104 3104
 }
@@ -3131,8 +3131,8 @@  discard block
 block discarded – undo
3131 3131
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3132 3132
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3133 3133
     // Extra data for setting up the Meeting.
3134
-    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3135
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3134
+    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3135
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3136 3136
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3137 3137
     }
3138 3138
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3238,7 +3238,7 @@  discard block
 block discarded – undo
3238 3238
     );
3239 3239
 
3240 3240
     // Check status and set extra values.
3241
-    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession);  // In locallib.
3241
+    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib.
3242 3242
     if ($activitystatus == 'ended') {
3243 3243
         $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array(
3244 3244
             $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation);
Please login to merge, or discard this patch.