Completed
Push — v2.3-stable ( cd79c3...8dc849 )
by Jesus
02:30 queued 42s
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   +58 added lines, -58 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
     }
@@ -1590,7 +1590,7 @@  discard block
 block discarded – undo
1590 1590
     }
1591 1591
     $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
1592 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'];
1593
+        '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1594 1594
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1595 1595
         $href .= '&href='.urlencode(trim($playback['url']));
1596 1596
     }
@@ -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');
@@ -1766,10 +1766,10 @@  discard block
 block discarded – undo
1766 1766
             'id' => $id,
1767 1767
             'onclick' => $onclick,
1768 1768
             'data-action' => $data['action']
1769
-          );
1769
+            );
1770 1770
         if (!isset($recording['imported'])) {
1771 1771
             $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances(
1772
-              $recording['recordID']);
1772
+                $recording['recordID']);
1773 1773
         }
1774 1774
         if (isset($data['disabled'])) {
1775 1775
             $iconattributes['class'] .= ' fa-' . $data['disabled'];
@@ -2302,17 +2302,17 @@  discard block
 block discarded – undo
2302 2302
 function bigbluebuttonbn_get_instance_type_profiles() {
2303 2303
     $instanceprofiles = array(
2304 2304
         BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL,
2305
-                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2306
-                  'features' => array('all')),
2305
+                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2306
+                    'features' => array('all')),
2307 2307
         BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY,
2308
-                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2309
-                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2310
-                      'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2311
-                      'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2312
-                      'clienttype')),
2308
+                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2309
+                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2310
+                        'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2311
+                        'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2312
+                        'clienttype')),
2313 2313
         BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY,
2314
-                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2315
-                  'features' => array('showrecordings', 'importrecordings'))
2314
+                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2315
+                    'features' => array('showrecordings', 'importrecordings'))
2316 2316
     );
2317 2317
     return $instanceprofiles;
2318 2318
 }
@@ -2399,8 +2399,8 @@  discard block
 block discarded – undo
2399 2399
     $activitytime = '';
2400 2400
     if ($time) {
2401 2401
         $activitytime = calendar_day_representation($time).' '.
2402
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2403
-          calendar_time_representation($time);
2402
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2403
+            calendar_time_representation($time);
2404 2404
     }
2405 2405
     return $activitytime;
2406 2406
 }
@@ -2719,7 +2719,7 @@  discard block
 block discarded – undo
2719 2719
         $renderer->render_group_element('participant_moderator_default',
2720 2720
             $renderer->render_group_element_configmultiselect('participant_moderator_default',
2721 2721
                 array_keys($owner), array_merge($owner, $roles))
2722
-          );
2722
+            );
2723 2723
     }
2724 2724
 }
2725 2725
 
@@ -2755,7 +2755,7 @@  discard block
 block discarded – undo
2755 2755
         // Web Client default.
2756 2756
         $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2757 2757
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2758
-                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2758
+                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2759 2759
         $renderer->render_group_element('clienttype_default',
2760 2760
             $renderer->render_group_element_configselect('clienttype_default',
2761 2761
                 $default, $choices));
@@ -2866,7 +2866,7 @@  discard block
 block discarded – undo
2866 2866
         return $output;
2867 2867
     }
2868 2868
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2869
-      'bigbluebuttonbn_view_general_warning') . "\n";
2869
+        'bigbluebuttonbn_view_general_warning') . "\n";
2870 2870
     $output .= '    ' . $message . "\n";
2871 2871
     $output .= '  <div class="singlebutton pull-right">' . "\n";
2872 2872
     if (!empty($href)) {
Please login to merge, or discard this patch.
Spacing   +81 added lines, -81 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 = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
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 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
 /**
@@ -1633,7 +1633,7 @@  discard block
 block discarded – undo
1633 1633
     $validatedurls[$urlhost] = true;
1634 1634
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1635 1635
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1636
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1636
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1637 1637
         debugging($error, DEBUG_DEVELOPER);
1638 1638
         $validatedurls[$urlhost] = false;
1639 1639
     }
@@ -1724,12 +1724,12 @@  discard block
 block discarded – undo
1724 1724
  * @return string
1725 1725
  */
1726 1726
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1727
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1727
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1728 1728
     if (empty($data)) {
1729 1729
         return $htmltext;
1730 1730
     }
1731
-    $target = $data['action'] . '-' . $data['target'];
1732
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1731
+    $target = $data['action'].'-'.$data['target'];
1732
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1733 1733
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1734 1734
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1735 1735
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1737,7 +1737,7 @@  discard block
 block discarded – undo
1737 1737
     $tail = html_writer::end_tag('div');
1738 1738
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1739 1739
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1740
-    return $head . $htmltext . $htmllink . $tail;
1740
+    return $head.$htmltext.$htmllink.$tail;
1741 1741
 }
1742 1742
 
1743 1743
 /**
@@ -1755,11 +1755,11 @@  discard block
 block discarded – undo
1755 1755
     }
1756 1756
     $target = $data['action'];
1757 1757
     if (isset($data['target'])) {
1758
-        $target .= '-' . $data['target'];
1758
+        $target .= '-'.$data['target'];
1759 1759
     }
1760
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1761
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1762
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1760
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1761
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);';
1762
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1763 1763
         // With icon for $manageaction.
1764 1764
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1765 1765
         $linkattributes = array(
@@ -1772,12 +1772,12 @@  discard block
 block discarded – undo
1772 1772
               $recording['recordID']);
1773 1773
         }
1774 1774
         if (isset($data['disabled'])) {
1775
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1775
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1776 1776
             $linkattributes['class'] = 'disabled';
1777 1777
             unset($linkattributes['onclick']);
1778 1778
         }
1779 1779
         $icon = new pix_icon('i/'.$data['tag'],
1780
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1780
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1781 1781
             'moodle', $iconattributes);
1782 1782
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1783 1783
     }
@@ -1873,7 +1873,7 @@  discard block
 block discarded – undo
1873 1873
     if ($bbbsession['managerecordings']) {
1874 1874
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1875 1875
         $table->align[] = 'left';
1876
-        $table->size[] = (count($tools) * 40) . 'px';
1876
+        $table->size[] = (count($tools) * 40).'px';
1877 1877
     }
1878 1878
     // Get the groups of the user.
1879 1879
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -1900,7 +1900,7 @@  discard block
 block discarded – undo
1900 1900
         $groupmode = $DB->get_record_sql($sql, $params, IGNORE_MULTIPLE);
1901 1901
 
1902 1902
         $displayrow = true;
1903
-        if ((isset($groupmode->groupmode) && (int)$groupmode->groupmode != VISIBLEGROUPS)
1903
+        if ((isset($groupmode->groupmode) && (int) $groupmode->groupmode != VISIBLEGROUPS)
1904 1904
             && !$bbbsession['administrator'] && !$bbbsession['moderator']) {
1905 1905
             $groupid = explode('[', $recording['meetingID']);
1906 1906
             if (isset($groupid[1])) {
@@ -1951,14 +1951,14 @@  discard block
 block discarded – undo
1951 1951
     }
1952 1952
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1953 1953
     $row->cells = array();
1954
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
1955
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;;
1956
-    $row->cells[] = $texthead . $rowdata->activity . $texttail;
1957
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
1954
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
1955
+    $row->cells[] = $texthead.$rowdata->meeting.$texttail; ;
1956
+    $row->cells[] = $texthead.$rowdata->activity.$texttail;
1957
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
1958 1958
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
1959 1959
         $row->cells[] = $rowdata->preview;
1960 1960
     }
1961
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
1961
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
1962 1962
     $row->cells[] = $rowdata->duration_formatted;
1963 1963
     if ($bbbsession['managerecordings']) {
1964 1964
         $row->cells[] = $rowdata->actionbar;
@@ -2001,7 +2001,7 @@  discard block
 block discarded – undo
2001 2001
     $sender = get_admin();
2002 2002
     // Prepare message.
2003 2003
     $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
2004
-        ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
2004
+        ' &quot;'.$bigbluebuttonbn->name.'&quot; '.
2005 2005
         get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
2006 2006
     $context = context_course::instance($bigbluebuttonbn->course);
2007 2007
     \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext);
@@ -2136,17 +2136,17 @@  discard block
 block discarded – undo
2136 2136
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2137 2137
  */
2138 2138
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2139
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2139
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2140 2140
     if (empty($courseid)) {
2141 2141
         $courseid = 0;
2142 2142
     }
2143 2143
     if (empty($bigbluebuttonbnid)) {
2144
-        return $sql . " AND courseid = {$courseid}";
2144
+        return $sql." AND courseid = {$courseid}";
2145 2145
     }
2146 2146
     if ($subset) {
2147
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2147
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2148 2148
     }
2149
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2149
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2150 2150
 }
2151 2151
 
2152 2152
 /**
@@ -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_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2163
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2163
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
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
 /**
@@ -2494,7 +2494,7 @@  discard block
 block discarded – undo
2494 2494
  */
2495 2495
 function bigbluebuttonbn_settings_general(&$renderer) {
2496 2496
     // Configuration for BigBlueButton.
2497
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2497
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2498 2498
         $renderer->render_group_header('general');
2499 2499
         $renderer->render_group_element('server_url',
2500 2500
             $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL));
@@ -2512,7 +2512,7 @@  discard block
 block discarded – undo
2512 2512
  */
2513 2513
 function bigbluebuttonbn_settings_record(&$renderer) {
2514 2514
     // Configuration for 'recording' feature.
2515
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2515
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2516 2516
         $renderer->render_group_header('recording');
2517 2517
         $renderer->render_group_element('recording_default',
2518 2518
             $renderer->render_group_element_checkbox('recording_default', 1));
@@ -2542,7 +2542,7 @@  discard block
 block discarded – undo
2542 2542
  */
2543 2543
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2544 2544
     // Configuration for 'import recordings' feature.
2545
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2545
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2546 2546
         $renderer->render_group_header('importrecordings');
2547 2547
         $renderer->render_group_element('importrecordings_enabled',
2548 2548
             $renderer->render_group_element_checkbox('importrecordings_enabled', 0));
@@ -2560,7 +2560,7 @@  discard block
 block discarded – undo
2560 2560
  */
2561 2561
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2562 2562
     // Configuration for 'show recordings' feature.
2563
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2563
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2564 2564
         $renderer->render_group_header('recordings');
2565 2565
         $renderer->render_group_element('recordings_html_default',
2566 2566
             $renderer->render_group_element_checkbox('recordings_html_default', 1));
@@ -2592,7 +2592,7 @@  discard block
 block discarded – undo
2592 2592
  */
2593 2593
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2594 2594
     // Configuration for wait for moderator feature.
2595
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2595
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2596 2596
         $renderer->render_group_header('waitformoderator');
2597 2597
         $renderer->render_group_element('waitformoderator_default',
2598 2598
             $renderer->render_group_element_checkbox('waitformoderator_default', 0));
@@ -2614,7 +2614,7 @@  discard block
 block discarded – undo
2614 2614
  */
2615 2615
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2616 2616
     // Configuration for "static voice bridge" feature.
2617
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2617
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2618 2618
         $renderer->render_group_header('voicebridge');
2619 2619
         $renderer->render_group_element('voicebridge_editable',
2620 2620
             $renderer->render_group_element_checkbox('voicebridge_editable', 0));
@@ -2630,7 +2630,7 @@  discard block
 block discarded – undo
2630 2630
  */
2631 2631
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2632 2632
     // Configuration for "preupload presentation" feature.
2633
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2633
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2634 2634
         // This feature only works if curl is installed.
2635 2635
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2636 2636
         if (!extension_loaded('curl')) {
@@ -2656,7 +2656,7 @@  discard block
 block discarded – undo
2656 2656
  */
2657 2657
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2658 2658
     // Configuration for "preupload presentation" feature.
2659
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2659
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2660 2660
         if (extension_loaded('curl')) {
2661 2661
             // This feature only works if curl is installed.
2662 2662
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2673,7 +2673,7 @@  discard block
 block discarded – undo
2673 2673
  */
2674 2674
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2675 2675
     // Configuration for "user limit" feature.
2676
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2676
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2677 2677
         $renderer->render_group_header('userlimit');
2678 2678
         $renderer->render_group_element('userlimit_default',
2679 2679
             $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT));
@@ -2691,7 +2691,7 @@  discard block
 block discarded – undo
2691 2691
  */
2692 2692
 function bigbluebuttonbn_settings_duration(&$renderer) {
2693 2693
     // Configuration for "scheduled duration" feature.
2694
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2694
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2695 2695
         $renderer->render_group_header('scheduled');
2696 2696
         $renderer->render_group_element('scheduled_duration_enabled',
2697 2697
             $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1));
@@ -2711,7 +2711,7 @@  discard block
 block discarded – undo
2711 2711
  */
2712 2712
 function bigbluebuttonbn_settings_participants(&$renderer) {
2713 2713
     // Configuration for defining the default role/user that will be moderator on new activities.
2714
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2714
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2715 2715
         $renderer->render_group_header('participant');
2716 2716
         // UI for 'participants' feature.
2717 2717
         $roles = bigbluebuttonbn_get_roles();
@@ -2732,7 +2732,7 @@  discard block
 block discarded – undo
2732 2732
  */
2733 2733
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2734 2734
     // Configuration for "send notifications" feature.
2735
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2735
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2736 2736
         $renderer->render_group_header('sendnotifications');
2737 2737
         $renderer->render_group_element('sendnotifications_enabled',
2738 2738
             $renderer->render_group_element_checkbox('sendnotifications_enabled', 1));
@@ -2748,12 +2748,12 @@  discard block
 block discarded – undo
2748 2748
  */
2749 2749
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
2750 2750
     // Configuration for "clienttype" feature.
2751
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2751
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2752 2752
         $renderer->render_group_header('clienttype');
2753 2753
         $renderer->render_group_element('clienttype_editable',
2754 2754
             $renderer->render_group_element_checkbox('clienttype_editable', 0));
2755 2755
         // Web Client default.
2756
-        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2756
+        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2757 2757
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2758 2758
                          BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2759 2759
         $renderer->render_group_element('clienttype_default',
@@ -2771,7 +2771,7 @@  discard block
 block discarded – undo
2771 2771
  */
2772 2772
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
2773 2773
     // Configuration for BigBlueButton.
2774
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2774
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2775 2775
         $renderer->render_group_header('muteonstart');
2776 2776
         $renderer->render_group_element('muteonstart_default',
2777 2777
             $renderer->render_group_element_checkbox('muteonstart_default', 0));
@@ -2793,7 +2793,7 @@  discard block
 block discarded – undo
2793 2793
         return;
2794 2794
     }
2795 2795
     // Configuration for 'notify users when recording ready' feature.
2796
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2796
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2797 2797
         $renderer->render_group_header('extended_capabilities');
2798 2798
         // UI for 'notify users when recording ready' feature.
2799 2799
         $renderer->render_group_element('recordingready_enabled',
@@ -2813,7 +2813,7 @@  discard block
 block discarded – undo
2813 2813
     global $DB;
2814 2814
     do {
2815 2815
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
2816
-        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2816
+        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2817 2817
     } while ($meetingid == $encodedseed);
2818 2818
     return $encodedseed;
2819 2819
 }
@@ -2858,22 +2858,22 @@  discard block
 block discarded – undo
2858 2858
  *
2859 2859
  * @return string
2860 2860
  */
2861
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') {
2861
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
2862 2862
     global $OUTPUT;
2863 2863
     $output = "\n";
2864 2864
     // Evaluates if config_warning is enabled.
2865 2865
     if (empty($message)) {
2866 2866
         return $output;
2867 2867
     }
2868
-    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2869
-      'bigbluebuttonbn_view_general_warning') . "\n";
2870
-    $output .= '    ' . $message . "\n";
2871
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
2868
+    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
2869
+      'bigbluebuttonbn_view_general_warning')."\n";
2870
+    $output .= '    '.$message."\n";
2871
+    $output .= '  <div class="singlebutton pull-right">'."\n";
2872 2872
     if (!empty($href)) {
2873 2873
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
2874 2874
     }
2875
-    $output .= '  </div>' . "\n";
2876
-    $output .= $OUTPUT->box_end() . "\n";
2875
+    $output .= '  </div>'."\n";
2876
+    $output .= $OUTPUT->box_end()."\n";
2877 2877
     return $output;
2878 2878
 }
2879 2879
 
@@ -2897,10 +2897,10 @@  discard block
 block discarded – undo
2897 2897
     if ($class == '') {
2898 2898
         $class = 'btn btn-secondary';
2899 2899
     }
2900
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
2901
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
2902
-    $output .= '          title="' . $title . '"'."\n";
2903
-    $output .= '          >' . $text . '</button>'."\n";
2900
+    $output  = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
2901
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
2902
+    $output .= '          title="'.$title.'"'."\n";
2903
+    $output .= '          >'.$text.'</button>'."\n";
2904 2904
     $output .= '  </form>'."\n";
2905 2905
     return $output;
2906 2906
 }
@@ -2967,7 +2967,7 @@  discard block
 block discarded – undo
2967 2967
 
2968 2968
     // By default, use a meetingid without groups.
2969 2969
     if (empty($mid)) {
2970
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
2970
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
2971 2971
     }
2972 2972
 
2973 2973
     // When meeting is running, all authorized users can join right in.
@@ -3028,7 +3028,7 @@  discard block
 block discarded – undo
3028 3028
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3029 3029
     global $DB;
3030 3030
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3031
-    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3031
+    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3032 3032
     return $ownerid;
3033 3033
 }
3034 3034
 
@@ -3038,7 +3038,7 @@  discard block
 block discarded – undo
3038 3038
  * @return boolean
3039 3039
  */
3040 3040
 function bigbluebuttonbn_has_html5_client() {
3041
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3041
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3042 3042
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3043 3043
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3044 3044
 }
@@ -3071,8 +3071,8 @@  discard block
 block discarded – undo
3071 3071
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3072 3072
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3073 3073
     // Extra data for setting up the Meeting.
3074
-    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3075
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3074
+    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3075
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3076 3076
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3077 3077
     }
3078 3078
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3178,7 +3178,7 @@  discard block
 block discarded – undo
3178 3178
     );
3179 3179
 
3180 3180
     // Check status and set extra values.
3181
-    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession);  // In locallib.
3181
+    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib.
3182 3182
     if ($activitystatus == 'ended') {
3183 3183
         $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array(
3184 3184
             $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.