Completed
Push — master ( 81f985...bcb26e )
by Jesus
17s queued 11s
created
classes/event/events.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 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
  * The mod_bigbluebuttonbn class for event name definition.
Please login to merge, or discard this patch.
classes/event/activity_viewed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      */
44 44
     protected function init($crud = 'r', $edulevel = self::LEVEL_PARTICIPATING) {
45 45
         parent::init($crud, $edulevel);
46
-        $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity " .
46
+        $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity ".
47 47
             "with id '##objectid' for the course id '##courseid'.";
48 48
     }
49 49
 
Please login to merge, or discard this patch.
classes/external.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public static function view_bigbluebuttonbn($bigbluebuttonbnid) {
63 63
         global $DB, $CFG;
64
-        require_once($CFG->dirroot . "/mod/bigbluebuttonbn/lib.php");
64
+        require_once($CFG->dirroot."/mod/bigbluebuttonbn/lib.php");
65 65
 
66 66
         $params = self::validate_parameters(self::view_bigbluebuttonbn_parameters(),
67 67
                                             array(
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @since Moodle 3.3
110 110
      */
111 111
     public static function get_bigbluebuttonbns_by_courses_parameters() {
112
-        return new external_function_parameters (
112
+        return new external_function_parameters(
113 113
             array(
114 114
                 'courseids' => new external_multiple_structure(
115 115
                     new external_value(PARAM_INT, 'Course id'), 'Array of course ids', VALUE_DEFAULT, array()
Please login to merge, or discard this patch.
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.
lib.php 3 patches
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.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
357 357
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
358 358
     $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,
359
-                                              BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
359
+                                                BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
360 360
     return $result;
361 361
 }
362 362
 
@@ -589,12 +589,12 @@  discard block
 block discarded – undo
589 589
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
590 590
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
591 591
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
592
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
592
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
593 593
     $str .= '  </div>'."\n";
594 594
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
595 595
         '</div>'."\n";
596 596
     $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
597
-      .'</div>'."\n";
597
+        .'</div>'."\n";
598 598
     $str .= '</div>'."\n";
599 599
     return $str;
600 600
 }
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
             'bigbluebuttonbn',
837 837
             $bigbluebuttonbn->id,
838 838
             $bigbluebuttonbn->completionexpected
839
-          );
839
+            );
840 840
     }
841 841
 }
842 842
 
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.
classes/locallib/notifier.php 2 patches
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.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
      *
112 112
      * @param object $bigbluebuttonbn
113 113
      *
114
-     * @return void
114
+     * @return string
115 115
      */
116 116
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
117 117
         return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
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
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
  * Helper function to retrieve imported recordings from the Moodle database.
318 318
  * The references are stored as events in bigbluebuttonbn_logs.
319 319
  *
320
- * @param string $courseid
320
+ * @param integer $courseid
321 321
  * @param string $bigbluebuttonbnid
322 322
  * @param bool   $subset
323 323
  *
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 /**
346 346
  * Helper function to retrive the default config.xml file.
347 347
  *
348
- * @return string
348
+ * @return null|SimpleXMLElement
349 349
  */
350 350
 function bigbluebuttonbn_get_default_config_xml() {
351 351
     $xml = bigbluebuttonbn_wrap_xml_load_file(
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
  * @param object $a
428 428
  * @param object $b
429 429
  *
430
- * @return array
430
+ * @return integer
431 431
  */
432 432
 function bigbluebuttonbn_recording_build_sorter($a, $b) {
433 433
     global $CFG;
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
  * @param string $data
542 542
  * @param string $contenttype
543 543
  *
544
- * @return object
544
+ * @return null|SimpleXMLElement
545 545
  */
546 546
 function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
547 547
     if (extension_loaded('curl')) {
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
  * @param string $data
583 583
  * @param string $contenttype
584 584
  *
585
- * @return object
585
+ * @return string
586 586
  */
587 587
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
588 588
     global $CFG;
@@ -977,7 +977,7 @@  discard block
 block discarded – undo
977 977
  * @param integer $instance
978 978
  * @param integer $voicebridge
979 979
  *
980
- * @return string
980
+ * @return boolean
981 981
  */
982 982
 function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) {
983 983
     global $DB;
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
  * @param string $meetingid
1326 1326
  * @param string $configxml
1327 1327
  *
1328
- * @return object
1328
+ * @return null|SimpleXMLElement
1329 1329
  */
1330 1330
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1331 1331
     $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
@@ -1379,7 +1379,7 @@  discard block
 block discarded – undo
1379 1379
  * @param array $recording
1380 1380
  * @param array $tools
1381 1381
  *
1382
- * @return array
1382
+ * @return null|stdClass
1383 1383
  */
1384 1384
 function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) {
1385 1385
     if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
@@ -2016,7 +2016,7 @@  discard block
 block discarded – undo
2016 2016
  *
2017 2017
  * @param array $bbbsession
2018 2018
  * @param array $recording
2019
- * @param object $rowdata
2019
+ * @param stdClass $rowdata
2020 2020
  *
2021 2021
  * @return object
2022 2022
  */
@@ -2211,7 +2211,7 @@  discard block
 block discarded – undo
2211 2211
  *
2212 2212
  * @param array $bbbsession
2213 2213
  * @param array $recordings
2214
- * @param array $tools
2214
+ * @param string[] $tools
2215 2215
  *
2216 2216
  * @return array
2217 2217
  */
@@ -2292,7 +2292,7 @@  discard block
 block discarded – undo
2292 2292
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2293 2293
  * in the getRecordings request considering only those that belong to deleted activities.
2294 2294
  *
2295
- * @param string $courseid
2295
+ * @param integer $courseid
2296 2296
  * @param string $bigbluebuttonbnid
2297 2297
  * @param bool   $subset
2298 2298
  *
@@ -2316,7 +2316,7 @@  discard block
 block discarded – undo
2316 2316
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2317 2317
  * in the getRecordings request considering only those that belong to imported recordings.
2318 2318
  *
2319
- * @param string $courseid
2319
+ * @param integer $courseid
2320 2320
  * @param string $bigbluebuttonbnid
2321 2321
  * @param bool   $subset
2322 2322
  *
@@ -2339,7 +2339,7 @@  discard block
 block discarded – undo
2339 2339
 /**
2340 2340
  * Helper function to get recordings and imported recordings together.
2341 2341
  *
2342
- * @param string $courseid
2342
+ * @param integer $courseid
2343 2343
  * @param string $bigbluebuttonbnid
2344 2344
  * @param bool   $subset
2345 2345
  * @param bool   $includedeleted
@@ -2357,7 +2357,7 @@  discard block
 block discarded – undo
2357 2357
  * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events
2358 2358
  * in bigbluebuttonbn_logs.
2359 2359
  *
2360
- * @param string $courseid
2360
+ * @param integer $courseid
2361 2361
  * @param string $bigbluebuttonbnid
2362 2362
  * @param bool   $subset
2363 2363
  * @param bool   $includedeleted
Please login to merge, or discard this patch.
Spacing   +80 added lines, -80 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) {
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
             || defined('BEHAT_UTIL')) {
243 243
         // Just return the fake recording.
244 244
         global $CFG;
245
-        require_once($CFG->libdir . '/testing/generator/lib.php');
246
-        require_once(__DIR__ . '/tests/generator/lib.php');
245
+        require_once($CFG->libdir.'/testing/generator/lib.php');
246
+        require_once(__DIR__.'/tests/generator/lib.php');
247 247
         return mod_bigbluebuttonbn_generator::bigbluebuttonbn_get_recordings_array_fetch($meetingidsarray);
248 248
     }
249 249
     $recordings = array();
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
         if (is_object($value)) {
417 417
             $value = '';
418 418
         }
419
-        $metadataarray['meta_' . $key] = $value;
419
+        $metadataarray['meta_'.$key] = $value;
420 420
     }
421 421
     return $metadataarray;
422 422
 }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
             return $xml;
557 557
         } catch (Exception $e) {
558 558
             libxml_use_internal_errors($previous);
559
-            $error = 'Caught exception: ' . $e->getMessage();
559
+            $error = 'Caught exception: '.$e->getMessage();
560 560
             debugging($error, DEBUG_DEVELOPER);
561 561
             return null;
562 562
         }
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
568 568
         return $response;
569 569
     } catch (Exception $e) {
570
-        $error = 'Caught exception: ' . $e->getMessage();
570
+        $error = 'Caught exception: '.$e->getMessage();
571 571
         debugging($error, DEBUG_DEVELOPER);
572 572
         libxml_use_internal_errors($previous);
573 573
         return null;
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
  */
587 587
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
588 588
     global $CFG;
589
-    require_once($CFG->libdir . '/filelib.php');
589
+    require_once($CFG->libdir.'/filelib.php');
590 590
     $c = new curl();
591 591
     $c->setopt(array('SSL_VERIFYPEER' => true));
592 592
     if ($method == 'POST') {
@@ -595,8 +595,8 @@  discard block
 block discarded – undo
595 595
         }
596 596
         $options = array();
597 597
         $options['CURLOPT_HTTPHEADER'] = array(
598
-            'Content-Type: ' . $contenttype,
599
-            'Content-Length: ' . strlen($data),
598
+            'Content-Type: '.$contenttype,
599
+            'Content-Length: '.strlen($data),
600 600
             'Content-Language: en-US',
601 601
         );
602 602
 
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
  * @return void
618 618
  */
619 619
 function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) {
620
-    $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
620
+    $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
621 621
     if (bigbluebuttonbn_is_meeting_running($meetingid)) {
622 622
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
623 623
     }
@@ -637,9 +637,9 @@  discard block
 block discarded – undo
637 637
     if ($userroles) {
638 638
         $where = '';
639 639
         foreach ($userroles as $userrole) {
640
-            $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid;
640
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
641 641
         }
642
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
642
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
643 643
     }
644 644
     return $userroles;
645 645
 }
@@ -984,9 +984,9 @@  discard block
 block discarded – undo
984 984
     if ($voicebridge == 0) {
985 985
         return true;
986 986
     }
987
-    $select = 'voicebridge = ' . $voicebridge;
987
+    $select = 'voicebridge = '.$voicebridge;
988 988
     if ($instance != 0) {
989
-        $select .= ' AND id <>' . $instance;
989
+        $select .= ' AND id <>'.$instance;
990 990
     }
991 991
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
992 992
         return true;
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
 function bigbluebuttonbn_generate_nonce() {
1123 1123
     $mt = microtime();
1124 1124
     $rand = mt_rand();
1125
-    return md5($mt . $rand);
1125
+    return md5($mt.$rand);
1126 1126
 }
1127 1127
 
1128 1128
 /**
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
         $params['other'] = $options['other'];
1171 1171
     }
1172 1172
     $event = call_user_func_array(
1173
-        '\mod_bigbluebuttonbn\event\\' . $type . '::create',
1173
+        '\mod_bigbluebuttonbn\event\\'.$type.'::create',
1174 1174
         array($params)
1175 1175
     );
1176 1176
     $event->add_record_snapshot('course_modules', $cm);
@@ -1328,7 +1328,7 @@  discard block
 block discarded – undo
1328 1328
  * @return object
1329 1329
  */
1330 1330
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1331
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1331
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1332 1332
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1333 1333
     $xml = bigbluebuttonbn_wrap_xml_load_file(
1334 1334
         $urldefaultconfig,
@@ -1348,9 +1348,9 @@  discard block
 block discarded – undo
1348 1348
  * @return string
1349 1349
  */
1350 1350
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1351
-    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1351
+    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1352 1352
     $sharedsecret = \mod_bigbluebuttonbn\locallib\config::get('shared_secret');
1353
-    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . $sharedsecret);
1353
+    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.$sharedsecret);
1354 1354
     return $configxmlparams;
1355 1355
 }
1356 1356
 
@@ -1456,7 +1456,7 @@  discard block
 block discarded – undo
1456 1456
     global $USER;
1457 1457
     $starttime = $starttime - ($starttime % 1000);
1458 1458
     // Set formatted date.
1459
-    $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1459
+    $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1460 1460
     return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1461 1461
 }
1462 1462
 
@@ -1504,11 +1504,11 @@  discard block
 block discarded – undo
1504 1504
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1505 1505
     }
1506 1506
     $head = html_writer::start_tag('div', array(
1507
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1507
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1508 1508
         'data-recordingid' => $recording['recordID'],
1509 1509
         'data-meetingid' => $recording['meetingID']));
1510 1510
     $tail = html_writer::end_tag('div');
1511
-    return $head . $actionbar . $tail;
1511
+    return $head.$actionbar.$tail;
1512 1512
 }
1513 1513
 
1514 1514
 /**
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
  * @return string
1573 1573
  */
1574 1574
 function bigbluebuttonbn_get_recording_data_row_preview($recording) {
1575
-    $options = array('id' => 'preview-' . $recording['recordID']);
1575
+    $options = array('id' => 'preview-'.$recording['recordID']);
1576 1576
     if ($recording['published'] === 'false') {
1577 1577
         $options['hidden'] = 'hidden';
1578 1578
     }
@@ -1604,7 +1604,7 @@  discard block
 block discarded – undo
1604 1604
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1605 1605
         $recordingpreview .= html_writer::empty_tag(
1606 1606
             'img',
1607
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')
1607
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')
1608 1608
         );
1609 1609
         $recordingpreview .= html_writer::end_tag('div');
1610 1610
     }
@@ -1639,7 +1639,7 @@  discard block
 block discarded – undo
1639 1639
     if ($recording['published'] === 'false') {
1640 1640
         $visibility = 'hidden ';
1641 1641
     }
1642
-    $id = 'playbacks-' . $recording['recordID'];
1642
+    $id = 'playbacks-'.$recording['recordID'];
1643 1643
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1644 1644
         'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1645 1645
         'title' => $title, $visibility => $visibility));
@@ -1665,13 +1665,13 @@  discard block
 block discarded – undo
1665 1665
         return '';
1666 1666
     }
1667 1667
     $text = bigbluebuttonbn_get_recording_type_text($playback['type']);
1668
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1669
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1668
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1669
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1670 1670
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1671
-        $href .= '&href=' . urlencode(trim($playback['url']));
1671
+        $href .= '&href='.urlencode(trim($playback['url']));
1672 1672
     }
1673 1673
     $linkattributes = array(
1674
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1674
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1675 1675
         'class' => 'btn btn-sm btn-default',
1676 1676
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1677 1677
         'data-action' => 'play',
@@ -1683,7 +1683,7 @@  discard block
 block discarded – undo
1683 1683
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1684 1684
         unset($linkattributes['data-href']);
1685 1685
     }
1686
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1686
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1687 1687
 }
1688 1688
 
1689 1689
 /**
@@ -1696,7 +1696,7 @@  discard block
 block discarded – undo
1696 1696
 function bigbluebuttonbn_get_recording_type_text($playbacktype) {
1697 1697
     // Check first if string exists, and if it does'nt just default to the capitalised version of the string.
1698 1698
     $text = ucwords($playbacktype);
1699
-    $typestringid = 'view_recording_format_' . $playbacktype;
1699
+    $typestringid = 'view_recording_format_'.$playbacktype;
1700 1700
     if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) {
1701 1701
         $text = get_string($typestringid, 'bigbluebuttonbn');
1702 1702
     }
@@ -1726,7 +1726,7 @@  discard block
 block discarded – undo
1726 1726
     $validatedurls[$urlhost] = true;
1727 1727
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1728 1728
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1729
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1729
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1730 1730
         debugging($error, DEBUG_DEVELOPER);
1731 1731
         $validatedurls[$urlhost] = false;
1732 1732
     }
@@ -1817,12 +1817,12 @@  discard block
 block discarded – undo
1817 1817
  * @return string
1818 1818
  */
1819 1819
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1820
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1820
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1821 1821
     if (empty($data)) {
1822 1822
         return $htmltext;
1823 1823
     }
1824
-    $target = $data['action'] . '-' . $data['target'];
1825
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1824
+    $target = $data['action'].'-'.$data['target'];
1825
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1826 1826
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1827 1827
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1828 1828
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1830,7 +1830,7 @@  discard block
 block discarded – undo
1830 1830
     $tail = html_writer::end_tag('div');
1831 1831
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1832 1832
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1833
-    return $head . $htmltext . $htmllink . $tail;
1833
+    return $head.$htmltext.$htmllink.$tail;
1834 1834
 }
1835 1835
 
1836 1836
 /**
@@ -1848,10 +1848,10 @@  discard block
 block discarded – undo
1848 1848
     }
1849 1849
     $target = $data['action'];
1850 1850
     if (isset($data['target'])) {
1851
-        $target .= '-' . $data['target'];
1851
+        $target .= '-'.$data['target'];
1852 1852
     }
1853
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1854
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1853
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1854
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);';
1855 1855
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1856 1856
         // With icon for $manageaction.
1857 1857
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
@@ -1866,13 +1866,13 @@  discard block
 block discarded – undo
1866 1866
             );
1867 1867
         }
1868 1868
         if (isset($data['disabled'])) {
1869
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1869
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1870 1870
             $linkattributes['class'] = 'disabled';
1871 1871
             unset($linkattributes['onclick']);
1872 1872
         }
1873 1873
         $icon = new pix_icon(
1874
-            'i/' . $data['tag'],
1875
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1874
+            'i/'.$data['tag'],
1875
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1876 1876
             'moodle',
1877 1877
             $iconattributes
1878 1878
         );
@@ -1967,7 +1967,7 @@  discard block
 block discarded – undo
1967 1967
     if ($bbbsession['managerecordings']) {
1968 1968
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1969 1969
         $table->align[] = 'left';
1970
-        $table->size[] = (count($tools) * 40) . 'px';
1970
+        $table->size[] = (count($tools) * 40).'px';
1971 1971
     }
1972 1972
     // Get the groups of the user.
1973 1973
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -2022,7 +2022,7 @@  discard block
 block discarded – undo
2022 2022
  */
2023 2023
 function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) {
2024 2024
     $row = new html_table_row();
2025
-    $row->id = 'recording-tr-' . $recording['recordID'];
2025
+    $row->id = 'recording-tr-'.$recording['recordID'];
2026 2026
     $row->attributes['data-imported'] = 'false';
2027 2027
     $texthead = '';
2028 2028
     $texttail = '';
@@ -2034,13 +2034,13 @@  discard block
 block discarded – undo
2034 2034
     }
2035 2035
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
2036 2036
     $row->cells = array();
2037
-    $row->cells[] = $texthead . $rowdata->playback . $texttail;
2038
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
2039
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
2037
+    $row->cells[] = $texthead.$rowdata->playback.$texttail;
2038
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
2039
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
2040 2040
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
2041 2041
         $row->cells[] = $rowdata->preview;
2042 2042
     }
2043
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
2043
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
2044 2044
     $row->cells[] = $rowdata->duration_formatted;
2045 2045
     if ($bbbsession['managerecordings']) {
2046 2046
         $row->cells[] = $rowdata->actionbar;
@@ -2131,7 +2131,7 @@  discard block
 block discarded – undo
2131 2131
         // Enqueue it.
2132 2132
         \core\task\manager::queue_adhoc_task($task);
2133 2133
     } catch (Exception $e) {
2134
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2134
+        mtrace("Error while enqueuing completion_update_state task. ".(string) $e);
2135 2135
     }
2136 2136
 }
2137 2137
 
@@ -2299,17 +2299,17 @@  discard block
 block discarded – undo
2299 2299
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2300 2300
  */
2301 2301
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2302
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2302
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2303 2303
     if (empty($courseid)) {
2304 2304
         $courseid = 0;
2305 2305
     }
2306 2306
     if (empty($bigbluebuttonbnid)) {
2307
-        return $sql . " AND courseid = {$courseid}";
2307
+        return $sql." AND courseid = {$courseid}";
2308 2308
     }
2309 2309
     if ($subset) {
2310
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2310
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2311 2311
     }
2312
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2312
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2313 2313
 }
2314 2314
 
2315 2315
 /**
@@ -2323,17 +2323,17 @@  discard block
 block discarded – undo
2323 2323
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2324 2324
  */
2325 2325
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2326
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2326
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2327 2327
     if (empty($courseid)) {
2328 2328
         $courseid = 0;
2329 2329
     }
2330 2330
     if (empty($bigbluebuttonbnid)) {
2331
-        return $sql . " AND courseid = '{$courseid}'";
2331
+        return $sql." AND courseid = '{$courseid}'";
2332 2332
     }
2333 2333
     if ($subset) {
2334
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2334
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2335 2335
     }
2336
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2336
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2337 2337
 }
2338 2338
 
2339 2339
 /**
@@ -2392,7 +2392,7 @@  discard block
 block discarded – undo
2392 2392
     }
2393 2393
     // Prepare select for loading records based on existent bigbluebuttonbns.
2394 2394
     $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
2395
-    $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
2395
+    $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
2396 2396
     // Include only Create events and exclude those with record not true.
2397 2397
     $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
2398 2398
     // Execute select for loading records based on existent bigbluebuttonbns.
@@ -2577,8 +2577,8 @@  discard block
 block discarded – undo
2577 2577
     require_once($CFG->dirroot.'/calendar/lib.php');
2578 2578
     $activitytime = '';
2579 2579
     if ($time) {
2580
-        $activitytime = calendar_day_representation($time) . ' ' .
2581
-        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
2580
+        $activitytime = calendar_day_representation($time).' '.
2581
+        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2582 2582
         calendar_time_representation($time);
2583 2583
     }
2584 2584
     return $activitytime;
@@ -3127,16 +3127,16 @@  discard block
 block discarded – undo
3127 3127
         return $output;
3128 3128
     }
3129 3129
     $output .= $OUTPUT->box_start(
3130
-        'box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
3130
+        'box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
3131 3131
         'bigbluebuttonbn_view_general_warning'
3132
-    ) . "\n";
3133
-    $output .= '    ' . $message . "\n";
3134
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
3132
+    )."\n";
3133
+    $output .= '    '.$message."\n";
3134
+    $output .= '  <div class="singlebutton pull-right">'."\n";
3135 3135
     if (!empty($href)) {
3136 3136
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
3137 3137
     }
3138
-    $output .= '  </div>' . "\n";
3139
-    $output .= $OUTPUT->box_end() . "\n";
3138
+    $output .= '  </div>'."\n";
3139
+    $output .= $OUTPUT->box_end()."\n";
3140 3140
     return $output;
3141 3141
 }
3142 3142
 
@@ -3160,11 +3160,11 @@  discard block
 block discarded – undo
3160 3160
     if ($class == '') {
3161 3161
         $class = 'btn btn-secondary';
3162 3162
     }
3163
-    $output = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
3164
-    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
3165
-    $output .= '          title="' . $title . '"' . "\n";
3166
-    $output .= '          >' . $text . '</button>' . "\n";
3167
-    $output .= '  </form>' . "\n";
3163
+    $output = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
3164
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
3165
+    $output .= '          title="'.$title.'"'."\n";
3166
+    $output .= '          >'.$text.'</button>'."\n";
3167
+    $output .= '  </form>'."\n";
3168 3168
     return $output;
3169 3169
 }
3170 3170
 
@@ -3228,7 +3228,7 @@  discard block
 block discarded – undo
3228 3228
 function bigbluebuttonbn_user_can_join_meeting($bigbluebuttonbn, $mid = null, $userid = null) {
3229 3229
     // By default, use a meetingid without groups.
3230 3230
     if (empty($mid)) {
3231
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
3231
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
3232 3232
     }
3233 3233
     // When meeting is running, all authorized users can join right in.
3234 3234
     if (bigbluebuttonbn_is_meeting_running($mid)) {
@@ -3297,7 +3297,7 @@  discard block
 block discarded – undo
3297 3297
  * @return boolean
3298 3298
  */
3299 3299
 function bigbluebuttonbn_has_html5_client() {
3300
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3300
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3301 3301
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3302 3302
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3303 3303
 }
@@ -3325,7 +3325,7 @@  discard block
 block discarded – undo
3325 3325
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
3326 3326
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
3327 3327
     // Database info related to the activity.
3328
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
3328
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
3329 3329
     $bbbsession['bigbluebuttonbn']->id;
3330 3330
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3331 3331
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -3357,12 +3357,12 @@  discard block
 block discarded – undo
3357 3357
     if ($bbbsession['bigbluebuttonbn']->record) {
3358 3358
         // Check if is enable record all from start.
3359 3359
         if ($bbbsession['recordallfromstart']) {
3360
-            $bbbsession['welcome'] .= '<br><br>' . get_string(
3360
+            $bbbsession['welcome'] .= '<br><br>'.get_string(
3361 3361
                 'bbbrecordallfromstartwarning',
3362 3362
                 'bigbluebuttonbn'
3363 3363
             );
3364 3364
         } else {
3365
-            $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
3365
+            $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
3366 3366
         }
3367 3367
     }
3368 3368
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
@@ -3377,7 +3377,7 @@  discard block
 block discarded – undo
3377 3377
     $bbbsession['originServerName'] = $parsedurl['host'];
3378 3378
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
3379 3379
     $bbbsession['originServerCommonName'] = '';
3380
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
3380
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
3381 3381
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
3382 3382
     // Setting for clienttype, assign flash if not enabled, or default if not editable.
3383 3383
     $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH;
@@ -3484,7 +3484,7 @@  discard block
 block discarded – undo
3484 3484
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3485 3485
         $metadata["bn-recording-status"] = json_encode(
3486 3486
             array(
3487
-                'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
3487
+                'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
3488 3488
                 'context' => $bbbsession['bigbluebuttonbnURL'],
3489 3489
             )
3490 3490
         );
Please login to merge, or discard this patch.