Completed
Push — master ( 349780...c2fbdd )
by Jesus
02:08
created
locallib.php 3 patches
Doc Comments   +22 added lines patch added patch discarded remove patch
@@ -561,6 +561,12 @@  discard block
 block discarded – undo
561 561
     }
562 562
 }
563 563
 
564
+/**
565
+ * @param string $url
566
+ * @param string $data
567
+ *
568
+ * @return string
569
+ */
564 570
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = BIGBLUEBUTTONBN_METHOD_GET,
565 571
     $data = null, $contenttype = 'text/xml') {
566 572
     $c = new curl();
@@ -736,6 +742,9 @@  discard block
 block discarded – undo
736 742
       ];
737 743
 }
738 744
 
745
+/**
746
+ * @param string $participants
747
+ */
739 748
 function bigbluebuttonbn_is_moderator($context, $participants, $userid = null, $userroles = null) {
740 749
     global $USER;
741 750
     if (empty($participants)) {
@@ -1192,6 +1201,9 @@  discard block
 block discarded – undo
1192 1201
     return $recordingtypes;
1193 1202
 }
1194 1203
 
1204
+/**
1205
+ * @param boolean $editable
1206
+ */
1195 1207
 function bigbluebuttonbn_get_recording_data_row_meta_activity($recording, $editable) {
1196 1208
     $payload = array();
1197 1209
     if ($editable) {
@@ -1212,6 +1224,9 @@  discard block
 block discarded – undo
1212 1224
     return bigbluebuttonbn_get_recording_data_row_text($recording, $recording['meetingName'], $payload);
1213 1225
 }
1214 1226
 
1227
+/**
1228
+ * @param boolean $editable
1229
+ */
1215 1230
 function bigbluebuttonbn_get_recording_data_row_meta_description($recording, $editable) {
1216 1231
     $payload = array();
1217 1232
     if ($editable) {
@@ -1476,6 +1491,9 @@  discard block
 block discarded – undo
1476 1491
     return html_writer::div(html_writer::table($table), '', array('id' => 'bigbluebuttonbn_html_table'));
1477 1492
 }
1478 1493
 
1494
+/**
1495
+ * @param integer $len
1496
+ */
1479 1497
 function bigbluebuttonbn_html2text($html, $len) {
1480 1498
     $text = strip_tags($html);
1481 1499
     $text = str_replace(' ', ' ', $text);
@@ -1520,6 +1538,10 @@  discard block
 block discarded – undo
1520 1538
     return "id <> '{$bigbluebuttonbnid}' AND course = '{$courseid}'";
1521 1539
 }
1522 1540
 
1541
+/**
1542
+ * @param string $courseid
1543
+ * @param string $bigbluebuttonbnid
1544
+ */
1523 1545
 function bigbluebuttonbn_get_recordings_sql_selectdeleted($courseid, $bigbluebuttonbnid = null, $subset = true) {
1524 1546
     if ($bigbluebuttonbnid === null) {
1525 1547
         return "courseid = '{$courseid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE.
Please login to merge, or discard this patch.
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
  */
99 99
 function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) {
100 100
     $data = ['meetingID' => $meetingid,
101
-              'fullName' => $username,
102
-              'password' => $pw,
103
-              'logoutURL' => $logouturl,
101
+                'fullName' => $username,
102
+                'password' => $pw,
103
+                'logoutURL' => $logouturl,
104 104
             ];
105 105
 
106 106
     if (!is_null($configtoken)) {
@@ -201,24 +201,24 @@  discard block
 block discarded – undo
201 201
 function bigbluebuttonbn_get_meeting_info_array($meetingid) {
202 202
     $xml = bigbluebuttonbn_wrap_xml_load_file(
203 203
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
204
-      );
204
+        );
205 205
 
206 206
     if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) {
207 207
         // Meeting info was returned.
208 208
         return array('returncode' => $xml->returncode,
209
-                     'meetingID' => $xml->meetingID,
210
-                     'moderatorPW' => $xml->moderatorPW,
211
-                     'attendeePW' => $xml->attendeePW,
212
-                     'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
213
-                     'running' => $xml->running,
214
-                     'recording' => $xml->recording,
215
-                     'startTime' => $xml->startTime,
216
-                     'endTime' => $xml->endTime,
217
-                     'participantCount' => $xml->participantCount,
218
-                     'moderatorCount' => $xml->moderatorCount,
219
-                     'attendees' => $xml->attendees,
220
-                     'metadata' => $xml->metadata,
221
-                   );
209
+                        'meetingID' => $xml->meetingID,
210
+                        'moderatorPW' => $xml->moderatorPW,
211
+                        'attendeePW' => $xml->attendeePW,
212
+                        'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
213
+                        'running' => $xml->running,
214
+                        'recording' => $xml->recording,
215
+                        'startTime' => $xml->startTime,
216
+                        'endTime' => $xml->endTime,
217
+                        'participantCount' => $xml->participantCount,
218
+                        'moderatorCount' => $xml->moderatorCount,
219
+                        'attendees' => $xml->attendees,
220
+                        'metadata' => $xml->metadata,
221
+                    );
222 222
     }
223 223
 
224 224
     if ($xml) {
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         // Do getRecordings is executed using a method GET (supported by all versions of BBB).
283 283
         $xml = bigbluebuttonbn_wrap_xml_load_file(
284 284
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getRecordings', ['meetingID' => implode(',', $mids)])
285
-          );
285
+            );
286 286
         if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
287 287
             // If there were meetings already created.
288 288
             foreach ($xml->recordings->recording as $recording) {
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 function bigbluebuttonbn_get_default_config_xml() {
354 354
     $xml = bigbluebuttonbn_wrap_xml_load_file(
355 355
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML')
356
-      );
356
+        );
357 357
 
358 358
     return $xml;
359 359
 }
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     foreach ($ids as $id) {
431 431
         $xml = bigbluebuttonbn_wrap_xml_load_file(
432 432
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id])
433
-          );
433
+            );
434 434
         if ($xml && $xml->returncode != 'SUCCESS') {
435 435
             return false;
436 436
         }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     foreach ($ids as $id) {
449 449
         $xml = bigbluebuttonbn_wrap_xml_load_file(
450 450
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
451
-          );
451
+            );
452 452
         if ($xml && $xml->returncode != 'SUCCESS') {
453 453
             return false;
454 454
         }
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
     foreach ($ids as $id) {
467 467
         $xml = bigbluebuttonbn_wrap_xml_load_file(
468 468
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
469
-          );
469
+            );
470 470
         if ($xml && $xml->returncode != 'SUCCESS') {
471 471
             return false;
472 472
         }
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
483 483
     $xml = bigbluebuttonbn_wrap_xml_load_file(
484 484
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
485
-      );
485
+        );
486 486
 
487 487
     if ($xml) {
488 488
         // If the xml packet returned failure it displays the message to the user.
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 function bigbluebuttonbn_is_meeting_running($meetingid) {
500 500
     $xml = bigbluebuttonbn_wrap_xml_load_file(
501 501
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('isMeetingRunning', ['meetingID' => $meetingid])
502
-      );
502
+        );
503 503
 
504 504
     if ($xml && $xml->returncode == 'SUCCESS') {
505 505
         return ($xml->running == 'true');
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 function bigbluebuttonbn_get_server_version() {
512 512
     $xml = bigbluebuttonbn_wrap_xml_load_file(
513 513
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url()
514
-      );
514
+        );
515 515
 
516 516
     if ($xml && $xml->returncode == 'SUCCESS') {
517 517
         return $xml->version;
@@ -572,10 +572,10 @@  discard block
 block discarded – undo
572 572
 
573 573
         $options = array();
574 574
         $options['CURLOPT_HTTPHEADER'] = array(
575
-                 'Content-Type: '.$contenttype,
576
-                 'Content-Length: '.strlen($data),
577
-                 'Content-Language: en-US',
578
-               );
575
+                    'Content-Type: '.$contenttype,
576
+                    'Content-Length: '.strlen($data),
577
+                    'Content-Language: en-US',
578
+                );
579 579
 
580 580
         return $c->post($url, $data, $options);
581 581
     }
@@ -657,16 +657,16 @@  discard block
 block discarded – undo
657 657
         'all' => array(
658 658
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
659 659
             'children' => []
660
-          )
661
-      );
660
+            )
661
+        );
662 662
     $data['role'] = array(
663 663
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
664 664
         'children' => bigbluebuttonbn_get_roles_select($context)
665
-      );
665
+        );
666 666
     $data['user'] = array(
667 667
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
668 668
         'children' => bigbluebuttonbn_get_users_select($context)
669
-      );
669
+        );
670 670
     return $data;
671 671
 }
672 672
 
@@ -716,9 +716,9 @@  discard block
 block discarded – undo
716 716
             continue;
717 717
         }
718 718
         $participantlistarray[] = array(
719
-              'selectiontype' => 'role',
720
-              'selectionid' => $moderatordefault,
721
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
719
+                'selectiontype' => 'role',
720
+                'selectionid' => $moderatordefault,
721
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
722 722
     }
723 723
     return $participantlistarray;
724 724
 }
@@ -729,11 +729,11 @@  discard block
 block discarded – undo
729 729
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
730 730
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
731 731
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
732
-          ],
732
+            ],
733 733
         'type_selected' => 'all',
734 734
         'options' => ['all' => '---------------'],
735 735
         'selected' => 'all',
736
-      ];
736
+        ];
737 737
 }
738 738
 
739 739
 function bigbluebuttonbn_is_moderator($context, $participants, $userid = null, $userroles = null) {
@@ -855,8 +855,8 @@  discard block
 block discarded – undo
855 855
         }
856 856
     }
857 857
     $parray = array('url' => $purl, 'name' => $pname,
858
-                               'icon' => $picon,
859
-                               'mimetype_description' => $pmimetypedescrip);
858
+                                'icon' => $picon,
859
+                                'mimetype_description' => $pmimetypedescrip);
860 860
     return $parray;
861 861
 }
862 862
 
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
         $eventproperties['other'] = $options['other'];
931 931
     }
932 932
     $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create',
933
-      array($eventproperties));
933
+        array($eventproperties));
934 934
     $event->trigger();
935 935
 }
936 936
 
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
     // Ping again and refresh the cache.
976 976
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
977 977
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
978
-      );
978
+        );
979 979
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
980 980
     return $meetinginfo;
981 981
 }
@@ -1176,8 +1176,8 @@  discard block
 block discarded – undo
1176 1176
     }
1177 1177
     $id = 'playbacks-'.$recording['recordID'];
1178 1178
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1179
-          'data-recordingid' => $recording['recordID'], 'data-meetingid' => $recording['meetingID'],
1180
-          'title' => $title, $visibility => $visibility));
1179
+            'data-recordingid' => $recording['recordID'], 'data-meetingid' => $recording['meetingID'],
1180
+            'title' => $title, $visibility => $visibility));
1181 1181
     foreach ($recording['playbacks'] as $playback) {
1182 1182
         $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_play(this);';
1183 1183
         $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn='.$bigbluebuttonbnid.
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
             'onclick' => $onclick,
1286 1286
             'data-action' => $data['action'],
1287 1287
             'data-links' => bigbluebuttonbn_get_count_recording_imported_instances($recording['recordID'])
1288
-          );
1288
+            );
1289 1289
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1290 1290
     }
1291 1291
 
@@ -1402,7 +1402,7 @@  discard block
 block discarded – undo
1402 1402
         $texthead . $rowdata->activity . $texttail, $texthead . $rowdata->description . $texttail,
1403 1403
         $rowdata->preview, $texthead . $rowdata->date_formatted . $texttail,
1404 1404
         $rowdata->duration_formatted
1405
-      );
1405
+        );
1406 1406
     if ($bbbsession['managerecordings']) {
1407 1407
         $row->cells[] = $rowdata->actionbar;
1408 1408
     }
@@ -1664,8 +1664,8 @@  discard block
 block discarded – undo
1664 1664
     $activitytime = '';
1665 1665
     if ($time) {
1666 1666
         $activitytime = calendar_day_representation($time).' '.
1667
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
1668
-          calendar_time_representation($time);
1667
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
1668
+            calendar_time_representation($time);
1669 1669
     }
1670 1670
 
1671 1671
     return $activitytime;
Please login to merge, or discard this patch.
Spacing   +99 added lines, -99 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
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     if (isset($meta)) {
83 83
         $log->meta = $meta;
84 84
     } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) {
85
-        $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}';
85
+        $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}';
86 86
     }
87 87
 
88 88
     $DB->insert_record('bigbluebuttonbn_logs', $log);
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 
135 135
     if (!is_null($pname) && !is_null($purl)) {
136 136
         $method = BIGBLUEBUTTONBN_METHOD_POST;
137
-        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='" . $pname . "'><document url='".
138
-            $purl."' /></module></modules>";
137
+        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='" . $pname . "'><document url='" .
138
+            $purl . "' /></module></modules>";
139 139
     }
140 140
 
141 141
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                                 'moderatorPW' => $meeting->moderatorPW,
181 181
                                 'attendeePW' => $meeting->attendeePW,
182 182
                                 'hasBeenForciblyEnded' => $meeting->hasBeenForciblyEnded,
183
-                                'running' => $meeting->running, );
183
+                                'running' => $meeting->running,);
184 184
         }
185 185
 
186 186
         return $meetings;
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
         // Override imported flag with actual ID.
338 338
         $recording['imported'] = $recordimported->id;
339 339
         if (isset($recordimported->protected)) {
340
-            $recording['protected'] = (string) $recordimported->protected;
340
+            $recording['protected'] = (string)$recordimported->protected;
341 341
         }
342 342
         /////////////////////////////////////////
343 343
         // MOCKUP TO BE DELETED BEFORE RELEASE
@@ -361,37 +361,37 @@  discard block
 block discarded – undo
361 361
 function bigbluebuttonbn_get_default_config_xml_array() {
362 362
     $defaultconfigxml = bigbluebuttonbn_getDefaultConfigXML();
363 363
 
364
-    return (array) $defaultconfigxml;
364
+    return (array)$defaultconfigxml;
365 365
 }
366 366
 
367 367
 function bigbluebuttonbn_get_recording_array_value($recording) {
368 368
     // Add formats.
369 369
     $playbackarray = array();
370 370
     foreach ($recording->playback->format as $format) {
371
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
372
-            'url' => (string) $format->url, 'length' => (string) $format->length);
371
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
372
+            'url' => (string)$format->url, 'length' => (string)$format->length);
373 373
         // Add preview per format when existing.
374 374
         if ($format->preview) {
375 375
             $imagesarray = array();
376 376
             foreach ($format->preview->images->image as $image) {
377
-                $imagearray = array('url' => (string) $image);
377
+                $imagearray = array('url' => (string)$image);
378 378
                 foreach ($image->attributes() as $attkey => $attvalue) {
379
-                    $imagearray[$attkey] = (string) $attvalue;
379
+                    $imagearray[$attkey] = (string)$attvalue;
380 380
                 }
381 381
                 array_push($imagesarray, $imagearray);
382 382
             }
383
-            $playbackarray[(string) $format->type]['preview'] = $imagesarray;
383
+            $playbackarray[(string)$format->type]['preview'] = $imagesarray;
384 384
         }
385 385
     }
386 386
 
387 387
     // Add the metadata to the recordings array.
388 388
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
389
-    $recordingarray = array('recordID' => (string) $recording->recordID,
390
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
391
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
392
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
389
+    $recordingarray = array('recordID' => (string)$recording->recordID,
390
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
391
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
392
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
393 393
     if (isset($recording->protected)) {
394
-        $recordingarray['protected'] = (string) $recording->protected;
394
+        $recordingarray['protected'] = (string)$recording->protected;
395 395
     }
396 396
     /////////////////////////////////////////
397 397
     // MOCKUP TO BE DELETED BEFORE RELEASE
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
         if (is_object($value)) {
408 408
             $value = '';
409 409
         }
410
-        $metadataarray['meta_'.$key] = $value;
410
+        $metadataarray['meta_' . $key] = $value;
411 411
     }
412 412
     return $metadataarray;
413 413
 }
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
     $ids = explode(',', $recordids);
466 466
     foreach ($ids as $id) {
467 467
         $xml = bigbluebuttonbn_wrap_xml_load_file(
468
-            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
468
+            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
469 469
           );
470 470
         if ($xml && $xml->returncode != 'SUCCESS') {
471 471
             return false;
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
             return $xml;
543 543
         } catch (Exception $e) {
544 544
             libxml_use_internal_errors($previous);
545
-            $error = 'Caught exception: '.$e->getMessage();
545
+            $error = 'Caught exception: ' . $e->getMessage();
546 546
             debugging($error, DEBUG_DEVELOPER);
547 547
             return null;
548 548
         }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
555 555
         return $response;
556 556
     } catch (Exception $e) {
557
-        $error = 'Caught exception: '.$e->getMessage();
557
+        $error = 'Caught exception: ' . $e->getMessage();
558 558
         debugging($error, DEBUG_DEVELOPER);
559 559
         libxml_use_internal_errors($previous);
560 560
         return null;
@@ -572,8 +572,8 @@  discard block
 block discarded – undo
572 572
 
573 573
         $options = array();
574 574
         $options['CURLOPT_HTTPHEADER'] = array(
575
-                 'Content-Type: '.$contenttype,
576
-                 'Content-Length: '.strlen($data),
575
+                 'Content-Type: ' . $contenttype,
576
+                 'Content-Length: ' . strlen($data),
577 577
                  'Content-Language: en-US',
578 578
                );
579 579
 
@@ -590,9 +590,9 @@  discard block
 block discarded – undo
590 590
     if ($userroles) {
591 591
         $where = '';
592 592
         foreach ($userroles as $value) {
593
-            $where .= (empty($where) ? ' WHERE' : ' AND').' id='.$value->roleid;
593
+            $where .= (empty($where) ? ' WHERE' : ' AND') . ' id=' . $value->roleid;
594 594
         }
595
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
595
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
596 596
     }
597 597
 
598 598
     return $userroles;
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 }
606 606
 
607 607
 function bigbluebuttonbn_get_users(context $context = null) {
608
-    $users = (array) get_enrolled_users($context,'',0,'u.*',null,0,0,true);
608
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
609 609
     foreach ($users as $key => $value) {
610 610
         $users[$key] = fullname($value);
611 611
     }
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 }
614 614
 
615 615
 function bigbluebuttonbn_get_users_select(context $context = null) {
616
-    $users = (array) get_enrolled_users($context,'',0,'u.*',null,0,0,true);
616
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
617 617
     foreach ($users as $key => $value) {
618 618
         $users[$key] = array('id' => $value->id, 'name' => fullname($value));
619 619
     }
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 }
622 622
 
623 623
 function bigbluebuttonbn_get_roles(context $context = null) {
624
-    $roles = (array) role_get_names($context);
624
+    $roles = (array)role_get_names($context);
625 625
     foreach ($roles as $key => $value) {
626 626
         $roles[$key] = $value->localname;
627 627
     }
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
 }
630 630
 
631 631
 function bigbluebuttonbn_get_roles_select(context $context = null) {
632
-    $roles = (array) role_get_names($context);
632
+    $roles = (array)role_get_names($context);
633 633
     foreach ($roles as $key => $value) {
634 634
         $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
635 635
     }
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 }
638 638
 
639 639
 function bigbluebuttonbn_get_role($id) {
640
-    $roles = (array) role_get_names();
640
+    $roles = (array)role_get_names();
641 641
     if (is_numeric($id)) {
642 642
         return (object)$roles[$id];
643 643
     }
@@ -683,11 +683,11 @@  discard block
 block discarded – undo
683 683
         return array();
684 684
     }
685 685
     foreach ($rules as $key => $rule) {
686
-        if ( $rule['selectiontype'] !== 'role' || is_numeric($rule['selectionid']) ) {
686
+        if ($rule['selectiontype'] !== 'role' || is_numeric($rule['selectionid'])) {
687 687
             continue;
688 688
         }
689 689
         $role = bigbluebuttonbn_get_role($rule['selectionid']);
690
-        if ( $role == null ) {
690
+        if ($role == null) {
691 691
             unset($rules[$key]);
692 692
             continue;
693 693
         }
@@ -752,10 +752,10 @@  discard block
 block discarded – undo
752 752
     if (empty($userroles)) {
753 753
         $userroles = get_user_roles($context, $userid, true);
754 754
     }
755
-    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles);
755
+    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles);
756 756
 }
757 757
 
758
-function bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles) {
758
+function bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles) {
759 759
     // Iterate participant rules.
760 760
     foreach ($participantlist as $participant) {
761 761
         if (bigbluebuttonbn_is_moderator_validate_rule($participant, $userid, $userroles)) {
@@ -800,9 +800,9 @@  discard block
 block discarded – undo
800 800
     $isunique = true;
801 801
     if ($voicebridge != 0) {
802 802
         $table = 'bigbluebuttonbn';
803
-        $select = 'voicebridge = '.$voicebridge;
803
+        $select = 'voicebridge = ' . $voicebridge;
804 804
         if ($id) {
805
-            $select .= ' AND id <> '.$id;
805
+            $select .= ' AND id <> ' . $id;
806 806
         }
807 807
         if ($DB->get_records_select($table, $select)) {
808 808
             $isunique = false;
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 function bigbluebuttonbn_generate_nonce() {
864 864
     $mt = microtime();
865 865
     $rand = mt_rand();
866
-    return md5($mt.$rand);
866
+    return md5($mt . $rand);
867 867
 }
868 868
 
869 869
 function bigbluebuttonbn_random_password($length = 8) {
@@ -874,41 +874,41 @@  discard block
 block discarded – undo
874 874
 
875 875
 function bigbluebuttonbn_events() {
876 876
     return array(
877
-        (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
878
-        (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
879
-        (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION,
880
-        (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED,
881
-        (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED,
882
-        (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED,
883
-        (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT,
884
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
885
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
886
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
887
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
888
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
889
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
890
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
891
-        (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
877
+        (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
878
+        (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
879
+        (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION,
880
+        (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED,
881
+        (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED,
882
+        (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED,
883
+        (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT,
884
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
885
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
886
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
887
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
888
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
889
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
890
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
891
+        (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
892 892
     );
893 893
 }
894 894
 
895 895
 function bigbluebuttonbn_events_action() {
896 896
     return array(
897
-        'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
898
-        'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
899
-        'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION,
900
-        'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED,
901
-        'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED,
902
-        'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED,
903
-        'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT,
904
-        'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
905
-        'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
906
-        'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
907
-        'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
908
-        'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
909
-        'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
910
-        'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
911
-        'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
897
+        'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED,
898
+        'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED,
899
+        'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION,
900
+        'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED,
901
+        'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED,
902
+        'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED,
903
+        'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT,
904
+        'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED,
905
+        'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED,
906
+        'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED,
907
+        'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED,
908
+        'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED,
909
+        'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED,
910
+        'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED,
911
+        'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED
912 912
     );
913 913
 }
914 914
 
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
     if (array_key_exists('other', $options)) {
930 930
         $eventproperties['other'] = $options['other'];
931 931
     }
932
-    $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create',
932
+    $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create',
933 933
       array($eventproperties));
934 934
     $event->trigger();
935 935
 }
@@ -970,10 +970,10 @@  discard block
 block discarded – undo
970 970
     $now = time();
971 971
     if (!$forced && isset($result) && $now < ($result['creation_time'] + $cachettl)) {
972 972
         // Use the value in the cache.
973
-        return (array) json_decode($result['meeting_info']);
973
+        return (array)json_decode($result['meeting_info']);
974 974
     }
975 975
     // Ping again and refresh the cache.
976
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
976
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
977 977
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
978 978
       );
979 979
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1031,8 +1031,8 @@  discard block
 block discarded – undo
1031 1031
  * @param string $configxml
1032 1032
  */
1033 1033
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1034
-    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1035
-    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret'));
1034
+    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1035
+    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret'));
1036 1036
     return $configxmlparams;
1037 1037
 }
1038 1038
 
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
  * @param string $configxml
1042 1042
  */
1043 1043
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1044
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1044
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1045 1045
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1046 1046
     $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, BIGBLUEBUTTONBN_METHOD_POST,
1047 1047
         $configxmlparams, 'application/x-www-form-urlencoded');
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
  */
1055 1055
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1056 1056
     $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml);
1057
-    $configxmlarray = (array) $configxml;
1057
+    $configxmlarray = (array)$configxml;
1058 1058
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1059 1059
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1060 1060
         return '';
@@ -1084,7 +1084,7 @@  discard block
 block discarded – undo
1084 1084
         $row->date = $starttime;
1085 1085
         $starttime = $starttime - ($starttime % 1000);
1086 1086
         // Set formatted date.
1087
-        $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1087
+        $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1088 1088
         $row->date_formatted = userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1089 1089
         // Set formatted duration.
1090 1090
         $firstplayback = array_values($recording['playbacks'])[0];
@@ -1101,7 +1101,7 @@  discard block
 block discarded – undo
1101 1101
 function bigbluebuttonbn_get_recording_data_row_actionbar($recording, $tools) {
1102 1102
     $actionbar = '';
1103 1103
     foreach ($tools as $tool) {
1104
-        if ( $tool == 'protect' && !isset($recording['protected']) ) {
1104
+        if ($tool == 'protect' && !isset($recording['protected'])) {
1105 1105
             continue;
1106 1106
         }
1107 1107
         $buttonpayload = bigbluebuttonbn_get_recording_data_row_actionbar_payload($recording, $tool);
@@ -1145,7 +1145,7 @@  discard block
 block discarded – undo
1145 1145
         $visibility = 'hidden ';
1146 1146
     }
1147 1147
     $recordingpreview = html_writer::start_tag('div',
1148
-        array('id' => 'preview-'.$recording['recordID'], $visibility => $visibility));
1148
+        array('id' => 'preview-' . $recording['recordID'], $visibility => $visibility));
1149 1149
     foreach ($recording['playbacks'] as $playback) {
1150 1150
         if (isset($playback['preview'])) {
1151 1151
             foreach ($playback['preview'] as $image) {
@@ -1174,19 +1174,19 @@  discard block
 block discarded – undo
1174 1174
     if ($recording['published'] === 'false') {
1175 1175
         $visibility = 'hidden ';
1176 1176
     }
1177
-    $id = 'playbacks-'.$recording['recordID'];
1177
+    $id = 'playbacks-' . $recording['recordID'];
1178 1178
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1179 1179
           'data-recordingid' => $recording['recordID'], 'data-meetingid' => $recording['meetingID'],
1180 1180
           'title' => $title, $visibility => $visibility));
1181 1181
     foreach ($recording['playbacks'] as $playback) {
1182 1182
         $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_play(this);';
1183
-        $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn='.$bigbluebuttonbnid.
1184
-            '&href='.urlencode($playback['url']).'&rid='.$recording['recordID'];
1185
-        $linkattributes = array('title' => get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'),
1183
+        $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn=' . $bigbluebuttonbnid .
1184
+            '&href=' . urlencode($playback['url']) . '&rid=' . $recording['recordID'];
1185
+        $linkattributes = array('title' => get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'),
1186 1186
             'class' => 'btn btn-sm btn-default', 'onclick' => $onclick,
1187 1187
             'data-action' => 'play', 'data-href' => $href);
1188
-        $recordingtypes .= $OUTPUT->action_link('#', get_string('view_recording_format_'.$playback['type'],
1189
-            'bigbluebuttonbn'), null, $linkattributes).'&#32;';
1188
+        $recordingtypes .= $OUTPUT->action_link('#', get_string('view_recording_format_' . $playback['type'],
1189
+            'bigbluebuttonbn'), null, $linkattributes) . '&#32;';
1190 1190
     }
1191 1191
     $recordingtypes .= html_writer::end_tag('div');
1192 1192
     return $recordingtypes;
@@ -1273,11 +1273,11 @@  discard block
 block discarded – undo
1273 1273
         $target .= '-' . $data['target'];
1274 1274
     }
1275 1275
     $id = 'recording-' . $target . '-' . $recording['recordID'];
1276
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_'.$data['action'].'(this);';
1276
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_' . $data['action'] . '(this);';
1277 1277
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1278 1278
         // With icon for $manageaction.
1279 1279
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1280
-        $icon = new pix_icon('i/'.$data['tag'],
1280
+        $icon = new pix_icon('i/' . $data['tag'],
1281 1281
             get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1282 1282
             'moodle', $iconattributes);
1283 1283
         $linkattributes = array(
@@ -1361,14 +1361,14 @@  discard block
 block discarded – undo
1361 1361
     if ($bbbsession['managerecordings']) {
1362 1362
         $table->head[] = $actionbar;
1363 1363
         $table->align[] = 'left';
1364
-        $table->size[] = (sizeof($tools)*40) . 'px';
1364
+        $table->size[] = (sizeof($tools) * 40) . 'px';
1365 1365
     }
1366 1366
 
1367 1367
     // Build table content.
1368 1368
     if (isset($recordings) && !array_key_exists('messageKey', $recordings)) {
1369 1369
         // There are recordings for this meeting.
1370 1370
         foreach ($recordings as $recording) {
1371
-            if ( !bigbluebuttonbn_include_recording_table_row($bbbsession, $recording) ) {
1371
+            if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
1372 1372
                 continue;
1373 1373
             }
1374 1374
             bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $tools, $table);
@@ -1386,7 +1386,7 @@  discard block
 block discarded – undo
1386 1386
     }
1387 1387
 
1388 1388
     $row = new html_table_row();
1389
-    $row->id = 'recording-td-'.$recording['recordID'];
1389
+    $row->id = 'recording-td-' . $recording['recordID'];
1390 1390
     $row->attributes['data-imported'] = 'false';
1391 1391
     $texthead = '';
1392 1392
     $texttail = '';
@@ -1410,7 +1410,7 @@  discard block
 block discarded – undo
1410 1410
 }
1411 1411
 
1412 1412
 function bigbluebuttonbn_include_recording_table_row($bbbsession, $recording) {
1413
-    return !( !isset($recording['imported']) && isset($bbbsession['group']) && $recording['meetingID'] != $bbbsession['meetingid'] );
1413
+    return !(!isset($recording['imported']) && isset($bbbsession['group']) && $recording['meetingID'] != $bbbsession['meetingid']);
1414 1414
 }
1415 1415
 
1416 1416
 function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) {
@@ -1422,9 +1422,9 @@  discard block
 block discarded – undo
1422 1422
     // Build the message_body.
1423 1423
     $msg->activity_type = '';
1424 1424
     $msg->activity_title = $bigbluebuttonbn->name;
1425
-    $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').' '.
1426
-        $msg->activity_type.' &quot;'.$msg->activity_title.'&quot; '.
1427
-        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
1425
+    $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . ' ' .
1426
+        $msg->activity_type . ' &quot;' . $msg->activity_title . '&quot; ' .
1427
+        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>';
1428 1428
 
1429 1429
     bigbluebuttonbn_send_notification($sender, $bigbluebuttonbn, $messagetext);
1430 1430
 }
@@ -1522,15 +1522,15 @@  discard block
 block discarded – undo
1522 1522
 
1523 1523
 function bigbluebuttonbn_get_recordings_sql_selectdeleted($courseid, $bigbluebuttonbnid = null, $subset = true) {
1524 1524
     if ($bigbluebuttonbnid === null) {
1525
-        return "courseid = '{$courseid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE.
1525
+        return "courseid = '{$courseid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE .
1526 1526
             "' AND meta like '%has_recordings%' AND meta like '%true%'";
1527 1527
     }
1528 1528
     if ($subset) {
1529
-        return "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE.
1529
+        return "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE .
1530 1530
             "' AND meta like '%has_recordings%' AND meta like '%true%'";
1531 1531
     }
1532
-    return "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '".
1533
-        BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
1532
+    return "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '" .
1533
+        BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
1534 1534
 }
1535 1535
 
1536 1536
 function bigbluebuttonbn_get_allrecordings($courseid, $bigbluebuttonbnid = null, $subset = true,
@@ -1579,7 +1579,7 @@  discard block
 block discarded – undo
1579 1579
 
1580 1580
     // Prepare select for loading records based on existent bigbluebuttonbns.
1581 1581
     $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
1582
-    $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
1582
+    $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
1583 1583
     // Include only Create events and exclude those with record not true.
1584 1584
     $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
1585 1585
     // Execute select for loading records based on existent bigbluebuttonbns.
@@ -1663,8 +1663,8 @@  discard block
 block discarded – undo
1663 1663
 function bigbluebuttonbn_format_activity_time($time) {
1664 1664
     $activitytime = '';
1665 1665
     if ($time) {
1666
-        $activitytime = calendar_day_representation($time).' '.
1667
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
1666
+        $activitytime = calendar_day_representation($time) . ' ' .
1667
+          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
1668 1668
           calendar_time_representation($time);
1669 1669
     }
1670 1670
 
Please login to merge, or discard this patch.
view.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -274,11 +274,11 @@  discard block
 block discarded – undo
274 274
 
275 275
     echo $OUTPUT->box_start('generalbox boxaligncenter');
276 276
     echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn').
277
-      '</div>';
277
+        '</div>';
278 278
     echo $OUTPUT->box_end();
279 279
 
280 280
     groups_print_activity_menu(
281
-      $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id);
281
+        $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id);
282 282
     echo '<br><br>';
283 283
 }
284 284
 
@@ -364,11 +364,11 @@  discard block
 block discarded – undo
364 364
 }
365 365
 
366 366
 function bigbluebuttonbn_view_include_recordings(&$bbbsession) {
367
-   if ( $bbbsession['bigbluebuttonbn']->type == BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY &&
367
+    if ( $bbbsession['bigbluebuttonbn']->type == BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY &&
368 368
        $bbbsession['bigbluebuttonbn']->recordings_imported ) {
369
-       return false;
370
-   }
371
-   return true;
369
+        return false;
370
+    }
371
+    return true;
372 372
 }
373 373
 
374 374
 function bigbluebuttonbn_view_render_recordings(&$bbbsession, $showroom, &$jsvars) {
@@ -383,13 +383,13 @@  discard block
 block discarded – undo
383 383
         $recordings = bigbluebuttonbn_get_recordings(
384 384
             $bbbsession['course']->id, $bigbluebuttonbnid, $showroom,
385 385
             $bbbsession['bigbluebuttonbn']->recordings_deleted
386
-          );
386
+            );
387 387
     }
388 388
 
389 389
     // Get recording links.
390 390
     $recordingsimported = bigbluebuttonbn_get_recordings_imported_array(
391 391
         $bbbsession['course']->id, $bigbluebuttonbnid, $showroom
392
-      );
392
+        );
393 393
 
394 394
     /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent
395 395
      * recordings are not included. */
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
     // JavaScript variables for recordings.
406 406
     $jsvars += array(
407 407
             'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1',
408
-          );
408
+            );
409 409
 
410 410
     // If there are meetings with recordings load the data to the table.
411 411
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
     $jsvars += array(
418 418
             'columns' => bigbluebuttonbn_get_recording_columns($bbbsession),
419 419
             'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings),
420
-          );
420
+            );
421 421
 
422 422
     // Render a YUI table.
423 423
     return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table'));
@@ -428,10 +428,10 @@  discard block
 block discarded – undo
428 428
 
429 429
     $button = html_writer::tag('input', '',
430 430
         array('type' => 'button',
431
-              'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
432
-              'class' => 'btn btn-secondary',
433
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
434
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
431
+                'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
432
+                'class' => 'btn btn-secondary',
433
+                'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
434
+                    $bbbsession['bigbluebuttonbn']->id.'\''));
435 435
     $output = html_writer::start_tag('br');
436 436
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
437 437
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
         return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
450 450
                 ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''.
451 451
                 ''.$OUTPUT->action_link($bbbsession['presentation']['url'],
452
-                      $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
452
+                        $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
453 453
     }
454 454
 
455 455
     return '';
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 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
 $bn = optional_param('n', 0, PARAM_INT);
@@ -59,21 +59,21 @@  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
-$bbbsession['serverversion'] = (string) $serverversion;
76
+$bbbsession['serverversion'] = (string)$serverversion;
77 77
 
78 78
 // Mark viewed by user (if required).
79 79
 $completion = new completion_info($course);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 // Print the page header.
83 83
 $PAGE->set_context($context);
84
-$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
84
+$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
85 85
 $PAGE->set_title(format_string($bigbluebuttonbn->name));
86 86
 $PAGE->set_cacheable(false);
87 87
 $PAGE->set_heading($course->fullname);
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
 if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) {
92 92
     echo $OUTPUT->header();
93 93
     if (isguestuser()) {
94
-        echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
95
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
94
+        echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
95
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
96 96
     } else {
97
-        echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
98
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
97
+        echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
98
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
99 99
     }
100 100
     echo $OUTPUT->footer();
101 101
     exit;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
 // Operation URLs.
105 105
 $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
106
-$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id .
106
+$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id .
107 107
     '&bn=' . $bbbsession['bigbluebuttonbn']->id;
108 108
 $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
109 109
     'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 echo $OUTPUT->footer();
124 124
 
125 125
 // Shows version as a comment.
126
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
126
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
127 127
 
128 128
 // Initialize session variable used across views.
129 129
 $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) {
@@ -248,10 +248,10 @@  discard block
 block discarded – undo
248 248
     $bbbsession['group'] = groups_get_activity_group($bbbsession['cm'], true);
249 249
 
250 250
     // Assign group default values.
251
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
252
-        $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']';
251
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
252
+        $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']';
253 253
     $groupname = get_string('allparticipants');
254
-    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')';
254
+    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')';
255 255
 
256 256
     if (count($groups) == 0) {
257 257
         // Only the All participants group exists.
@@ -262,10 +262,10 @@  discard block
 block discarded – undo
262 262
         $bbbsession['group'] = array_values($groups)[0]->id;
263 263
     }
264 264
 
265
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
266
-        $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']';
265
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
266
+        $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']';
267 267
     $groupname = groups_get_group_name($bbbsession['group']);
268
-    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')';
268
+    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')';
269 269
 
270 270
     if (count($groups) == 1) {
271 271
         // There only one group and the user has access to.
@@ -273,12 +273,12 @@  discard block
 block discarded – undo
273 273
     }
274 274
 
275 275
     echo $OUTPUT->box_start('generalbox boxaligncenter');
276
-    echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn').
276
+    echo '<br><div class="alert alert-warning">' . get_string('view_groups_selection_warning', 'bigbluebuttonbn') .
277 277
       '</div>';
278 278
     echo $OUTPUT->box_end();
279 279
 
280 280
     groups_print_activity_menu(
281
-      $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id);
281
+      $bbbsession['cm'], $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id);
282 282
     echo '<br><br>';
283 283
 }
284 284
 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
             'M.mod_bigbluebuttonbn.recordings.init', array($jsvars));
321 321
     }
322 322
 
323
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
323
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
324 324
 
325 325
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
326 326
 }
@@ -331,12 +331,12 @@  discard block
 block discarded – undo
331 331
     // JavaScript variables for room.
332 332
     $openingtime = '';
333 333
     if ($bbbsession['openingtime']) {
334
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
334
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
335 335
             userdate($bbbsession['openingtime']);
336 336
     }
337 337
     $closingtime = '';
338 338
     if ($bbbsession['closingtime']) {
339
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
339
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
340 340
             userdate($bbbsession['closingtime']);
341 341
     }
342 342
     $jsvars += array(
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
     $output .= $OUTPUT->box_end();
354 354
 
355 355
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
356
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
356
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
357 357
     $output .= $OUTPUT->box_end();
358 358
 
359 359
     if ($activity == 'ended') {
@@ -364,8 +364,8 @@  discard block
 block discarded – undo
364 364
 }
365 365
 
366 366
 function bigbluebuttonbn_view_include_recordings(&$bbbsession) {
367
-   if ( $bbbsession['bigbluebuttonbn']->type == BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY &&
368
-       $bbbsession['bigbluebuttonbn']->recordings_imported ) {
367
+   if ($bbbsession['bigbluebuttonbn']->type == BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY &&
368
+       $bbbsession['bigbluebuttonbn']->recordings_imported) {
369 369
        return false;
370 370
    }
371 371
    return true;
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 
380 380
     // Get recordings.
381 381
     $recordings = array();
382
-    if ( bigbluebuttonbn_view_include_recordings($bbbsession) ) {
382
+    if (bigbluebuttonbn_view_include_recordings($bbbsession)) {
383 383
         $recordings = bigbluebuttonbn_get_recordings(
384 384
             $bbbsession['course']->id, $bigbluebuttonbnid, $showroom,
385 385
             $bbbsession['bigbluebuttonbn']->recordings_deleted
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
     // If there are meetings with recordings load the data to the table.
411 411
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
412 412
         // Render a plain html table.
413
-        return bigbluebutton_output_recording_table($bbbsession, $recordings)."\n";
413
+        return bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n";
414 414
     }
415 415
 
416 416
     // JavaScript variables for recordings with YUI.
@@ -430,8 +430,8 @@  discard block
 block discarded – undo
430 430
         array('type' => 'button',
431 431
               'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
432 432
               'class' => 'btn btn-secondary',
433
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
434
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
433
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
434
+                  $bbbsession['bigbluebuttonbn']->id . '\''));
435 435
     $output = html_writer::start_tag('br');
436 436
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
437 437
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -446,10 +446,10 @@  discard block
 block discarded – undo
446 446
         $attributes = array('title' => $bbbsession['presentation']['name']);
447 447
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
448 448
 
449
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
450
-                ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''.
451
-                ''.$OUTPUT->action_link($bbbsession['presentation']['url'],
452
-                      $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
449
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
450
+                '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' .
451
+                '' . $OUTPUT->action_link($bbbsession['presentation']['url'],
452
+                      $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
453 453
     }
454 454
 
455 455
     return '';
Please login to merge, or discard this patch.
bbb_broker.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -371,23 +371,23 @@  discard block
 block discarded – undo
371 371
             return array(
372 372
                 'status' => false,
373 373
                 'message' => get_string('view_recording_'.$action.'_link_deleted', 'bigbluebuttonbn')
374
-              );
374
+                );
375 375
         }
376 376
         if ($realrecordings[$params['id']][$action.'ed'] !== 'true') {
377 377
             return array(
378 378
                 'status' => false,
379 379
                 'message' => get_string('view_recording_'.$action.'_link_not_'.$action.'ed', 'bigbluebuttonbn')
380
-              );
380
+                );
381 381
         }
382 382
         return array(
383 383
             'status' => bigbluebuttonbn_publish_recording_imported($recordings[$params['id']]['imported'], true)
384
-          );
384
+            );
385 385
     }
386 386
 
387 387
     // As the recordingid was not identified as imported recording link, execute publish on a real recording.
388 388
     return array(
389 389
         'status' => bigbluebuttonbn_publish_recordings($params['id'], 'true')
390
-      );
390
+        );
391 391
 }
392 392
 
393 393
 function bigbluebuttonbn_broker_recording_action_unpublishprotect($params, $recordings, $action) {
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
         // Execute unpublish or protect on imported recording link.
398 398
         return array(
399 399
             'status' => bigbluebuttonbn_publish_recording_imported($recordings[$params['id']]['imported'], false)
400
-          );
400
+            );
401 401
     }
402 402
 
403 403
     // As the recordingid was not identified as imported recording link, execute unpublish on a real recording.
@@ -416,8 +416,8 @@  discard block
 block discarded – undo
416 416
     }
417 417
     // Second: Execute the actual unpublish.
418 418
     return array(
419
-      'status' => bigbluebuttonbn_publish_recordings($params['id'], 'false')
420
-      );
419
+        'status' => bigbluebuttonbn_publish_recordings($params['id'], 'false')
420
+        );
421 421
 }
422 422
 
423 423
 function bigbluebuttonbn_broker_recording_action_delete($params, $recordings) {
@@ -426,10 +426,10 @@  discard block
 block discarded – undo
426 426
     if (bigbluebuttonbn_broker_recording_is_imported($recordings, $params['id'])) {
427 427
         // Execute delete on imported recording link.
428 428
         return array(
429
-          'status' => bigbluebuttonbn_delete_recording_imported(
430
-              $recordings[$params['id']]['imported']
429
+            'status' => bigbluebuttonbn_delete_recording_imported(
430
+                $recordings[$params['id']]['imported']
431 431
             )
432
-          );
432
+            );
433 433
     }
434 434
 
435 435
     // As the recordingid was not identified as imported recording link, execute delete on a real recording.
@@ -444,26 +444,26 @@  discard block
 block discarded – undo
444 444
     }
445 445
     // Second: Execute the actual delete.
446 446
     return array(
447
-      'status' => bigbluebuttonbn_delete_recordings($params['id'])
448
-      );
447
+        'status' => bigbluebuttonbn_delete_recordings($params['id'])
448
+        );
449 449
 }
450 450
 
451 451
 function bigbluebuttonbn_broker_recording_action_edit($params, $recordings) {
452 452
     if (bigbluebuttonbn_broker_recording_is_imported($recordings, $params['id'])) {
453 453
         // Execute update on imported recording link.
454 454
         return array(
455
-          'status' => bigbluebuttonbn_update_recording_imported(
456
-              $recordings[$params['id']]['imported'], json_decode($params['meta'], true)
455
+            'status' => bigbluebuttonbn_update_recording_imported(
456
+                $recordings[$params['id']]['imported'], json_decode($params['meta'], true)
457 457
             )
458
-          );
458
+            );
459 459
     }
460 460
 
461 461
     // As the recordingid was not identified as imported recording link, execute update on a real recording.
462 462
     // (No need to update imported links as the update only affects the actual recording).
463 463
     // Execute update on actual recording.
464 464
     return array(
465
-      'status' => bigbluebuttonbn_update_recordings($params['id'], json_decode($params['meta']))
466
-      );
465
+        'status' => bigbluebuttonbn_update_recordings($params['id'], json_decode($params['meta']))
466
+        );
467 467
 }
468 468
 
469 469
 function bigbluebuttonbn_broker_recording_ready($params, $bigbluebuttonbn) {
@@ -604,10 +604,10 @@  discard block
 block discarded – undo
604 604
     $params['recording_import'] = ['id' => 'The recordingID must be specified.'];
605 605
     $params['recording_ready'] = [
606 606
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
607
-          ];
607
+            ];
608 608
     $params['live_session_events'] = [
609 609
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
610
-          ];
610
+            ];
611 611
     return $params;
612 612
 }
613 613
 
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 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
 use \Firebase\JWT\JWT;
29 29
 
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
 $params['meta'] = optional_param('meta', '', PARAM_TEXT);
40 40
 
41 41
 if (empty($params['action'])) {
42
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
42
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
43 43
     return;
44 44
 }
45 45
 
46 46
 $error = bigbluebuttonbn_broker_validate_parameters($params);
47 47
 if (!empty($error)) {
48
-    header('HTTP/1.0 400 Bad Request. '.$error);
48
+    header('HTTP/1.0 400 Bad Request. ' . $error);
49 49
     return;
50 50
 }
51 51
 
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
         return;
140 140
     }
141 141
 
142
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
142
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
143 143
     return;
144 144
 
145 145
 } catch (Exception $e) {
146
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
146
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
147 147
     return;
148 148
 }
149 149
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 function bigbluebuttonbn_broker_recording_info_current($recording, $params) {
284 284
     $callbackresponse['status'] = true;
285 285
     $callbackresponse['found'] = true;
286
-    $callbackresponse['published'] = (string) $recording['published'];
286
+    $callbackresponse['published'] = (string)$recording['published'];
287 287
     if (!isset($params['meta'])) {
288 288
         return $callbackresponse;
289 289
     }
@@ -370,13 +370,13 @@  discard block
 block discarded – undo
370 370
         if (!isset($realrecordings[$params['id']])) {
371 371
             return array(
372 372
                 'status' => false,
373
-                'message' => get_string('view_recording_'.$action.'_link_deleted', 'bigbluebuttonbn')
373
+                'message' => get_string('view_recording_' . $action . '_link_deleted', 'bigbluebuttonbn')
374 374
               );
375 375
         }
376
-        if ($realrecordings[$params['id']][$action.'ed'] !== 'true') {
376
+        if ($realrecordings[$params['id']][$action . 'ed'] !== 'true') {
377 377
             return array(
378 378
                 'status' => false,
379
-                'message' => get_string('view_recording_'.$action.'_link_not_'.$action.'ed', 'bigbluebuttonbn')
379
+                'message' => get_string('view_recording_' . $action . '_link_not_' . $action . 'ed', 'bigbluebuttonbn')
380 380
               );
381 381
         }
382 382
         return array(
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
         foreach ($importedall as $key => $record) {
409 409
             $meta = json_decode($record->meta, true);
410 410
             // Prepare data for the update.
411
-            $meta['recording'][$action.'ed'] = 'false';
411
+            $meta['recording'][$action . 'ed'] = 'false';
412 412
             $importedall[$key]->meta = json_encode($meta);
413 413
             // Proceed with the update.
414 414
             $DB->update_record('bigbluebuttonbn_logs', $importedall[$key]);
@@ -473,8 +473,8 @@  discard block
 block discarded – undo
473 473
         $decodedparameters = JWT::decode($params['signed_parameters'], \mod_bigbluebuttonbn\locallib\config::get('shared_secret'),
474 474
             array('HS256'));
475 475
     } catch (Exception $e) {
476
-        $error = 'Caught exception: '.$e->getMessage();
477
-        header('HTTP/1.0 400 Bad Request. '.$error);
476
+        $error = 'Caught exception: ' . $e->getMessage();
477
+        header('HTTP/1.0 400 Bad Request. ' . $error);
478 478
         return;
479 479
     }
480 480
 
@@ -492,8 +492,8 @@  discard block
 block discarded – undo
492 492
         bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn);
493 493
         header('HTTP/1.0 202 Accepted');
494 494
     } catch (Exception $e) {
495
-        $error = 'Caught exception: '.$e->getMessage();
496
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
495
+        $error = 'Caught exception: ' . $e->getMessage();
496
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
497 497
     }
498 498
 }
499 499
 
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
509 509
     if (!isset($importrecordings[$params['id']])) {
510 510
         $error = "Recording {$params['id']} could not be found. It can not be imported";
511
-        header('HTTP/1.0 404 Not found. '.$error);
511
+        header('HTTP/1.0 404 Not found. ' . $error);
512 512
         return;
513 513
     }
514 514
 
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
 
517 517
     $importrecordings[$params['id']]['imported'] = true;
518 518
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
519
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
519
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
520 520
     bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
521 521
     // Moodle event logger: Create an event for recording imported.
522 522
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -534,8 +534,8 @@  discard block
 block discarded – undo
534 534
         $decodedparameters = JWT::decode($params['signed_parameters'], \mod_bigbluebuttonbn\locallib\config::get('shared_secret'),
535 535
             array('HS256'));
536 536
     } catch (Exception $e) {
537
-        $error = 'Caught exception: '.$e->getMessage();
538
-        header('HTTP/1.0 400 Bad Request. '.$error);
537
+        $error = 'Caught exception: ' . $e->getMessage();
538
+        header('HTTP/1.0 400 Bad Request. ' . $error);
539 539
         return;
540 540
     }
541 541
 
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 
574 574
     $action = strtolower($params['action']);
575 575
     if (!array_key_exists($action, $requiredparams)) {
576
-        return 'Action '.$params['action'].' can not be performed.';
576
+        return 'Action ' . $params['action'] . ' can not be performed.';
577 577
     }
578 578
 
579 579
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
Please login to merge, or discard this patch.
config-dist.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
  * recordings from a different activity even from a different course.
95 95
  **/
96 96
 
97
- /*
97
+    /*
98 98
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
99 99
  * activities will have the 'import recordings' capability enabled.
100 100
  */
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
  * 'Join session' button enabled
116 116
  **/
117 117
 
118
- /*
118
+    /*
119 119
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
120 120
  * activities will have the 'wait for moderator' capability enabled by
121 121
  * default.
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
  * 5. CONFIGURATION FOR "STATIC VOICE BRIDGE" FEATURE
150 150
  *
151 151
  **/
152
- /*
152
+    /*
153 153
  * A conference voice bridge number can be permanently assigned to a room
154 154
  * or activity.
155 155
  */
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
  * 6. CONFIGURATION FOR "PRE-UPLOAD PRESENTATION" FEATURE
160 160
  *
161 161
  **/
162
- /*
162
+    /*
163 163
  * Since version 0.8, BigBluebutton has an implementation for allowing
164 164
  * preuploading presentation. When this feature is enabled, users creating or
165 165
  * editing a room or activity can upload a PDF or Office document to the
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
  * applied to each room or activity, or globally.
177 177
  **/
178 178
 
179
- /*
179
+    /*
180 180
  * The number of users allowed in a session by default when a new room or
181 181
  * conference is added. If the number is set to 0, no limit is established.
182 182
  * $CFG->bigbluebuttonbn['userlimit_default'] = 0;
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
  * By default only the owner is assigned.
198 198
  **/
199 199
 
200
- /*
200
+    /*
201 201
  * The values for this parameter can be 'owner' and/or any of the roles defined in
202 202
  * Moodle (including the custom parameters). The value used will be the key for the role.
203 203
  * [owner|manager|coursecreator|editingteacher|teacher|student|guest|user|frontpage|ANY_CUSTOM_ROLE]
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
  * 9. CONFIGURATION FOR "NOTIFICATION SENDING" FEATURE
209 209
  *
210 210
  **/
211
- /*
211
+    /*
212 212
  * When the value is set to 1 (checked) the 'notification sending'
213 213
  * capability can be used by the user creating or editing the room or
214 214
  * activity.
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
  * 10. CONFIGURATION FOR "RECORDING READY" FEATURE
223 223
  *
224 224
  **/
225
- /*
225
+    /*
226 226
  * When the value is set to 1 (checked) the 'notify users when recording ready'
227 227
  * capability is enabled, meaning that a message will be sent to all enrolled
228 228
  * users in a course when a recording is ready
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
  * 12. GENERAL CONFIGURATION FOR RECORDINGS UI
247 247
  *
248 248
  **/
249
- /*
249
+    /*
250 250
  * When the value is set to 1 (checked) the bigbluebuttonbn resources
251 251
  * will show the recodings in an html table by default.
252 252
  * $CFG->bigbluebuttonbn['recordings_html_default'] = 0;
@@ -270,13 +270,13 @@  discard block
 block discarded – undo
270 270
  * $CFG->bigbluebuttonbn['recordings_deleted_editable'] = 0;
271 271
  */
272 272
 
273
- /*
273
+    /*
274 274
   * When the value is set to 1 (checked) the bigbluebuttonbn resources for recordings
275 275
   * will show only the imported links as part of the list.
276 276
   * $CFG->bigbluebuttonbn['recordings_imported_default'] = 0;
277 277
   */
278 278
 
279
- /*
279
+    /*
280 280
   * When the value is set to 1 (checked) the 'show only imported links'
281 281
   * capability can be enabled/disabled by the user creating or editing the resource for recordings.
282 282
   * $CFG->bigbluebuttonbn['recordings_imported_editable'] = 1;
Please login to merge, or discard this patch.
mod_form.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 'alt' => get_string('delete'),
112 112
                 'title' => get_string('delete'),
113 113
                 'src' => $jsvars['pix_icon_delete']
114
-              );
114
+                );
115 115
 
116 116
             $jsvars['pix_icon_delete'] = html_writer::tag('img', $options);
117 117
         }
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
212 212
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6],
213 213
                 ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'),
214
-                 'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
215
-              );
214
+                    'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
215
+                );
216 216
         } else {
217 217
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
218 218
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
     private function bigbluebuttonbn_mform_add_block_room_recordings($mform, $cfg) {
248 248
         $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT,
249
-                  'description_key' => null];
249
+                    'description_key' => null];
250 250
         if ($cfg['recordings_html_editable']) {
251 251
             $field['type'] = 'checkbox';
252 252
             $field['description_key'] = 'mod_form_field_recordings_html';
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
             $field['description_key'], $cfg['recordings_html_default']);
256 256
 
257 257
         $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT,
258
-                  'description_key' => null];
258
+                    'description_key' => null];
259 259
         if ($cfg['recordings_deleted_editable']) {
260 260
             $field['type'] = 'checkbox';
261 261
             $field['description_key'] = 'mod_form_field_recordings_deleted';
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             $field['description_key'], $cfg['recordings_deleted_default']);
265 265
 
266 266
         $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT,
267
-                  'description_key' => null];
267
+                    'description_key' => null];
268 268
         if ($cfg['recordings_imported_editable']) {
269 269
             $field['type'] = 'checkbox';
270 270
             $field['description_key'] = 'mod_form_field_recordings_imported';
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             html_writer::select($participantselection['type_options'], 'bigbluebuttonbn_participant_selection_type',
320 320
                 $participantselection['type_selected'], array(),
321 321
                 array('id' => 'bigbluebuttonbn_participant_selection_type',
322
-                      'onchange' => 'M.mod_bigbluebuttonbn.modform.participant_selection_set(); return 0;')).'&nbsp;&nbsp;'.
322
+                        'onchange' => 'M.mod_bigbluebuttonbn.modform.participant_selection_set(); return 0;')).'&nbsp;&nbsp;'.
323 323
             html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection',
324 324
                 $participantselection['selected'], array(),
325 325
                 array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')).'&nbsp;&nbsp;'.
Please login to merge, or discard this patch.
db/upgrade.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -36,23 +36,23 @@  discard block
 block discarded – undo
36 36
 
37 37
         // Change welcome, allow null.
38 38
         $fielddefinition = array('type' => XMLDB_TYPE_TEXT,
39
-                                  'precision' => null,
40
-                                  'unsigned' => null,
41
-                                  'notnull' => XMLDB_NOTNULL,
42
-                                  'sequence' => null,
43
-                                  'default' => null,
44
-                                  'previous' => 'type');
39
+                                    'precision' => null,
40
+                                    'unsigned' => null,
41
+                                    'notnull' => XMLDB_NOTNULL,
42
+                                    'sequence' => null,
43
+                                    'default' => null,
44
+                                    'previous' => 'type');
45 45
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'welcome',
46 46
             $fielddefinition);
47 47
 
48 48
         // Change userid definition in bigbluebuttonbn_log.
49 49
         $fielddefinition = array('type' => XMLDB_TYPE_INTEGER,
50
-                                  'precision' => '10',
51
-                                  'unsigned' => null,
52
-                                  'notnull' => XMLDB_NOTNULL,
53
-                                  'sequence' => null,
54
-                                  'default' => null,
55
-                                  'previous' => 'bigbluebuttonbnid');
50
+                                    'precision' => '10',
51
+                                    'unsigned' => null,
52
+                                    'notnull' => XMLDB_NOTNULL,
53
+                                    'sequence' => null,
54
+                                    'default' => null,
55
+                                    'previous' => 'bigbluebuttonbnid');
56 56
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn_log', 'userid',
57 57
             $fielddefinition);
58 58
 
@@ -78,45 +78,45 @@  discard block
 block discarded – undo
78 78
 
79 79
         // Add field type.
80 80
         $fielddefinition = array('type' => XMLDB_TYPE_INTEGER,
81
-                                  'precision' => '2',
82
-                                  'unsigned' => null,
83
-                                  'notnull' => XMLDB_NOTNULL,
84
-                                  'sequence' => null,
85
-                                  'default' => 0,
86
-                                  'previous' => 'id');
81
+                                    'precision' => '2',
82
+                                    'unsigned' => null,
83
+                                    'notnull' => XMLDB_NOTNULL,
84
+                                    'sequence' => null,
85
+                                    'default' => 0,
86
+                                    'previous' => 'id');
87 87
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'type',
88 88
             $fielddefinition);
89 89
 
90 90
         // Add field recordings_html.
91 91
         $fielddefinition = array('type' => XMLDB_TYPE_INTEGER,
92
-                                  'precision' => '1',
93
-                                  'unsigned' => null,
94
-                                  'notnull' => XMLDB_NOTNULL,
95
-                                  'sequence' => null,
96
-                                  'default' => 0,
97
-                                  'previous' => null);
92
+                                    'precision' => '1',
93
+                                    'unsigned' => null,
94
+                                    'notnull' => XMLDB_NOTNULL,
95
+                                    'sequence' => null,
96
+                                    'default' => 0,
97
+                                    'previous' => null);
98 98
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'recordings_html',
99 99
             $fielddefinition);
100 100
 
101 101
         // Add field recordings_deleted.
102 102
         $fielddefinition = array('type' => XMLDB_TYPE_INTEGER,
103
-                                  'precision' => '1',
104
-                                  'unsigned' => null,
105
-                                  'notnull' => XMLDB_NOTNULL,
106
-                                  'sequence' => null,
107
-                                  'default' => 1,
108
-                                  'previous' => null);
103
+                                    'precision' => '1',
104
+                                    'unsigned' => null,
105
+                                    'notnull' => XMLDB_NOTNULL,
106
+                                    'sequence' => null,
107
+                                    'default' => 1,
108
+                                    'previous' => null);
109 109
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'recordings_deleted',
110 110
             $fielddefinition);
111 111
 
112 112
         // Add field recordings_imported.
113 113
         $fielddefinition = array('type' => XMLDB_TYPE_INTEGER,
114
-                                  'precision' => '1',
115
-                                  'unsigned' => null,
116
-                                  'notnull' => XMLDB_NOTNULL,
117
-                                  'sequence' => null,
118
-                                  'default' => 0,
119
-                                  'previous' => null);
114
+                                    'precision' => '1',
115
+                                    'unsigned' => null,
116
+                                    'notnull' => XMLDB_NOTNULL,
117
+                                    'sequence' => null,
118
+                                    'default' => 0,
119
+                                    'previous' => null);
120 120
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'recordings_imported',
121 121
             $fielddefinition);
122 122
 
@@ -133,12 +133,12 @@  discard block
 block discarded – undo
133 133
     $table = new xmldb_table($tablename);
134 134
     $field = new xmldb_field($fieldname);
135 135
     $field->set_attributes($fielddefinition['type'],
136
-                           $fielddefinition['precision'],
137
-                           $fielddefinition['unsigned'],
138
-                           $fielddefinition['notnull'],
139
-                           $fielddefinition['sequence'],
140
-                           $fielddefinition['default'],
141
-                           $fielddefinition['previous']);
136
+                            $fielddefinition['precision'],
137
+                            $fielddefinition['unsigned'],
138
+                            $fielddefinition['notnull'],
139
+                            $fielddefinition['sequence'],
140
+                            $fielddefinition['default'],
141
+                            $fielddefinition['previous']);
142 142
     if ($dbman->field_exists($table, $field)) {
143 143
         $dbman->change_field_type($table, $field, true, true);
144 144
         $dbman->change_field_precision($table, $field, true, true);
Please login to merge, or discard this patch.
classes/locallib/config.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -123,25 +123,25 @@
 block discarded – undo
123 123
      */
124 124
     public static function get_options() {
125 125
         return [
126
-               'version_major' => self::get_moodle_version_major(),
127
-               'voicebridge_editable' => self::get('voicebridge_editable'),
128
-               'recording_default' => self::get('recording_default'),
129
-               'recording_editable' => self::get('recording_editable'),
130
-               'waitformoderator_default' => self::get('waitformoderator_default'),
131
-               'waitformoderator_editable' => self::get('waitformoderator_editable'),
132
-               'userlimit_default' => self::get('userlimit_default'),
133
-               'userlimit_editable' => self::get('userlimit_editable'),
134
-               'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
135
-               'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
136
-               'recordings_html_default' => self::get('recordings_html_default'),
137
-               'recordings_html_editable' => self::get('recordings_html_editable'),
138
-               'recordings_deleted_default' => self::get('recordings_deleted_default'),
139
-               'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
140
-               'recordings_imported_default' => self::get('recordings_imported_default'),
141
-               'recordings_imported_editable' => self::get('recordings_imported_editable'),
142
-               'recording_icons_enabled' => self::get('recording_icons_enabled'),
143
-               'instance_type_enabled' => self::recordings_enabled(),
144
-               'instance_type_default' => BIGBLUEBUTTONBN_TYPE_ALL,
145
-          ];
126
+                'version_major' => self::get_moodle_version_major(),
127
+                'voicebridge_editable' => self::get('voicebridge_editable'),
128
+                'recording_default' => self::get('recording_default'),
129
+                'recording_editable' => self::get('recording_editable'),
130
+                'waitformoderator_default' => self::get('waitformoderator_default'),
131
+                'waitformoderator_editable' => self::get('waitformoderator_editable'),
132
+                'userlimit_default' => self::get('userlimit_default'),
133
+                'userlimit_editable' => self::get('userlimit_editable'),
134
+                'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
135
+                'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
136
+                'recordings_html_default' => self::get('recordings_html_default'),
137
+                'recordings_html_editable' => self::get('recordings_html_editable'),
138
+                'recordings_deleted_default' => self::get('recordings_deleted_default'),
139
+                'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
140
+                'recordings_imported_default' => self::get('recordings_imported_default'),
141
+                'recordings_imported_editable' => self::get('recordings_imported_editable'),
142
+                'recording_icons_enabled' => self::get('recording_icons_enabled'),
143
+                'instance_type_enabled' => self::recordings_enabled(),
144
+                'instance_type_default' => BIGBLUEBUTTONBN_TYPE_ALL,
145
+            ];
146 146
     }
147 147
 }
Please login to merge, or discard this patch.