Completed
Push — master ( 1d1df5...87b1fe )
by Jesus
07:01
created
backup/moodle2/backup_bigbluebuttonbn_activity_task.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 defined('MOODLE_INTERNAL') || die;
25 25
 
26
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php');
26
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php');
27 27
 
28 28
 /**
29 29
  * bigbluebuttonbn backup task that provides all the settings and steps to perform one
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
     public static function encode_content_links($content) {
54 54
         global $CFG;
55 55
 
56
-        $base = preg_quote($CFG->wwwroot.'/mod/bigbluebuttonbn', '#');
56
+        $base = preg_quote($CFG->wwwroot . '/mod/bigbluebuttonbn', '#');
57 57
 
58 58
         // Link to the list of bigbluebuttonbns.
59
-        $pattern = '#('.$base."\/index.php\?id\=)([0-9]+)#";
59
+        $pattern = '#(' . $base . "\/index.php\?id\=)([0-9]+)#";
60 60
         $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNINDEX*$2@$', $content);
61 61
 
62 62
         // Link to bigbluebuttonbn view by moduleid.
63
-        $pattern = '#('.$base."\/view.php\?id\=)([0-9]+)#";
63
+        $pattern = '#(' . $base . "\/view.php\?id\=)([0-9]+)#";
64 64
         $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNVIEWBYID*$2@$', $content);
65 65
 
66 66
         return $content;
Please login to merge, or discard this patch.
backup/moodle2/restore_bigbluebuttonbn_stepslib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     protected function process_bigbluebuttonbn($data) {
46 46
         global $DB;
47 47
 
48
-        $data = (object) $data;
48
+        $data = (object)$data;
49 49
         $data->course = $this->get_courseid();
50 50
 
51 51
         $data->timemodified = $this->apply_date_offset($data->timemodified);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     protected function process_bigbluebuttonbn_logs($data) {
60 60
         global $DB;
61 61
 
62
-        $data = (object) $data;
62
+        $data = (object)$data;
63 63
         // Apply modifications.
64 64
         $data->courseid = $this->get_mappingid('course', $data->courseid);
65 65
         $data->bigbluebuttonbnid = $this->get_new_parentid('bigbluebuttonbn');
Please login to merge, or discard this patch.
backup/moodle2/restore_bigbluebuttonbn_activity_task.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
 defined('MOODLE_INTERNAL') || die();
25 25
 
26
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php');
26
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php');
27 27
 
28 28
 /**
29 29
  * bigbluebuttonbn restore task that provides all the settings and steps to perform one
Please login to merge, or discard this patch.
backup/moodle2/backup_bigbluebuttonbn_stepslib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
                             'moderatorpass', 'viewerpass', 'wait', 'record', 'tagging',
41 41
                             'welcome', 'voicebridge', 'openingtime', 'closingtime',
42 42
                             'timecreated', 'timemodified', 'presentation', 'participants',
43
-                            'userlimit', ));
43
+                            'userlimit',));
44 44
 
45 45
         $logs = new backup_nested_element('logs');
46 46
 
47 47
         $log = new backup_nested_element('log', array('id'), array(
48
-                'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', ));
48
+                'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',));
49 49
 
50 50
         // Build the tree.
51 51
         $bigbluebuttonbn->add_child($logs);
Please login to merge, or discard this patch.
settings.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
 global $CFG;
29 29
 
30
-require_once(dirname(__FILE__).'/locallib.php');
30
+require_once(dirname(__FILE__) . '/locallib.php');
31 31
 
32 32
 if ($ADMIN->fulltree) {
33 33
     if (!isset($CFG->bigbluebuttonbn['server_url']) ||
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
         } else {
259 259
             $settings->add(new admin_setting_heading('bigbluebuttonbn_feature_preuploadpresentation',
260 260
                 get_string('config_feature_preuploadpresentation', 'bigbluebuttonbn'),
261
-                get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn').'<br><br>'.
262
-                '<div class="form-defaultinfo">'.get_string('config_warning_curl_not_installed', 'bigbluebuttonbn').'</div><br>'
261
+                get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn') . '<br><br>' .
262
+                '<div class="form-defaultinfo">' . get_string('config_warning_curl_not_installed', 'bigbluebuttonbn') . '</div><br>'
263 263
                 ));
264 264
         }
265 265
     }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
24 24
  */
25 25
 
26
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
27
-require_once(dirname(__FILE__).'/locallib.php');
26
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
27
+require_once(dirname(__FILE__) . '/locallib.php');
28 28
 
29 29
 $id = required_param('id', PARAM_INT);
30 30
 $a = optional_param('a', 0, PARAM_INT);
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
 
93 93
         echo get_string('index_ending', 'bigbluebuttonbn');
94 94
 
95
-        $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
95
+        $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
96 96
         if ($g != '0') {
97
-            $meetingid .= '['.$g.']';
97
+            $meetingid .= '[' . $g . ']';
98 98
         }
99 99
         bigbluebuttonbn_wrap_xml_load_file(bigbluebuttonbn_getEndMeetingURL($meetingid));
100
-        redirect('index.php?id='.$id);
100
+        redirect('index.php?id=' . $id);
101 101
     }
102 102
 }
103 103
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         // Add a the data for the bigbluebuttonbn instance.
115 115
         $groupobj = null;
116 116
         if (groups_get_activity_groupmode($cm) > 0) {
117
-            $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants'));
117
+            $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants'));
118 118
         }
119 119
         $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj);
120 120
 
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
 
136 136
 // Functions.
137 137
 function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
138
-    $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
138
+    $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
139 139
     $paramgroup = '';
140 140
     $groupname = '';
141 141
 
142 142
     if ($groupobj) {
143
-        $meetingid .= '['.$groupobj->id.']';
144
-        $paramgroup = '&group='.$groupobj->id;
143
+        $meetingid .= '[' . $groupobj->id . ']';
144
+        $paramgroup = '&group=' . $groupobj->id;
145 145
         $groupname = $groupobj->name;
146 146
     }
147 147
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     }
161 161
 
162 162
     // Output Users in the meeting.
163
-    $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>';
163
+    $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>';
164 164
     $group = $groupname;
165 165
     $users = '';
166 166
     $viewerlist = '';
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         $attendeecount = 0;
198 198
         foreach ($meetinginfo['attendees']->attendee as $attendee) {
199 199
             if ($attendee->role == $role) {
200
-                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName;
200
+                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName;
201 201
             }
202 202
         }
203 203
     }
@@ -220,15 +220,15 @@  discard block
 block discarded – undo
220 220
     $actions = '';
221 221
 
222 222
     if ($moderator) {
223
-        $actions .= '<form name="form1" method="post" action="">'.'/n';
224
-        $actions .= '  <INPUT type="hidden" name="id" value="'.$course->id.'">'.'/n';
225
-        $actions .= '  <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'.'/n';
223
+        $actions .= '<form name="form1" method="post" action="">' . '/n';
224
+        $actions .= '  <INPUT type="hidden" name="id" value="' . $course->id . '">' . '/n';
225
+        $actions .= '  <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . '/n';
226 226
         if ($groupobj != null) {
227
-            $actions .= '  <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'.'/n';
227
+            $actions .= '  <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . '/n';
228 228
         }
229
-        $actions .= '  <INPUT type="submit" name="submit" value="end" onclick="return confirm(\''.
230
-            get_string('index_confirm_end', 'bigbluebuttonbn').'\')">'.'/n';
231
-        $actions .= '</form>'.'/n';
229
+        $actions .= '  <INPUT type="submit" name="submit" value="end" onclick="return confirm(\'' .
230
+            get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . '/n';
231
+        $actions .= '</form>' . '/n';
232 232
     }
233 233
 
234 234
     return $actions;
Please login to merge, or discard this patch.
import_view.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
23 23
  */
24 24
 
25
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
26
-require_once(dirname(__FILE__).'/locallib.php');
25
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
26
+require_once(dirname(__FILE__) . '/locallib.php');
27 27
 
28 28
 $bn = required_param('bn', PARAM_INT);
29 29
 $tc = optional_param('tc', 0, PARAM_INT);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     $output .= html_writer::tag('input', '',
98 98
         array('type' => 'button', 'class' => 'btn btn-secondary',
99 99
               'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
100
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
100
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\''));
101 101
 
102 102
     // JavaScript for locales.
103 103
     $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
Please login to merge, or discard this patch.
bbb_view.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
23 23
  */
24 24
 
25
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
26
-require_once(dirname(__FILE__).'/locallib.php');
25
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
26
+require_once(dirname(__FILE__) . '/locallib.php');
27 27
 
28 28
 $action = required_param('action', PARAM_TEXT);
29 29
 $id = optional_param('id', 0, PARAM_INT);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
         // If user is not administrator nor moderator (user is steudent) and waiting is required.
99 99
         if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
100
-            header('Location: '.$bbbsession['logoutURL']);
100
+            header('Location: ' . $bbbsession['logoutURL']);
101 101
             break;
102 102
         }
103 103
 
@@ -113,17 +113,17 @@  discard block
 block discarded – undo
113 113
             // The server is unreachable.
114 114
             if ($bbbsession['administrator']) {
115 115
                 print_error('view_error_unable_join', 'bigbluebuttonbn',
116
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
116
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
117 117
                 break;
118 118
             }
119 119
             if ($bbbsession['moderator']) {
120 120
                 print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
121
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
121
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
122 122
                 break;
123 123
             }
124 124
 
125 125
             print_error('view_error_unable_join_student', 'bigbluebuttonbn',
126
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
126
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
127 127
             break;
128 128
         }
129 129
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         // Moodle event logger: Create an event for meeting left.
159 159
         bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]);
160 160
         // Execute the redirect.
161
-        header('Location: '.urldecode($href));
161
+        header('Location: ' . urldecode($href));
162 162
         break;
163 163
     default:
164 164
         bigbluebutton_bbb_view_close_window();
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     }
202 202
     if ($durationtime > 0) {
203 203
         $data['duration'] = $durationtime;
204
-        $data['welcome'] .= '<br><br>'.str_replace('%duration%', ''.$durationtime, get_string('bbbdurationwarning', 'bigbluebuttonbn'));
204
+        $data['welcome'] .= '<br><br>' . str_replace('%duration%', '' . $durationtime, get_string('bbbdurationwarning', 'bigbluebuttonbn'));
205 205
     }
206 206
 
207 207
     $voicebridge = intval($bbbsession['voicebridge']);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
     if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) {
249 249
         // No more users allowed to join.
250
-        header('Location: '.$bbbsession['logoutURL']);
250
+        header('Location: ' . $bbbsession['logoutURL']);
251 251
         return;
252 252
     }
253 253
 
@@ -266,20 +266,20 @@  discard block
 block discarded – undo
266 266
     bigbluebuttonbn_participant_joined($bbbsession['meetingid'],
267 267
         ($bbbsession['administrator'] || $bbbsession['moderator']));
268 268
     // Execute the redirect.
269
-    header('Location: '.$joinurl);
269
+    header('Location: ' . $joinurl);
270 270
 }
271 271
 
272 272
 function bigbluebutton_bbb_view_errors($serrors, $id) {
273 273
     global $CFG, $OUTPUT;
274 274
 
275
-    $errors = (array) json_decode(urldecode($serrors));
275
+    $errors = (array)json_decode(urldecode($serrors));
276 276
     $msgerrors = '';
277 277
     foreach ($errors as $error) {
278
-        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n";
278
+        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n";
279 279
     }
280 280
 
281 281
     echo $OUTPUT->header();
282 282
     print_error('view_error_bigbluebutton', 'bigbluebuttonbn',
283
-        $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors);
283
+        $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors);
284 284
     echo $OUTPUT->footer();
285 285
 }
Please login to merge, or discard this patch.
locallib.php 1 patch
Spacing   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 global $CFG;
29 29
 
30
-require_once(dirname(__FILE__).'/lib.php');
30
+require_once(dirname(__FILE__) . '/lib.php');
31 31
 
32 32
 const BIGBLUEBUTTONBN_FORCED = true;
33 33
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     if (isset($meta)) {
77 77
         $log->meta = $meta;
78 78
     } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) {
79
-        $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}';
79
+        $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}';
80 80
     }
81 81
 
82 82
     $DB->insert_record('bigbluebuttonbn_logs', $log);
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 
122 122
     if (!is_null($pname) && !is_null($purl)) {
123 123
         $method = BIGBLUEBUTTONBN_METHOD_POST;
124
-        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='" . $pname . "'><document url='".
125
-            $purl."' /></module></modules>";
124
+        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='" . $pname . "'><document url='" .
125
+            $purl . "' /></module></modules>";
126 126
     }
127 127
 
128 128
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                                 'moderatorPW' => $meeting->moderatorPW,
168 168
                                 'attendeePW' => $meeting->attendeePW,
169 169
                                 'hasBeenForciblyEnded' => $meeting->hasBeenForciblyEnded,
170
-                                'running' => $meeting->running, );
170
+                                'running' => $meeting->running,);
171 171
         }
172 172
 
173 173
         return $meetings;
@@ -308,12 +308,12 @@  discard block
 block discarded – undo
308 308
 function bigbluebuttonbn_get_recordings_imported_array($courseid, $bigbluebuttonbnid = null, $subset = true) {
309 309
     global $DB;
310 310
 
311
-    $select = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '".
312
-        BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
311
+    $select = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '" .
312
+        BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
313 313
     if ($bigbluebuttonbnid === null) {
314
-        $select = "courseid = '{$courseid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
314
+        $select = "courseid = '{$courseid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
315 315
     } else if ($subset) {
316
-        $select = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
316
+        $select = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
317 317
     }
318 318
     $recordsimported = $DB->get_records_select('bigbluebuttonbn_logs', $select);
319 319
 
@@ -340,37 +340,37 @@  discard block
 block discarded – undo
340 340
 function bigbluebuttonbn_get_default_config_xml_array() {
341 341
     $defaultconfigxml = bigbluebuttonbn_getDefaultConfigXML();
342 342
 
343
-    return (array) $defaultconfigxml;
343
+    return (array)$defaultconfigxml;
344 344
 }
345 345
 
346 346
 function bigbluebuttonbn_get_recording_array_value($recording) {
347 347
     // Add formats.
348 348
     $playbackarray = array();
349 349
     foreach ($recording->playback->format as $format) {
350
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
351
-            'url' => (string) $format->url, 'length' => (string) $format->length);
350
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
351
+            'url' => (string)$format->url, 'length' => (string)$format->length);
352 352
         // Add preview per format when existing.
353 353
         if ($format->preview) {
354 354
             $imagesarray = array();
355 355
             foreach ($format->preview->images->image as $image) {
356
-                $imagearray = array('url' => (string) $image);
356
+                $imagearray = array('url' => (string)$image);
357 357
                 foreach ($image->attributes() as $attkey => $attvalue) {
358
-                    $imagearray[$attkey] = (string) $attvalue;
358
+                    $imagearray[$attkey] = (string)$attvalue;
359 359
                 }
360 360
                 array_push($imagesarray, $imagearray);
361 361
             }
362
-            $playbackarray[(string) $format->type]['preview'] = $imagesarray;
362
+            $playbackarray[(string)$format->type]['preview'] = $imagesarray;
363 363
         }
364 364
     }
365 365
 
366 366
     // Add the metadata to the recordings array.
367 367
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
368
-    $recordingarray = array('recordID' => (string) $recording->recordID,
369
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
370
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
371
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
368
+    $recordingarray = array('recordID' => (string)$recording->recordID,
369
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
370
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
371
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
372 372
     if (isset($recording->protected)) {
373
-        $recordingarray['protected'] = (string) $recording->protected;
373
+        $recordingarray['protected'] = (string)$recording->protected;
374 374
     }
375 375
     // Force protected.
376 376
     $recordingarray['protected'] = 'false';
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         if (is_object($value)) {
384 384
             $value = '';
385 385
         }
386
-        $metadataarray['meta_'.$key] = $value;
386
+        $metadataarray['meta_' . $key] = $value;
387 387
     }
388 388
     return $metadataarray;
389 389
 }
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
     $ids = explode(',', $recordids);
442 442
     foreach ($ids as $id) {
443 443
         $xml = bigbluebuttonbn_wrap_xml_load_file(
444
-            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
444
+            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
445 445
           );
446 446
         if ($xml && $xml->returncode != 'SUCCESS') {
447 447
             return false;
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
             return $xml;
562 562
         } catch (Exception $e) {
563 563
             libxml_use_internal_errors($previous);
564
-            $error = 'Caught exception: '.$e->getMessage();
564
+            $error = 'Caught exception: ' . $e->getMessage();
565 565
             debugging($error, DEBUG_DEVELOPER);
566 566
             return null;
567 567
         }
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
574 574
         return $response;
575 575
     } catch (Exception $e) {
576
-        $error = 'Caught exception: '.$e->getMessage();
576
+        $error = 'Caught exception: ' . $e->getMessage();
577 577
         debugging($error, DEBUG_DEVELOPER);
578 578
         libxml_use_internal_errors($previous);
579 579
         return null;
@@ -591,8 +591,8 @@  discard block
 block discarded – undo
591 591
 
592 592
         $options = array();
593 593
         $options['CURLOPT_HTTPHEADER'] = array(
594
-                 'Content-Type: '.$contenttype,
595
-                 'Content-Length: '.strlen($data),
594
+                 'Content-Type: ' . $contenttype,
595
+                 'Content-Length: ' . strlen($data),
596 596
                  'Content-Language: en-US',
597 597
                );
598 598
 
@@ -609,9 +609,9 @@  discard block
 block discarded – undo
609 609
     if ($userroles) {
610 610
         $where = '';
611 611
         foreach ($userroles as $value) {
612
-            $where .= (empty($where) ? ' WHERE' : ' AND').' id='.$value->roleid;
612
+            $where .= (empty($where) ? ' WHERE' : ' AND') . ' id=' . $value->roleid;
613 613
         }
614
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
614
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
615 615
     }
616 616
 
617 617
     return $userroles;
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 }
625 625
 
626 626
 function bigbluebuttonbn_get_users(context $context = null) {
627
-    $users = (array) get_enrolled_users($context,'',0,'u.*',null,0,0,true);
627
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
628 628
     foreach ($users as $key => $value) {
629 629
         $users[$key] = fullname($value);
630 630
     }
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
 }
633 633
 
634 634
 function bigbluebuttonbn_get_users_select(context $context = null) {
635
-    $users = (array) get_enrolled_users($context,'',0,'u.*',null,0,0,true);
635
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
636 636
     foreach ($users as $key => $value) {
637 637
         $users[$key] = array('id' => $value->id, 'name' => fullname($value));
638 638
     }
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 }
641 641
 
642 642
 function bigbluebuttonbn_get_roles(context $context = null) {
643
-    $roles = (array) role_get_names($context);
643
+    $roles = (array)role_get_names($context);
644 644
     foreach ($roles as $key => $value) {
645 645
         $roles[$key] = $value->localname;
646 646
     }
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
 }
649 649
 
650 650
 function bigbluebuttonbn_get_roles_select(context $context = null) {
651
-    $roles = (array) role_get_names($context);
651
+    $roles = (array)role_get_names($context);
652 652
     foreach ($roles as $key => $value) {
653 653
         $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
654 654
     }
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
 }
657 657
 
658 658
 function bigbluebuttonbn_get_role($id) {
659
-    $roles = (array) role_get_names();
659
+    $roles = (array)role_get_names();
660 660
     if (is_numeric($id)) {
661 661
         return $roles[$id];
662 662
     }
@@ -820,9 +820,9 @@  discard block
 block discarded – undo
820 820
     $isunique = true;
821 821
     if ($voicebridge != 0) {
822 822
         $table = 'bigbluebuttonbn';
823
-        $select = 'voicebridge = '.$voicebridge;
823
+        $select = 'voicebridge = ' . $voicebridge;
824 824
         if ($id) {
825
-            $select .= ' AND id <> '.$id;
825
+            $select .= ' AND id <> ' . $id;
826 826
         }
827 827
         if ($DB->get_records_select($table, $select)) {
828 828
             $isunique = false;
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
     $mt = microtime();
891 891
     $rand = mt_rand();
892 892
 
893
-    return md5($mt.$rand);
893
+    return md5($mt . $rand);
894 894
 }
895 895
 
896 896
 function bigbluebuttonbn_random_password($length = 8) {
@@ -902,41 +902,41 @@  discard block
 block discarded – undo
902 902
 
903 903
 function bigbluebuttonbn_events() {
904 904
     return array(
905
-        (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
906
-        (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
907
-        (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION,
908
-        (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED,
909
-        (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED,
910
-        (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED,
911
-        (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT,
912
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
913
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
914
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
915
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
916
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
917
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
918
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
919
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
905
+        (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
906
+        (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
907
+        (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION,
908
+        (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED,
909
+        (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED,
910
+        (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED,
911
+        (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT,
912
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
913
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
914
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
915
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
916
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
917
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
918
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
919
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
920 920
     );
921 921
 }
922 922
 
923 923
 function bigbluebuttonbn_events_action() {
924 924
     return array(
925
-        'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
926
-        'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
927
-        'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION,
928
-        'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED,
929
-        'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED,
930
-        'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED,
931
-        'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT,
932
-        'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
933
-        'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
934
-        'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
935
-        'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
936
-        'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
937
-        'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
938
-        'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
939
-        'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
925
+        'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
926
+        'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
927
+        'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION,
928
+        'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED,
929
+        'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED,
930
+        'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED,
931
+        'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT,
932
+        'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
933
+        'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
934
+        'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
935
+        'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
936
+        'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
937
+        'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
938
+        'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
939
+        'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
940 940
     );
941 941
 }
942 942
 
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
         $eventproperties['other'] = $options['other'];
961 961
     }
962 962
 
963
-    $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create',
963
+    $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create',
964 964
       array($eventproperties));
965 965
     $event->trigger();
966 966
 }
@@ -1003,11 +1003,11 @@  discard block
 block discarded – undo
1003 1003
     $now = time();
1004 1004
     if (!$forced && isset($result) && $now < ($result['creation_time'] + $cachettl)) {
1005 1005
         // Use the value in the cache.
1006
-        return (array) json_decode($result['meeting_info']);
1006
+        return (array)json_decode($result['meeting_info']);
1007 1007
     }
1008 1008
 
1009 1009
     // Ping again and refresh the cache.
1010
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1010
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1011 1011
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1012 1012
       );
1013 1013
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1065,8 +1065,8 @@  discard block
 block discarded – undo
1065 1065
  * @param string $configxml
1066 1066
  */
1067 1067
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1068
-    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1069
-    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret'));
1068
+    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1069
+    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret'));
1070 1070
 
1071 1071
     return $configxmlparams;
1072 1072
 }
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
  * @param string $configxml
1077 1077
  */
1078 1078
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1079
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1079
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1080 1080
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1081 1081
     $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, BIGBLUEBUTTONBN_METHOD_POST,
1082 1082
         $configxmlparams, 'application/x-www-form-urlencoded');
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
  */
1091 1091
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1092 1092
     $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml);
1093
-    $configxmlarray = (array) $configxml;
1093
+    $configxmlarray = (array)$configxml;
1094 1094
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1095 1095
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1096 1096
         return '';
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
         $starttime = $starttime - ($starttime % 1000);
1128 1128
 
1129 1129
         // Set formatted date.
1130
-        $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1130
+        $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1131 1131
         $row->date_formatted = userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1132 1132
 
1133 1133
         // Set formatted duration.
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
     }
1199 1199
 
1200 1200
     $recordingpreview = html_writer::start_tag('div',
1201
-        array('id' => 'preview-'.$recording['recordID'], $visibility => $visibility));
1201
+        array('id' => 'preview-' . $recording['recordID'], $visibility => $visibility));
1202 1202
     foreach ($recording['playbacks'] as $playback) {
1203 1203
         if (isset($playback['preview'])) {
1204 1204
             foreach ($playback['preview'] as $image) {
@@ -1231,19 +1231,19 @@  discard block
 block discarded – undo
1231 1231
         $visibility = 'hidden ';
1232 1232
     }
1233 1233
 
1234
-    $id = 'playbacks-'.$recording['recordID'];
1234
+    $id = 'playbacks-' . $recording['recordID'];
1235 1235
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1236 1236
           'data-recordingid' => $recording['recordID'], 'data-meetingid' => $recording['meetingID'],
1237 1237
           'title' => $title, $visibility => $visibility));
1238 1238
     foreach ($recording['playbacks'] as $playback) {
1239 1239
         $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_play(this);';
1240
-        $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn='.$bigbluebuttonbnid.
1241
-            '&href='.urlencode($playback['url']).'&rid='.$recording['recordID'];
1242
-        $linkattributes = array('title' => get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'),
1240
+        $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn=' . $bigbluebuttonbnid .
1241
+            '&href=' . urlencode($playback['url']) . '&rid=' . $recording['recordID'];
1242
+        $linkattributes = array('title' => get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'),
1243 1243
             'class' => 'btn btn-sm btn-default', 'onclick' => $onclick,
1244 1244
             'data-action' => 'play', 'data-href' => $href);
1245
-        $recordingtypes .= $OUTPUT->action_link('#', get_string('view_recording_format_'.$playback['type'],
1246
-            'bigbluebuttonbn'), null, $linkattributes).'&#32;';
1245
+        $recordingtypes .= $OUTPUT->action_link('#', get_string('view_recording_format_' . $playback['type'],
1246
+            'bigbluebuttonbn'), null, $linkattributes) . '&#32;';
1247 1247
     }
1248 1248
     $recordingtypes .= html_writer::end_tag('div');
1249 1249
 
@@ -1328,11 +1328,11 @@  discard block
 block discarded – undo
1328 1328
         $target .= '-' . $data['target'];
1329 1329
     }
1330 1330
     $id = 'recording-' . $target . '-' . $recording['recordID'];
1331
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_'.$data['action'].'(this);';
1331
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_' . $data['action'] . '(this);';
1332 1332
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1333 1333
         // With icon for $manageaction.
1334 1334
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1335
-        $icon = new pix_icon('i/'.$data['tag'],
1335
+        $icon = new pix_icon('i/' . $data['tag'],
1336 1336
             get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1337 1337
             'moodle', $iconattributes);
1338 1338
         $linkattributes = array(
@@ -1423,7 +1423,7 @@  discard block
 block discarded – undo
1423 1423
         // There are recordings for this meeting.
1424 1424
         foreach ($recordings as $recording) {
1425 1425
             $row = new html_table_row();
1426
-            $row->id = 'recording-td-'.$recording['recordID'];
1426
+            $row->id = 'recording-td-' . $recording['recordID'];
1427 1427
             $row->attributes['data-imported'] = 'false';
1428 1428
             $texthead = '';
1429 1429
             $texttail = '';
@@ -1437,9 +1437,9 @@  discard block
 block discarded – undo
1437 1437
             $rowdata = bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools);
1438 1438
             if ($rowdata != null) {
1439 1439
                 $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1440
-                $row->cells = array($texthead.$rowdata->recording.$texttail,
1441
-                    $texthead.$rowdata->activity.$texttail, $texthead.$rowdata->description.$texttail,
1442
-                    $rowdata->preview, $texthead.$rowdata->date_formatted.$texttail,
1440
+                $row->cells = array($texthead . $rowdata->recording . $texttail,
1441
+                    $texthead . $rowdata->activity . $texttail, $texthead . $rowdata->description . $texttail,
1442
+                    $rowdata->preview, $texthead . $rowdata->date_formatted . $texttail,
1443 1443
                     $rowdata->duration_formatted);
1444 1444
                 if ($bbbsession['managerecordings']) {
1445 1445
                     $row->cells[] = $rowdata->actionbar;
@@ -1461,9 +1461,9 @@  discard block
 block discarded – undo
1461 1461
     // Build the message_body.
1462 1462
     $msg->activity_type = '';
1463 1463
     $msg->activity_title = $bigbluebuttonbn->name;
1464
-    $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').' '.
1465
-        $msg->activity_type.' &quot;'.$msg->activity_title.'&quot; '.
1466
-        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
1464
+    $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . ' ' .
1465
+        $msg->activity_type . ' &quot;' . $msg->activity_title . '&quot; ' .
1466
+        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>';
1467 1467
 
1468 1468
     bigbluebuttonbn_send_notification($sender, $bigbluebuttonbn, $messagetext);
1469 1469
 }
@@ -1556,15 +1556,15 @@  discard block
 block discarded – undo
1556 1556
 
1557 1557
     // Gather the bigbluebuttonbnids whose meetingids should be included in the getRecordings request'.
1558 1558
     $select = "id <> '{$bigbluebuttonbnid}' AND course = '{$courseid}'";
1559
-    $selectdeleted = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '".
1560
-        BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
1559
+    $selectdeleted = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '" .
1560
+        BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
1561 1561
     if ($bigbluebuttonbnid === null) {
1562 1562
         $select = "course = '{$courseid}'";
1563
-        $selectdeleted = "courseid = '{$courseid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE.
1563
+        $selectdeleted = "courseid = '{$courseid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE .
1564 1564
             "' AND meta like '%has_recordings%' AND meta like '%true%'";
1565 1565
     } else if ($subset) {
1566 1566
         $select = "id = '{$bigbluebuttonbnid}'";
1567
-        $selectdeleted = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE.
1567
+        $selectdeleted = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE .
1568 1568
             "' AND meta like '%has_recordings%' AND meta like '%true%'";
1569 1569
     }
1570 1570
     $bigbluebuttonbns = $DB->get_records_select_menu('bigbluebuttonbn', $select, null, 'id', 'id, meetingid');
@@ -1586,7 +1586,7 @@  discard block
 block discarded – undo
1586 1586
     if (!empty($bigbluebuttonbns)) {
1587 1587
         // Prepare select for loading records based on existent bigbluebuttonbns.
1588 1588
         $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
1589
-        $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
1589
+        $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
1590 1590
         // Include only Create events and exclude those with record not true.
1591 1591
         $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
1592 1592
         // Execute select for loading records based on existent bigbluebuttonbns.
@@ -1678,8 +1678,8 @@  discard block
 block discarded – undo
1678 1678
 function bigbluebuttonbn_format_activity_time($time) {
1679 1679
     $activitytime = '';
1680 1680
     if ($time) {
1681
-        $activitytime = calendar_day_representation($time).' '.
1682
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
1681
+        $activitytime = calendar_day_representation($time) . ' ' .
1682
+          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
1683 1683
           calendar_time_representation($time);
1684 1684
     }
1685 1685
 
@@ -1705,7 +1705,7 @@  discard block
 block discarded – undo
1705 1705
 
1706 1706
 function bigbluebuttonbn_get_moderator_email($context) {
1707 1707
     $moderatoremails = array();
1708
-    $users = (array) get_enrolled_users($context,'',0,'u.*',null,0,0,true);
1708
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
1709 1709
     $counter = 0;
1710 1710
     foreach ($users as $key => $user) {
1711 1711
         if ($counter == 5) {
Please login to merge, or discard this patch.