Completed
Push — master ( 32c9ae...514091 )
by Jesus
04:47
created
bbb_broker.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -179,6 +179,9 @@  discard block
 block discarded – undo
179 179
     return "{$params['callback']}({$callbackresponsedata});";
180 180
 }
181 181
 
182
+/**
183
+ * @param boolean $running
184
+ */
182 185
 function bigbluebuttonbn_broker_meeting_info_can_join($bbbsession, $running, $participantcount) {
183 186
     $status = array("can_join" => false);
184 187
     if ($running) {
@@ -199,6 +202,9 @@  discard block
 block discarded – undo
199 202
     return $status;
200 203
 }
201 204
 
205
+/**
206
+ * @param boolean $running
207
+ */
202 208
 function bigbluebuttonbn_broker_meeting_info_can_end($bbbsession, $running) {
203 209
     $status = array("can_end" => false);
204 210
     if ($running && ($bbbsession['administrator'] || $bbbsession['moderator'])) {
@@ -345,6 +351,9 @@  discard block
 block discarded – undo
345 351
     return "{$params['callback']}({$callbackresponsedata});";
346 352
 }
347 353
 
354
+/**
355
+ * @param string $action
356
+ */
348 357
 function bigbluebuttonbn_broker_recording_action_perform($action, $bbbsession, $params, $recordings) {
349 358
     if ($action == 'recording_publish') {
350 359
         return bigbluebuttonbn_broker_recording_action_publish($bbbsession, $params, $recordings);
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -389,10 +389,10 @@  discard block
 block discarded – undo
389 389
     if (bigbluebuttonbn_broker_recording_is_imported($recordings, $params['id'])) {
390 390
         // Execute unpublish on imported recording link.
391 391
         return array(
392
-          'status' => bigbluebuttonbn_publish_recording_imported(
393
-              $params['id'], $bbbsession['bigbluebuttonbn']->id, false
392
+            'status' => bigbluebuttonbn_publish_recording_imported(
393
+                $params['id'], $bbbsession['bigbluebuttonbn']->id, false
394 394
             )
395
-          );
395
+            );
396 396
     }
397 397
 
398 398
     // As the recordingid was not identified as imported recording link, execute unpublish on a real recording.
@@ -412,26 +412,26 @@  discard block
 block discarded – undo
412 412
     }
413 413
     // Second: Execute the real unpublish.
414 414
     return array(
415
-      'status' => bigbluebuttonbn_publish_recordings($params['id'], 'false')
416
-      );
415
+        'status' => bigbluebuttonbn_publish_recordings($params['id'], 'false')
416
+        );
417 417
 }
418 418
 
419 419
 function bigbluebuttonbn_broker_recording_action_edit($bbbsession, $params, $recordings) {
420 420
     if (bigbluebuttonbn_broker_recording_is_imported($recordings, $params['id'])) {
421 421
         // Execute update on imported recording link.
422 422
         return array(
423
-          'status' => bigbluebuttonbn_update_recording_imported(
424
-              $params['id'], $bbbsession['bigbluebuttonbn']->id, json_decode($params['meta'], true)
423
+            'status' => bigbluebuttonbn_update_recording_imported(
424
+                $params['id'], $bbbsession['bigbluebuttonbn']->id, json_decode($params['meta'], true)
425 425
             )
426
-          );
426
+            );
427 427
     }
428 428
 
429 429
     // As the recordingid was not identified as imported recording link, execute update on a real recording.
430 430
     // (No need to update imported links as the update only affects the actual recording).
431 431
     // Execute update on actual recording.
432 432
     return array(
433
-      'status' => bigbluebuttonbn_update_recordings($params['id'], json_decode($params['meta']))
434
-      );
433
+        'status' => bigbluebuttonbn_update_recordings($params['id'], json_decode($params['meta']))
434
+        );
435 435
 }
436 436
 
437 437
 function bigbluebuttonbn_broker_recording_action_delete($bbbsession, $params, $recordings) {
@@ -440,10 +440,10 @@  discard block
 block discarded – undo
440 440
     if (bigbluebuttonbn_broker_recording_is_imported($recordings, $params['id'])) {
441 441
         // Execute delete on imported recording link.
442 442
         return array(
443
-          'status' => bigbluebuttonbn_delete_recording_imported(
444
-              $params['id'], $bbbsession['bigbluebuttonbn']->id
443
+            'status' => bigbluebuttonbn_delete_recording_imported(
444
+                $params['id'], $bbbsession['bigbluebuttonbn']->id
445 445
             )
446
-          );
446
+            );
447 447
     }
448 448
 
449 449
     // As the recordingid was not identified as imported recording link, execute delete on a real recording.
@@ -458,8 +458,8 @@  discard block
 block discarded – undo
458 458
     }
459 459
     // Execute the actual delete.
460 460
     return array(
461
-      'status' => bigbluebuttonbn_delete_recordings($params['id'])
462
-      );
461
+        'status' => bigbluebuttonbn_delete_recordings($params['id'])
462
+        );
463 463
 }
464 464
 
465 465
 function bigbluebuttonbn_broker_recording_ready($params, $bigbluebuttonbn) {
@@ -600,10 +600,10 @@  discard block
 block discarded – undo
600 600
     $params['recording_import'] = ['id' => 'The recordingID must be specified.'];
601 601
     $params['recording_ready'] = [
602 602
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
603
-          ];
603
+            ];
604 604
     $params['live_session_events'] = [
605 605
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
606
-          ];
606
+            ];
607 607
     return $params;
608 608
 }
609 609
 
Please login to merge, or discard this patch.
view.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
 function bigbluebuttonbn_view_bbbsession_roles($context, $userid) {
198 198
     if (isguestuser()) {
199
-      return bigbluebuttonbn_get_guest_role();
199
+        return bigbluebuttonbn_get_guest_role();
200 200
     }
201 201
     return bigbluebuttonbn_get_user_roles($context, $userid);
202 202
 }
@@ -277,11 +277,11 @@  discard block
 block discarded – undo
277 277
 
278 278
     echo $OUTPUT->box_start('generalbox boxaligncenter');
279 279
     echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn').
280
-      '</div>';
280
+        '</div>';
281 281
     echo $OUTPUT->box_end();
282 282
 
283 283
     groups_print_activity_menu(
284
-      $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups);
284
+        $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups);
285 285
     echo '<br><br>';
286 286
 }
287 287
 
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
     // JavaScript variables for recordings.
388 388
     $jsvars += array(
389 389
             'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1',
390
-          );
390
+            );
391 391
 
392 392
     // If there are meetings with recordings load the data to the table.
393 393
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     $jsvars += array(
400 400
             'columns' => bigbluebuttonbn_get_recording_columns($bbbsession),
401 401
             'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings),
402
-          );
402
+            );
403 403
 
404 404
     // Render a YUI table.
405 405
     return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table'));
@@ -410,10 +410,10 @@  discard block
 block discarded – undo
410 410
 
411 411
     $button = html_writer::tag('input', '',
412 412
         array('type' => 'button',
413
-              'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
414
-              'class' => 'btn btn-secondary',
415
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
416
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
413
+                'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
414
+                'class' => 'btn btn-secondary',
415
+                'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
416
+                    $bbbsession['bigbluebuttonbn']->id.'\''));
417 417
     $output = html_writer::start_tag('br');
418 418
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
419 419
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
         return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
432 432
                 ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''.
433 433
                 ''.$OUTPUT->action_link($bbbsession['presentation']['url'],
434
-                      $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
434
+                        $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
435 435
     }
436 436
 
437 437
     return '';
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 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
 $b = optional_param('n', 0, PARAM_INT);
@@ -59,18 +59,18 @@  discard block
 block discarded – undo
59 59
 if (is_null($serverversion)) {
60 60
     if ($bbbsession['administrator']) {
61 61
         print_error('view_error_unable_join', 'bigbluebuttonbn',
62
-            $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
62
+            $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
63 63
         exit;
64 64
     }
65 65
 
66 66
     if ($bbbsession['moderator']) {
67 67
         print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
68
-            $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
68
+            $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
69 69
         exit;
70 70
     }
71 71
 
72 72
     print_error('view_error_unable_join_student', 'bigbluebuttonbn',
73
-        $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
73
+        $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
74 74
     exit;
75 75
 }
76 76
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 // Print the page header.
82 82
 $PAGE->set_context($context);
83
-$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
83
+$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
84 84
 $PAGE->set_title(format_string($bigbluebuttonbn->name));
85 85
 $PAGE->set_cacheable(false);
86 86
 $PAGE->set_heading($course->fullname);
@@ -90,26 +90,26 @@  discard block
 block discarded – undo
90 90
 if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) {
91 91
     echo $OUTPUT->header();
92 92
     if (isguestuser()) {
93
-        echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
94
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
93
+        echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
94
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
95 95
     } else {
96
-        echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
97
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
96
+        echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
97
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
98 98
     }
99 99
     echo $OUTPUT->footer();
100 100
     exit;
101 101
 }
102 102
 
103 103
 // Operation URLs.
104
-$bbbsession['courseURL'] = $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course;
105
-$bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id.
106
-    '&bn='.$bbbsession['bigbluebuttonbn']->id;
107
-$bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_'.
108
-    'ready&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id;
109
-$bbbsession['meetingEventsURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=meeting'.
110
-    '_events&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id;
111
-$bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$id.
112
-    '&bn='.$bbbsession['bigbluebuttonbn']->id;
104
+$bbbsession['courseURL'] = $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course;
105
+$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id .
106
+    '&bn=' . $bbbsession['bigbluebuttonbn']->id;
107
+$bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
108
+    'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
109
+$bbbsession['meetingEventsURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=meeting' .
110
+    '_events&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
111
+$bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $id .
112
+    '&bn=' . $bbbsession['bigbluebuttonbn']->id;
113 113
 
114 114
 // Output starts.
115 115
 echo $OUTPUT->header();
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 echo $OUTPUT->footer();
123 123
 
124 124
 // Shows version as a comment.
125
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
125
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
126 126
 
127 127
 // Initialize session variable used across views.
128 128
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     $bbbsession['viewerPW'] = $bigbluebuttonbn->viewerpass;
155 155
 
156 156
     // Database info related to the activity.
157
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
157
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
158 158
         $bbbsession['bigbluebuttonbn']->id;
159 159
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
160 160
     $bbbsession['meetingdescription'] = $bigbluebuttonbn->intro;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn');
176 176
     }
177 177
     if ($bigbluebuttonbn->record) {
178
-        $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
178
+        $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
179 179
     }
180 180
 
181 181
     $bbbsession['openingtime'] = $bigbluebuttonbn->openingtime;
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     $bbbsession['originServerName'] = $parsedurl['host'];
192 192
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
193 193
     $bbbsession['originServerCommonName'] = '';
194
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
194
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
195 195
 }
196 196
 
197 197
 function bigbluebuttonbn_view_bbbsession_roles($context, $userid) {
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
     $bbbsession['group'] = groups_get_activity_group($bbbsession['cm'], true);
251 251
 
252 252
     // Assign group default values.
253
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
254
-        $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']';
253
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
254
+        $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']';
255 255
     $groupname = get_string('allparticipants');
256
-    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')';
256
+    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')';
257 257
 
258 258
 
259 259
     if (sizeof($groups) == 0) {
@@ -265,10 +265,10 @@  discard block
 block discarded – undo
265 265
         $bbbsession['group'] = array_values($groups)[0]->id;
266 266
     }
267 267
 
268
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
269
-        $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']';
268
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
269
+        $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']';
270 270
     $groupname = groups_get_group_name($bbbsession['group']);
271
-    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')';
271
+    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')';
272 272
 
273 273
     if (sizeof($groups) == 1) {
274 274
         // There only one group and the user has access to.
@@ -276,12 +276,12 @@  discard block
 block discarded – undo
276 276
     }
277 277
 
278 278
     echo $OUTPUT->box_start('generalbox boxaligncenter');
279
-    echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn').
279
+    echo '<br><div class="alert alert-warning">' . get_string('view_groups_selection_warning', 'bigbluebuttonbn') .
280 280
       '</div>';
281 281
     echo $OUTPUT->box_end();
282 282
 
283 283
     groups_print_activity_menu(
284
-      $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups);
284
+      $bbbsession['cm'], $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id, false, $onlyexistentgroups);
285 285
     echo '<br><br>';
286 286
 }
287 287
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
             'M.mod_bigbluebuttonbn.recordings.init', array($jsvars));
324 324
     }
325 325
 
326
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
326
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
327 327
 
328 328
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
329 329
 }
@@ -334,12 +334,12 @@  discard block
 block discarded – undo
334 334
     // JavaScript variables for room.
335 335
     $openingtime = '';
336 336
     if ($bbbsession['openingtime']) {
337
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
337
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
338 338
             userdate($bbbsession['openingtime']);
339 339
     }
340 340
     $closingtime = '';
341 341
     if ($bbbsession['closingtime']) {
342
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
342
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
343 343
             userdate($bbbsession['closingtime']);
344 344
     }
345 345
     $jsvars += array(
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     $output .= $OUTPUT->box_end();
357 357
 
358 358
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
359
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
359
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
360 360
     $output .= $OUTPUT->box_end();
361 361
 
362 362
     if ($activity == 'ended') {
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
     // If there are meetings with recordings load the data to the table.
393 393
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
394 394
         // Render a plain html table.
395
-        return bigbluebutton_output_recording_table($bbbsession, $recordings)."\n";
395
+        return bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n";
396 396
     }
397 397
 
398 398
     // JavaScript variables for recordings with YUI.
@@ -412,8 +412,8 @@  discard block
 block discarded – undo
412 412
         array('type' => 'button',
413 413
               'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
414 414
               'class' => 'btn btn-secondary',
415
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
416
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
415
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
416
+                  $bbbsession['bigbluebuttonbn']->id . '\''));
417 417
     $output = html_writer::start_tag('br');
418 418
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
419 419
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -428,10 +428,10 @@  discard block
 block discarded – undo
428 428
         $attributes = array('title' => $bbbsession['presentation']['name']);
429 429
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
430 430
 
431
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
432
-                ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''.
433
-                ''.$OUTPUT->action_link($bbbsession['presentation']['url'],
434
-                      $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
431
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
432
+                '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' .
433
+                '' . $OUTPUT->action_link($bbbsession['presentation']['url'],
434
+                      $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
435 435
     }
436 436
 
437 437
     return '';
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_viewed.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function get_description() {
55 55
         $rid = isset($this->other) ? $this->other : 'unknown';
56
-        $a = (object) array('userid' => $this->userid,
56
+        $a = (object)array('userid' => $this->userid,
57 57
                             'recordingid' => $rid,
58 58
                             'courseid' => $this->contextinstanceid);
59 59
 
60
-        return "The user with id '$a->userid' has viewed a recording with id ".
60
+        return "The user with id '$a->userid' has viewed a recording with id " .
61 61
         "'$a->recordingid' from the course id '$a->courseid'.";
62 62
     }
63 63
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function get_legacy_logdata() {
70 70
         return array($this->courseid, 'bigbluebuttonbn', 'recording viewed',
71
-                'view.php?pageid='.$this->objectid, 'Recording viewed',
71
+                'view.php?pageid=' . $this->objectid, 'Recording viewed',
72 72
                 $this->contextinstanceid);
73 73
     }
74 74
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_published.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function get_description() {
55 55
         $rid = isset($this->other) ? $this->other : 'unknown';
56
-        $a = (object) array('userid' => $this->userid,
56
+        $a = (object)array('userid' => $this->userid,
57 57
                             'recordingid' => $rid,
58 58
                             'courseid' => $this->contextinstanceid);
59 59
 
60
-        return "The user with id '$a->userid' has published a recording with id ".
60
+        return "The user with id '$a->userid' has published a recording with id " .
61 61
         "'$a->recordingid' in the course id '$a->courseid'.";
62 62
     }
63 63
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function get_legacy_logdata() {
70 70
         return array($this->courseid, 'bigbluebuttonbn', 'recording published',
71
-                'view.php?pageid='.$this->objectid, 'Recording published',
71
+                'view.php?pageid=' . $this->objectid, 'Recording published',
72 72
                 $this->contextinstanceid);
73 73
     }
74 74
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_unpublished.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function get_description() {
55 55
         $rid = isset($this->other) ? $this->other : 'unknown';
56
-        $a = (object) array('userid' => $this->userid,
56
+        $a = (object)array('userid' => $this->userid,
57 57
                             'recordingid' => $rid,
58 58
                             'courseid' => $this->contextinstanceid);
59 59
 
60
-        return "The user with id '$a->userid' has unpublished a recording with id ".
60
+        return "The user with id '$a->userid' has unpublished a recording with id " .
61 61
         "'$a->recordingid' in the course id '$a->courseid'.";
62 62
     }
63 63
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function get_legacy_logdata() {
70 70
         return array($this->courseid, 'bigbluebuttonbn', 'recording unpublished',
71
-                'view.php?pageid='.$this->objectid, 'Recording unpublished',
71
+                'view.php?pageid=' . $this->objectid, 'Recording unpublished',
72 72
                 $this->contextinstanceid);
73 73
     }
74 74
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_deleted.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function get_description() {
55 55
         $rid = isset($this->other) ? $this->other : 'unknown';
56
-        $a = (object) array('userid' => $this->userid,
56
+        $a = (object)array('userid' => $this->userid,
57 57
                             'recordingid' => $rid,
58 58
                             'courseid' => $this->contextinstanceid);
59 59
 
60
-        return "The user with id '$a->userid' has deleted a recording with id ".
60
+        return "The user with id '$a->userid' has deleted a recording with id " .
61 61
         "'$a->recordingid' from the course id '$a->courseid'.";
62 62
     }
63 63
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function get_legacy_logdata() {
70 70
         return array($this->courseid, 'bigbluebuttonbn', 'recording deleted',
71
-                'view.php?pageid='.$this->objectid, 'Recording deleted',
71
+                'view.php?pageid=' . $this->objectid, 'Recording deleted',
72 72
                 $this->contextinstanceid);
73 73
     }
74 74
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_edited.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function get_description() {
55 55
         $rid = isset($this->other) ? $this->other : 'unknown';
56
-        $a = (object) array('userid' => $this->userid,
56
+        $a = (object)array('userid' => $this->userid,
57 57
                             'recordingid' => $rid,
58 58
                             'courseid' => $this->contextinstanceid);
59 59
 
60
-        return "The user with id '$a->userid' has edited a recording with id ".
60
+        return "The user with id '$a->userid' has edited a recording with id " .
61 61
         "'$a->recordingid' in the course id '$a->courseid'.";
62 62
     }
63 63
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function get_legacy_logdata() {
70 70
         return array($this->courseid, 'bigbluebuttonbn', 'recording edited',
71
-                'view.php?pageid='.$this->objectid, 'Recording edited',
71
+                'view.php?pageid=' . $this->objectid, 'Recording edited',
72 72
                 $this->contextinstanceid);
73 73
     }
74 74
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_imported.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function get_description() {
55 55
         $rid = isset($this->other) ? $this->other : 'unknown';
56
-        $a = (object) array('userid' => $this->userid,
56
+        $a = (object)array('userid' => $this->userid,
57 57
                             'recordingid' => $rid,
58 58
                             'courseid' => $this->contextinstanceid);
59 59
 
60
-        return "The user with id '$a->userid' has imported a recording with id ".
60
+        return "The user with id '$a->userid' has imported a recording with id " .
61 61
         "'$a->recordingid' into the course id '$a->courseid'.";
62 62
     }
63 63
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function get_legacy_logdata() {
70 70
         return array($this->courseid, 'bigbluebuttonbn', 'recording imported',
71
-                'view.php?pageid='.$this->objectid, 'Recording imported',
71
+                'view.php?pageid=' . $this->objectid, 'Recording imported',
72 72
                 $this->contextinstanceid);
73 73
     }
74 74
 
Please login to merge, or discard this patch.
locallib.php 2 patches
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 // BigBlueButton API Calls.
86 86
 function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) {
87 87
     $data = ['meetingID' => $meetingid,
88
-              'fullName' => $username,
89
-              'password' => $pw,
90
-              'logoutURL' => $logouturl,
88
+                'fullName' => $username,
89
+                'password' => $pw,
90
+                'logoutURL' => $logouturl,
91 91
             ];
92 92
 
93 93
     if (!is_null($configtoken)) {
@@ -202,24 +202,24 @@  discard block
 block discarded – undo
202 202
 function bigbluebuttonbn_get_meeting_info_array($meetingid) {
203 203
     $xml = bigbluebuttonbn_wrap_xml_load_file(
204 204
         bigbluebuttonbn_bigbluebutton_action_url('getMeetingInfo', ['meetingID' => $meetingid])
205
-      );
205
+        );
206 206
 
207 207
     if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) {
208 208
         // Meeting info was returned.
209 209
         return array('returncode' => $xml->returncode,
210
-                     'meetingID' => $xml->meetingID,
211
-                     'moderatorPW' => $xml->moderatorPW,
212
-                     'attendeePW' => $xml->attendeePW,
213
-                     'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
214
-                     'running' => $xml->running,
215
-                     'recording' => $xml->recording,
216
-                     'startTime' => $xml->startTime,
217
-                     'endTime' => $xml->endTime,
218
-                     'participantCount' => $xml->participantCount,
219
-                     'moderatorCount' => $xml->moderatorCount,
220
-                     'attendees' => $xml->attendees,
221
-                     'metadata' => $xml->metadata,
222
-                   );
210
+                        'meetingID' => $xml->meetingID,
211
+                        'moderatorPW' => $xml->moderatorPW,
212
+                        'attendeePW' => $xml->attendeePW,
213
+                        'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
214
+                        'running' => $xml->running,
215
+                        'recording' => $xml->recording,
216
+                        'startTime' => $xml->startTime,
217
+                        'endTime' => $xml->endTime,
218
+                        'participantCount' => $xml->participantCount,
219
+                        'moderatorCount' => $xml->moderatorCount,
220
+                        'attendees' => $xml->attendees,
221
+                        'metadata' => $xml->metadata,
222
+                    );
223 223
     }
224 224
 
225 225
     if ($xml) {
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         // Do getRecordings is executed using a method GET (supported by all versions of BBB).
286 286
         $xml = bigbluebuttonbn_wrap_xml_load_file(
287 287
             bigbluebuttonbn_bigbluebutton_action_url('getRecordings', ['meetingID' => implode(',', $mids)])
288
-          );
288
+            );
289 289
         if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
290 290
             // If there were meetings already created.
291 291
             foreach ($xml->recordings->recording as $recording) {
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 function bigbluebuttonbn_get_default_config_xml() {
347 347
     $xml = bigbluebuttonbn_wrap_xml_load_file(
348 348
         bigbluebuttonbn_bigbluebutton_action_url('getDefaultConfigXML')
349
-      );
349
+        );
350 350
 
351 351
     return $xml;
352 352
 }
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
     foreach ($ids as $id) {
415 415
         $xml = bigbluebuttonbn_wrap_xml_load_file(
416 416
             bigbluebuttonbn_bigbluebutton_action_url('deleteRecordings', ['recordID' => $id])
417
-          );
417
+            );
418 418
         if ($xml && $xml->returncode != 'SUCCESS') {
419 419
             return false;
420 420
         }
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
     foreach ($ids as $id) {
433 433
         $xml = bigbluebuttonbn_wrap_xml_load_file(
434 434
             bigbluebuttonbn_bigbluebutton_action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
435
-          );
435
+            );
436 436
         if ($xml && $xml->returncode != 'SUCCESS') {
437 437
             return false;
438 438
         }
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
     foreach ($ids as $id) {
451 451
         $xml = bigbluebuttonbn_wrap_xml_load_file(
452 452
             bigbluebuttonbn_bigbluebutton_action_url('updateRecordings', ['recordID' => $id] + (array) $params)
453
-          );
453
+            );
454 454
         if ($xml && $xml->returncode != 'SUCCESS') {
455 455
             return false;
456 456
         }
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
510 510
     $xml = bigbluebuttonbn_wrap_xml_load_file(
511 511
         bigbluebuttonbn_bigbluebutton_action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
512
-      );
512
+        );
513 513
 
514 514
     if ($xml) {
515 515
         // If the xml packet returned failure it displays the message to the user.
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 function bigbluebuttonbn_is_meeting_running($meetingid) {
527 527
     $xml = bigbluebuttonbn_wrap_xml_load_file(
528 528
         bigbluebuttonbn_bigbluebutton_action_url('isMeetingRunning', ['meetingID' => $meetingid])
529
-      );
529
+        );
530 530
 
531 531
     if ($xml && $xml->returncode == 'SUCCESS') {
532 532
         return ($xml->running == 'true');
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 function bigbluebuttonbn_get_server_version() {
539 539
     $xml = bigbluebuttonbn_wrap_xml_load_file(
540 540
         bigbluebuttonbn_bigbluebutton_action_url()
541
-      );
541
+        );
542 542
 
543 543
     if ($xml && $xml->returncode == 'SUCCESS') {
544 544
         return $xml->version;
@@ -604,10 +604,10 @@  discard block
 block discarded – undo
604 604
 
605 605
         $options = array();
606 606
         $options['CURLOPT_HTTPHEADER'] = array(
607
-                 'Content-Type: '.$contenttype,
608
-                 'Content-Length: '.strlen($data),
609
-                 'Content-Language: en-US',
610
-               );
607
+                    'Content-Type: '.$contenttype,
608
+                    'Content-Length: '.strlen($data),
609
+                    'Content-Language: en-US',
610
+                );
611 611
 
612 612
         return $c->post($url, $data, $options);
613 613
     }
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
         $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
667 667
     }
668 668
     return $roles;
669
- }
669
+    }
670 670
 
671 671
 function bigbluebuttonbn_get_role($id) {
672 672
     $roles = (array) role_get_names();
@@ -686,18 +686,18 @@  discard block
 block discarded – undo
686 686
         'all' => array(
687 687
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
688 688
             'children' => []
689
-          )
690
-      );
689
+            )
690
+        );
691 691
 
692 692
     $data['role'] = array(
693 693
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
694 694
         'children' => bigbluebuttonbn_get_roles_select($context)
695
-      );
695
+        );
696 696
 
697 697
     $data['user'] = array(
698 698
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
699 699
         'children' => bigbluebuttonbn_get_users_select($context)
700
-      );
700
+        );
701 701
 
702 702
     return $data;
703 703
 }
@@ -744,9 +744,9 @@  discard block
 block discarded – undo
744 744
         }
745 745
 
746 746
         $participantlistarray[] = array(
747
-              'selectiontype' => 'role',
748
-              'selectionid' => $moderatordefault,
749
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
747
+                'selectiontype' => 'role',
748
+                'selectionid' => $moderatordefault,
749
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
750 750
     }
751 751
 
752 752
     return $participantlistarray;
@@ -758,11 +758,11 @@  discard block
 block discarded – undo
758 758
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
759 759
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
760 760
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
761
-          ],
761
+            ],
762 762
         'type_selected' => 'all',
763 763
         'options' => ['all' => '---------------'],
764 764
         'selected' => 'all',
765
-      ];
765
+        ];
766 766
 }
767 767
 
768 768
 function bigbluebuttonbn_is_moderator($context, $participants, $userid = null, $userroles = null) {
@@ -893,8 +893,8 @@  discard block
 block discarded – undo
893 893
     }
894 894
 
895 895
     $parray = array('url' => $purl, 'name' => $pname,
896
-                               'icon' => $picon,
897
-                               'mimetype_description' => $pmimetypedescrip);
896
+                                'icon' => $picon,
897
+                                'mimetype_description' => $pmimetypedescrip);
898 898
 
899 899
     return $parray;
900 900
 }
@@ -982,7 +982,7 @@  discard block
 block discarded – undo
982 982
     }
983 983
 
984 984
     $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create',
985
-      array($eventproperties));
985
+        array($eventproperties));
986 986
     $event->trigger();
987 987
 }
988 988
 
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
     // Ping again and refresh the cache.
1031 1031
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1032 1032
         bigbluebuttonbn_bigbluebutton_action_url('getMeetingInfo', ['meetingID' => $meetingid])
1033
-      );
1033
+        );
1034 1034
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
1035 1035
 
1036 1036
     return $meetinginfo;
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
         $actionbar .= bigbluebuttonbn_actionbar_render_button(
1169 1169
             $recording,
1170 1170
             bigbluebuttonbn_get_recording_data_row_actionbar_payload($recording, $tool)
1171
-          );
1171
+            );
1172 1172
     }
1173 1173
 
1174 1174
     $head = html_writer::start_tag('div', array(
@@ -1254,8 +1254,8 @@  discard block
 block discarded – undo
1254 1254
 
1255 1255
     $id = 'playbacks-'.$recording['recordID'];
1256 1256
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1257
-          'data-recordingid' => $recording['recordID'], 'data-meetingid' => $recording['meetingID'],
1258
-          'title' => $title, $visibility => $visibility));
1257
+            'data-recordingid' => $recording['recordID'], 'data-meetingid' => $recording['meetingID'],
1258
+            'title' => $title, $visibility => $visibility));
1259 1259
     foreach ($recording['playbacks'] as $playback) {
1260 1260
         $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_play(this);';
1261 1261
         $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn='.$bigbluebuttonbnid.
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
         $payload['source'] = 'meta_contextactivitydescription';
1304 1304
         $metadescription = trim($recording[$payload['source']]);
1305 1305
         if (!empty($metadescription)) {
1306
-          return bigbluebuttonbn_get_recording_data_row_text($recording, $metadescription, $payload);
1306
+            return bigbluebuttonbn_get_recording_data_row_text($recording, $metadescription, $payload);
1307 1307
         }
1308 1308
     }
1309 1309
 
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
             'onclick' => $onclick,
1359 1359
             'data-action' => $data['action'],
1360 1360
             'data-links' => bigbluebuttonbn_get_count_recording_imported_instances($recording['recordID'])
1361
-          );
1361
+            );
1362 1362
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1363 1363
     }
1364 1364
 
@@ -1959,23 +1959,23 @@  discard block
 block discarded – undo
1959 1959
  */
1960 1960
 function bigbluebuttonbn_get_cfg_options() {
1961 1961
     return [
1962
-          'version_major' => bigbluebuttonbn_get_moodle_version_major(),
1963
-          'voicebridge_editable' => bigbluebuttonbn_get_cfg_voicebridge_editable(),
1964
-          'recording_default' => bigbluebuttonbn_get_cfg_recording_default(),
1965
-          'recording_editable' => bigbluebuttonbn_get_cfg_recording_editable(),
1966
-          'waitformoderator_default' => bigbluebuttonbn_get_cfg_waitformoderator_default(),
1967
-          'waitformoderator_editable' => bigbluebuttonbn_get_cfg_waitformoderator_editable(),
1968
-          'userlimit_default' => bigbluebuttonbn_get_cfg_userlimit_default(),
1969
-          'userlimit_editable' => bigbluebuttonbn_get_cfg_userlimit_editable(),
1970
-          'preuploadpresentation_enabled' => bigbluebuttonbn_get_cfg_preuploadpresentation_enabled(),
1971
-          'sendnotifications_enabled' => bigbluebuttonbn_get_cfg_sendnotifications_enabled(),
1972
-          'recordings_html_default' => bigbluebuttonbn_get_cfg_recordings_html_default(),
1973
-          'recordings_html_editable' => bigbluebuttonbn_get_cfg_recordings_html_editable(),
1974
-          'recordings_deleted_activities_default' => bigbluebuttonbn_get_cfg_recordings_deleted_activities_default(),
1975
-          'recordings_deleted_activities_editable' => bigbluebuttonbn_get_cfg_recordings_deleted_activities_editable(),
1976
-          'recording_icons_enabled' => bigbluebuttonbn_get_cfg_recording_icons_enabled(),
1977
-          'instance_type_enabled' => bigbluebuttonbn_recordings_enabled(),
1978
-          'instance_type_default' => BIGBLUEBUTTONBN_TYPE_ALL,
1962
+            'version_major' => bigbluebuttonbn_get_moodle_version_major(),
1963
+            'voicebridge_editable' => bigbluebuttonbn_get_cfg_voicebridge_editable(),
1964
+            'recording_default' => bigbluebuttonbn_get_cfg_recording_default(),
1965
+            'recording_editable' => bigbluebuttonbn_get_cfg_recording_editable(),
1966
+            'waitformoderator_default' => bigbluebuttonbn_get_cfg_waitformoderator_default(),
1967
+            'waitformoderator_editable' => bigbluebuttonbn_get_cfg_waitformoderator_editable(),
1968
+            'userlimit_default' => bigbluebuttonbn_get_cfg_userlimit_default(),
1969
+            'userlimit_editable' => bigbluebuttonbn_get_cfg_userlimit_editable(),
1970
+            'preuploadpresentation_enabled' => bigbluebuttonbn_get_cfg_preuploadpresentation_enabled(),
1971
+            'sendnotifications_enabled' => bigbluebuttonbn_get_cfg_sendnotifications_enabled(),
1972
+            'recordings_html_default' => bigbluebuttonbn_get_cfg_recordings_html_default(),
1973
+            'recordings_html_editable' => bigbluebuttonbn_get_cfg_recordings_html_editable(),
1974
+            'recordings_deleted_activities_default' => bigbluebuttonbn_get_cfg_recordings_deleted_activities_default(),
1975
+            'recordings_deleted_activities_editable' => bigbluebuttonbn_get_cfg_recordings_deleted_activities_editable(),
1976
+            'recording_icons_enabled' => bigbluebuttonbn_get_cfg_recording_icons_enabled(),
1977
+            'instance_type_enabled' => bigbluebuttonbn_recordings_enabled(),
1978
+            'instance_type_default' => BIGBLUEBUTTONBN_TYPE_ALL,
1979 1979
         ];
1980 1980
 }
1981 1981
 
@@ -2176,8 +2176,8 @@  discard block
 block discarded – undo
2176 2176
     $activitytime = '';
2177 2177
     if ($time) {
2178 2178
         $activitytime = calendar_day_representation($time).' '.
2179
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2180
-          calendar_time_representation($time);
2179
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2180
+            calendar_time_representation($time);
2181 2181
     }
2182 2182
 
2183 2183
     return $activitytime;
Please login to merge, or discard this patch.
Spacing   +101 added lines, -101 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);
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
  * @param array  $metadata
115 115
  */
116 116
 function bigbluebuttonbn_bigbluebutton_action_url($action = '', $data = array(), $metadata = array()) {
117
-    $baseurl = bigbluebuttonbn_get_cfg_server_url().'api/'.$action.'?';
117
+    $baseurl = bigbluebuttonbn_get_cfg_server_url() . 'api/' . $action . '?';
118 118
     $params = '';
119 119
 
120 120
     foreach ($data as $key => $value) {
121
-        $params .= '&'.$key.'='.urlencode($value);
121
+        $params .= '&' . $key . '=' . urlencode($value);
122 122
     }
123 123
 
124 124
     foreach ($metadata as $key => $value) {
125
-        $params .= '&'.'meta_'.$key.'='.urlencode($value);
125
+        $params .= '&' . 'meta_' . $key . '=' . urlencode($value);
126 126
     }
127 127
 
128
-    return $baseurl.$params.'&checksum='.sha1($action.$params.bigbluebuttonbn_get_cfg_shared_secret());
128
+    return $baseurl . $params . '&checksum=' . sha1($action . $params . bigbluebuttonbn_get_cfg_shared_secret());
129 129
 }
130 130
 
131 131
 function bigbluebuttonbn_get_create_meeting_array($data, $metadata = array(), $pname = null, $purl = null) {
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 
136 136
     if (!is_null($pname) && !is_null($purl)) {
137 137
         $method = BIGBLUEBUTTONBN_METHOD_POST;
138
-        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
139
-            $purl."' /></module></modules>";
138
+        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
139
+            $purl . "' /></module></modules>";
140 140
     }
141 141
 
142 142
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data);
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                                 'moderatorPW' => $meeting->moderatorPW,
182 182
                                 'attendeePW' => $meeting->attendeePW,
183 183
                                 'hasBeenForciblyEnded' => $meeting->hasBeenForciblyEnded,
184
-                                'running' => $meeting->running, );
184
+                                'running' => $meeting->running,);
185 185
         }
186 186
 
187 187
         return $meetings;
@@ -324,12 +324,12 @@  discard block
 block discarded – undo
324 324
 function bigbluebuttonbn_get_recordings_imported_array($courseid, $bigbluebuttonbnid = null, $subset = true) {
325 325
     global $DB;
326 326
 
327
-    $select = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '".
328
-        BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
327
+    $select = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '" .
328
+        BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
329 329
     if ($bigbluebuttonbnid === null) {
330
-        $select = "courseid = '{$courseid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
330
+        $select = "courseid = '{$courseid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
331 331
     } else if ($subset) {
332
-        $select = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
332
+        $select = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
333 333
     }
334 334
     $recordsimported = $DB->get_records_select('bigbluebuttonbn_logs', $select);
335 335
 
@@ -354,35 +354,35 @@  discard block
 block discarded – undo
354 354
 function bigbluebuttonbn_get_default_config_xml_array() {
355 355
     $defaultconfigxml = bigbluebuttonbn_getDefaultConfigXML();
356 356
 
357
-    return (array) $defaultconfigxml;
357
+    return (array)$defaultconfigxml;
358 358
 }
359 359
 
360 360
 function bigbluebuttonbn_get_recording_array_value($recording) {
361 361
     // Add formats.
362 362
     $playbackarray = array();
363 363
     foreach ($recording->playback->format as $format) {
364
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
365
-            'url' => (string) $format->url, 'length' => (string) $format->length);
364
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
365
+            'url' => (string)$format->url, 'length' => (string)$format->length);
366 366
         // Add preview per format when existing.
367 367
         if ($format->preview) {
368 368
             $imagesarray = array();
369 369
             foreach ($format->preview->images->image as $image) {
370
-                $imagearray = array('url' => (string) $image);
370
+                $imagearray = array('url' => (string)$image);
371 371
                 foreach ($image->attributes() as $attkey => $attvalue) {
372
-                    $imagearray[$attkey] = (string) $attvalue;
372
+                    $imagearray[$attkey] = (string)$attvalue;
373 373
                 }
374 374
                 array_push($imagesarray, $imagearray);
375 375
             }
376
-            $playbackarray[(string) $format->type]['preview'] = $imagesarray;
376
+            $playbackarray[(string)$format->type]['preview'] = $imagesarray;
377 377
         }
378 378
     }
379 379
 
380 380
     // Add the metadata to the recordings array.
381 381
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
382
-    return array('recordID' => (string) $recording->recordID,
383
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
384
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
385
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray) + $metadataarray;
382
+    return array('recordID' => (string)$recording->recordID,
383
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
384
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
385
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray) + $metadataarray;
386 386
 }
387 387
 
388 388
 function bigbluebuttonbn_get_recording_array_meta($metadata) {
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
         if (is_object($value)) {
392 392
             $value = '';
393 393
         }
394
-        $metadataarray['meta_'.$key] = $value;
394
+        $metadataarray['meta_' . $key] = $value;
395 395
     }
396 396
     return $metadataarray;
397 397
 }
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
     $ids = explode(',', $recordids);
450 450
     foreach ($ids as $id) {
451 451
         $xml = bigbluebuttonbn_wrap_xml_load_file(
452
-            bigbluebuttonbn_bigbluebutton_action_url('updateRecordings', ['recordID' => $id] + (array) $params)
452
+            bigbluebuttonbn_bigbluebutton_action_url('updateRecordings', ['recordID' => $id] + (array)$params)
453 453
           );
454 454
         if ($xml && $xml->returncode != 'SUCCESS') {
455 455
             return false;
@@ -604,8 +604,8 @@  discard block
 block discarded – undo
604 604
 
605 605
         $options = array();
606 606
         $options['CURLOPT_HTTPHEADER'] = array(
607
-                 'Content-Type: '.$contenttype,
608
-                 'Content-Length: '.strlen($data),
607
+                 'Content-Type: ' . $contenttype,
608
+                 'Content-Length: ' . strlen($data),
609 609
                  'Content-Language: en-US',
610 610
                );
611 611
 
@@ -622,9 +622,9 @@  discard block
 block discarded – undo
622 622
     if ($userroles) {
623 623
         $where = '';
624 624
         foreach ($userroles as $value) {
625
-            $where .= (empty($where) ? ' WHERE' : ' AND').' id='.$value->roleid;
625
+            $where .= (empty($where) ? ' WHERE' : ' AND') . ' id=' . $value->roleid;
626 626
         }
627
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
627
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
628 628
     }
629 629
 
630 630
     return $userroles;
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 }
638 638
 
639 639
 function bigbluebuttonbn_get_users(context $context = null) {
640
-    $users = (array) get_enrolled_users($context);
640
+    $users = (array)get_enrolled_users($context);
641 641
     foreach ($users as $key => $value) {
642 642
         $users[$key] = fullname($value);
643 643
     }
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 }
646 646
 
647 647
 function bigbluebuttonbn_get_users_select(context $context = null) {
648
-    $users = (array) get_enrolled_users($context);
648
+    $users = (array)get_enrolled_users($context);
649 649
     foreach ($users as $key => $value) {
650 650
         $users[$key] = array('id' => $value->id, 'name' => fullname($value));
651 651
     }
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 }
654 654
 
655 655
 function bigbluebuttonbn_get_roles(context $context = null) {
656
-    $roles = (array) role_get_names($context);
656
+    $roles = (array)role_get_names($context);
657 657
     foreach ($roles as $key => $value) {
658 658
         $roles[$key] = $value->localname;
659 659
     }
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 }
662 662
 
663 663
 function bigbluebuttonbn_get_roles_select(context $context = null) {
664
-    $roles = (array) role_get_names($context);
664
+    $roles = (array)role_get_names($context);
665 665
     foreach ($roles as $key => $value) {
666 666
         $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
667 667
     }
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
  }
670 670
 
671 671
 function bigbluebuttonbn_get_role($id) {
672
-    $roles = (array) role_get_names();
672
+    $roles = (array)role_get_names();
673 673
     if (is_numeric($id)) {
674 674
         return $roles[$id];
675 675
     }
@@ -833,9 +833,9 @@  discard block
 block discarded – undo
833 833
     $isunique = true;
834 834
     if ($voicebridge != 0) {
835 835
         $table = 'bigbluebuttonbn';
836
-        $select = 'voicebridge = '.$voicebridge;
836
+        $select = 'voicebridge = ' . $voicebridge;
837 837
         if ($id) {
838
-            $select .= ' AND id <> '.$id;
838
+            $select .= ' AND id <> ' . $id;
839 839
         }
840 840
         if ($DB->get_records_select($table, $select)) {
841 841
             $isunique = false;
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
     $mt = microtime();
904 904
     $rand = mt_rand();
905 905
 
906
-    return md5($mt.$rand);
906
+    return md5($mt . $rand);
907 907
 }
908 908
 
909 909
 function bigbluebuttonbn_random_password($length = 8) {
@@ -923,41 +923,41 @@  discard block
 block discarded – undo
923 923
 
924 924
 function bigbluebuttonbn_events() {
925 925
     return array(
926
-        (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
927
-        (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
928
-        (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION,
929
-        (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED,
930
-        (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED,
931
-        (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED,
932
-        (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT,
933
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
934
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
935
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
936
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
937
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
938
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
939
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
940
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
926
+        (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
927
+        (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
928
+        (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION,
929
+        (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED,
930
+        (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED,
931
+        (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED,
932
+        (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT,
933
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
934
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
935
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
936
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
937
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
938
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
939
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
940
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
941 941
     );
942 942
 }
943 943
 
944 944
 function bigbluebuttonbn_events_action() {
945 945
     return array(
946
-        'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
947
-        'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
948
-        'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION,
949
-        'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED,
950
-        'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED,
951
-        'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED,
952
-        'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT,
953
-        'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
954
-        'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
955
-        'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
956
-        'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
957
-        'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
958
-        'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
959
-        'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
960
-        'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
946
+        'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
947
+        'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
948
+        'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION,
949
+        'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED,
950
+        'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED,
951
+        'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED,
952
+        'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT,
953
+        'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
954
+        'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
955
+        'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
956
+        'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
957
+        'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
958
+        'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
959
+        'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
960
+        'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
961 961
     );
962 962
 }
963 963
 
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
         $eventproperties['other'] = $options['other'];
982 982
     }
983 983
 
984
-    $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create',
984
+    $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create',
985 985
       array($eventproperties));
986 986
     $event->trigger();
987 987
 }
@@ -1024,11 +1024,11 @@  discard block
 block discarded – undo
1024 1024
     $now = time();
1025 1025
     if (!$forced && isset($result) && $now < ($result['creation_time'] + $cachettl)) {
1026 1026
         // Use the value in the cache.
1027
-        return (array) json_decode($result['meeting_info']);
1027
+        return (array)json_decode($result['meeting_info']);
1028 1028
     }
1029 1029
 
1030 1030
     // Ping again and refresh the cache.
1031
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1031
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1032 1032
         bigbluebuttonbn_bigbluebutton_action_url('getMeetingInfo', ['meetingID' => $meetingid])
1033 1033
       );
1034 1034
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1082,8 +1082,8 @@  discard block
 block discarded – undo
1082 1082
  * @param string $configxml
1083 1083
  */
1084 1084
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1085
-    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1086
-    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.bigbluebuttonbn_get_cfg_shared_secret());
1085
+    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1086
+    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . bigbluebuttonbn_get_cfg_shared_secret());
1087 1087
 
1088 1088
     return $configxmlparams;
1089 1089
 }
@@ -1093,7 +1093,7 @@  discard block
 block discarded – undo
1093 1093
  * @param string $configxml
1094 1094
  */
1095 1095
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1096
-    $urldefaultconfig = bigbluebuttonbn_get_cfg_server_url().'api/setConfigXML?';
1096
+    $urldefaultconfig = bigbluebuttonbn_get_cfg_server_url() . 'api/setConfigXML?';
1097 1097
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1098 1098
     $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, BIGBLUEBUTTONBN_METHOD_POST,
1099 1099
         $configxmlparams, 'application/x-www-form-urlencoded');
@@ -1107,7 +1107,7 @@  discard block
 block discarded – undo
1107 1107
  */
1108 1108
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1109 1109
     $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml);
1110
-    $configxmlarray = (array) $configxml;
1110
+    $configxmlarray = (array)$configxml;
1111 1111
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1112 1112
         //debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1113 1113
         return '';
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
         $starttime = $starttime - ($starttime % 1000);
1145 1145
 
1146 1146
         // Set formatted date.
1147
-        $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1147
+        $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1148 1148
         $row->date_formatted = userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1149 1149
 
1150 1150
         // Set formatted duration.
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
     }
1220 1220
 
1221 1221
     $recordingpreview = html_writer::start_tag('div',
1222
-        array('id' => 'preview-'.$recording['recordID'], $visibility => $visibility));
1222
+        array('id' => 'preview-' . $recording['recordID'], $visibility => $visibility));
1223 1223
     foreach ($recording['playbacks'] as $playback) {
1224 1224
         if (isset($playback['preview'])) {
1225 1225
             foreach ($playback['preview'] as $image) {
@@ -1252,20 +1252,20 @@  discard block
 block discarded – undo
1252 1252
         $visibility = 'hidden ';
1253 1253
     }
1254 1254
 
1255
-    $id = 'playbacks-'.$recording['recordID'];
1255
+    $id = 'playbacks-' . $recording['recordID'];
1256 1256
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1257 1257
           'data-recordingid' => $recording['recordID'], 'data-meetingid' => $recording['meetingID'],
1258 1258
           'title' => $title, $visibility => $visibility));
1259 1259
     foreach ($recording['playbacks'] as $playback) {
1260 1260
         $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_play(this);';
1261
-        $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn='.$bigbluebuttonbnid.
1262
-            '&href='.urlencode($playback['url']).'&rid='.$recording['recordID'];
1261
+        $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn=' . $bigbluebuttonbnid .
1262
+            '&href=' . urlencode($playback['url']) . '&rid=' . $recording['recordID'];
1263 1263
         //$href = $playback['url'];
1264
-        $linkattributes = array('title' => get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'),
1264
+        $linkattributes = array('title' => get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'),
1265 1265
             'class' => 'btn btn-sm btn-default', 'onclick' => $onclick,
1266 1266
             'data-action' => 'play', 'data-href' => $href);
1267
-        $recordingtypes .= $OUTPUT->action_link('#', get_string('view_recording_format_'.$playback['type'],
1268
-            'bigbluebuttonbn'), null, $linkattributes).'&#32;';
1267
+        $recordingtypes .= $OUTPUT->action_link('#', get_string('view_recording_format_' . $playback['type'],
1268
+            'bigbluebuttonbn'), null, $linkattributes) . '&#32;';
1269 1269
     }
1270 1270
     $recordingtypes .= html_writer::end_tag('div');
1271 1271
 
@@ -1346,11 +1346,11 @@  discard block
 block discarded – undo
1346 1346
         $target .= '-' . $data['target'];
1347 1347
     }
1348 1348
     $id = 'recording-' . $target . '-' . $recording['recordID'];
1349
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_'.$data['action'].'(this);';
1349
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_' . $data['action'] . '(this);';
1350 1350
     if (bigbluebuttonbn_get_cfg_recording_icons_enabled()) {
1351 1351
         // With icon for $manageaction.
1352 1352
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1353
-        $icon = new pix_icon('i/'.$data['tag'],
1353
+        $icon = new pix_icon('i/' . $data['tag'],
1354 1354
             get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1355 1355
             'moodle', $iconattributes);
1356 1356
         $linkattributes = array(
@@ -1441,7 +1441,7 @@  discard block
 block discarded – undo
1441 1441
         // There are recordings for this meeting.
1442 1442
         foreach ($recordings as $recording) {
1443 1443
             $row = new html_table_row();
1444
-            $row->id = 'recording-td-'.$recording['recordID'];
1444
+            $row->id = 'recording-td-' . $recording['recordID'];
1445 1445
             $row->attributes['data-imported'] = 'false';
1446 1446
             $texthead = '';
1447 1447
             $texttail = '';
@@ -1455,9 +1455,9 @@  discard block
 block discarded – undo
1455 1455
             $rowdata = bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools);
1456 1456
             if ($rowdata != null) {
1457 1457
                 $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1458
-                $row->cells = array($texthead.$rowdata->recording.$texttail,
1459
-                    $texthead.$rowdata->activity.$texttail, $texthead.$rowdata->description.$texttail,
1460
-                    $rowdata->preview, $texthead.$rowdata->date_formatted.$texttail,
1458
+                $row->cells = array($texthead . $rowdata->recording . $texttail,
1459
+                    $texthead . $rowdata->activity . $texttail, $texthead . $rowdata->description . $texttail,
1460
+                    $rowdata->preview, $texthead . $rowdata->date_formatted . $texttail,
1461 1461
                     $rowdata->duration_formatted);
1462 1462
                 if ($bbbsession['managerecordings']) {
1463 1463
                     $row->cells[] = $rowdata->actionbar;
@@ -1479,9 +1479,9 @@  discard block
 block discarded – undo
1479 1479
     // Build the message_body.
1480 1480
     $msg->activity_type = '';
1481 1481
     $msg->activity_title = $bigbluebuttonbn->name;
1482
-    $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').' '.
1483
-        $msg->activity_type.' &quot;'.$msg->activity_title.'&quot; '.
1484
-        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
1482
+    $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . ' ' .
1483
+        $msg->activity_type . ' &quot;' . $msg->activity_title . '&quot; ' .
1484
+        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>';
1485 1485
 
1486 1486
     bigbluebuttonbn_send_notification($sender, $bigbluebuttonbn, $messagetext);
1487 1487
 }
@@ -1507,15 +1507,15 @@  discard block
 block discarded – undo
1507 1507
     global $CFG;
1508 1508
 
1509 1509
     if (isset($CFG->bigbluebuttonbn['server_url'])) {
1510
-        return trim(trim($CFG->bigbluebuttonbn['server_url']), '/').'/';
1510
+        return trim(trim($CFG->bigbluebuttonbn['server_url']), '/') . '/';
1511 1511
     }
1512 1512
 
1513 1513
     if (isset($CFG->bigbluebuttonbn_server_url)) {
1514
-        return trim(trim($CFG->bigbluebuttonbn_server_url), '/').'/';
1514
+        return trim(trim($CFG->bigbluebuttonbn_server_url), '/') . '/';
1515 1515
     }
1516 1516
 
1517 1517
     if (isset($CFG->BigBlueButtonBNServerURL)) {
1518
-        return trim(trim($CFG->BigBlueButtonBNServerURL), '/').'/';
1518
+        return trim(trim($CFG->BigBlueButtonBNServerURL), '/') . '/';
1519 1519
     }
1520 1520
 
1521 1521
     return  BIGBLUEBUTTONBN_DEFAULT_SERVER_URL;
@@ -2053,15 +2053,15 @@  discard block
 block discarded – undo
2053 2053
 
2054 2054
     // Gather the bigbluebuttonbnids whose meetingids should be included in the getRecordings request'.
2055 2055
     $select = "id <> '{$bigbluebuttonbnid}' AND course = '{$courseid}'";
2056
-    $selectdeleted = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '".
2057
-        BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2056
+    $selectdeleted = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '" .
2057
+        BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2058 2058
     if ($bigbluebuttonbnid === null) {
2059 2059
         $select = "course = '{$courseid}'";
2060
-        $selectdeleted = "courseid = '{$courseid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE.
2060
+        $selectdeleted = "courseid = '{$courseid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE .
2061 2061
             "' AND meta like '%has_recordings%' AND meta like '%true%'";
2062 2062
     } else if ($subset) {
2063 2063
         $select = "id = '{$bigbluebuttonbnid}'";
2064
-        $selectdeleted = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE.
2064
+        $selectdeleted = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE .
2065 2065
             "' AND meta like '%has_recordings%' AND meta like '%true%'";
2066 2066
     }
2067 2067
     $bigbluebuttonbns = $DB->get_records_select_menu('bigbluebuttonbn', $select, null, 'id', 'id, meetingid');
@@ -2083,7 +2083,7 @@  discard block
 block discarded – undo
2083 2083
     if (!empty($bigbluebuttonbns)) {
2084 2084
         // Prepare select for loading records based on existent bigbluebuttonbns.
2085 2085
         $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
2086
-        $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
2086
+        $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
2087 2087
         // Include only Create events and exclude those with record not true.
2088 2088
         $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
2089 2089
         // Execute select for loading records based on existent bigbluebuttonbns.
@@ -2175,8 +2175,8 @@  discard block
 block discarded – undo
2175 2175
 function bigbluebuttonbn_format_activity_time($time) {
2176 2176
     $activitytime = '';
2177 2177
     if ($time) {
2178
-        $activitytime = calendar_day_representation($time).' '.
2179
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2178
+        $activitytime = calendar_day_representation($time) . ' ' .
2179
+          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
2180 2180
           calendar_time_representation($time);
2181 2181
     }
2182 2182
 
Please login to merge, or discard this patch.