Completed
Push — v2.3-stable ( 8dc849...237794 )
by Jesus
02:05
created
locallib.php 2 patches
Indentation   +57 added lines, -57 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.
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 function bigbluebuttonbn_get_default_config_xml() {
330 330
     $xml = bigbluebuttonbn_wrap_xml_load_file(
331 331
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML')
332
-      );
332
+        );
333 333
     return $xml;
334 334
 }
335 335
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
     foreach ($ids as $id) {
434 434
         $xml = bigbluebuttonbn_wrap_xml_load_file(
435 435
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id])
436
-          );
436
+            );
437 437
         if ($xml && $xml->returncode != 'SUCCESS') {
438 438
             return false;
439 439
         }
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     foreach ($ids as $id) {
453 453
         $xml = bigbluebuttonbn_wrap_xml_load_file(
454 454
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
455
-          );
455
+            );
456 456
         if ($xml && $xml->returncode != 'SUCCESS') {
457 457
             return false;
458 458
         }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     foreach ($ids as $id) {
472 472
         $xml = bigbluebuttonbn_wrap_xml_load_file(
473 473
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
474
-          );
474
+            );
475 475
         if ($xml && $xml->returncode != 'SUCCESS') {
476 476
             return false;
477 477
         }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
489 489
     $xml = bigbluebuttonbn_wrap_xml_load_file(
490 490
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
491
-      );
491
+        );
492 492
     if ($xml) {
493 493
         // If the xml packet returned failure it displays the message to the user.
494 494
         return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 function bigbluebuttonbn_get_server_version() {
506 506
     $xml = bigbluebuttonbn_wrap_xml_load_file(
507 507
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url()
508
-      );
508
+        );
509 509
     if ($xml && $xml->returncode == 'SUCCESS') {
510 510
         return $xml->version;
511 511
     }
@@ -572,10 +572,10 @@  discard block
 block discarded – undo
572 572
         }
573 573
         $options = array();
574 574
         $options['CURLOPT_HTTPHEADER'] = array(
575
-                 'Content-Type: '.$contenttype,
576
-                 'Content-Length: '.strlen($data),
577
-                 'Content-Language: en-US',
578
-               );
575
+                    'Content-Type: '.$contenttype,
576
+                    'Content-Length: '.strlen($data),
577
+                    'Content-Language: en-US',
578
+                );
579 579
 
580 580
         return $c->post($url, $data, $options);
581 581
     }
@@ -722,16 +722,16 @@  discard block
 block discarded – undo
722 722
         'all' => array(
723 723
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
724 724
             'children' => []
725
-          )
726
-      );
725
+            )
726
+        );
727 727
     $data['role'] = array(
728 728
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
729 729
         'children' => bigbluebuttonbn_get_roles_select($context)
730
-      );
730
+        );
731 731
     $data['user'] = array(
732 732
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
733 733
         'children' => bigbluebuttonbn_get_users_select($context)
734
-      );
734
+        );
735 735
     return $data;
736 736
 }
737 737
 
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
         'selectiontype' => 'all',
775 775
         'selectionid' => 'all',
776 776
         'role' => BIGBLUEBUTTONBN_ROLE_VIEWER
777
-      );
777
+        );
778 778
     $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default'));
779 779
     foreach ($defaultrules as $defaultrule) {
780 780
         if ($defaultrule == '0') {
@@ -787,9 +787,9 @@  discard block
 block discarded – undo
787 787
             continue;
788 788
         }
789 789
         $participantlist[] = array(
790
-              'selectiontype' => 'role',
791
-              'selectionid' => $defaultrule,
792
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
790
+                'selectiontype' => 'role',
791
+                'selectionid' => $defaultrule,
792
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
793 793
     }
794 794
     return $participantlist;
795 795
 }
@@ -828,11 +828,11 @@  discard block
 block discarded – undo
828 828
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
829 829
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
830 830
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
831
-          ],
831
+            ],
832 832
         'type_selected' => 'all',
833 833
         'options' => ['all' => '---------------'],
834 834
         'selected' => 'all',
835
-      ];
835
+        ];
836 836
 }
837 837
 
838 838
 /**
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
     // Ping again and refresh the cache.
1152 1152
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1153 1153
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1154
-      );
1154
+        );
1155 1155
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
1156 1156
     return $meetinginfo;
1157 1157
 }
@@ -1565,8 +1565,8 @@  discard block
 block discarded – undo
1565 1565
     }
1566 1566
     $id = 'playbacks-'.$recording['recordID'];
1567 1567
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1568
-          'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1569
-          'title' => $title, $visibility => $visibility));
1568
+            'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1569
+            'title' => $title, $visibility => $visibility));
1570 1570
     foreach ($recording['playbacks'] as $playback) {
1571 1571
         $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback);
1572 1572
     }
@@ -1601,7 +1601,7 @@  discard block
 block discarded – undo
1601 1601
         'data-action' => 'play',
1602 1602
         'data-target' => $playback['type'],
1603 1603
         'data-href' => $href,
1604
-      );
1604
+        );
1605 1605
     if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1606 1606
         $linkattributes['class'] = 'btn btn-sm btn-warning';
1607 1607
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
@@ -1783,10 +1783,10 @@  discard block
 block discarded – undo
1783 1783
             'id' => $id,
1784 1784
             'onclick' => $onclick,
1785 1785
             'data-action' => $data['action']
1786
-          );
1786
+            );
1787 1787
         if (!isset($recording['imported'])) {
1788 1788
             $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances(
1789
-              $recording['recordID']);
1789
+                $recording['recordID']);
1790 1790
         }
1791 1791
         if (isset($data['disabled'])) {
1792 1792
             $iconattributes['class'] .= ' fa-' . $data['disabled'];
@@ -2319,17 +2319,17 @@  discard block
 block discarded – undo
2319 2319
 function bigbluebuttonbn_get_instance_type_profiles() {
2320 2320
     $instanceprofiles = array(
2321 2321
         BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL,
2322
-                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2323
-                  'features' => array('all')),
2322
+                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2323
+                    'features' => array('all')),
2324 2324
         BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY,
2325
-                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2326
-                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2327
-                      'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2328
-                      'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2329
-                      'clienttype', 'availabilityconditionsheader')),
2325
+                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2326
+                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2327
+                        'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2328
+                        'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2329
+                        'clienttype', 'availabilityconditionsheader')),
2330 2330
         BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY,
2331
-                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2332
-                  'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2331
+                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2332
+                    'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2333 2333
     );
2334 2334
     return $instanceprofiles;
2335 2335
 }
@@ -2416,8 +2416,8 @@  discard block
 block discarded – undo
2416 2416
     $activitytime = '';
2417 2417
     if ($time) {
2418 2418
         $activitytime = calendar_day_representation($time).' '.
2419
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2420
-          calendar_time_representation($time);
2419
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2420
+            calendar_time_representation($time);
2421 2421
     }
2422 2422
     return $activitytime;
2423 2423
 }
@@ -2736,7 +2736,7 @@  discard block
 block discarded – undo
2736 2736
         $renderer->render_group_element('participant_moderator_default',
2737 2737
             $renderer->render_group_element_configmultiselect('participant_moderator_default',
2738 2738
                 array_keys($owner), array_merge($owner, $roles))
2739
-          );
2739
+            );
2740 2740
     }
2741 2741
 }
2742 2742
 
@@ -2772,7 +2772,7 @@  discard block
 block discarded – undo
2772 2772
         // Web Client default.
2773 2773
         $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2774 2774
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2775
-                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2775
+                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2776 2776
         $renderer->render_group_element('clienttype_default',
2777 2777
             $renderer->render_group_element_configselect('clienttype_default',
2778 2778
                 $default, $choices));
@@ -2883,7 +2883,7 @@  discard block
 block discarded – undo
2883 2883
         return $output;
2884 2884
     }
2885 2885
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2886
-      'bigbluebuttonbn_view_general_warning') . "\n";
2886
+        'bigbluebuttonbn_view_general_warning') . "\n";
2887 2887
     $output .= '    ' . $message . "\n";
2888 2888
     $output .= '  <div class="singlebutton pull-right">' . "\n";
2889 2889
     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');
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
     if ($userroles) {
615 615
         $where = '';
616 616
         foreach ($userroles as $userrole) {
617
-            $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid;
617
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
618 618
         }
619 619
         $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
620 620
     }
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
 function bigbluebuttonbn_get_role($id) {
702 702
     $roles = (array) role_get_names();
703 703
     if (is_numeric($id) && isset($roles[$id])) {
704
-        return (object)$roles[$id];
704
+        return (object) $roles[$id];
705 705
     }
706 706
     foreach ($roles as $role) {
707 707
         if ($role->shortname == $id) {
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
782 782
                 $participantlist[] = array(
783 783
                     'selectiontype' => 'user',
784
-                    'selectionid' => (string)$ownerid,
784
+                    'selectionid' => (string) $ownerid,
785 785
                     'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
786 786
             }
787 787
             continue;
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
     if (!isguestuser()) {
857 857
         $userroles = bigbluebuttonbn_get_user_roles($context, $userid);
858 858
     }
859
-    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles);
859
+    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles);
860 860
 }
861 861
 
862 862
 /**
@@ -941,9 +941,9 @@  discard block
 block discarded – undo
941 941
     if ($voicebridge == 0) {
942 942
         return true;
943 943
     }
944
-    $select = 'voicebridge = ' . $voicebridge;
944
+    $select = 'voicebridge = '.$voicebridge;
945 945
     if ($instance != 0) {
946
-        $select .= ' AND id <>' . $instance;
946
+        $select .= ' AND id <>'.$instance;
947 947
     }
948 948
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
949 949
         return true;
@@ -963,7 +963,7 @@  discard block
 block discarded – undo
963 963
     $now = time();
964 964
     if ($closingtime > 0 && $now < $closingtime) {
965 965
         $duration = ceil(($closingtime - $now) / 60);
966
-        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
966
+        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
967 967
         $duration = intval($duration) + $compensationtime;
968 968
     }
969 969
     return $duration;
@@ -1103,7 +1103,7 @@  discard block
 block discarded – undo
1103 1103
     if (array_key_exists('other', $options)) {
1104 1104
         $params['other'] = $options['other'];
1105 1105
     }
1106
-    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create',
1106
+    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create',
1107 1107
         array($params));
1108 1108
     $event->add_record_snapshot('course_modules', $cm);
1109 1109
     $event->add_record_snapshot('course', $course);
@@ -1140,7 +1140,7 @@  discard block
 block discarded – undo
1140 1140
  * @return array
1141 1141
  */
1142 1142
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1143
-    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1143
+    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1144 1144
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1145 1145
     $result = $cache->get($meetingid);
1146 1146
     $now = time();
@@ -1346,7 +1346,7 @@  discard block
 block discarded – undo
1346 1346
  * @return boolean
1347 1347
  */
1348 1348
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1349
-    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1349
+    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1350 1350
 }
1351 1351
 
1352 1352
 /**
@@ -1357,7 +1357,7 @@  discard block
 block discarded – undo
1357 1357
  * @return boolean
1358 1358
  */
1359 1359
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1360
-    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1360
+    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1361 1361
 }
1362 1362
 
1363 1363
 /**
@@ -1433,11 +1433,11 @@  discard block
 block discarded – undo
1433 1433
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1434 1434
     }
1435 1435
     $head = html_writer::start_tag('div', array(
1436
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1436
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1437 1437
         'data-recordingid' => $recording['recordID'],
1438 1438
         'data-meetingid' => $recording['meetingID']));
1439 1439
     $tail = html_writer::end_tag('div');
1440
-    return $head . $actionbar . $tail;
1440
+    return $head.$actionbar.$tail;
1441 1441
 }
1442 1442
 
1443 1443
 /**
@@ -1532,7 +1532,7 @@  discard block
 block discarded – undo
1532 1532
         }
1533 1533
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1534 1534
         $recordingpreview .= html_writer::empty_tag('img',
1535
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left'));
1535
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left'));
1536 1536
         $recordingpreview .= html_writer::end_tag('div');
1537 1537
     }
1538 1538
     $recordingpreview .= html_writer::end_tag('div');
@@ -1589,13 +1589,13 @@  discard block
 block discarded – undo
1589 1589
         return '';
1590 1590
     }
1591 1591
     $text = bigbluebuttonbn_get_recording_type_text($playback['type']);
1592
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1593
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1592
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1593
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1594 1594
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1595
-        $href .= '&href=' . urlencode(trim($playback['url']));
1595
+        $href .= '&href='.urlencode(trim($playback['url']));
1596 1596
     }
1597 1597
     $linkattributes = array(
1598
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1598
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1599 1599
         'class' => 'btn btn-sm btn-default',
1600 1600
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1601 1601
         'data-action' => 'play',
@@ -1607,7 +1607,7 @@  discard block
 block discarded – undo
1607 1607
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1608 1608
         unset($linkattributes['data-href']);
1609 1609
     }
1610
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1610
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1611 1611
 }
1612 1612
 
1613 1613
 /**
@@ -1620,7 +1620,7 @@  discard block
 block discarded – undo
1620 1620
 function bigbluebuttonbn_get_recording_type_text($playbacktype) {
1621 1621
     // Check first if string exists, and if it does'nt just default to the capitalised version of the string.
1622 1622
     $text = ucwords($playbacktype);
1623
-    $typestringid = 'view_recording_format_' . $playbacktype;
1623
+    $typestringid = 'view_recording_format_'.$playbacktype;
1624 1624
     if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) {
1625 1625
         $text = get_string($typestringid, 'bigbluebuttonbn');
1626 1626
     }
@@ -1650,7 +1650,7 @@  discard block
 block discarded – undo
1650 1650
     $validatedurls[$urlhost] = true;
1651 1651
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1652 1652
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1653
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1653
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1654 1654
         debugging($error, DEBUG_DEVELOPER);
1655 1655
         $validatedurls[$urlhost] = false;
1656 1656
     }
@@ -1741,12 +1741,12 @@  discard block
 block discarded – undo
1741 1741
  * @return string
1742 1742
  */
1743 1743
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1744
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1744
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1745 1745
     if (empty($data)) {
1746 1746
         return $htmltext;
1747 1747
     }
1748
-    $target = $data['action'] . '-' . $data['target'];
1749
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1748
+    $target = $data['action'].'-'.$data['target'];
1749
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1750 1750
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1751 1751
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1752 1752
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1754,7 +1754,7 @@  discard block
 block discarded – undo
1754 1754
     $tail = html_writer::end_tag('div');
1755 1755
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1756 1756
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1757
-    return $head . $htmltext . $htmllink . $tail;
1757
+    return $head.$htmltext.$htmllink.$tail;
1758 1758
 }
1759 1759
 
1760 1760
 /**
@@ -1772,11 +1772,11 @@  discard block
 block discarded – undo
1772 1772
     }
1773 1773
     $target = $data['action'];
1774 1774
     if (isset($data['target'])) {
1775
-        $target .= '-' . $data['target'];
1775
+        $target .= '-'.$data['target'];
1776 1776
     }
1777
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1778
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1779
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1777
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1778
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);';
1779
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1780 1780
         // With icon for $manageaction.
1781 1781
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1782 1782
         $linkattributes = array(
@@ -1789,12 +1789,12 @@  discard block
 block discarded – undo
1789 1789
               $recording['recordID']);
1790 1790
         }
1791 1791
         if (isset($data['disabled'])) {
1792
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1792
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1793 1793
             $linkattributes['class'] = 'disabled';
1794 1794
             unset($linkattributes['onclick']);
1795 1795
         }
1796 1796
         $icon = new pix_icon('i/'.$data['tag'],
1797
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1797
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1798 1798
             'moodle', $iconattributes);
1799 1799
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1800 1800
     }
@@ -1890,7 +1890,7 @@  discard block
 block discarded – undo
1890 1890
     if ($bbbsession['managerecordings']) {
1891 1891
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1892 1892
         $table->align[] = 'left';
1893
-        $table->size[] = (count($tools) * 40) . 'px';
1893
+        $table->size[] = (count($tools) * 40).'px';
1894 1894
     }
1895 1895
     // Get the groups of the user.
1896 1896
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -1917,7 +1917,7 @@  discard block
 block discarded – undo
1917 1917
         $groupmode = $DB->get_record_sql($sql, $params, IGNORE_MULTIPLE);
1918 1918
 
1919 1919
         $displayrow = true;
1920
-        if ((isset($groupmode->groupmode) && (int)$groupmode->groupmode != VISIBLEGROUPS)
1920
+        if ((isset($groupmode->groupmode) && (int) $groupmode->groupmode != VISIBLEGROUPS)
1921 1921
             && !$bbbsession['administrator'] && !$bbbsession['moderator']) {
1922 1922
             $groupid = explode('[', $recording['meetingID']);
1923 1923
             if (isset($groupid[1])) {
@@ -1968,14 +1968,14 @@  discard block
 block discarded – undo
1968 1968
     }
1969 1969
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1970 1970
     $row->cells = array();
1971
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
1972
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;;
1973
-    $row->cells[] = $texthead . $rowdata->activity . $texttail;
1974
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
1971
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
1972
+    $row->cells[] = $texthead.$rowdata->meeting.$texttail; ;
1973
+    $row->cells[] = $texthead.$rowdata->activity.$texttail;
1974
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
1975 1975
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
1976 1976
         $row->cells[] = $rowdata->preview;
1977 1977
     }
1978
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
1978
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
1979 1979
     $row->cells[] = $rowdata->duration_formatted;
1980 1980
     if ($bbbsession['managerecordings']) {
1981 1981
         $row->cells[] = $rowdata->actionbar;
@@ -2018,7 +2018,7 @@  discard block
 block discarded – undo
2018 2018
     $sender = get_admin();
2019 2019
     // Prepare message.
2020 2020
     $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
2021
-        ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
2021
+        ' &quot;'.$bigbluebuttonbn->name.'&quot; '.
2022 2022
         get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
2023 2023
     $context = context_course::instance($bigbluebuttonbn->course);
2024 2024
     \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext);
@@ -2153,17 +2153,17 @@  discard block
 block discarded – undo
2153 2153
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2154 2154
  */
2155 2155
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2156
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2156
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2157 2157
     if (empty($courseid)) {
2158 2158
         $courseid = 0;
2159 2159
     }
2160 2160
     if (empty($bigbluebuttonbnid)) {
2161
-        return $sql . " AND courseid = {$courseid}";
2161
+        return $sql." AND courseid = {$courseid}";
2162 2162
     }
2163 2163
     if ($subset) {
2164
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2164
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2165 2165
     }
2166
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2166
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2167 2167
 }
2168 2168
 
2169 2169
 /**
@@ -2177,17 +2177,17 @@  discard block
 block discarded – undo
2177 2177
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2178 2178
  */
2179 2179
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2180
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2180
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2181 2181
     if (empty($courseid)) {
2182 2182
         $courseid = 0;
2183 2183
     }
2184 2184
     if (empty($bigbluebuttonbnid)) {
2185
-        return $sql . " AND courseid = '{$courseid}'";
2185
+        return $sql." AND courseid = '{$courseid}'";
2186 2186
     }
2187 2187
     if ($subset) {
2188
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2188
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2189 2189
     }
2190
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2190
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2191 2191
 }
2192 2192
 
2193 2193
 /**
@@ -2511,7 +2511,7 @@  discard block
 block discarded – undo
2511 2511
  */
2512 2512
 function bigbluebuttonbn_settings_general(&$renderer) {
2513 2513
     // Configuration for BigBlueButton.
2514
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2514
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2515 2515
         $renderer->render_group_header('general');
2516 2516
         $renderer->render_group_element('server_url',
2517 2517
             $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL));
@@ -2529,7 +2529,7 @@  discard block
 block discarded – undo
2529 2529
  */
2530 2530
 function bigbluebuttonbn_settings_record(&$renderer) {
2531 2531
     // Configuration for 'recording' feature.
2532
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2532
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2533 2533
         $renderer->render_group_header('recording');
2534 2534
         $renderer->render_group_element('recording_default',
2535 2535
             $renderer->render_group_element_checkbox('recording_default', 1));
@@ -2559,7 +2559,7 @@  discard block
 block discarded – undo
2559 2559
  */
2560 2560
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2561 2561
     // Configuration for 'import recordings' feature.
2562
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2562
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2563 2563
         $renderer->render_group_header('importrecordings');
2564 2564
         $renderer->render_group_element('importrecordings_enabled',
2565 2565
             $renderer->render_group_element_checkbox('importrecordings_enabled', 0));
@@ -2577,7 +2577,7 @@  discard block
 block discarded – undo
2577 2577
  */
2578 2578
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2579 2579
     // Configuration for 'show recordings' feature.
2580
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2580
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2581 2581
         $renderer->render_group_header('recordings');
2582 2582
         $renderer->render_group_element('recordings_html_default',
2583 2583
             $renderer->render_group_element_checkbox('recordings_html_default', 1));
@@ -2609,7 +2609,7 @@  discard block
 block discarded – undo
2609 2609
  */
2610 2610
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2611 2611
     // Configuration for wait for moderator feature.
2612
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2612
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2613 2613
         $renderer->render_group_header('waitformoderator');
2614 2614
         $renderer->render_group_element('waitformoderator_default',
2615 2615
             $renderer->render_group_element_checkbox('waitformoderator_default', 0));
@@ -2631,7 +2631,7 @@  discard block
 block discarded – undo
2631 2631
  */
2632 2632
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2633 2633
     // Configuration for "static voice bridge" feature.
2634
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2634
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2635 2635
         $renderer->render_group_header('voicebridge');
2636 2636
         $renderer->render_group_element('voicebridge_editable',
2637 2637
             $renderer->render_group_element_checkbox('voicebridge_editable', 0));
@@ -2647,7 +2647,7 @@  discard block
 block discarded – undo
2647 2647
  */
2648 2648
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2649 2649
     // Configuration for "preupload presentation" feature.
2650
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2650
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2651 2651
         // This feature only works if curl is installed.
2652 2652
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2653 2653
         if (!extension_loaded('curl')) {
@@ -2673,7 +2673,7 @@  discard block
 block discarded – undo
2673 2673
  */
2674 2674
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2675 2675
     // Configuration for "preupload presentation" feature.
2676
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2676
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2677 2677
         if (extension_loaded('curl')) {
2678 2678
             // This feature only works if curl is installed.
2679 2679
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2690,7 +2690,7 @@  discard block
 block discarded – undo
2690 2690
  */
2691 2691
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2692 2692
     // Configuration for "user limit" feature.
2693
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2693
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2694 2694
         $renderer->render_group_header('userlimit');
2695 2695
         $renderer->render_group_element('userlimit_default',
2696 2696
             $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT));
@@ -2708,7 +2708,7 @@  discard block
 block discarded – undo
2708 2708
  */
2709 2709
 function bigbluebuttonbn_settings_duration(&$renderer) {
2710 2710
     // Configuration for "scheduled duration" feature.
2711
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2711
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2712 2712
         $renderer->render_group_header('scheduled');
2713 2713
         $renderer->render_group_element('scheduled_duration_enabled',
2714 2714
             $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1));
@@ -2728,7 +2728,7 @@  discard block
 block discarded – undo
2728 2728
  */
2729 2729
 function bigbluebuttonbn_settings_participants(&$renderer) {
2730 2730
     // Configuration for defining the default role/user that will be moderator on new activities.
2731
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2731
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2732 2732
         $renderer->render_group_header('participant');
2733 2733
         // UI for 'participants' feature.
2734 2734
         $roles = bigbluebuttonbn_get_roles();
@@ -2749,7 +2749,7 @@  discard block
 block discarded – undo
2749 2749
  */
2750 2750
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2751 2751
     // Configuration for "send notifications" feature.
2752
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2752
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2753 2753
         $renderer->render_group_header('sendnotifications');
2754 2754
         $renderer->render_group_element('sendnotifications_enabled',
2755 2755
             $renderer->render_group_element_checkbox('sendnotifications_enabled', 1));
@@ -2765,12 +2765,12 @@  discard block
 block discarded – undo
2765 2765
  */
2766 2766
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
2767 2767
     // Configuration for "clienttype" feature.
2768
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2768
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2769 2769
         $renderer->render_group_header('clienttype');
2770 2770
         $renderer->render_group_element('clienttype_editable',
2771 2771
             $renderer->render_group_element_checkbox('clienttype_editable', 0));
2772 2772
         // Web Client default.
2773
-        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2773
+        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2774 2774
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2775 2775
                          BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2776 2776
         $renderer->render_group_element('clienttype_default',
@@ -2788,7 +2788,7 @@  discard block
 block discarded – undo
2788 2788
  */
2789 2789
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
2790 2790
     // Configuration for BigBlueButton.
2791
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2791
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2792 2792
         $renderer->render_group_header('muteonstart');
2793 2793
         $renderer->render_group_element('muteonstart_default',
2794 2794
             $renderer->render_group_element_checkbox('muteonstart_default', 0));
@@ -2810,7 +2810,7 @@  discard block
 block discarded – undo
2810 2810
         return;
2811 2811
     }
2812 2812
     // Configuration for 'notify users when recording ready' feature.
2813
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2813
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2814 2814
         $renderer->render_group_header('extended_capabilities');
2815 2815
         // UI for 'notify users when recording ready' feature.
2816 2816
         $renderer->render_group_element('recordingready_enabled',
@@ -2830,7 +2830,7 @@  discard block
 block discarded – undo
2830 2830
     global $DB;
2831 2831
     do {
2832 2832
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
2833
-        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2833
+        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2834 2834
     } while ($meetingid == $encodedseed);
2835 2835
     return $encodedseed;
2836 2836
 }
@@ -2875,22 +2875,22 @@  discard block
 block discarded – undo
2875 2875
  *
2876 2876
  * @return string
2877 2877
  */
2878
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') {
2878
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
2879 2879
     global $OUTPUT;
2880 2880
     $output = "\n";
2881 2881
     // Evaluates if config_warning is enabled.
2882 2882
     if (empty($message)) {
2883 2883
         return $output;
2884 2884
     }
2885
-    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2886
-      'bigbluebuttonbn_view_general_warning') . "\n";
2887
-    $output .= '    ' . $message . "\n";
2888
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
2885
+    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
2886
+      'bigbluebuttonbn_view_general_warning')."\n";
2887
+    $output .= '    '.$message."\n";
2888
+    $output .= '  <div class="singlebutton pull-right">'."\n";
2889 2889
     if (!empty($href)) {
2890 2890
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
2891 2891
     }
2892
-    $output .= '  </div>' . "\n";
2893
-    $output .= $OUTPUT->box_end() . "\n";
2892
+    $output .= '  </div>'."\n";
2893
+    $output .= $OUTPUT->box_end()."\n";
2894 2894
     return $output;
2895 2895
 }
2896 2896
 
@@ -2914,10 +2914,10 @@  discard block
 block discarded – undo
2914 2914
     if ($class == '') {
2915 2915
         $class = 'btn btn-secondary';
2916 2916
     }
2917
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
2918
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
2919
-    $output .= '          title="' . $title . '"'."\n";
2920
-    $output .= '          >' . $text . '</button>'."\n";
2917
+    $output  = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
2918
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
2919
+    $output .= '          title="'.$title.'"'."\n";
2920
+    $output .= '          >'.$text.'</button>'."\n";
2921 2921
     $output .= '  </form>'."\n";
2922 2922
     return $output;
2923 2923
 }
@@ -2984,7 +2984,7 @@  discard block
 block discarded – undo
2984 2984
 
2985 2985
     // By default, use a meetingid without groups.
2986 2986
     if (empty($mid)) {
2987
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
2987
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
2988 2988
     }
2989 2989
 
2990 2990
     // When meeting is running, all authorized users can join right in.
@@ -3045,7 +3045,7 @@  discard block
 block discarded – undo
3045 3045
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3046 3046
     global $DB;
3047 3047
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3048
-    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3048
+    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3049 3049
     return $ownerid;
3050 3050
 }
3051 3051
 
@@ -3055,7 +3055,7 @@  discard block
 block discarded – undo
3055 3055
  * @return boolean
3056 3056
  */
3057 3057
 function bigbluebuttonbn_has_html5_client() {
3058
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3058
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3059 3059
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3060 3060
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3061 3061
 }
@@ -3088,8 +3088,8 @@  discard block
 block discarded – undo
3088 3088
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3089 3089
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3090 3090
     // Extra data for setting up the Meeting.
3091
-    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3092
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3091
+    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3092
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3093 3093
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3094 3094
     }
3095 3095
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3195,7 +3195,7 @@  discard block
 block discarded – undo
3195 3195
     );
3196 3196
 
3197 3197
     // Check status and set extra values.
3198
-    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession);  // In locallib.
3198
+    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib.
3199 3199
     if ($activitystatus == 'ended') {
3200 3200
         $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array(
3201 3201
             $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation);
Please login to merge, or discard this patch.