Completed
Push — v2.3-stable ( 8dc849...237794 )
by Jesus
02:05
created
classes/settings/validator.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
                 !isset($CFG->bigbluebuttonbn['recordings_imported_editable']) ||
92 92
                 !isset($CFG->bigbluebuttonbn['recordings_preview_default']) ||
93 93
                 !isset($CFG->bigbluebuttonbn['recordings_preview_editable'])
94
-              );
94
+                );
95 95
     }
96 96
 
97 97
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 defined('MOODLE_INTERNAL') || die();
29 29
 
30
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
30
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
31 31
 require_once($CFG->libdir.'/adminlib.php');
32 32
 
33 33
 /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                 !isset($CFG->bigbluebuttonbn['recording_all_from_start_default']) ||
63 63
                 !isset($CFG->bigbluebuttonbn['recording_all_from_start_editable']) ||
64 64
                 !isset($CFG->bigbluebuttonbn['recording_hide_button_default']) ||
65
-                !isset($CFG->bigbluebuttonbn['recording_hide_button_editable']) );
65
+                !isset($CFG->bigbluebuttonbn['recording_hide_button_editable']));
66 66
     }
67 67
 
68 68
     /**
Please login to merge, or discard this patch.
viewlib.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         return;
86 86
     }
87 87
     echo $OUTPUT->box_start('generalbox boxaligncenter');
88
-    echo '<br><div class="alert alert-' . $type . '">' . $message . '</div>';
88
+    echo '<br><div class="alert alert-'.$type.'">'.$message.'</div>';
89 89
     echo $OUTPUT->box_end();
90 90
 }
91 91
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     }
105 105
     $typeprofiles = bigbluebuttonbn_get_instance_type_profiles();
106 106
     $enabledfeatures = bigbluebuttonbn_get_enabled_features($typeprofiles, $type);
107
-    $pinginterval = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000;
107
+    $pinginterval = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000;
108 108
     // JavaScript for locales.
109 109
     $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
110 110
     // JavaScript variables.
@@ -375,10 +375,10 @@  discard block
 block discarded – undo
375 375
         return '';
376 376
     }
377 377
     return bigbluebuttonbn_render_warning(
378
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_message'),
379
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_box_type'),
380
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'),
381
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'),
382
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class')
378
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_message'),
379
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_box_type'),
380
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'),
381
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'),
382
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class')
383 383
     );
384 384
 }
Please login to merge, or discard this patch.
locallib.php 3 patches
Doc Comments   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
  * Helper function to retrieve imported recordings from the Moodle database.
297 297
  * The references are stored as events in bigbluebuttonbn_logs.
298 298
  *
299
- * @param string $courseid
299
+ * @param integer $courseid
300 300
  * @param string $bigbluebuttonbnid
301 301
  * @param bool   $subset
302 302
  *
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 /**
325 325
  * Helper function to retrive the default config.xml file.
326 326
  *
327
- * @return string
327
+ * @return null|SimpleXMLElement
328 328
  */
329 329
 function bigbluebuttonbn_get_default_config_xml() {
330 330
     $xml = bigbluebuttonbn_wrap_xml_load_file(
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
  * @param object $a
407 407
  * @param object $b
408 408
  *
409
- * @return array
409
+ * @return integer
410 410
  */
411 411
 function bigbluebuttonbn_recording_build_sorter($a, $b) {
412 412
     global $CFG;
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
  * @param string $data
521 521
  * @param string $contenttype
522 522
  *
523
- * @return object
523
+ * @return null|SimpleXMLElement
524 524
  */
525 525
 function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
526 526
     if (extension_loaded('curl')) {
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
  * @param string $data
562 562
  * @param string $contenttype
563 563
  *
564
- * @return object
564
+ * @return string
565 565
  */
566 566
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
567 567
     $c = new curl();
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
  * @param integer $instance
935 935
  * @param integer $voicebridge
936 936
  *
937
- * @return string
937
+ * @return boolean
938 938
  */
939 939
 function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) {
940 940
     global $DB;
@@ -1257,7 +1257,7 @@  discard block
 block discarded – undo
1257 1257
  * @param string $meetingid
1258 1258
  * @param string $configxml
1259 1259
  *
1260
- * @return object
1260
+ * @return null|SimpleXMLElement
1261 1261
  */
1262 1262
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1263 1263
     $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
  * @param array $recording
1307 1307
  * @param array $tools
1308 1308
  *
1309
- * @return array
1309
+ * @return null|stdClass
1310 1310
  */
1311 1311
 function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) {
1312 1312
     if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
@@ -1933,7 +1933,7 @@  discard block
 block discarded – undo
1933 1933
  *
1934 1934
  * @param array $bbbsession
1935 1935
  * @param array $recording
1936
- * @param object $rowdata
1936
+ * @param stdClass $rowdata
1937 1937
  *
1938 1938
  * @return object
1939 1939
  */
@@ -2051,7 +2051,7 @@  discard block
 block discarded – undo
2051 2051
  *
2052 2052
  * @param array $bbbsession
2053 2053
  * @param array $recordings
2054
- * @param array $tools
2054
+ * @param string[] $tools
2055 2055
  *
2056 2056
  * @return array
2057 2057
  */
@@ -2129,7 +2129,7 @@  discard block
 block discarded – undo
2129 2129
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2130 2130
  * in the getRecordings request considering only those that belong to deleted activities.
2131 2131
  *
2132
- * @param string $courseid
2132
+ * @param integer $courseid
2133 2133
  * @param string $bigbluebuttonbnid
2134 2134
  * @param bool   $subset
2135 2135
  *
@@ -2153,7 +2153,7 @@  discard block
 block discarded – undo
2153 2153
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2154 2154
  * in the getRecordings request considering only those that belong to imported recordings.
2155 2155
  *
2156
- * @param string $courseid
2156
+ * @param integer $courseid
2157 2157
  * @param string $bigbluebuttonbnid
2158 2158
  * @param bool   $subset
2159 2159
  *
@@ -2176,7 +2176,7 @@  discard block
 block discarded – undo
2176 2176
 /**
2177 2177
  * Helper function to get recordings and imported recordings together.
2178 2178
  *
2179
- * @param string $courseid
2179
+ * @param integer $courseid
2180 2180
  * @param string $bigbluebuttonbnid
2181 2181
  * @param bool   $subset
2182 2182
  * @param bool   $includedeleted
@@ -2194,7 +2194,7 @@  discard block
 block discarded – undo
2194 2194
  * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events
2195 2195
  * in bigbluebuttonbn_logs.
2196 2196
  *
2197
- * @param string $courseid
2197
+ * @param integer $courseid
2198 2198
  * @param string $bigbluebuttonbnid
2199 2199
  * @param bool   $subset
2200 2200
  * @param bool   $includedeleted
Please login to merge, or discard this patch.
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.
bbb_view.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
  */
310 310
 function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession) {
311 311
     $data = ['meetingID' => $bbbsession['meetingid'],
312
-              'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
313
-              'attendeePW' => $bbbsession['viewerPW'],
314
-              'moderatorPW' => $bbbsession['modPW'],
315
-              'logoutURL' => $bbbsession['logoutURL'],
312
+                'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
313
+                'attendeePW' => $bbbsession['viewerPW'],
314
+                'moderatorPW' => $bbbsession['modPW'],
315
+                'logoutURL' => $bbbsession['logoutURL'],
316 316
             ];
317 317
     $data['record'] = bigbluebutton_bbb_view_create_meeting_data_record($bbbsession['record']);
318 318
     // Check if auto_start_record is enable.
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             '%duration%',
335 335
             (string) $durationtime,
336 336
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
337
-          );
337
+            );
338 338
     }
339 339
     $voicebridge = intval($bbbsession['voicebridge']);
340 340
     if ($voicebridge > 0 && $voicebridge < 79999) {
@@ -385,22 +385,22 @@  discard block
 block discarded – undo
385 385
 function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) {
386 386
     global $USER;
387 387
     $metadata = ['bbb-origin' => $bbbsession['origin'],
388
-                 'bbb-origin-version' => $bbbsession['originVersion'],
389
-                 'bbb-origin-server-name' => $bbbsession['originServerName'],
390
-                 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
391
-                 'bbb-origin-tag' => $bbbsession['originTag'],
392
-                 'bbb-context' => $bbbsession['course']->fullname,
393
-                 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
394
-                 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
395
-                 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
388
+                    'bbb-origin-version' => $bbbsession['originVersion'],
389
+                    'bbb-origin-server-name' => $bbbsession['originServerName'],
390
+                    'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
391
+                    'bbb-origin-tag' => $bbbsession['originTag'],
392
+                    'bbb-context' => $bbbsession['course']->fullname,
393
+                    'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
394
+                    'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
395
+                    'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
396 396
                 ];
397 397
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
398 398
         $metadata["bn-recording-status"] = json_encode(
399 399
             array(
400 400
                 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
401 401
                 'context' => $bbbsession['bigbluebuttonbnURL']
402
-              )
403
-          );
402
+                )
403
+            );
404 404
     }
405 405
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
406 406
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -85,15 +85,15 @@  discard block
 block discarded – undo
85 85
     $bbbsession['serverversion'] = (string) $serverversion;
86 86
 
87 87
     // Operation URLs.
88
-    $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
89
-    $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id .
90
-        '&bn=' . $bbbsession['bigbluebuttonbn']->id;
91
-    $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
92
-        'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
93
-    $bbbsession['meetingEventsURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=meeting' .
94
-        '_events&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
95
-    $bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $cm->id .
96
-        '&bn=' . $bbbsession['bigbluebuttonbn']->id;
88
+    $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
89
+    $bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id.
90
+        '&bn='.$bbbsession['bigbluebuttonbn']->id;
91
+    $bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_'.
92
+        'ready&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id;
93
+    $bbbsession['meetingEventsURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=meeting'.
94
+        '_events&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id;
95
+    $bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$cm->id.
96
+        '&bn='.$bbbsession['bigbluebuttonbn']->id;
97 97
 
98 98
     // Check status and set extra values.
99 99
     $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession);
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $lastaccess = json_decode($lastaccess->meta);
156 156
         // If the user acceded from Timeline it should be redirected to the Dashboard.
157 157
         if (isset($lastaccess->origin) && $lastaccess->origin == BIGBLUEBUTTON_ORIGIN_TIMELINE) {
158
-            redirect($CFG->wwwroot . '/my/');
158
+            redirect($CFG->wwwroot.'/my/');
159 159
         }
160 160
         // Close the tab or window where BBB was opened.
161 161
         bigbluebutton_bbb_view_close_window();
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
  * @return string
358 358
  */
359 359
 function bigbluebutton_bbb_view_create_meeting_data_record($record) {
360
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) {
360
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) {
361 361
         return 'true';
362 362
     }
363 363
     return 'false';
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
  * @return integer
371 371
  */
372 372
 function bigbluebutton_bbb_view_create_meeting_data_duration($closingtime) {
373
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) {
373
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) {
374 374
         return bigbluebuttonbn_get_duration($closingtime);
375 375
     }
376 376
     return 0;
@@ -394,18 +394,18 @@  discard block
 block discarded – undo
394 394
                  'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
395 395
                  'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
396 396
                 ];
397
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
397
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
398 398
         $metadata["bn-recording-status"] = json_encode(
399 399
             array(
400
-                'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
400
+                'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
401 401
                 'context' => $bbbsession['bigbluebuttonbnURL']
402 402
               )
403 403
           );
404 404
     }
405
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
405
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
406 406
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
407 407
     }
408
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
408
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
409 409
         $metadata['bn-meeting-events-url'] = $bbbsession['meetingEventsURL'];
410 410
     }
411 411
     return $metadata;
Please login to merge, or discard this patch.
bbb_broker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 // The endpoints for recording_ready and live_session_event callbacks must be moved to services (CONTRIB-7440).
51 51
 // But in order to support the transition, requests other than the callbacks are redirected to bbb_ajax.php.
52 52
 if ($params['action'] != 'recording_ready' && $params['action'] != 'live_session_events') {
53
-    $url = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_ajax.php?' . http_build_query($params, '', '&');
54
-    header("Location: " . $url);
53
+    $url = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_ajax.php?'.http_build_query($params, '', '&');
54
+    header("Location: ".$url);
55 55
     exit;
56 56
 }
57 57
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn);
77 77
         return;
78 78
     }
79
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
79
+    header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist');
80 80
 } catch (Exception $e) {
81 81
     header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
82 82
 }
Please login to merge, or discard this patch.
bbb_ajax.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
         echo bigbluebuttonbn_broker_recording_import($bbbsession, $params);
122 122
         return;
123 123
     }
124
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
124
+    header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist');
125 125
 } catch (Exception $e) {
126 126
     header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
127 127
 }
Please login to merge, or discard this patch.
classes/locallib/mobileview.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 defined('MOODLE_INTERNAL') || die();
28 28
 
29
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
29
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
30 30
 
31 31
 /**
32 32
  * Methods used to render view BBB in mobile.
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
             $session['bigbluebuttonbn']->id;
63 63
         $session['meetingname'] = $session['bigbluebuttonbn']->name;
64 64
         $session['meetingdescription'] = $session['bigbluebuttonbn']->intro;
65
-        $session['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
66
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
65
+        $session['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
66
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
67 67
             $session['userlimit'] = intval($session['bigbluebuttonbn']->userlimit);
68 68
         }
69 69
         $session['voicebridge'] = $session['bigbluebuttonbn']->voicebridge;
@@ -180,18 +180,18 @@  discard block
 block discarded – undo
180 180
             'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
181 181
         ];
182 182
         // Check recording status.
183
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
183
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
184 184
             $metadatabbb["bn-recording-status"] = json_encode(
185 185
                 array(
186
-                    'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
186
+                    'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
187 187
                     'context' => $bbbsession['bigbluebuttonbnURL']
188 188
                 )
189 189
             );
190 190
         }
191
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
191
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
192 192
             $metadatabbb['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
193 193
         }
194
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
194
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
195 195
             $metadatabbb['bn-meeting-events-url'] = $bbbsession['meetingEventsURL'];
196 196
         }
197 197
         return $metadatabbb;
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
      * @return string
253 253
      */
254 254
     public static function bigbluebutton_bbb_view_create_meeting_data_record($record) {
255
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) {
255
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) {
256 256
             return 'true';
257 257
         }
258 258
         return 'false';
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      * @return integer
266 266
      */
267 267
     public static function bigbluebutton_bbb_view_create_meeting_data_duration($closingtime) {
268
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) {
268
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) {
269 269
             return bigbluebuttonbn_get_duration($closingtime);
270 270
         }
271 271
         return 0;
Please login to merge, or discard this patch.