Completed
Push — v2.3-stable ( 59783c...c49e84 )
by Jesus
02:11
created
mod_form.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
107 107
         $jsvars['participantData'] = bigbluebuttonbn_get_participant_data($context, $bigbluebuttonbn);
108 108
         $jsvars['participantList'] = $participantlist;
109
-        $jsvars['iconsEnabled'] = (boolean)$cfg['recording_icons_enabled'];
110
-        $jsvars['pixIconDelete'] = (string)$OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle');
109
+        $jsvars['iconsEnabled'] = (boolean) $cfg['recording_icons_enabled'];
110
+        $jsvars['pixIconDelete'] = (string) $OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle');
111 111
         $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-modform',
112 112
             'M.mod_bigbluebuttonbn.modform.init', array($jsvars));
113 113
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      * @return void
166 166
      */
167 167
     private function bigbluebuttonbn_mform_add_block_profiles(&$mform, $profiles) {
168
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
168
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
169 169
             $mform->addElement('select', 'type', get_string('mod_form_field_instanceprofiles', 'bigbluebuttonbn'),
170 170
                 bigbluebuttonbn_get_instance_profiles_array($profiles),
171 171
                 array('onchange' => 'M.mod_bigbluebuttonbn.modform.updateInstanceTypeProfile(this);'));
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;'
405 405
           ));
406 406
         $htmladdparticipant = html_writer::tag('div',
407
-            $htmlselectiontype . '  ' . $htmlselectionoptions . '  ' . $htmlselectioninput, null);
407
+            $htmlselectiontype.'  '.$htmlselectionoptions.'  '.$htmlselectioninput, null);
408 408
         $mform->addElement('html', "\n\n");
409 409
         $mform->addElement('static', 'static_add_participant',
410 410
             get_string('mod_form_field_participant_add', 'bigbluebuttonbn'), $htmladdparticipant);
Please login to merge, or discard this patch.
locallib.php 3 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null,
104 104
         $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) {
105 105
     $data = ['meetingID' => $meetingid,
106
-              'fullName' => $username,
107
-              'password' => $pw,
108
-              'logoutURL' => $logouturl,
106
+                'fullName' => $username,
107
+                'password' => $pw,
108
+                'logoutURL' => $logouturl,
109 109
             ];
110 110
     // Choose between Adobe Flash or HTML5 Client.
111 111
     if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) {
@@ -161,23 +161,23 @@  discard block
 block discarded – undo
161 161
 function bigbluebuttonbn_get_meeting_info_array($meetingid) {
162 162
     $xml = bigbluebuttonbn_wrap_xml_load_file(
163 163
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
164
-      );
164
+        );
165 165
     if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) {
166 166
         // Meeting info was returned.
167 167
         return array('returncode' => $xml->returncode,
168
-                     'meetingID' => $xml->meetingID,
169
-                     'moderatorPW' => $xml->moderatorPW,
170
-                     'attendeePW' => $xml->attendeePW,
171
-                     'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
172
-                     'running' => $xml->running,
173
-                     'recording' => $xml->recording,
174
-                     'startTime' => $xml->startTime,
175
-                     'endTime' => $xml->endTime,
176
-                     'participantCount' => $xml->participantCount,
177
-                     'moderatorCount' => $xml->moderatorCount,
178
-                     'attendees' => $xml->attendees,
179
-                     'metadata' => $xml->metadata,
180
-                   );
168
+                        'meetingID' => $xml->meetingID,
169
+                        'moderatorPW' => $xml->moderatorPW,
170
+                        'attendeePW' => $xml->attendeePW,
171
+                        'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
172
+                        'running' => $xml->running,
173
+                        'recording' => $xml->recording,
174
+                        'startTime' => $xml->startTime,
175
+                        'endTime' => $xml->endTime,
176
+                        'participantCount' => $xml->participantCount,
177
+                        'moderatorCount' => $xml->moderatorCount,
178
+                        'attendees' => $xml->attendees,
179
+                        'metadata' => $xml->metadata,
180
+                    );
181 181
     }
182 182
     if ($xml) {
183 183
         // Either failure or success without meeting info.
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 function bigbluebuttonbn_get_default_config_xml() {
330 330
     $xml = bigbluebuttonbn_wrap_xml_load_file(
331 331
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML')
332
-      );
332
+        );
333 333
     return $xml;
334 334
 }
335 335
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
     foreach ($ids as $id) {
434 434
         $xml = bigbluebuttonbn_wrap_xml_load_file(
435 435
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id])
436
-          );
436
+            );
437 437
         if ($xml && $xml->returncode != 'SUCCESS') {
438 438
             return false;
439 439
         }
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     foreach ($ids as $id) {
453 453
         $xml = bigbluebuttonbn_wrap_xml_load_file(
454 454
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
455
-          );
455
+            );
456 456
         if ($xml && $xml->returncode != 'SUCCESS') {
457 457
             return false;
458 458
         }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     foreach ($ids as $id) {
472 472
         $xml = bigbluebuttonbn_wrap_xml_load_file(
473 473
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
474
-          );
474
+            );
475 475
         if ($xml && $xml->returncode != 'SUCCESS') {
476 476
             return false;
477 477
         }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
489 489
     $xml = bigbluebuttonbn_wrap_xml_load_file(
490 490
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
491
-      );
491
+        );
492 492
     if ($xml) {
493 493
         // If the xml packet returned failure it displays the message to the user.
494 494
         return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 function bigbluebuttonbn_get_server_version() {
506 506
     $xml = bigbluebuttonbn_wrap_xml_load_file(
507 507
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url()
508
-      );
508
+        );
509 509
     if ($xml && $xml->returncode == 'SUCCESS') {
510 510
         return $xml->version;
511 511
     }
@@ -572,10 +572,10 @@  discard block
 block discarded – undo
572 572
         }
573 573
         $options = array();
574 574
         $options['CURLOPT_HTTPHEADER'] = array(
575
-                 'Content-Type: '.$contenttype,
576
-                 'Content-Length: '.strlen($data),
577
-                 'Content-Language: en-US',
578
-               );
575
+                    'Content-Type: '.$contenttype,
576
+                    'Content-Length: '.strlen($data),
577
+                    'Content-Language: en-US',
578
+                );
579 579
 
580 580
         return $c->post($url, $data, $options);
581 581
     }
@@ -739,12 +739,12 @@  discard block
 block discarded – undo
739 739
         'all' => array(
740 740
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
741 741
             'children' => []
742
-          )
743
-      );
742
+            )
743
+        );
744 744
     $data['role'] = array(
745 745
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
746 746
         'children' => bigbluebuttonbn_get_roles_select($context)
747
-      );
747
+        );
748 748
     $data['user'] = array(
749 749
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
750 750
         'children' => bigbluebuttonbn_get_users_select($context, $bbactivity),
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
         'selectiontype' => 'all',
792 792
         'selectionid' => 'all',
793 793
         'role' => BIGBLUEBUTTONBN_ROLE_VIEWER
794
-      );
794
+        );
795 795
     $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default'));
796 796
     foreach ($defaultrules as $defaultrule) {
797 797
         if ($defaultrule == '0') {
@@ -804,9 +804,9 @@  discard block
 block discarded – undo
804 804
             continue;
805 805
         }
806 806
         $participantlist[] = array(
807
-              'selectiontype' => 'role',
808
-              'selectionid' => $defaultrule,
809
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
807
+                'selectiontype' => 'role',
808
+                'selectionid' => $defaultrule,
809
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
810 810
     }
811 811
     return $participantlist;
812 812
 }
@@ -845,11 +845,11 @@  discard block
 block discarded – undo
845 845
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
846 846
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
847 847
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
848
-          ],
848
+            ],
849 849
         'type_selected' => 'all',
850 850
         'options' => ['all' => '---------------'],
851 851
         'selected' => 'all',
852
-      ];
852
+        ];
853 853
 }
854 854
 
855 855
 /**
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
     // Ping again and refresh the cache.
1169 1169
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1170 1170
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1171
-      );
1171
+        );
1172 1172
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
1173 1173
     return $meetinginfo;
1174 1174
 }
@@ -1582,8 +1582,8 @@  discard block
 block discarded – undo
1582 1582
     }
1583 1583
     $id = 'playbacks-'.$recording['recordID'];
1584 1584
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1585
-          'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1586
-          'title' => $title, $visibility => $visibility));
1585
+            'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1586
+            'title' => $title, $visibility => $visibility));
1587 1587
     foreach ($recording['playbacks'] as $playback) {
1588 1588
         $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback);
1589 1589
     }
@@ -1618,7 +1618,7 @@  discard block
 block discarded – undo
1618 1618
         'data-action' => 'play',
1619 1619
         'data-target' => $playback['type'],
1620 1620
         'data-href' => $href,
1621
-      );
1621
+        );
1622 1622
     if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1623 1623
         $linkattributes['class'] = 'btn btn-sm btn-warning';
1624 1624
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
@@ -1800,10 +1800,10 @@  discard block
 block discarded – undo
1800 1800
             'id' => $id,
1801 1801
             'onclick' => $onclick,
1802 1802
             'data-action' => $data['action']
1803
-          );
1803
+            );
1804 1804
         if (!isset($recording['imported'])) {
1805 1805
             $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances(
1806
-              $recording['recordID']);
1806
+                $recording['recordID']);
1807 1807
         }
1808 1808
         if (isset($data['disabled'])) {
1809 1809
             $iconattributes['class'] .= ' fa-' . $data['disabled'];
@@ -2326,17 +2326,17 @@  discard block
 block discarded – undo
2326 2326
 function bigbluebuttonbn_get_instance_type_profiles() {
2327 2327
     $instanceprofiles = array(
2328 2328
         BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL,
2329
-                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2330
-                  'features' => array('all')),
2329
+                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2330
+                    'features' => array('all')),
2331 2331
         BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY,
2332
-                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2333
-                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2334
-                      'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2335
-                      'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2336
-                      'clienttype', 'availabilityconditionsheader')),
2332
+                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2333
+                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2334
+                        'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2335
+                        'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2336
+                        'clienttype', 'availabilityconditionsheader')),
2337 2337
         BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY,
2338
-                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2339
-                  'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2338
+                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2339
+                    'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader'))
2340 2340
     );
2341 2341
     return $instanceprofiles;
2342 2342
 }
@@ -2423,8 +2423,8 @@  discard block
 block discarded – undo
2423 2423
     $activitytime = '';
2424 2424
     if ($time) {
2425 2425
         $activitytime = calendar_day_representation($time).' '.
2426
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2427
-          calendar_time_representation($time);
2426
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2427
+            calendar_time_representation($time);
2428 2428
     }
2429 2429
     return $activitytime;
2430 2430
 }
@@ -2743,7 +2743,7 @@  discard block
 block discarded – undo
2743 2743
         $renderer->render_group_element('participant_moderator_default',
2744 2744
             $renderer->render_group_element_configmultiselect('participant_moderator_default',
2745 2745
                 array_keys($owner), array_merge($owner, $roles))
2746
-          );
2746
+            );
2747 2747
     }
2748 2748
 }
2749 2749
 
@@ -2779,7 +2779,7 @@  discard block
 block discarded – undo
2779 2779
         // Web Client default.
2780 2780
         $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2781 2781
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2782
-                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2782
+                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2783 2783
         $renderer->render_group_element('clienttype_default',
2784 2784
             $renderer->render_group_element_configselect('clienttype_default',
2785 2785
                 $default, $choices));
@@ -2890,7 +2890,7 @@  discard block
 block discarded – undo
2890 2890
         return $output;
2891 2891
     }
2892 2892
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2893
-      'bigbluebuttonbn_view_general_warning') . "\n";
2893
+        'bigbluebuttonbn_view_general_warning') . "\n";
2894 2894
     $output .= '    ' . $message . "\n";
2895 2895
     $output .= '  <div class="singlebutton pull-right">' . "\n";
2896 2896
     if (!empty($href)) {
Please login to merge, or discard this patch.
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
     global $CFG;
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
  * @param integer $instance
957 957
  * @param integer $voicebridge
958 958
  *
959
- * @return string
959
+ * @return boolean
960 960
  */
961 961
 function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) {
962 962
     global $DB;
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
  * @param string $meetingid
1280 1280
  * @param string $configxml
1281 1281
  *
1282
- * @return object
1282
+ * @return null|SimpleXMLElement
1283 1283
  */
1284 1284
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1285 1285
     $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
@@ -1328,7 +1328,7 @@  discard block
 block discarded – undo
1328 1328
  * @param array $recording
1329 1329
  * @param array $tools
1330 1330
  *
1331
- * @return array
1331
+ * @return null|stdClass
1332 1332
  */
1333 1333
 function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) {
1334 1334
     if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
@@ -1962,7 +1962,7 @@  discard block
 block discarded – undo
1962 1962
  *
1963 1963
  * @param array $bbbsession
1964 1964
  * @param array $recording
1965
- * @param object $rowdata
1965
+ * @param stdClass $rowdata
1966 1966
  *
1967 1967
  * @return object
1968 1968
  */
@@ -2080,7 +2080,7 @@  discard block
 block discarded – undo
2080 2080
  *
2081 2081
  * @param array $bbbsession
2082 2082
  * @param array $recordings
2083
- * @param array $tools
2083
+ * @param string[] $tools
2084 2084
  *
2085 2085
  * @return array
2086 2086
  */
@@ -2158,7 +2158,7 @@  discard block
 block discarded – undo
2158 2158
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2159 2159
  * in the getRecordings request considering only those that belong to deleted activities.
2160 2160
  *
2161
- * @param string $courseid
2161
+ * @param integer $courseid
2162 2162
  * @param string $bigbluebuttonbnid
2163 2163
  * @param bool   $subset
2164 2164
  *
@@ -2182,7 +2182,7 @@  discard block
 block discarded – undo
2182 2182
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2183 2183
  * in the getRecordings request considering only those that belong to imported recordings.
2184 2184
  *
2185
- * @param string $courseid
2185
+ * @param integer $courseid
2186 2186
  * @param string $bigbluebuttonbnid
2187 2187
  * @param bool   $subset
2188 2188
  *
@@ -2205,7 +2205,7 @@  discard block
 block discarded – undo
2205 2205
 /**
2206 2206
  * Helper function to get recordings and imported recordings together.
2207 2207
  *
2208
- * @param string $courseid
2208
+ * @param integer $courseid
2209 2209
  * @param string $bigbluebuttonbnid
2210 2210
  * @param bool   $subset
2211 2211
  * @param bool   $includedeleted
@@ -2223,7 +2223,7 @@  discard block
 block discarded – undo
2223 2223
  * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events
2224 2224
  * in bigbluebuttonbn_logs.
2225 2225
  *
2226
- * @param string $courseid
2226
+ * @param integer $courseid
2227 2227
  * @param string $bigbluebuttonbnid
2228 2228
  * @param bool   $subset
2229 2229
  * @param bool   $includedeleted
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');
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
  */
566 566
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
567 567
     global $CFG;
568
-    require_once($CFG->libdir . '/filelib.php');
568
+    require_once($CFG->libdir.'/filelib.php');
569 569
     $c = new curl();
570 570
     $c->setopt(array('SSL_VERIFYPEER' => true));
571 571
     if ($method == 'POST') {
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
     if ($userroles) {
617 617
         $where = '';
618 618
         foreach ($userroles as $userrole) {
619
-            $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid;
619
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
620 620
         }
621 621
         $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
622 622
     }
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
 function bigbluebuttonbn_get_role($id) {
724 724
     $roles = (array) role_get_names();
725 725
     if (is_numeric($id) && isset($roles[$id])) {
726
-        return (object)$roles[$id];
726
+        return (object) $roles[$id];
727 727
     }
728 728
     foreach ($roles as $role) {
729 729
         if ($role->shortname == $id) {
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
804 804
                 $participantlist[] = array(
805 805
                     'selectiontype' => 'user',
806
-                    'selectionid' => (string)$ownerid,
806
+                    'selectionid' => (string) $ownerid,
807 807
                     'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
808 808
             }
809 809
             continue;
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
     if (!isguestuser()) {
879 879
         $userroles = bigbluebuttonbn_get_user_roles($context, $userid);
880 880
     }
881
-    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles);
881
+    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles);
882 882
 }
883 883
 
884 884
 /**
@@ -963,9 +963,9 @@  discard block
 block discarded – undo
963 963
     if ($voicebridge == 0) {
964 964
         return true;
965 965
     }
966
-    $select = 'voicebridge = ' . $voicebridge;
966
+    $select = 'voicebridge = '.$voicebridge;
967 967
     if ($instance != 0) {
968
-        $select .= ' AND id <>' . $instance;
968
+        $select .= ' AND id <>'.$instance;
969 969
     }
970 970
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
971 971
         return true;
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
     $now = time();
986 986
     if ($closingtime > 0 && $now < $closingtime) {
987 987
         $duration = ceil(($closingtime - $now) / 60);
988
-        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
988
+        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
989 989
         $duration = intval($duration) + $compensationtime;
990 990
     }
991 991
     return $duration;
@@ -1125,7 +1125,7 @@  discard block
 block discarded – undo
1125 1125
     if (array_key_exists('other', $options)) {
1126 1126
         $params['other'] = $options['other'];
1127 1127
     }
1128
-    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create',
1128
+    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create',
1129 1129
         array($params));
1130 1130
     $event->add_record_snapshot('course_modules', $cm);
1131 1131
     $event->add_record_snapshot('course', $course);
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
  * @return array
1163 1163
  */
1164 1164
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1165
-    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1165
+    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1166 1166
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1167 1167
     $result = $cache->get($meetingid);
1168 1168
     $now = time();
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
  * @return boolean
1369 1369
  */
1370 1370
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1371
-    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1371
+    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1372 1372
 }
1373 1373
 
1374 1374
 /**
@@ -1379,7 +1379,7 @@  discard block
 block discarded – undo
1379 1379
  * @return boolean
1380 1380
  */
1381 1381
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1382
-    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1382
+    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1383 1383
 }
1384 1384
 
1385 1385
 /**
@@ -1455,11 +1455,11 @@  discard block
 block discarded – undo
1455 1455
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1456 1456
     }
1457 1457
     $head = html_writer::start_tag('div', array(
1458
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1458
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1459 1459
         'data-recordingid' => $recording['recordID'],
1460 1460
         'data-meetingid' => $recording['meetingID']));
1461 1461
     $tail = html_writer::end_tag('div');
1462
-    return $head . $actionbar . $tail;
1462
+    return $head.$actionbar.$tail;
1463 1463
 }
1464 1464
 
1465 1465
 /**
@@ -1554,7 +1554,7 @@  discard block
 block discarded – undo
1554 1554
         }
1555 1555
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1556 1556
         $recordingpreview .= html_writer::empty_tag('img',
1557
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left'));
1557
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left'));
1558 1558
         $recordingpreview .= html_writer::end_tag('div');
1559 1559
     }
1560 1560
     $recordingpreview .= html_writer::end_tag('div');
@@ -1611,13 +1611,13 @@  discard block
 block discarded – undo
1611 1611
         return '';
1612 1612
     }
1613 1613
     $text = bigbluebuttonbn_get_recording_type_text($playback['type']);
1614
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1615
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1614
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1615
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1616 1616
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1617
-        $href .= '&href=' . urlencode(trim($playback['url']));
1617
+        $href .= '&href='.urlencode(trim($playback['url']));
1618 1618
     }
1619 1619
     $linkattributes = array(
1620
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1620
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1621 1621
         'class' => 'btn btn-sm btn-default',
1622 1622
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1623 1623
         'data-action' => 'play',
@@ -1629,7 +1629,7 @@  discard block
 block discarded – undo
1629 1629
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1630 1630
         unset($linkattributes['data-href']);
1631 1631
     }
1632
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1632
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1633 1633
 }
1634 1634
 
1635 1635
 /**
@@ -1642,7 +1642,7 @@  discard block
 block discarded – undo
1642 1642
 function bigbluebuttonbn_get_recording_type_text($playbacktype) {
1643 1643
     // Check first if string exists, and if it does'nt just default to the capitalised version of the string.
1644 1644
     $text = ucwords($playbacktype);
1645
-    $typestringid = 'view_recording_format_' . $playbacktype;
1645
+    $typestringid = 'view_recording_format_'.$playbacktype;
1646 1646
     if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) {
1647 1647
         $text = get_string($typestringid, 'bigbluebuttonbn');
1648 1648
     }
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
     $validatedurls[$urlhost] = true;
1673 1673
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1674 1674
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1675
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1675
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1676 1676
         debugging($error, DEBUG_DEVELOPER);
1677 1677
         $validatedurls[$urlhost] = false;
1678 1678
     }
@@ -1763,12 +1763,12 @@  discard block
 block discarded – undo
1763 1763
  * @return string
1764 1764
  */
1765 1765
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1766
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1766
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1767 1767
     if (empty($data)) {
1768 1768
         return $htmltext;
1769 1769
     }
1770
-    $target = $data['action'] . '-' . $data['target'];
1771
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1770
+    $target = $data['action'].'-'.$data['target'];
1771
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1772 1772
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1773 1773
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1774 1774
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1776,7 +1776,7 @@  discard block
 block discarded – undo
1776 1776
     $tail = html_writer::end_tag('div');
1777 1777
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1778 1778
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1779
-    return $head . $htmltext . $htmllink . $tail;
1779
+    return $head.$htmltext.$htmllink.$tail;
1780 1780
 }
1781 1781
 
1782 1782
 /**
@@ -1794,11 +1794,11 @@  discard block
 block discarded – undo
1794 1794
     }
1795 1795
     $target = $data['action'];
1796 1796
     if (isset($data['target'])) {
1797
-        $target .= '-' . $data['target'];
1797
+        $target .= '-'.$data['target'];
1798 1798
     }
1799
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1800
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1801
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1799
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1800
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);';
1801
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1802 1802
         // With icon for $manageaction.
1803 1803
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1804 1804
         $linkattributes = array(
@@ -1811,12 +1811,12 @@  discard block
 block discarded – undo
1811 1811
               $recording['recordID']);
1812 1812
         }
1813 1813
         if (isset($data['disabled'])) {
1814
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1814
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1815 1815
             $linkattributes['class'] = 'disabled';
1816 1816
             unset($linkattributes['onclick']);
1817 1817
         }
1818 1818
         $icon = new pix_icon('i/'.$data['tag'],
1819
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1819
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1820 1820
             'moodle', $iconattributes);
1821 1821
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1822 1822
     }
@@ -1912,7 +1912,7 @@  discard block
 block discarded – undo
1912 1912
     if ($bbbsession['managerecordings']) {
1913 1913
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1914 1914
         $table->align[] = 'left';
1915
-        $table->size[] = (count($tools) * 40) . 'px';
1915
+        $table->size[] = (count($tools) * 40).'px';
1916 1916
     }
1917 1917
     // Get the groups of the user.
1918 1918
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -1980,14 +1980,14 @@  discard block
 block discarded – undo
1980 1980
     }
1981 1981
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1982 1982
     $row->cells = array();
1983
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
1984
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;;
1985
-    $row->cells[] = $texthead . $rowdata->activity . $texttail;
1986
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
1983
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
1984
+    $row->cells[] = $texthead.$rowdata->meeting.$texttail; ;
1985
+    $row->cells[] = $texthead.$rowdata->activity.$texttail;
1986
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
1987 1987
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
1988 1988
         $row->cells[] = $rowdata->preview;
1989 1989
     }
1990
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
1990
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
1991 1991
     $row->cells[] = $rowdata->duration_formatted;
1992 1992
     if ($bbbsession['managerecordings']) {
1993 1993
         $row->cells[] = $rowdata->actionbar;
@@ -2030,7 +2030,7 @@  discard block
 block discarded – undo
2030 2030
     $sender = get_admin();
2031 2031
     // Prepare message.
2032 2032
     $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
2033
-        ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
2033
+        ' &quot;'.$bigbluebuttonbn->name.'&quot; '.
2034 2034
         get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
2035 2035
     $context = context_course::instance($bigbluebuttonbn->course);
2036 2036
     \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext);
@@ -2165,17 +2165,17 @@  discard block
 block discarded – undo
2165 2165
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2166 2166
  */
2167 2167
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2168
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2168
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2169 2169
     if (empty($courseid)) {
2170 2170
         $courseid = 0;
2171 2171
     }
2172 2172
     if (empty($bigbluebuttonbnid)) {
2173
-        return $sql . " AND courseid = {$courseid}";
2173
+        return $sql." AND courseid = {$courseid}";
2174 2174
     }
2175 2175
     if ($subset) {
2176
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2176
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2177 2177
     }
2178
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2178
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2179 2179
 }
2180 2180
 
2181 2181
 /**
@@ -2189,17 +2189,17 @@  discard block
 block discarded – undo
2189 2189
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2190 2190
  */
2191 2191
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2192
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2192
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2193 2193
     if (empty($courseid)) {
2194 2194
         $courseid = 0;
2195 2195
     }
2196 2196
     if (empty($bigbluebuttonbnid)) {
2197
-        return $sql . " AND courseid = '{$courseid}'";
2197
+        return $sql." AND courseid = '{$courseid}'";
2198 2198
     }
2199 2199
     if ($subset) {
2200
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2200
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2201 2201
     }
2202
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2202
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2203 2203
 }
2204 2204
 
2205 2205
 /**
@@ -2525,7 +2525,7 @@  discard block
 block discarded – undo
2525 2525
  */
2526 2526
 function bigbluebuttonbn_settings_general(&$renderer) {
2527 2527
     // Configuration for BigBlueButton.
2528
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2528
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2529 2529
         $renderer->render_group_header('general');
2530 2530
         $renderer->render_group_element('server_url',
2531 2531
             $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL));
@@ -2543,7 +2543,7 @@  discard block
 block discarded – undo
2543 2543
  */
2544 2544
 function bigbluebuttonbn_settings_record(&$renderer) {
2545 2545
     // Configuration for 'recording' feature.
2546
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2546
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2547 2547
         $renderer->render_group_header('recording');
2548 2548
         $renderer->render_group_element('recording_default',
2549 2549
             $renderer->render_group_element_checkbox('recording_default', 1));
@@ -2573,7 +2573,7 @@  discard block
 block discarded – undo
2573 2573
  */
2574 2574
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2575 2575
     // Configuration for 'import recordings' feature.
2576
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2576
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2577 2577
         $renderer->render_group_header('importrecordings');
2578 2578
         $renderer->render_group_element('importrecordings_enabled',
2579 2579
             $renderer->render_group_element_checkbox('importrecordings_enabled', 0));
@@ -2591,7 +2591,7 @@  discard block
 block discarded – undo
2591 2591
  */
2592 2592
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2593 2593
     // Configuration for 'show recordings' feature.
2594
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2594
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2595 2595
         $renderer->render_group_header('recordings');
2596 2596
         $renderer->render_group_element('recordings_html_default',
2597 2597
             $renderer->render_group_element_checkbox('recordings_html_default', 1));
@@ -2623,7 +2623,7 @@  discard block
 block discarded – undo
2623 2623
  */
2624 2624
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2625 2625
     // Configuration for wait for moderator feature.
2626
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2626
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2627 2627
         $renderer->render_group_header('waitformoderator');
2628 2628
         $renderer->render_group_element('waitformoderator_default',
2629 2629
             $renderer->render_group_element_checkbox('waitformoderator_default', 0));
@@ -2645,7 +2645,7 @@  discard block
 block discarded – undo
2645 2645
  */
2646 2646
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2647 2647
     // Configuration for "static voice bridge" feature.
2648
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2648
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2649 2649
         $renderer->render_group_header('voicebridge');
2650 2650
         $renderer->render_group_element('voicebridge_editable',
2651 2651
             $renderer->render_group_element_checkbox('voicebridge_editable', 0));
@@ -2661,7 +2661,7 @@  discard block
 block discarded – undo
2661 2661
  */
2662 2662
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2663 2663
     // Configuration for "preupload presentation" feature.
2664
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2664
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2665 2665
         // This feature only works if curl is installed.
2666 2666
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2667 2667
         if (!extension_loaded('curl')) {
@@ -2687,7 +2687,7 @@  discard block
 block discarded – undo
2687 2687
  */
2688 2688
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2689 2689
     // Configuration for "preupload presentation" feature.
2690
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2690
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2691 2691
         if (extension_loaded('curl')) {
2692 2692
             // This feature only works if curl is installed.
2693 2693
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2704,7 +2704,7 @@  discard block
 block discarded – undo
2704 2704
  */
2705 2705
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2706 2706
     // Configuration for "user limit" feature.
2707
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2707
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2708 2708
         $renderer->render_group_header('userlimit');
2709 2709
         $renderer->render_group_element('userlimit_default',
2710 2710
             $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT));
@@ -2722,7 +2722,7 @@  discard block
 block discarded – undo
2722 2722
  */
2723 2723
 function bigbluebuttonbn_settings_duration(&$renderer) {
2724 2724
     // Configuration for "scheduled duration" feature.
2725
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2725
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2726 2726
         $renderer->render_group_header('scheduled');
2727 2727
         $renderer->render_group_element('scheduled_duration_enabled',
2728 2728
             $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1));
@@ -2742,7 +2742,7 @@  discard block
 block discarded – undo
2742 2742
  */
2743 2743
 function bigbluebuttonbn_settings_participants(&$renderer) {
2744 2744
     // Configuration for defining the default role/user that will be moderator on new activities.
2745
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2745
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2746 2746
         $renderer->render_group_header('participant');
2747 2747
         // UI for 'participants' feature.
2748 2748
         $roles = bigbluebuttonbn_get_roles();
@@ -2763,7 +2763,7 @@  discard block
 block discarded – undo
2763 2763
  */
2764 2764
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2765 2765
     // Configuration for "send notifications" feature.
2766
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2766
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2767 2767
         $renderer->render_group_header('sendnotifications');
2768 2768
         $renderer->render_group_element('sendnotifications_enabled',
2769 2769
             $renderer->render_group_element_checkbox('sendnotifications_enabled', 1));
@@ -2779,12 +2779,12 @@  discard block
 block discarded – undo
2779 2779
  */
2780 2780
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
2781 2781
     // Configuration for "clienttype" feature.
2782
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2782
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2783 2783
         $renderer->render_group_header('clienttype');
2784 2784
         $renderer->render_group_element('clienttype_editable',
2785 2785
             $renderer->render_group_element_checkbox('clienttype_editable', 0));
2786 2786
         // Web Client default.
2787
-        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2787
+        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2788 2788
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2789 2789
                          BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2790 2790
         $renderer->render_group_element('clienttype_default',
@@ -2802,7 +2802,7 @@  discard block
 block discarded – undo
2802 2802
  */
2803 2803
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
2804 2804
     // Configuration for BigBlueButton.
2805
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2805
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2806 2806
         $renderer->render_group_header('muteonstart');
2807 2807
         $renderer->render_group_element('muteonstart_default',
2808 2808
             $renderer->render_group_element_checkbox('muteonstart_default', 0));
@@ -2824,7 +2824,7 @@  discard block
 block discarded – undo
2824 2824
         return;
2825 2825
     }
2826 2826
     // Configuration for 'notify users when recording ready' feature.
2827
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2827
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2828 2828
         $renderer->render_group_header('extended_capabilities');
2829 2829
         // UI for 'notify users when recording ready' feature.
2830 2830
         $renderer->render_group_element('recordingready_enabled',
@@ -2844,7 +2844,7 @@  discard block
 block discarded – undo
2844 2844
     global $DB;
2845 2845
     do {
2846 2846
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
2847
-        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2847
+        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2848 2848
     } while ($meetingid == $encodedseed);
2849 2849
     return $encodedseed;
2850 2850
 }
@@ -2889,22 +2889,22 @@  discard block
 block discarded – undo
2889 2889
  *
2890 2890
  * @return string
2891 2891
  */
2892
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') {
2892
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
2893 2893
     global $OUTPUT;
2894 2894
     $output = "\n";
2895 2895
     // Evaluates if config_warning is enabled.
2896 2896
     if (empty($message)) {
2897 2897
         return $output;
2898 2898
     }
2899
-    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2900
-      'bigbluebuttonbn_view_general_warning') . "\n";
2901
-    $output .= '    ' . $message . "\n";
2902
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
2899
+    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
2900
+      'bigbluebuttonbn_view_general_warning')."\n";
2901
+    $output .= '    '.$message."\n";
2902
+    $output .= '  <div class="singlebutton pull-right">'."\n";
2903 2903
     if (!empty($href)) {
2904 2904
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
2905 2905
     }
2906
-    $output .= '  </div>' . "\n";
2907
-    $output .= $OUTPUT->box_end() . "\n";
2906
+    $output .= '  </div>'."\n";
2907
+    $output .= $OUTPUT->box_end()."\n";
2908 2908
     return $output;
2909 2909
 }
2910 2910
 
@@ -2928,10 +2928,10 @@  discard block
 block discarded – undo
2928 2928
     if ($class == '') {
2929 2929
         $class = 'btn btn-secondary';
2930 2930
     }
2931
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
2932
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
2933
-    $output .= '          title="' . $title . '"'."\n";
2934
-    $output .= '          >' . $text . '</button>'."\n";
2931
+    $output  = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
2932
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
2933
+    $output .= '          title="'.$title.'"'."\n";
2934
+    $output .= '          >'.$text.'</button>'."\n";
2935 2935
     $output .= '  </form>'."\n";
2936 2936
     return $output;
2937 2937
 }
@@ -2998,7 +2998,7 @@  discard block
 block discarded – undo
2998 2998
 
2999 2999
     // By default, use a meetingid without groups.
3000 3000
     if (empty($mid)) {
3001
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
3001
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
3002 3002
     }
3003 3003
 
3004 3004
     // When meeting is running, all authorized users can join right in.
@@ -3059,7 +3059,7 @@  discard block
 block discarded – undo
3059 3059
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3060 3060
     global $DB;
3061 3061
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3062
-    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3062
+    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3063 3063
     return $ownerid;
3064 3064
 }
3065 3065
 
@@ -3069,7 +3069,7 @@  discard block
 block discarded – undo
3069 3069
  * @return boolean
3070 3070
  */
3071 3071
 function bigbluebuttonbn_has_html5_client() {
3072
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3072
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3073 3073
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3074 3074
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3075 3075
 }
@@ -3102,8 +3102,8 @@  discard block
 block discarded – undo
3102 3102
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3103 3103
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3104 3104
     // Extra data for setting up the Meeting.
3105
-    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3106
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3105
+    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3106
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3107 3107
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3108 3108
     }
3109 3109
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3209,7 +3209,7 @@  discard block
 block discarded – undo
3209 3209
     );
3210 3210
 
3211 3211
     // Check status and set extra values.
3212
-    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession);  // In locallib.
3212
+    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib.
3213 3213
     if ($activitystatus == 'ended') {
3214 3214
         $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array(
3215 3215
             $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation);
Please login to merge, or discard this patch.
classes/privacy/provider.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -54,6 +54,7 @@  discard block
 block discarded – undo
54 54
          * Get the list of users who have data within a context.
55 55
          *
56 56
          * @param   userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
57
+         * @return void
57 58
          */
58 59
         public static function get_users_in_context(userlist $userlist);
59 60
 
@@ -61,6 +62,7 @@  discard block
 block discarded – undo
61 62
          * Delete multiple users within a single context.
62 63
          *
63 64
          * @param   approved_userlist       $userlist The approved context and user information to delete information for.
65
+         * @return void
64 66
          */
65 67
         public static function delete_data_for_users(approved_userlist $userlist);
66 68
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 defined('MOODLE_INTERNAL') || die();
38 38
 
39 39
 global $CFG;
40
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
40
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
41 41
 
42 42
 /*
43 43
  * This part is to be eliminated as soon as possible but allows the phpunit test to pass Ok on MOODLE_33 and below WHILST allowing
Please login to merge, or discard this patch.
lib.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
268 268
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
269 269
     $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,
270
-                                              BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
270
+                                                BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
271 271
     return $result;
272 272
 }
273 273
 
@@ -496,12 +496,12 @@  discard block
 block discarded – undo
496 496
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
497 497
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
498 498
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
499
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
499
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
500 500
     $str .= '  </div>'."\n";
501 501
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
502 502
         '</div>'."\n";
503 503
     $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
504
-      .'</div>'."\n";
504
+        .'</div>'."\n";
505 505
     $str .= '</div>'."\n";
506 506
     return $str;
507 507
 }
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
             $bigbluebuttonbn->coursemodule,
707 707
             'bigbluebuttonbn',
708 708
             $bigbluebuttonbn->id, $bigbluebuttonbn->completionexpected
709
-          );
709
+            );
710 710
     }
711 711
 }
712 712
 
Please login to merge, or discard this patch.