Completed
Push — v2.3-stable ( 59783c...c4848d )
by Jesus
02:56
created
mod_form.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
107 107
         $jsvars['participantData'] = bigbluebuttonbn_get_participant_data($context, $bigbluebuttonbn);
108 108
         $jsvars['participantList'] = $participantlist;
109
-        $jsvars['iconsEnabled'] = (boolean)$cfg['recording_icons_enabled'];
110
-        $jsvars['pixIconDelete'] = (string)$OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle');
109
+        $jsvars['iconsEnabled'] = (boolean) $cfg['recording_icons_enabled'];
110
+        $jsvars['pixIconDelete'] = (string) $OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle');
111 111
         $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-modform',
112 112
             'M.mod_bigbluebuttonbn.modform.init', array($jsvars));
113 113
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      * @return void
166 166
      */
167 167
     private function bigbluebuttonbn_mform_add_block_profiles(&$mform, $profiles) {
168
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
168
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
169 169
             $mform->addElement('select', 'type', get_string('mod_form_field_instanceprofiles', 'bigbluebuttonbn'),
170 170
                 bigbluebuttonbn_get_instance_profiles_array($profiles),
171 171
                 array('onchange' => 'M.mod_bigbluebuttonbn.modform.updateInstanceTypeProfile(this);'));
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;'
405 405
           ));
406 406
         $htmladdparticipant = html_writer::tag('div',
407
-            $htmlselectiontype . '  ' . $htmlselectionoptions . '  ' . $htmlselectioninput, null);
407
+            $htmlselectiontype.'  '.$htmlselectionoptions.'  '.$htmlselectioninput, null);
408 408
         $mform->addElement('html', "\n\n");
409 409
         $mform->addElement('static', 'static_add_participant',
410 410
             get_string('mod_form_field_participant_add', 'bigbluebuttonbn'), $htmladdparticipant);
Please login to merge, or discard this patch.
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.
@@ -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
     }
@@ -739,12 +739,12 @@  discard block
 block discarded – undo
739 739
         'all' => array(
740 740
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
741 741
             'children' => []
742
-          )
743
-      );
742
+            )
743
+        );
744 744
     $data['role'] = array(
745 745
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
746 746
         'children' => bigbluebuttonbn_get_roles_select($context)
747
-      );
747
+        );
748 748
     $data['user'] = array(
749 749
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
750 750
         'children' => bigbluebuttonbn_get_users_select($context, $bbactivity),
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
         'selectiontype' => 'all',
792 792
         'selectionid' => 'all',
793 793
         'role' => BIGBLUEBUTTONBN_ROLE_VIEWER
794
-      );
794
+        );
795 795
     $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default'));
796 796
     foreach ($defaultrules as $defaultrule) {
797 797
         if ($defaultrule == '0') {
@@ -804,9 +804,9 @@  discard block
 block discarded – undo
804 804
             continue;
805 805
         }
806 806
         $participantlist[] = array(
807
-              'selectiontype' => 'role',
808
-              'selectionid' => $defaultrule,
809
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
807
+                'selectiontype' => 'role',
808
+                'selectionid' => $defaultrule,
809
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
810 810
     }
811 811
     return $participantlist;
812 812
 }
@@ -845,11 +845,11 @@  discard block
 block discarded – undo
845 845
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
846 846
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
847 847
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
848
-          ],
848
+            ],
849 849
         'type_selected' => 'all',
850 850
         'options' => ['all' => '---------------'],
851 851
         'selected' => 'all',
852
-      ];
852
+        ];
853 853
 }
854 854
 
855 855
 /**
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
     // Ping again and refresh the cache.
1169 1169
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1170 1170
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1171
-      );
1171
+        );
1172 1172
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
1173 1173
     return $meetinginfo;
1174 1174
 }
@@ -1582,8 +1582,8 @@  discard block
 block discarded – undo
1582 1582
     }
1583 1583
     $id = 'playbacks-'.$recording['recordID'];
1584 1584
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1585
-          'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1586
-          'title' => $title, $visibility => $visibility));
1585
+            'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1586
+            'title' => $title, $visibility => $visibility));
1587 1587
     foreach ($recording['playbacks'] as $playback) {
1588 1588
         $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback);
1589 1589
     }
@@ -1618,7 +1618,7 @@  discard block
 block discarded – undo
1618 1618
         'data-action' => 'play',
1619 1619
         'data-target' => $playback['type'],
1620 1620
         'data-href' => $href,
1621
-      );
1621
+        );
1622 1622
     if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1623 1623
         $linkattributes['class'] = 'btn btn-sm btn-warning';
1624 1624
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
@@ -1800,10 +1800,10 @@  discard block
 block discarded – undo
1800 1800
             'id' => $id,
1801 1801
             'onclick' => $onclick,
1802 1802
             'data-action' => $data['action']
1803
-          );
1803
+            );
1804 1804
         if (!isset($recording['imported'])) {
1805 1805
             $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances(
1806
-              $recording['recordID']);
1806
+                $recording['recordID']);
1807 1807
         }
1808 1808
         if (isset($data['disabled'])) {
1809 1809
             $iconattributes['class'] .= ' fa-' . $data['disabled'];
@@ -2326,17 +2326,17 @@  discard block
 block discarded – undo
2326 2326
 function bigbluebuttonbn_get_instance_type_profiles() {
2327 2327
     $instanceprofiles = array(
2328 2328
         BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL,
2329
-                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2330
-                  'features' => array('all')),
2329
+                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2330
+                    'features' => array('all')),
2331 2331
         BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY,
2332
-                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2333
-                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2334
-                      'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2335
-                      'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2336
-                      'clienttype', 'availabilityconditionsheader')),
2332
+                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2333
+                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2334
+                        'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2335
+                        'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2336
+                        'clienttype', 'availabilityconditionsheader')),
2337 2337
         BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY,
2338
-                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2339
-                  'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2338
+                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2339
+                    'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2340 2340
     );
2341 2341
     return $instanceprofiles;
2342 2342
 }
@@ -2423,8 +2423,8 @@  discard block
 block discarded – undo
2423 2423
     $activitytime = '';
2424 2424
     if ($time) {
2425 2425
         $activitytime = calendar_day_representation($time).' '.
2426
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2427
-          calendar_time_representation($time);
2426
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2427
+            calendar_time_representation($time);
2428 2428
     }
2429 2429
     return $activitytime;
2430 2430
 }
@@ -2743,7 +2743,7 @@  discard block
 block discarded – undo
2743 2743
         $renderer->render_group_element('participant_moderator_default',
2744 2744
             $renderer->render_group_element_configmultiselect('participant_moderator_default',
2745 2745
                 array_keys($owner), array_merge($owner, $roles))
2746
-          );
2746
+            );
2747 2747
     }
2748 2748
 }
2749 2749
 
@@ -2779,7 +2779,7 @@  discard block
 block discarded – undo
2779 2779
         // Web Client default.
2780 2780
         $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2781 2781
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2782
-                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2782
+                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2783 2783
         $renderer->render_group_element('clienttype_default',
2784 2784
             $renderer->render_group_element_configselect('clienttype_default',
2785 2785
                 $default, $choices));
@@ -2890,7 +2890,7 @@  discard block
 block discarded – undo
2890 2890
         return $output;
2891 2891
     }
2892 2892
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2893
-      'bigbluebuttonbn_view_general_warning') . "\n";
2893
+        'bigbluebuttonbn_view_general_warning') . "\n";
2894 2894
     $output .= '    ' . $message . "\n";
2895 2895
     $output .= '  <div class="singlebutton pull-right">' . "\n";
2896 2896
     if (!empty($href)) {
Please login to merge, or discard this patch.
Spacing   +82 added lines, -82 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
     }
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 function bigbluebuttonbn_get_role($id) {
719 719
     $roles = (array) role_get_names();
720 720
     if (is_numeric($id) && isset($roles[$id])) {
721
-        return (object)$roles[$id];
721
+        return (object) $roles[$id];
722 722
     }
723 723
     foreach ($roles as $role) {
724 724
         if ($role->shortname == $id) {
@@ -798,7 +798,7 @@  discard block
 block discarded – undo
798 798
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
799 799
                 $participantlist[] = array(
800 800
                     'selectiontype' => 'user',
801
-                    'selectionid' => (string)$ownerid,
801
+                    'selectionid' => (string) $ownerid,
802 802
                     'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
803 803
             }
804 804
             continue;
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
     if (!isguestuser()) {
874 874
         $userroles = bigbluebuttonbn_get_user_roles($context, $userid);
875 875
     }
876
-    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles);
876
+    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles);
877 877
 }
878 878
 
879 879
 /**
@@ -958,9 +958,9 @@  discard block
 block discarded – undo
958 958
     if ($voicebridge == 0) {
959 959
         return true;
960 960
     }
961
-    $select = 'voicebridge = ' . $voicebridge;
961
+    $select = 'voicebridge = '.$voicebridge;
962 962
     if ($instance != 0) {
963
-        $select .= ' AND id <>' . $instance;
963
+        $select .= ' AND id <>'.$instance;
964 964
     }
965 965
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
966 966
         return true;
@@ -980,7 +980,7 @@  discard block
 block discarded – undo
980 980
     $now = time();
981 981
     if ($closingtime > 0 && $now < $closingtime) {
982 982
         $duration = ceil(($closingtime - $now) / 60);
983
-        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
983
+        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
984 984
         $duration = intval($duration) + $compensationtime;
985 985
     }
986 986
     return $duration;
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
     if (array_key_exists('other', $options)) {
1121 1121
         $params['other'] = $options['other'];
1122 1122
     }
1123
-    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create',
1123
+    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create',
1124 1124
         array($params));
1125 1125
     $event->add_record_snapshot('course_modules', $cm);
1126 1126
     $event->add_record_snapshot('course', $course);
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
  * @return array
1158 1158
  */
1159 1159
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1160
-    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1160
+    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1161 1161
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1162 1162
     $result = $cache->get($meetingid);
1163 1163
     $now = time();
@@ -1363,7 +1363,7 @@  discard block
 block discarded – undo
1363 1363
  * @return boolean
1364 1364
  */
1365 1365
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1366
-    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1366
+    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1367 1367
 }
1368 1368
 
1369 1369
 /**
@@ -1374,7 +1374,7 @@  discard block
 block discarded – undo
1374 1374
  * @return boolean
1375 1375
  */
1376 1376
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1377
-    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1377
+    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1378 1378
 }
1379 1379
 
1380 1380
 /**
@@ -1450,11 +1450,11 @@  discard block
 block discarded – undo
1450 1450
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1451 1451
     }
1452 1452
     $head = html_writer::start_tag('div', array(
1453
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1453
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1454 1454
         'data-recordingid' => $recording['recordID'],
1455 1455
         'data-meetingid' => $recording['meetingID']));
1456 1456
     $tail = html_writer::end_tag('div');
1457
-    return $head . $actionbar . $tail;
1457
+    return $head.$actionbar.$tail;
1458 1458
 }
1459 1459
 
1460 1460
 /**
@@ -1549,7 +1549,7 @@  discard block
 block discarded – undo
1549 1549
         }
1550 1550
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1551 1551
         $recordingpreview .= html_writer::empty_tag('img',
1552
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left'));
1552
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left'));
1553 1553
         $recordingpreview .= html_writer::end_tag('div');
1554 1554
     }
1555 1555
     $recordingpreview .= html_writer::end_tag('div');
@@ -1606,13 +1606,13 @@  discard block
 block discarded – undo
1606 1606
         return '';
1607 1607
     }
1608 1608
     $text = bigbluebuttonbn_get_recording_type_text($playback['type']);
1609
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1610
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1609
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1610
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1611 1611
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1612
-        $href .= '&href=' . urlencode(trim($playback['url']));
1612
+        $href .= '&href='.urlencode(trim($playback['url']));
1613 1613
     }
1614 1614
     $linkattributes = array(
1615
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1615
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1616 1616
         'class' => 'btn btn-sm btn-default',
1617 1617
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1618 1618
         'data-action' => 'play',
@@ -1624,7 +1624,7 @@  discard block
 block discarded – undo
1624 1624
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1625 1625
         unset($linkattributes['data-href']);
1626 1626
     }
1627
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1627
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1628 1628
 }
1629 1629
 
1630 1630
 /**
@@ -1637,7 +1637,7 @@  discard block
 block discarded – undo
1637 1637
 function bigbluebuttonbn_get_recording_type_text($playbacktype) {
1638 1638
     // Check first if string exists, and if it does'nt just default to the capitalised version of the string.
1639 1639
     $text = ucwords($playbacktype);
1640
-    $typestringid = 'view_recording_format_' . $playbacktype;
1640
+    $typestringid = 'view_recording_format_'.$playbacktype;
1641 1641
     if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) {
1642 1642
         $text = get_string($typestringid, 'bigbluebuttonbn');
1643 1643
     }
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
     $validatedurls[$urlhost] = true;
1668 1668
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1669 1669
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1670
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1670
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1671 1671
         debugging($error, DEBUG_DEVELOPER);
1672 1672
         $validatedurls[$urlhost] = false;
1673 1673
     }
@@ -1758,12 +1758,12 @@  discard block
 block discarded – undo
1758 1758
  * @return string
1759 1759
  */
1760 1760
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1761
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1761
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1762 1762
     if (empty($data)) {
1763 1763
         return $htmltext;
1764 1764
     }
1765
-    $target = $data['action'] . '-' . $data['target'];
1766
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1765
+    $target = $data['action'].'-'.$data['target'];
1766
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1767 1767
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1768 1768
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1769 1769
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1771,7 +1771,7 @@  discard block
 block discarded – undo
1771 1771
     $tail = html_writer::end_tag('div');
1772 1772
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1773 1773
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1774
-    return $head . $htmltext . $htmllink . $tail;
1774
+    return $head.$htmltext.$htmllink.$tail;
1775 1775
 }
1776 1776
 
1777 1777
 /**
@@ -1789,11 +1789,11 @@  discard block
 block discarded – undo
1789 1789
     }
1790 1790
     $target = $data['action'];
1791 1791
     if (isset($data['target'])) {
1792
-        $target .= '-' . $data['target'];
1792
+        $target .= '-'.$data['target'];
1793 1793
     }
1794
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1795
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1796
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1794
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1795
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);';
1796
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1797 1797
         // With icon for $manageaction.
1798 1798
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1799 1799
         $linkattributes = array(
@@ -1806,12 +1806,12 @@  discard block
 block discarded – undo
1806 1806
               $recording['recordID']);
1807 1807
         }
1808 1808
         if (isset($data['disabled'])) {
1809
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1809
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1810 1810
             $linkattributes['class'] = 'disabled';
1811 1811
             unset($linkattributes['onclick']);
1812 1812
         }
1813 1813
         $icon = new pix_icon('i/'.$data['tag'],
1814
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1814
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1815 1815
             'moodle', $iconattributes);
1816 1816
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1817 1817
     }
@@ -1907,7 +1907,7 @@  discard block
 block discarded – undo
1907 1907
     if ($bbbsession['managerecordings']) {
1908 1908
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1909 1909
         $table->align[] = 'left';
1910
-        $table->size[] = (count($tools) * 40) . 'px';
1910
+        $table->size[] = (count($tools) * 40).'px';
1911 1911
     }
1912 1912
     // Get the groups of the user.
1913 1913
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -1975,14 +1975,14 @@  discard block
 block discarded – undo
1975 1975
     }
1976 1976
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1977 1977
     $row->cells = array();
1978
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
1979
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;;
1980
-    $row->cells[] = $texthead . $rowdata->activity . $texttail;
1981
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
1978
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
1979
+    $row->cells[] = $texthead.$rowdata->meeting.$texttail; ;
1980
+    $row->cells[] = $texthead.$rowdata->activity.$texttail;
1981
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
1982 1982
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
1983 1983
         $row->cells[] = $rowdata->preview;
1984 1984
     }
1985
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
1985
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
1986 1986
     $row->cells[] = $rowdata->duration_formatted;
1987 1987
     if ($bbbsession['managerecordings']) {
1988 1988
         $row->cells[] = $rowdata->actionbar;
@@ -2025,7 +2025,7 @@  discard block
 block discarded – undo
2025 2025
     $sender = get_admin();
2026 2026
     // Prepare message.
2027 2027
     $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
2028
-        ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
2028
+        ' &quot;'.$bigbluebuttonbn->name.'&quot; '.
2029 2029
         get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
2030 2030
     $context = context_course::instance($bigbluebuttonbn->course);
2031 2031
     \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext);
@@ -2160,17 +2160,17 @@  discard block
 block discarded – undo
2160 2160
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2161 2161
  */
2162 2162
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2163
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2163
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2164 2164
     if (empty($courseid)) {
2165 2165
         $courseid = 0;
2166 2166
     }
2167 2167
     if (empty($bigbluebuttonbnid)) {
2168
-        return $sql . " AND courseid = {$courseid}";
2168
+        return $sql." AND courseid = {$courseid}";
2169 2169
     }
2170 2170
     if ($subset) {
2171
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2171
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2172 2172
     }
2173
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2173
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2174 2174
 }
2175 2175
 
2176 2176
 /**
@@ -2184,17 +2184,17 @@  discard block
 block discarded – undo
2184 2184
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2185 2185
  */
2186 2186
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2187
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2187
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2188 2188
     if (empty($courseid)) {
2189 2189
         $courseid = 0;
2190 2190
     }
2191 2191
     if (empty($bigbluebuttonbnid)) {
2192
-        return $sql . " AND courseid = '{$courseid}'";
2192
+        return $sql." AND courseid = '{$courseid}'";
2193 2193
     }
2194 2194
     if ($subset) {
2195
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2195
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2196 2196
     }
2197
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2197
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2198 2198
 }
2199 2199
 
2200 2200
 /**
@@ -2518,7 +2518,7 @@  discard block
 block discarded – undo
2518 2518
  */
2519 2519
 function bigbluebuttonbn_settings_general(&$renderer) {
2520 2520
     // Configuration for BigBlueButton.
2521
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2521
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2522 2522
         $renderer->render_group_header('general');
2523 2523
         $renderer->render_group_element('server_url',
2524 2524
             $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL));
@@ -2536,7 +2536,7 @@  discard block
 block discarded – undo
2536 2536
  */
2537 2537
 function bigbluebuttonbn_settings_record(&$renderer) {
2538 2538
     // Configuration for 'recording' feature.
2539
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2539
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2540 2540
         $renderer->render_group_header('recording');
2541 2541
         $renderer->render_group_element('recording_default',
2542 2542
             $renderer->render_group_element_checkbox('recording_default', 1));
@@ -2566,7 +2566,7 @@  discard block
 block discarded – undo
2566 2566
  */
2567 2567
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2568 2568
     // Configuration for 'import recordings' feature.
2569
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2569
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2570 2570
         $renderer->render_group_header('importrecordings');
2571 2571
         $renderer->render_group_element('importrecordings_enabled',
2572 2572
             $renderer->render_group_element_checkbox('importrecordings_enabled', 0));
@@ -2584,7 +2584,7 @@  discard block
 block discarded – undo
2584 2584
  */
2585 2585
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2586 2586
     // Configuration for 'show recordings' feature.
2587
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2587
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2588 2588
         $renderer->render_group_header('recordings');
2589 2589
         $renderer->render_group_element('recordings_html_default',
2590 2590
             $renderer->render_group_element_checkbox('recordings_html_default', 1));
@@ -2616,7 +2616,7 @@  discard block
 block discarded – undo
2616 2616
  */
2617 2617
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2618 2618
     // Configuration for wait for moderator feature.
2619
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2619
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2620 2620
         $renderer->render_group_header('waitformoderator');
2621 2621
         $renderer->render_group_element('waitformoderator_default',
2622 2622
             $renderer->render_group_element_checkbox('waitformoderator_default', 0));
@@ -2638,7 +2638,7 @@  discard block
 block discarded – undo
2638 2638
  */
2639 2639
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2640 2640
     // Configuration for "static voice bridge" feature.
2641
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2641
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2642 2642
         $renderer->render_group_header('voicebridge');
2643 2643
         $renderer->render_group_element('voicebridge_editable',
2644 2644
             $renderer->render_group_element_checkbox('voicebridge_editable', 0));
@@ -2654,7 +2654,7 @@  discard block
 block discarded – undo
2654 2654
  */
2655 2655
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2656 2656
     // Configuration for "preupload presentation" feature.
2657
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2657
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2658 2658
         // This feature only works if curl is installed.
2659 2659
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2660 2660
         if (!extension_loaded('curl')) {
@@ -2680,7 +2680,7 @@  discard block
 block discarded – undo
2680 2680
  */
2681 2681
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2682 2682
     // Configuration for "preupload presentation" feature.
2683
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2683
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2684 2684
         if (extension_loaded('curl')) {
2685 2685
             // This feature only works if curl is installed.
2686 2686
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2697,7 +2697,7 @@  discard block
 block discarded – undo
2697 2697
  */
2698 2698
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2699 2699
     // Configuration for "user limit" feature.
2700
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2700
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2701 2701
         $renderer->render_group_header('userlimit');
2702 2702
         $renderer->render_group_element('userlimit_default',
2703 2703
             $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT));
@@ -2715,7 +2715,7 @@  discard block
 block discarded – undo
2715 2715
  */
2716 2716
 function bigbluebuttonbn_settings_duration(&$renderer) {
2717 2717
     // Configuration for "scheduled duration" feature.
2718
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2718
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2719 2719
         $renderer->render_group_header('scheduled');
2720 2720
         $renderer->render_group_element('scheduled_duration_enabled',
2721 2721
             $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1));
@@ -2735,7 +2735,7 @@  discard block
 block discarded – undo
2735 2735
  */
2736 2736
 function bigbluebuttonbn_settings_participants(&$renderer) {
2737 2737
     // Configuration for defining the default role/user that will be moderator on new activities.
2738
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2738
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2739 2739
         $renderer->render_group_header('participant');
2740 2740
         // UI for 'participants' feature.
2741 2741
         $roles = bigbluebuttonbn_get_roles();
@@ -2756,7 +2756,7 @@  discard block
 block discarded – undo
2756 2756
  */
2757 2757
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2758 2758
     // Configuration for "send notifications" feature.
2759
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2759
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2760 2760
         $renderer->render_group_header('sendnotifications');
2761 2761
         $renderer->render_group_element('sendnotifications_enabled',
2762 2762
             $renderer->render_group_element_checkbox('sendnotifications_enabled', 1));
@@ -2772,12 +2772,12 @@  discard block
 block discarded – undo
2772 2772
  */
2773 2773
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
2774 2774
     // Configuration for "clienttype" feature.
2775
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2775
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2776 2776
         $renderer->render_group_header('clienttype');
2777 2777
         $renderer->render_group_element('clienttype_editable',
2778 2778
             $renderer->render_group_element_checkbox('clienttype_editable', 0));
2779 2779
         // Web Client default.
2780
-        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2780
+        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2781 2781
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2782 2782
                          BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2783 2783
         $renderer->render_group_element('clienttype_default',
@@ -2795,7 +2795,7 @@  discard block
 block discarded – undo
2795 2795
  */
2796 2796
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
2797 2797
     // Configuration for BigBlueButton.
2798
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2798
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2799 2799
         $renderer->render_group_header('muteonstart');
2800 2800
         $renderer->render_group_element('muteonstart_default',
2801 2801
             $renderer->render_group_element_checkbox('muteonstart_default', 0));
@@ -2817,7 +2817,7 @@  discard block
 block discarded – undo
2817 2817
         return;
2818 2818
     }
2819 2819
     // Configuration for 'notify users when recording ready' feature.
2820
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2820
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2821 2821
         $renderer->render_group_header('extended_capabilities');
2822 2822
         // UI for 'notify users when recording ready' feature.
2823 2823
         $renderer->render_group_element('recordingready_enabled',
@@ -2837,7 +2837,7 @@  discard block
 block discarded – undo
2837 2837
     global $DB;
2838 2838
     do {
2839 2839
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
2840
-        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2840
+        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2841 2841
     } while ($meetingid == $encodedseed);
2842 2842
     return $encodedseed;
2843 2843
 }
@@ -2882,22 +2882,22 @@  discard block
 block discarded – undo
2882 2882
  *
2883 2883
  * @return string
2884 2884
  */
2885
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') {
2885
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
2886 2886
     global $OUTPUT;
2887 2887
     $output = "\n";
2888 2888
     // Evaluates if config_warning is enabled.
2889 2889
     if (empty($message)) {
2890 2890
         return $output;
2891 2891
     }
2892
-    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2893
-      'bigbluebuttonbn_view_general_warning') . "\n";
2894
-    $output .= '    ' . $message . "\n";
2895
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
2892
+    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
2893
+      'bigbluebuttonbn_view_general_warning')."\n";
2894
+    $output .= '    '.$message."\n";
2895
+    $output .= '  <div class="singlebutton pull-right">'."\n";
2896 2896
     if (!empty($href)) {
2897 2897
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
2898 2898
     }
2899
-    $output .= '  </div>' . "\n";
2900
-    $output .= $OUTPUT->box_end() . "\n";
2899
+    $output .= '  </div>'."\n";
2900
+    $output .= $OUTPUT->box_end()."\n";
2901 2901
     return $output;
2902 2902
 }
2903 2903
 
@@ -2921,10 +2921,10 @@  discard block
 block discarded – undo
2921 2921
     if ($class == '') {
2922 2922
         $class = 'btn btn-secondary';
2923 2923
     }
2924
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
2925
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
2926
-    $output .= '          title="' . $title . '"'."\n";
2927
-    $output .= '          >' . $text . '</button>'."\n";
2924
+    $output  = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
2925
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
2926
+    $output .= '          title="'.$title.'"'."\n";
2927
+    $output .= '          >'.$text.'</button>'."\n";
2928 2928
     $output .= '  </form>'."\n";
2929 2929
     return $output;
2930 2930
 }
@@ -2991,7 +2991,7 @@  discard block
 block discarded – undo
2991 2991
 
2992 2992
     // By default, use a meetingid without groups.
2993 2993
     if (empty($mid)) {
2994
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
2994
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
2995 2995
     }
2996 2996
 
2997 2997
     // When meeting is running, all authorized users can join right in.
@@ -3052,7 +3052,7 @@  discard block
 block discarded – undo
3052 3052
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3053 3053
     global $DB;
3054 3054
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3055
-    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3055
+    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3056 3056
     return $ownerid;
3057 3057
 }
3058 3058
 
@@ -3062,7 +3062,7 @@  discard block
 block discarded – undo
3062 3062
  * @return boolean
3063 3063
  */
3064 3064
 function bigbluebuttonbn_has_html5_client() {
3065
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3065
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3066 3066
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3067 3067
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3068 3068
 }
@@ -3095,8 +3095,8 @@  discard block
 block discarded – undo
3095 3095
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3096 3096
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3097 3097
     // Extra data for setting up the Meeting.
3098
-    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3099
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3098
+    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3099
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3100 3100
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3101 3101
     }
3102 3102
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3202,7 +3202,7 @@  discard block
 block discarded – undo
3202 3202
     );
3203 3203
 
3204 3204
     // Check status and set extra values.
3205
-    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession);  // In locallib.
3205
+    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib.
3206 3206
     if ($activitystatus == 'ended') {
3207 3207
         $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array(
3208 3208
             $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation);
Please login to merge, or discard this patch.