Completed
Push — v2.3-stable ( da9741...0662b8 )
by Jesus
01:44
created
classes/output/mobile.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
27 27
 
28 28
 defined('MOODLE_INTERNAL') || die();
29 29
 
30
-use context_module;
31 30
 use mod_bigbluebuttonbn\locallib\bigbluebutton;
32 31
 
33 32
 require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 use context_module;
31 31
 use mod_bigbluebuttonbn\locallib\bigbluebutton;
32 32
 
33
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
34
-require_once($CFG->dirroot . '/lib/grouplib.php');
33
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
34
+require_once($CFG->dirroot.'/lib/grouplib.php');
35 35
 
36 36
 /**
37 37
  * Mobile output class for bigbluebuttonbn
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             }
165 165
             if ($response['returncode'] == 'FAILED') {
166 166
                 // The meeting could not be created.
167
-                $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'],  'view_error_create');
167
+                $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create');
168 168
                 $e = get_string($errorkey, 'bigbluebuttonbn');
169 169
                 return(self::mobile_print_error($e));
170 170
             }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
                     'html' => $OUTPUT->render_from_template('mod_bigbluebuttonbn/mobile_view_notification', $data),
282 282
                 ),
283 283
             ),
284
-            'javascript' => file_get_contents($CFG->dirroot . '/mod/bigbluebuttonbn/mobile.notification.js'),
284
+            'javascript' => file_get_contents($CFG->dirroot.'/mod/bigbluebuttonbn/mobile.notification.js'),
285 285
             'otherdata' => '',
286 286
             'files' => ''
287 287
         );
Please login to merge, or discard this patch.
classes/locallib/bigbluebutton.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 defined('MOODLE_INTERNAL') || die();
31 31
 global $CFG;
32
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
32
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
33 33
 
34 34
 /**
35 35
  * Wrapper for executing http requests on a BigBlueButton server.
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
      * @return string
49 49
      */
50 50
     public static function action_url($action = '', $data = array(), $metadata = array()) {
51
-        $baseurl = self::sanitized_url() . $action . '?';
51
+        $baseurl = self::sanitized_url().$action.'?';
52 52
         $metadata = array_combine(
53 53
             array_map(
54 54
                 function($k) {
55
-                    return 'meta_' . $k;
55
+                    return 'meta_'.$k;
56 56
                 }
57 57
                 , array_keys($metadata)
58 58
             ),
59 59
             $metadata
60 60
         );
61 61
         $params = http_build_query($data + $metadata, '', '&');
62
-        return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret());
62
+        return $baseurl.$params.'&checksum='.sha1($action.$params.self::sanitized_secret());
63 63
     }
64 64
 
65 65
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         if (substr($serverurl, -4) == '/api') {
76 76
             $serverurl = rtrim($serverurl, '/api');
77 77
         }
78
-        return $serverurl . '/api/';
78
+        return $serverurl.'/api/';
79 79
     }
80 80
 
81 81
     /**
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
         $pserverurl = parse_url(trim(config::get('server_url')));
97 97
         $pserverurlport = "";
98 98
         if (isset($pserverurl['port'])) {
99
-            $pserverurlport = ":" . $pserverurl['port'];
99
+            $pserverurlport = ":".$pserverurl['port'];
100 100
         }
101
-        return $pserverurl['scheme'] . "://" . $pserverurl['host'] . $pserverurlport . "/";
101
+        return $pserverurl['scheme']."://".$pserverurl['host'].$pserverurlport."/";
102 102
     }
103 103
 
104 104
     /**
@@ -152,15 +152,15 @@  discard block
 block discarded – undo
152 152
         $bbbsession['serverversion'] = (string) $serverversion;
153 153
 
154 154
         // Operation URLs.
155
-        $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id;
156
-        $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $cm->id .
157
-            '&bn=' . $bbbsession['bigbluebuttonbn']->id;
158
-        $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
159
-            'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
160
-        $bbbsession['meetingEventsURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=meeting' .
161
-            '_events&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
162
-        $bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $cm->id .
163
-            '&bn=' . $bbbsession['bigbluebuttonbn']->id;
155
+        $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id;
156
+        $bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$cm->id.
157
+            '&bn='.$bbbsession['bigbluebuttonbn']->id;
158
+        $bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_'.
159
+            'ready&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id;
160
+        $bbbsession['meetingEventsURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=meeting'.
161
+            '_events&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id;
162
+        $bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$cm->id.
163
+            '&bn='.$bbbsession['bigbluebuttonbn']->id;
164 164
 
165 165
         return $bbbsession;
166 166
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         if ($viewinstance) {
268 268
             $bbbsession = self::build_bbb_session_fromviewinstance($viewinstance);
269 269
             if ($bbbsession) {
270
-                require_once($CFG->dirroot . "/mod/bigbluebuttonbn/brokerlib.php");
270
+                require_once($CFG->dirroot."/mod/bigbluebuttonbn/brokerlib.php");
271 271
                 $info = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], false);
272 272
                 $running = false;
273 273
                 if ($info['returncode'] == 'SUCCESS') {
Please login to merge, or discard this patch.
classes/locallib/mobileview.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 defined('MOODLE_INTERNAL') || die();
28 28
 global $CFG;
29
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
29
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
30 30
 
31 31
 /**
32 32
  * Methods used to render view BBB in mobile.
@@ -95,18 +95,18 @@  discard block
 block discarded – undo
95 95
             'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
96 96
         ];
97 97
         // Check recording status.
98
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
98
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
99 99
             $metadatabbb["bn-recording-status"] = json_encode(
100 100
                 array(
101
-                    'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
101
+                    'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
102 102
                     'context' => $bbbsession['bigbluebuttonbnURL']
103 103
                 )
104 104
             );
105 105
         }
106
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
106
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
107 107
             $metadatabbb['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
108 108
         }
109
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
109
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
110 110
             $metadatabbb['bn-meeting-events-url'] = $bbbsession['meetingEventsURL'];
111 111
         }
112 112
         return $metadatabbb;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      * @return string
168 168
      */
169 169
     public static function bigbluebutton_bbb_view_create_meeting_data_record($record) {
170
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) {
170
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) {
171 171
             return 'true';
172 172
         }
173 173
         return 'false';
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      * @return integer
181 181
      */
182 182
     public static function bigbluebutton_bbb_view_create_meeting_data_duration($closingtime) {
183
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) {
183
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) {
184 184
             return bigbluebuttonbn_get_duration($closingtime);
185 185
         }
186 186
         return 0;
Please login to merge, or discard this patch.
classes/external.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public static function view_bigbluebuttonbn($bigbluebuttonbnid) {
63 63
         global $DB, $CFG;
64
-        require_once($CFG->dirroot . "/mod/bigbluebuttonbn/lib.php");
64
+        require_once($CFG->dirroot."/mod/bigbluebuttonbn/lib.php");
65 65
 
66 66
         $params = self::validate_parameters(self::view_bigbluebuttonbn_parameters(),
67 67
                                             array(
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @since Moodle 3.3
110 110
      */
111 111
     public static function get_bigbluebuttonbns_by_courses_parameters() {
112
-        return new external_function_parameters (
112
+        return new external_function_parameters(
113 113
             array(
114 114
                 'courseids' => new external_multiple_structure(
115 115
                     new external_value(PARAM_INT, 'Course id'), 'Array of course ids', VALUE_DEFAULT, array()
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     public static function can_join($cmid) {
227 227
         global $SESSION, $CFG;
228
-        require_once($CFG->dirroot . "/mod/bigbluebuttonbn/locallib.php");
228
+        require_once($CFG->dirroot."/mod/bigbluebuttonbn/locallib.php");
229 229
 
230 230
         $params = self::validate_parameters(self::can_join_parameters(),
231 231
             array(
Please login to merge, or discard this patch.
bbb_view.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $lastaccess = json_decode($lastaccess->meta);
139 139
         // If the user acceded from Timeline it should be redirected to the Dashboard.
140 140
         if (isset($lastaccess->origin) && $lastaccess->origin == BIGBLUEBUTTON_ORIGIN_TIMELINE) {
141
-            redirect($CFG->wwwroot . '/my/');
141
+            redirect($CFG->wwwroot.'/my/');
142 142
         }
143 143
         // Close the tab or window where BBB was opened.
144 144
         bigbluebutton_bbb_view_close_window();
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
  * @return string
341 341
  */
342 342
 function bigbluebutton_bbb_view_create_meeting_data_record($record) {
343
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) {
343
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) {
344 344
         return 'true';
345 345
     }
346 346
     return 'false';
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
  * @return integer
354 354
  */
355 355
 function bigbluebutton_bbb_view_create_meeting_data_duration($closingtime) {
356
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) {
356
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) {
357 357
         return bigbluebuttonbn_get_duration($closingtime);
358 358
     }
359 359
     return 0;
@@ -377,18 +377,18 @@  discard block
 block discarded – undo
377 377
                  'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
378 378
                  'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
379 379
                 ];
380
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
380
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
381 381
         $metadata["bn-recording-status"] = json_encode(
382 382
             array(
383
-                'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
383
+                'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
384 384
                 'context' => $bbbsession['bigbluebuttonbnURL']
385 385
               )
386 386
           );
387 387
     }
388
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
388
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
389 389
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
390 390
     }
391
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
391
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
392 392
         $metadata['bn-meeting-events-url'] = $bbbsession['meetingEventsURL'];
393 393
     }
394 394
     return $metadata;
Please login to merge, or discard this patch.
view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 mod_bigbluebuttonbn\locallib\bigbluebutton::view_bbbsession_set($PAGE->context, $bbbsession);
59 59
 
60 60
 // Validates if the BigBlueButton server is working.
61
-$serverversion = bigbluebuttonbn_get_server_version();  // In locallib.
61
+$serverversion = bigbluebuttonbn_get_server_version(); // In locallib.
62 62
 if ($serverversion === null) {
63 63
     $errmsg = 'view_error_unable_join_student';
64 64
     $errurl = '/course/view.php';
Please login to merge, or discard this patch.