Completed
Branch scrutinizer (9d9d33)
by Jesus
02:12 queued 30s
created
classes/settings/renderer.php 1 patch
Spacing   +24 added lines, -24 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
 /**
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function render_group_header($name, $itemname = null, $itemdescription = null) {
65 65
         if ($itemname === null) {
66
-            $itemname = get_string('config_' . $name, 'bigbluebuttonbn');
66
+            $itemname = get_string('config_'.$name, 'bigbluebuttonbn');
67 67
         }
68 68
         if ($itemdescription === null) {
69
-            $itemdescription = get_string('config_' .$name . '_description', 'bigbluebuttonbn');
69
+            $itemdescription = get_string('config_'.$name.'_description', 'bigbluebuttonbn');
70 70
         }
71
-        $item = new \admin_setting_heading('bigbluebuttonbn_config_' . $name, $itemname, $itemdescription);
71
+        $item = new \admin_setting_heading('bigbluebuttonbn_config_'.$name, $itemname, $itemdescription);
72 72
         $this->settings->add($item);
73 73
     }
74 74
 
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
      * @return Object
98 98
      */
99 99
     public function render_group_element_text($name, $default = null, $type = PARAM_RAW) {
100
-        $item = new \admin_setting_configtext('bigbluebuttonbn_' . $name,
101
-                get_string('config_' . $name, 'bigbluebuttonbn'),
102
-                get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
100
+        $item = new \admin_setting_configtext('bigbluebuttonbn_'.$name,
101
+                get_string('config_'.$name, 'bigbluebuttonbn'),
102
+                get_string('config_'.$name.'_description', 'bigbluebuttonbn'),
103 103
                 $default, $type);
104 104
         return $item;
105 105
     }
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
      * @return Object
114 114
      */
115 115
     public function render_group_element_checkbox($name, $default = null) {
116
-        $item = new \admin_setting_configcheckbox('bigbluebuttonbn_' . $name,
117
-                get_string('config_' . $name, 'bigbluebuttonbn'),
118
-                get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
116
+        $item = new \admin_setting_configcheckbox('bigbluebuttonbn_'.$name,
117
+                get_string('config_'.$name, 'bigbluebuttonbn'),
118
+                get_string('config_'.$name.'_description', 'bigbluebuttonbn'),
119 119
                 $default);
120 120
         return $item;
121 121
     }
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
      * @return Object
131 131
      */
132 132
     public function render_group_element_configmultiselect($name, $defaultsetting, $choices) {
133
-        $item = new \admin_setting_configmultiselect('bigbluebuttonbn_' . $name,
134
-                get_string('config_' . $name, 'bigbluebuttonbn'),
135
-                get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
133
+        $item = new \admin_setting_configmultiselect('bigbluebuttonbn_'.$name,
134
+                get_string('config_'.$name, 'bigbluebuttonbn'),
135
+                get_string('config_'.$name.'_description', 'bigbluebuttonbn'),
136 136
                 $defaultsetting, $choices);
137 137
         return $item;
138 138
     }
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
      * @return Object
148 148
      */
149 149
     public function render_group_element_configselect($name, $defaultsetting, $choices) {
150
-        $item = new \admin_setting_configselect('bigbluebuttonbn_' . $name,
151
-                get_string('config_' . $name, 'bigbluebuttonbn'),
152
-                get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
150
+        $item = new \admin_setting_configselect('bigbluebuttonbn_'.$name,
151
+                get_string('config_'.$name, 'bigbluebuttonbn'),
152
+                get_string('config_'.$name.'_description', 'bigbluebuttonbn'),
153 153
                 $defaultsetting, $choices);
154 154
         return $item;
155 155
     }
@@ -166,14 +166,14 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public function render_warning_message($name, $message, $type = 'warning', $closable = true) {
168 168
         global $OUTPUT;
169
-        $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
170
-            'bigbluebuttonbn_' . $name)."\n";
169
+        $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
170
+            'bigbluebuttonbn_'.$name)."\n";
171 171
         if ($closable) {
172
-            $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>' . "\n";
172
+            $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>'."\n";
173 173
         }
174
-        $output .= '  ' . $message . "\n";
175
-        $output .= $OUTPUT->box_end() . "\n";
176
-        $item = new \admin_setting_heading('bigbluebuttonbn_' . $name, '', $output);
174
+        $output .= '  '.$message."\n";
175
+        $output .= $OUTPUT->box_end()."\n";
176
+        $item = new \admin_setting_heading('bigbluebuttonbn_'.$name, '', $output);
177 177
         $this->settings->add($item);
178 178
         return $item;
179 179
     }
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
         $filemanageroptions['mainfile'] = true;
196 196
 
197 197
         $filemanager = new \admin_setting_configstoredfile('mod_bigbluebuttonbn/presentationdefault',
198
-            get_string('config_' . $name, 'bigbluebuttonbn'),
199
-            get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
198
+            get_string('config_'.$name, 'bigbluebuttonbn'),
199
+            get_string('config_'.$name.'_description', 'bigbluebuttonbn'),
200 200
             'presentationdefault',
201 201
             0,
202 202
             $filemanageroptions);
Please login to merge, or discard this patch.
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.
lib.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
  * Remove this block when restored
65 65
  */
66 66
 
67
- /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
67
+    /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
68 68
 const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/';
69 69
 /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */
70 70
 const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6';
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
368 368
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
369 369
     $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,
370
-                                              BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
370
+                                                BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
371 371
     return $result;
372 372
 }
373 373
 
@@ -598,12 +598,12 @@  discard block
 block discarded – undo
598 598
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
599 599
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
600 600
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
601
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
601
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
602 602
     $str .= '  </div>'."\n";
603 603
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
604 604
         '</div>'."\n";
605 605
     $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
606
-      .'</div>'."\n";
606
+        .'</div>'."\n";
607 607
     $str .= '</div>'."\n";
608 608
     return $str;
609 609
 }
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
             'bigbluebuttonbn',
846 846
             $bigbluebuttonbn->id,
847 847
             $bigbluebuttonbn->completionexpected
848
-          );
848
+            );
849 849
     }
850 850
 }
851 851
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     // Update a record.
262 262
     $DB->update_record('bigbluebuttonbn', $bigbluebuttonbn);
263 263
     // Get the meetingid column in the bigbluebuttonbn table.
264
-    $bigbluebuttonbn->meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id));
264
+    $bigbluebuttonbn->meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id));
265 265
     // Log update action.
266 266
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_EDIT);
267 267
     // Complete the process.
@@ -315,9 +315,9 @@  discard block
 block discarded – undo
315 315
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
316 316
     global $DB;
317 317
     $sql  = "SELECT * FROM {bigbluebuttonbn_logs} ";
318
-    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
318
+    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ".$DB->sql_compare_text('meta')." = ?";
319 319
     $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
320
-    $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}";
320
+    $meta = "{\"has_recordings\":".empty($logs) ? "true" : "false"."}";
321 321
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);
322 322
 }
323 323
 
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
  */
336 336
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
337 337
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
338
-        return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' .
339
-            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' .
338
+        return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '.
339
+            get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '.
340 340
             get_string('view_message_times', 'bigbluebuttonbn');
341 341
     }
342 342
     return '';
@@ -357,12 +357,12 @@  discard block
 block discarded – undo
357 357
     if (is_object($courseorid)) {
358 358
         $course = $courseorid;
359 359
     } else {
360
-        $course = (object)array('id' => $courseorid);
360
+        $course = (object) array('id' => $courseorid);
361 361
     }
362 362
     if (is_object($userorid)) {
363 363
         $user = $userorid;
364 364
     } else {
365
-        $user = (object)array('id' => $userorid);
365
+        $user = (object) array('id' => $userorid);
366 366
     }
367 367
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
368 368
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 function bigbluebuttonbn_reset_course_items() {
389 389
     $items = array("events" => 0, "tags" => 0, "logs" => 0);
390 390
     // Include recordings only if enabled.
391
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
391
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
392 392
         $items["recordings"] = 0;
393 393
     }
394 394
     return $items;
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
 function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) {
695 695
     require_once(__DIR__.'/locallib.php');
696 696
     $bigbluebuttonbn->timemodified = time();
697
-    if ((integer)$bigbluebuttonbn->instance == 0) {
697
+    if ((integer) $bigbluebuttonbn->instance == 0) {
698 698
         $bigbluebuttonbn->meetingid = 0;
699 699
         $bigbluebuttonbn->timecreated = time();
700 700
         $bigbluebuttonbn->timemodified = 0;
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
 ) {
1131 1131
     global $CFG, $DB;
1132 1132
 
1133
-    require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
1133
+    require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
1134 1134
 
1135 1135
     // Get mod info.
1136 1136
     $cm = get_fast_modinfo($event->courseid)->instances['bigbluebuttonbn'][$event->instance];
@@ -1208,7 +1208,7 @@  discard block
 block discarded – undo
1208 1208
 function bigbluebuttonbn_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $nodenav) {
1209 1209
     global $PAGE, $USER;
1210 1210
     // Don't add validate completion if the callback for meetingevents is NOT enabled.
1211
-    if (!(boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
1211
+    if (!(boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
1212 1212
         return;
1213 1213
     }
1214 1214
     // Don't add validate completion if user is not allowed to edit the activity.
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
     if (!has_capability('moodle/course:manageactivities', $context, $USER->id)) {
1217 1217
         return;
1218 1218
     }
1219
-    $completionvalidate = '#action=completion_validate&bigbluebuttonbn=' . $PAGE->cm->instance;
1219
+    $completionvalidate = '#action=completion_validate&bigbluebuttonbn='.$PAGE->cm->instance;
1220 1220
     $nodenav->add(get_string('completionvalidatestate', 'bigbluebuttonbn'),
1221 1221
         $completionvalidate, navigation_node::TYPE_CONTAINER);
1222 1222
 }
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
  * @uses FEATURE_GRADE_OUTCOMES
104 104
  * @uses FEATURE_SHOW_DESCRIPTION
105 105
  * @param string $feature
106
- * @return mixed True if yes (some features may use other values)
106
+ * @return null|boolean True if yes (some features may use other values)
107 107
  */
108 108
 function bigbluebuttonbn_supports($feature) {
109 109
     if (!$feature) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
  *
311 311
  * @param object $bigbluebuttonbn Id of the module instance
312 312
  *
313
- * @return bool Success/Failure
313
+ * @return boolean|null Success/Failure
314 314
  */
315 315
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
316 316
     global $DB;
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
  * @param object $mod
332 332
  * @param object $bigbluebuttonbn
333 333
  *
334
- * @return bool
334
+ * @return string
335 335
  */
336 336
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
337 337
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
  * @param stdClass $context       context object
918 918
  * @param string   $filearea      file area
919 919
  *
920
- * @return false|null false if file not valid
920
+ * @return boolean false if file not valid
921 921
  */
922 922
 function bigbluebuttonbn_pluginfile_valid($context, $filearea) {
923 923
 
Please login to merge, or discard this patch.
classes/task/send_notification.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
 defined('MOODLE_INTERNAL') || die();
30 30
 
31
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
31
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
32 32
 
33 33
 /**
34 34
  * Class containing the scheduled task for lti module.
Please login to merge, or discard this patch.
locallib.php 2 patches
Doc Comments   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
  * Helper function to retrieve imported recordings from the Moodle database.
308 308
  * The references are stored as events in bigbluebuttonbn_logs.
309 309
  *
310
- * @param string $courseid
310
+ * @param integer $courseid
311 311
  * @param string $bigbluebuttonbnid
312 312
  * @param bool   $subset
313 313
  *
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 /**
336 336
  * Helper function to retrive the default config.xml file.
337 337
  *
338
- * @return string
338
+ * @return null|SimpleXMLElement
339 339
  */
340 340
 function bigbluebuttonbn_get_default_config_xml() {
341 341
     $xml = bigbluebuttonbn_wrap_xml_load_file(
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
  * @param object $a
418 418
  * @param object $b
419 419
  *
420
- * @return array
420
+ * @return integer
421 421
  */
422 422
 function bigbluebuttonbn_recording_build_sorter($a, $b) {
423 423
     global $CFG;
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
  * @param string $data
532 532
  * @param string $contenttype
533 533
  *
534
- * @return object
534
+ * @return null|SimpleXMLElement
535 535
  */
536 536
 function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
537 537
     if (extension_loaded('curl')) {
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
  * @param string $data
573 573
  * @param string $contenttype
574 574
  *
575
- * @return object
575
+ * @return string
576 576
  */
577 577
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
578 578
     $c = new curl();
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
  * @param integer $instance
946 946
  * @param integer $voicebridge
947 947
  *
948
- * @return string
948
+ * @return boolean
949 949
  */
950 950
 function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) {
951 951
     global $DB;
@@ -1293,7 +1293,7 @@  discard block
 block discarded – undo
1293 1293
  * @param string $meetingid
1294 1294
  * @param string $configxml
1295 1295
  *
1296
- * @return object
1296
+ * @return null|SimpleXMLElement
1297 1297
  */
1298 1298
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1299 1299
     $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
@@ -1347,7 +1347,7 @@  discard block
 block discarded – undo
1347 1347
  * @param array $recording
1348 1348
  * @param array $tools
1349 1349
  *
1350
- * @return array
1350
+ * @return null|stdClass
1351 1351
  */
1352 1352
 function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) {
1353 1353
     if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
@@ -1982,7 +1982,7 @@  discard block
 block discarded – undo
1982 1982
  *
1983 1983
  * @param array $bbbsession
1984 1984
  * @param array $recording
1985
- * @param object $rowdata
1985
+ * @param stdClass $rowdata
1986 1986
  *
1987 1987
  * @return object
1988 1988
  */
@@ -2177,7 +2177,7 @@  discard block
 block discarded – undo
2177 2177
  *
2178 2178
  * @param array $bbbsession
2179 2179
  * @param array $recordings
2180
- * @param array $tools
2180
+ * @param string[] $tools
2181 2181
  *
2182 2182
  * @return array
2183 2183
  */
@@ -2258,7 +2258,7 @@  discard block
 block discarded – undo
2258 2258
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2259 2259
  * in the getRecordings request considering only those that belong to deleted activities.
2260 2260
  *
2261
- * @param string $courseid
2261
+ * @param integer $courseid
2262 2262
  * @param string $bigbluebuttonbnid
2263 2263
  * @param bool   $subset
2264 2264
  *
@@ -2282,7 +2282,7 @@  discard block
 block discarded – undo
2282 2282
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2283 2283
  * in the getRecordings request considering only those that belong to imported recordings.
2284 2284
  *
2285
- * @param string $courseid
2285
+ * @param integer $courseid
2286 2286
  * @param string $bigbluebuttonbnid
2287 2287
  * @param bool   $subset
2288 2288
  *
@@ -2305,7 +2305,7 @@  discard block
 block discarded – undo
2305 2305
 /**
2306 2306
  * Helper function to get recordings and imported recordings together.
2307 2307
  *
2308
- * @param string $courseid
2308
+ * @param integer $courseid
2309 2309
  * @param string $bigbluebuttonbnid
2310 2310
  * @param bool   $subset
2311 2311
  * @param bool   $includedeleted
@@ -2323,7 +2323,7 @@  discard block
 block discarded – undo
2323 2323
  * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events
2324 2324
  * in bigbluebuttonbn_logs.
2325 2325
  *
2326
- * @param string $courseid
2326
+ * @param integer $courseid
2327 2327
  * @param string $bigbluebuttonbnid
2328 2328
  * @param bool   $subset
2329 2329
  * @param bool   $includedeleted
Please login to merge, or discard this patch.
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 global $CFG;
34 34
 
35
-require_once(__DIR__ . '/lib.php');
35
+require_once(__DIR__.'/lib.php');
36 36
 
37 37
 /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */
38 38
 const BIGBLUEBUTTONBN_UPDATE_CACHE = true;
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     $data = null;
146 146
     if (!is_null($pname) && !is_null($purl)) {
147 147
         $method = 'POST';
148
-        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
149
-            $purl . "' /></module></modules>";
148
+        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
149
+            $purl."' /></module></modules>";
150 150
     }
151 151
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data);
152 152
     if ($xml) {
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         if (is_object($value)) {
407 407
             $value = '';
408 408
         }
409
-        $metadataarray['meta_' . $key] = $value;
409
+        $metadataarray['meta_'.$key] = $value;
410 410
     }
411 411
     return $metadataarray;
412 412
 }
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
             return $xml;
547 547
         } catch (\Exception $e) {
548 548
             libxml_use_internal_errors($previous);
549
-            $error = 'Caught exception: ' . $e->getMessage();
549
+            $error = 'Caught exception: '.$e->getMessage();
550 550
             debugging($error, DEBUG_DEVELOPER);
551 551
             return null;
552 552
         }
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
558 558
         return $response;
559 559
     } catch (\Exception $e) {
560
-        $error = 'Caught exception: ' . $e->getMessage();
560
+        $error = 'Caught exception: '.$e->getMessage();
561 561
         debugging($error, DEBUG_DEVELOPER);
562 562
         libxml_use_internal_errors($previous);
563 563
         return null;
@@ -583,8 +583,8 @@  discard block
 block discarded – undo
583 583
         }
584 584
         $options = array();
585 585
         $options['CURLOPT_HTTPHEADER'] = array(
586
-            'Content-Type: ' . $contenttype,
587
-            'Content-Length: ' . strlen($data),
586
+            'Content-Type: '.$contenttype,
587
+            'Content-Length: '.strlen($data),
588 588
             'Content-Language: en-US',
589 589
         );
590 590
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
  * @return void
606 606
  */
607 607
 function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) {
608
-    $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
608
+    $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
609 609
     if (bigbluebuttonbn_is_meeting_running($meetingid)) {
610 610
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
611 611
     }
@@ -625,9 +625,9 @@  discard block
 block discarded – undo
625 625
     if ($userroles) {
626 626
         $where = '';
627 627
         foreach ($userroles as $userrole) {
628
-            $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid;
628
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
629 629
         }
630
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
630
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
631 631
     }
632 632
     return $userroles;
633 633
 }
@@ -952,9 +952,9 @@  discard block
 block discarded – undo
952 952
     if ($voicebridge == 0) {
953 953
         return true;
954 954
     }
955
-    $select = 'voicebridge = ' . $voicebridge;
955
+    $select = 'voicebridge = '.$voicebridge;
956 956
     if ($instance != 0) {
957
-        $select .= ' AND id <>' . $instance;
957
+        $select .= ' AND id <>'.$instance;
958 958
     }
959 959
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
960 960
         return true;
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
 function bigbluebuttonbn_generate_nonce() {
1091 1091
     $mt = microtime();
1092 1092
     $rand = mt_rand();
1093
-    return md5($mt . $rand);
1093
+    return md5($mt.$rand);
1094 1094
 }
1095 1095
 
1096 1096
 /**
@@ -1138,7 +1138,7 @@  discard block
 block discarded – undo
1138 1138
         $params['other'] = $options['other'];
1139 1139
     }
1140 1140
     $event = call_user_func_array(
1141
-        '\mod_bigbluebuttonbn\event\\' . $type . '::create',
1141
+        '\mod_bigbluebuttonbn\event\\'.$type.'::create',
1142 1142
         array($params)
1143 1143
     );
1144 1144
     $event->add_record_snapshot('course_modules', $cm);
@@ -1296,7 +1296,7 @@  discard block
 block discarded – undo
1296 1296
  * @return object
1297 1297
  */
1298 1298
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1299
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1299
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1300 1300
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1301 1301
     $xml = bigbluebuttonbn_wrap_xml_load_file(
1302 1302
         $urldefaultconfig,
@@ -1316,9 +1316,9 @@  discard block
 block discarded – undo
1316 1316
  * @return string
1317 1317
  */
1318 1318
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1319
-    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1319
+    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1320 1320
     $sharedsecret = \mod_bigbluebuttonbn\locallib\config::get('shared_secret');
1321
-    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . $sharedsecret);
1321
+    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.$sharedsecret);
1322 1322
     return $configxmlparams;
1323 1323
 }
1324 1324
 
@@ -1426,7 +1426,7 @@  discard block
 block discarded – undo
1426 1426
     global $USER;
1427 1427
     $starttime = $starttime - ($starttime % 1000);
1428 1428
     // Set formatted date.
1429
-    $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1429
+    $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1430 1430
     return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1431 1431
 }
1432 1432
 
@@ -1474,11 +1474,11 @@  discard block
 block discarded – undo
1474 1474
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1475 1475
     }
1476 1476
     $head = html_writer::start_tag('div', array(
1477
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1477
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1478 1478
         'data-recordingid' => $recording['recordID'],
1479 1479
         'data-meetingid' => $recording['meetingID']));
1480 1480
     $tail = html_writer::end_tag('div');
1481
-    return $head . $actionbar . $tail;
1481
+    return $head.$actionbar.$tail;
1482 1482
 }
1483 1483
 
1484 1484
 /**
@@ -1542,7 +1542,7 @@  discard block
 block discarded – undo
1542 1542
  * @return string
1543 1543
  */
1544 1544
 function bigbluebuttonbn_get_recording_data_row_preview($recording) {
1545
-    $options = array('id' => 'preview-' . $recording['recordID']);
1545
+    $options = array('id' => 'preview-'.$recording['recordID']);
1546 1546
     if ($recording['published'] === 'false') {
1547 1547
         $options['hidden'] = 'hidden';
1548 1548
     }
@@ -1574,7 +1574,7 @@  discard block
 block discarded – undo
1574 1574
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1575 1575
         $recordingpreview .= html_writer::empty_tag(
1576 1576
             'img',
1577
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')
1577
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')
1578 1578
         );
1579 1579
         $recordingpreview .= html_writer::end_tag('div');
1580 1580
     }
@@ -1609,7 +1609,7 @@  discard block
 block discarded – undo
1609 1609
     if ($recording['published'] === 'false') {
1610 1610
         $visibility = 'hidden ';
1611 1611
     }
1612
-    $id = 'playbacks-' . $recording['recordID'];
1612
+    $id = 'playbacks-'.$recording['recordID'];
1613 1613
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1614 1614
         'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1615 1615
         'title' => $title, $visibility => $visibility));
@@ -1634,14 +1634,14 @@  discard block
 block discarded – undo
1634 1634
     if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) {
1635 1635
         return '';
1636 1636
     }
1637
-    $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn');
1638
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1639
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1637
+    $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
1638
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1639
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1640 1640
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1641
-        $href .= '&href=' . urlencode(trim($playback['url']));
1641
+        $href .= '&href='.urlencode(trim($playback['url']));
1642 1642
     }
1643 1643
     $linkattributes = array(
1644
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1644
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1645 1645
         'class' => 'btn btn-sm btn-default',
1646 1646
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1647 1647
         'data-action' => 'play',
@@ -1653,7 +1653,7 @@  discard block
 block discarded – undo
1653 1653
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1654 1654
         unset($linkattributes['data-href']);
1655 1655
     }
1656
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1656
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1657 1657
 }
1658 1658
 
1659 1659
 /**
@@ -1679,7 +1679,7 @@  discard block
 block discarded – undo
1679 1679
     $validatedurls[$urlhost] = true;
1680 1680
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1681 1681
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1682
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1682
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1683 1683
         debugging($error, DEBUG_DEVELOPER);
1684 1684
         $validatedurls[$urlhost] = false;
1685 1685
     }
@@ -1770,12 +1770,12 @@  discard block
 block discarded – undo
1770 1770
  * @return string
1771 1771
  */
1772 1772
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1773
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1773
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1774 1774
     if (empty($data)) {
1775 1775
         return $htmltext;
1776 1776
     }
1777
-    $target = $data['action'] . '-' . $data['target'];
1778
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1777
+    $target = $data['action'].'-'.$data['target'];
1778
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1779 1779
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1780 1780
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1781 1781
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1783,7 +1783,7 @@  discard block
 block discarded – undo
1783 1783
     $tail = html_writer::end_tag('div');
1784 1784
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1785 1785
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1786
-    return $head . $htmltext . $htmllink . $tail;
1786
+    return $head.$htmltext.$htmllink.$tail;
1787 1787
 }
1788 1788
 
1789 1789
 /**
@@ -1801,10 +1801,10 @@  discard block
 block discarded – undo
1801 1801
     }
1802 1802
     $target = $data['action'];
1803 1803
     if (isset($data['target'])) {
1804
-        $target .= '-' . $data['target'];
1804
+        $target .= '-'.$data['target'];
1805 1805
     }
1806
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1807
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1806
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1807
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);';
1808 1808
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1809 1809
         // With icon for $manageaction.
1810 1810
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
@@ -1819,13 +1819,13 @@  discard block
 block discarded – undo
1819 1819
             );
1820 1820
         }
1821 1821
         if (isset($data['disabled'])) {
1822
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1822
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1823 1823
             $linkattributes['class'] = 'disabled';
1824 1824
             unset($linkattributes['onclick']);
1825 1825
         }
1826 1826
         $icon = new pix_icon(
1827
-            'i/' . $data['tag'],
1828
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1827
+            'i/'.$data['tag'],
1828
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1829 1829
             'moodle',
1830 1830
             $iconattributes
1831 1831
         );
@@ -1923,7 +1923,7 @@  discard block
 block discarded – undo
1923 1923
     if ($bbbsession['managerecordings']) {
1924 1924
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1925 1925
         $table->align[] = 'left';
1926
-        $table->size[] = (count($tools) * 40) . 'px';
1926
+        $table->size[] = (count($tools) * 40).'px';
1927 1927
     }
1928 1928
     // Get the groups of the user.
1929 1929
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -1988,7 +1988,7 @@  discard block
 block discarded – undo
1988 1988
  */
1989 1989
 function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) {
1990 1990
     $row = new html_table_row();
1991
-    $row->id = 'recording-tr-' . $recording['recordID'];
1991
+    $row->id = 'recording-tr-'.$recording['recordID'];
1992 1992
     $row->attributes['data-imported'] = 'false';
1993 1993
     $texthead = '';
1994 1994
     $texttail = '';
@@ -2000,15 +2000,15 @@  discard block
 block discarded – undo
2000 2000
     }
2001 2001
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
2002 2002
     $row->cells = array();
2003
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
2004
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;
2003
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
2004
+    $row->cells[] = $texthead.$rowdata->meeting.$texttail;
2005 2005
 
2006
-    $row->cells[] = $texthead . $rowdata->activity . $texttail;
2007
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
2006
+    $row->cells[] = $texthead.$rowdata->activity.$texttail;
2007
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
2008 2008
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
2009 2009
         $row->cells[] = $rowdata->preview;
2010 2010
     }
2011
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
2011
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
2012 2012
     $row->cells[] = $rowdata->duration_formatted;
2013 2013
     if ($bbbsession['managerecordings']) {
2014 2014
         $row->cells[] = $rowdata->actionbar;
@@ -2099,7 +2099,7 @@  discard block
 block discarded – undo
2099 2099
         // Enqueue it.
2100 2100
         \core\task\manager::queue_adhoc_task($task);
2101 2101
     } catch (\Exception $e) {
2102
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2102
+        mtrace("Error while enqueuing completion_update_state task. ".(string) $e);
2103 2103
     }
2104 2104
 }
2105 2105
 
@@ -2265,17 +2265,17 @@  discard block
 block discarded – undo
2265 2265
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2266 2266
  */
2267 2267
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2268
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2268
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2269 2269
     if (empty($courseid)) {
2270 2270
         $courseid = 0;
2271 2271
     }
2272 2272
     if (empty($bigbluebuttonbnid)) {
2273
-        return $sql . " AND courseid = {$courseid}";
2273
+        return $sql." AND courseid = {$courseid}";
2274 2274
     }
2275 2275
     if ($subset) {
2276
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2276
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2277 2277
     }
2278
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2278
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2279 2279
 }
2280 2280
 
2281 2281
 /**
@@ -2289,17 +2289,17 @@  discard block
 block discarded – undo
2289 2289
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2290 2290
  */
2291 2291
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2292
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2292
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2293 2293
     if (empty($courseid)) {
2294 2294
         $courseid = 0;
2295 2295
     }
2296 2296
     if (empty($bigbluebuttonbnid)) {
2297
-        return $sql . " AND courseid = '{$courseid}'";
2297
+        return $sql." AND courseid = '{$courseid}'";
2298 2298
     }
2299 2299
     if ($subset) {
2300
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2300
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2301 2301
     }
2302
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2302
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2303 2303
 }
2304 2304
 
2305 2305
 /**
@@ -2358,7 +2358,7 @@  discard block
 block discarded – undo
2358 2358
     }
2359 2359
     // Prepare select for loading records based on existent bigbluebuttonbns.
2360 2360
     $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
2361
-    $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
2361
+    $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
2362 2362
     // Include only Create events and exclude those with record not true.
2363 2363
     $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
2364 2364
     // Execute select for loading records based on existent bigbluebuttonbns.
@@ -2541,8 +2541,8 @@  discard block
 block discarded – undo
2541 2541
 function bigbluebuttonbn_format_activity_time($time) {
2542 2542
     $activitytime = '';
2543 2543
     if ($time) {
2544
-        $activitytime = calendar_day_representation($time) . ' ' .
2545
-        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
2544
+        $activitytime = calendar_day_representation($time).' '.
2545
+        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2546 2546
         calendar_time_representation($time);
2547 2547
     }
2548 2548
     return $activitytime;
@@ -3091,16 +3091,16 @@  discard block
 block discarded – undo
3091 3091
         return $output;
3092 3092
     }
3093 3093
     $output .= $OUTPUT->box_start(
3094
-        'box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
3094
+        'box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
3095 3095
         'bigbluebuttonbn_view_general_warning'
3096
-    ) . "\n";
3097
-    $output .= '    ' . $message . "\n";
3098
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
3096
+    )."\n";
3097
+    $output .= '    '.$message."\n";
3098
+    $output .= '  <div class="singlebutton pull-right">'."\n";
3099 3099
     if (!empty($href)) {
3100 3100
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
3101 3101
     }
3102
-    $output .= '  </div>' . "\n";
3103
-    $output .= $OUTPUT->box_end() . "\n";
3102
+    $output .= '  </div>'."\n";
3103
+    $output .= $OUTPUT->box_end()."\n";
3104 3104
     return $output;
3105 3105
 }
3106 3106
 
@@ -3124,11 +3124,11 @@  discard block
 block discarded – undo
3124 3124
     if ($class == '') {
3125 3125
         $class = 'btn btn-secondary';
3126 3126
     }
3127
-    $output = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
3128
-    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
3129
-    $output .= '          title="' . $title . '"' . "\n";
3130
-    $output .= '          >' . $text . '</button>' . "\n";
3131
-    $output .= '  </form>' . "\n";
3127
+    $output = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
3128
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
3129
+    $output .= '          title="'.$title.'"'."\n";
3130
+    $output .= '          >'.$text.'</button>'."\n";
3131
+    $output .= '  </form>'."\n";
3132 3132
     return $output;
3133 3133
 }
3134 3134
 
@@ -3192,7 +3192,7 @@  discard block
 block discarded – undo
3192 3192
 function bigbluebuttonbn_user_can_join_meeting($bigbluebuttonbn, $mid = null, $userid = null) {
3193 3193
     // By default, use a meetingid without groups.
3194 3194
     if (empty($mid)) {
3195
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
3195
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
3196 3196
     }
3197 3197
     // When meeting is running, all authorized users can join right in.
3198 3198
     if (bigbluebuttonbn_is_meeting_running($mid)) {
@@ -3261,7 +3261,7 @@  discard block
 block discarded – undo
3261 3261
  * @return boolean
3262 3262
  */
3263 3263
 function bigbluebuttonbn_has_html5_client() {
3264
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3264
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3265 3265
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3266 3266
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3267 3267
 }
@@ -3289,7 +3289,7 @@  discard block
 block discarded – undo
3289 3289
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
3290 3290
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
3291 3291
     // Database info related to the activity.
3292
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
3292
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
3293 3293
     $bbbsession['bigbluebuttonbn']->id;
3294 3294
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3295 3295
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -3321,12 +3321,12 @@  discard block
 block discarded – undo
3321 3321
     if ($bbbsession['bigbluebuttonbn']->record) {
3322 3322
         // Check if is enable record all from start.
3323 3323
         if ($bbbsession['recordallfromstart']) {
3324
-            $bbbsession['welcome'] .= '<br><br>' . get_string(
3324
+            $bbbsession['welcome'] .= '<br><br>'.get_string(
3325 3325
                 'bbbrecordallfromstartwarning',
3326 3326
                 'bigbluebuttonbn'
3327 3327
             );
3328 3328
         } else {
3329
-            $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
3329
+            $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
3330 3330
         }
3331 3331
     }
3332 3332
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
@@ -3341,7 +3341,7 @@  discard block
 block discarded – undo
3341 3341
     $bbbsession['originServerName'] = $parsedurl['host'];
3342 3342
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
3343 3343
     $bbbsession['originServerCommonName'] = '';
3344
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
3344
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
3345 3345
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
3346 3346
     // Setting for clienttype, assign flash if not enabled, or default if not editable.
3347 3347
     $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH;
@@ -3448,7 +3448,7 @@  discard block
 block discarded – undo
3448 3448
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3449 3449
         $metadata["bn-recording-status"] = json_encode(
3450 3450
             array(
3451
-                'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
3451
+                'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
3452 3452
                 'context' => $bbbsession['bigbluebuttonbnURL'],
3453 3453
             )
3454 3454
         );
Please login to merge, or discard this patch.
classes/locallib/notifier.php 1 patch
Spacing   +3 added lines, -3 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
 
32 32
 /**
33 33
  * Helper class for sending notifications.
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
117 117
         return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
118
-            ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
118
+            ' &quot;'.$bigbluebuttonbn->name.'&quot; '.
119 119
             get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
120 120
     }
121 121
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                     // Enqueue it.
159 159
                     \core\task\manager::queue_adhoc_task($task);
160 160
                 } catch (\Exception $e) {
161
-                    mtrace("Error while enqueuing completion_uopdate_state task. " . (string) $e);
161
+                    mtrace("Error while enqueuing completion_uopdate_state task. ".(string) $e);
162 162
                 }
163 163
             }
164 164
         }
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
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 // The endpoints for recording_ready and meeting_events callbacks must be moved to services (CONTRIB-7440).
44 44
 // But in order to support the transition, requests other than the callbacks are redirected to bbb_ajax.php.
45 45
 if ($params['action'] != 'recording_ready' && $params['action'] != 'meeting_events') {
46
-    $url = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_ajax.php?' . http_build_query($params, '', '&');
47
-    header("Location: " . $url);
46
+    $url = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_ajax.php?'.http_build_query($params, '', '&');
47
+    header("Location: ".$url);
48 48
     exit;
49 49
 }
50 50
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         bigbluebuttonbn_broker_meeting_events($bigbluebuttonbn);
72 72
         return;
73 73
     }
74
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
74
+    header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist');
75 75
 } catch (\Exception $e) {
76 76
     header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
77 77
 }
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
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
         echo $completionvalidate;
127 127
         return;
128 128
     }
129
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
129
+    header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist');
130 130
 } catch (\Exception $e) {
131 131
     header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
132 132
 }
Please login to merge, or discard this patch.