Completed
Push — master ( 72dffb...e1bd88 )
by Jesus
14:35
created
config-dist.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
  * recordings from a different activity even from a different course.
99 99
  **/
100 100
 
101
- /*
101
+    /*
102 102
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
103 103
  * activities will have the 'import recordings' capability enabled.
104 104
  * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
  * 'Join session' button enabled
120 120
  **/
121 121
 
122
- /*
122
+    /*
123 123
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
124 124
  * activities will have the 'wait for moderator' capability enabled by
125 125
  * default.
@@ -298,27 +298,27 @@  discard block
 block discarded – undo
298 298
  * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? ";
299 299
  */
300 300
 
301
- /*
301
+    /*
302 302
  * The warning box is always shown to administrators, but it is also possible to define other roles
303 303
  * to whom the it will be shown. The roles are based on the shortnames defined by Moodle:
304 304
  *     'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage'
305 305
  * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher';
306 306
  */
307 307
 
308
- /*
308
+    /*
309 309
  * As the general_warning_message is shown in a box, its type can be defined with general_warning_type
310 310
  * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme.
311 311
  * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger].
312 312
  * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info';
313 313
  */
314 314
 
315
- /*
315
+    /*
316 316
  * Additionally, when general_warning_button_href value is different than "", a button
317 317
  * can also be shown right after the message.
318 318
  * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/";
319 319
  */
320 320
 
321
- /*
321
+    /*
322 322
  * Finally, the text and class for the button can be modified
323 323
  * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site";
324 324
  * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary";
Please login to merge, or discard this patch.
bbb_broker.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
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
 use \Firebase\JWT\JWT;
30 30
 
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 require_login(0, false);
43 43
 
44 44
 if (empty($params['action'])) {
45
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
45
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
46 46
     return;
47 47
 }
48 48
 
49 49
 $error = bigbluebuttonbn_broker_validate_parameters($params);
50 50
 if (!empty($error)) {
51
-    header('HTTP/1.0 400 Bad Request. '.$error);
51
+    header('HTTP/1.0 400 Bad Request. ' . $error);
52 52
     return;
53 53
 }
54 54
 
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
         bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn, $cm);
133 133
         return;
134 134
     }
135
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
135
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
136 136
     return;
137 137
 
138 138
 } catch (Exception $e) {
139
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
139
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
140 140
     return;
141 141
 }
142 142
 
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 function bigbluebuttonbn_broker_recording_info_current($recording, $params) {
322 322
     $callbackresponse['status'] = true;
323 323
     $callbackresponse['found'] = true;
324
-    $callbackresponse['published'] = (string) $recording['published'];
324
+    $callbackresponse['published'] = (string)$recording['published'];
325 325
     if (!isset($params['meta']) || empty($params['meta'])) {
326 326
         return $callbackresponse;
327 327
     }
@@ -648,8 +648,8 @@  discard block
 block discarded – undo
648 648
         $decodedparameters = JWT::decode($params['signed_parameters'],
649 649
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
650 650
     } catch (Exception $e) {
651
-        $error = 'Caught exception: '.$e->getMessage();
652
-        header('HTTP/1.0 400 Bad Request. '.$error);
651
+        $error = 'Caught exception: ' . $e->getMessage();
652
+        header('HTTP/1.0 400 Bad Request. ' . $error);
653 653
         return;
654 654
     }
655 655
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -674,12 +674,12 @@  discard block
 block discarded – undo
674 674
             bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn);
675 675
         }
676 676
         $overrides = array('meetingid' => $decodedparameters->meeting_id);
677
-        $meta = '{"recordid":'.$decodedparameters->record_id.'}';
677
+        $meta = '{"recordid":' . $decodedparameters->record_id . '}';
678 678
         bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, $meta);
679 679
         header('HTTP/1.0 202 Accepted');
680 680
     } catch (Exception $e) {
681
-        $error = 'Caught exception: '.$e->getMessage();
682
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
681
+        $error = 'Caught exception: ' . $e->getMessage();
682
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
683 683
     }
684 684
 }
685 685
 
@@ -700,13 +700,13 @@  discard block
 block discarded – undo
700 700
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
701 701
     if (!isset($importrecordings[$params['id']])) {
702 702
         $error = "Recording {$params['id']} could not be found. It can not be imported";
703
-        header('HTTP/1.0 404 Not found. '.$error);
703
+        header('HTTP/1.0 404 Not found. ' . $error);
704 704
         return;
705 705
     }
706 706
     $callbackresponse = array('status' => true);
707 707
     $importrecordings[$params['id']]['imported'] = true;
708 708
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
709
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
709
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
710 710
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
711 711
     // Moodle event logger: Create an event for recording imported.
712 712
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -732,8 +732,8 @@  discard block
 block discarded – undo
732 732
         $decodedparameters = JWT::decode($params['signed_parameters'],
733 733
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
734 734
     } catch (Exception $e) {
735
-        $error = 'Caught exception: '.$e->getMessage();
736
-        header('HTTP/1.0 400 Bad Request. '.$error);
735
+        $error = 'Caught exception: ' . $e->getMessage();
736
+        header('HTTP/1.0 400 Bad Request. ' . $error);
737 737
         return;
738 738
     }
739 739
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
     }
775 775
     $action = strtolower($params['action']);
776 776
     if (!array_key_exists($action, $requiredparams)) {
777
-        return 'Action '.$params['action'].' can not be performed.';
777
+        return 'Action ' . $params['action'] . ' can not be performed.';
778 778
     }
779 779
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
780 780
 }
Please login to merge, or discard this patch.
classes/event/meeting_ended.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
      */
42 42
     protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) {
43 43
         parent::init($crud, $edulevel);
44
-        $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id ".
45
-            "'##objectid' for the course id '##courseid' has been forcibly ".
44
+        $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id " .
45
+            "'##objectid' for the course id '##courseid' has been forcibly " .
46 46
             "ended by the user with id '##userid'.";
47 47
     }
48 48
 
Please login to merge, or discard this patch.
classes/event/meeting_left.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
      */
42 42
     protected function init($crud = 'r', $edulevel = self::LEVEL_PARTICIPATING) {
43 43
         parent::init($crud, $edulevel);
44
-        $this->description = "The user with id '##userid' has left a bigbluebutton meeting for ".
45
-            "the bigbluebuttonbn activity with id '##objectid' for the course id ".
44
+        $this->description = "The user with id '##userid' has left a bigbluebutton meeting for " .
45
+            "the bigbluebuttonbn activity with id '##objectid' for the course id " .
46 46
             "'##courseid'.";
47 47
     }
48 48
 
Please login to merge, or discard this patch.
classes/event/recording_deleted.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) {
43 43
         parent::init($crud, $edulevel);
44
-        $this->description = "The user with id '##userid' has deleted a recording with id ".
44
+        $this->description = "The user with id '##userid' has deleted a recording with id " .
45 45
             "'##other' from the course id '##courseid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.
classes/event/recording_edited.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) {
43 43
         parent::init($crud, $edulevel);
44
-        $this->description = "The user with id '##userid' has edited a recording with id ".
44
+        $this->description = "The user with id '##userid' has edited a recording with id " .
45 45
             "'##other' in the course id '##courseid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_activity_management_viewed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     protected function init($crud = 'r', $edulevel = self::LEVEL_PARTICIPATING) {
42 42
         parent::init($crud, $edulevel);
43
-        $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity management page for ".
43
+        $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity management page for " .
44 44
         "the course module id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.
classes/event/recording_published.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) {
43 43
         parent::init($crud, $edulevel);
44
-        $this->description = "The user with id '##userid' has published a recording with id ".
44
+        $this->description = "The user with id '##userid' has published a recording with id " .
45 45
             "'##other' in the course id '##courseid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.
classes/event/meeting_created.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) {
43 43
         parent::init($crud, $edulevel);
44
-        $this->description = "The user with id '##userid' created a bigbluebutton meeting for ".
44
+        $this->description = "The user with id '##userid' created a bigbluebutton meeting for " .
45 45
             "the bigbluebuttonbn activity with id '##objectid' for the course id '##courseid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.