Completed
Push — master ( 1d1df5...87b1fe )
by Jesus
07:01
created
classes/event/bigbluebuttonbn_recording_edited.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     protected function init() {
36 36
         parent::init();
37
-        $this->description = "The user with id '$this->userid' has edited a recording with id ".
37
+        $this->description = "The user with id '$this->userid' has edited a recording with id " .
38 38
             "'$this->other' in the course id '$this->contextinstanceid'.";
39 39
     }
40 40
 
Please login to merge, or discard this patch.
bbb_broker.php 1 patch
Spacing   +19 added lines, -19 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
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
 function bigbluebuttonbn_broker_recording_info_current($recording, $params) {
291 291
     $callbackresponse['status'] = true;
292
-    $callbackresponse['published'] = (string) $recording['published'];
292
+    $callbackresponse['published'] = (string)$recording['published'];
293 293
     if (!isset($params['meta'])) {
294 294
         return $callbackresponse;
295 295
     }
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         // Execute publish or unprotect on imported recording link, if the real recording is published.
383 383
         $realrecordings = bigbluebuttonbn_get_recordings_array(
384 384
             $recordings[$params['id']]['meetingID'], $recordings[$params['id']]['recordID']);
385
-        $status = ($realrecordings[$params['id']][$action.'ed'] === 'true');
385
+        $status = ($realrecordings[$params['id']][$action . 'ed'] === 'true');
386 386
         if ($status) {
387 387
             // Only if the physical recording is published, execute publish on imported recording link.
388 388
             bigbluebuttonbn_publish_recording_imported($params['id'], $bbbsession['bigbluebuttonbn']->id, true);
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 
395 395
     $response = array('status' => $status);
396 396
     if (!$status) {
397
-        $response['message'] = get_string('view_recording_'.$action.'_link_error', 'bigbluebuttonbn');
397
+        $response['message'] = get_string('view_recording_' . $action . '_link_error', 'bigbluebuttonbn');
398 398
     }
399 399
     return $response;
400 400
 }
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
         foreach ($importedall as $key => $record) {
428 428
             $meta = json_decode($record->meta, true);
429 429
             // Prepare data for the update.
430
-            $meta['recording'][$action.'ed'] = 'false';
430
+            $meta['recording'][$action . 'ed'] = 'false';
431 431
             $importedall[$key]->meta = json_encode($meta);
432 432
 
433 433
             // Proceed with the update.
@@ -493,8 +493,8 @@  discard block
 block discarded – undo
493 493
         $decodedparameters = JWT::decode($params['signed_parameters'], \mod_bigbluebuttonbn\locallib\config::get('shared_secret'),
494 494
             array('HS256'));
495 495
     } catch (Exception $e) {
496
-        $error = 'Caught exception: '.$e->getMessage();
497
-        header('HTTP/1.0 400 Bad Request. '.$error);
496
+        $error = 'Caught exception: ' . $e->getMessage();
497
+        header('HTTP/1.0 400 Bad Request. ' . $error);
498 498
         return;
499 499
     }
500 500
 
@@ -512,8 +512,8 @@  discard block
 block discarded – undo
512 512
         bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn);
513 513
         header('HTTP/1.0 202 Accepted');
514 514
     } catch (Exception $e) {
515
-        $error = 'Caught exception: '.$e->getMessage();
516
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
515
+        $error = 'Caught exception: ' . $e->getMessage();
516
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
517 517
     }
518 518
 }
519 519
 
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
529 529
     if (!isset($importrecordings[$params['id']])) {
530 530
         $error = "Recording {$params['id']} could not be found. It can not be imported";
531
-        header('HTTP/1.0 404 Not found. '.$error);
531
+        header('HTTP/1.0 404 Not found. ' . $error);
532 532
         return;
533 533
     }
534 534
 
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 
537 537
     $importrecordings[$params['id']]['imported'] = true;
538 538
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
539
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
539
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
540 540
     bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
541 541
     // Moodle event logger: Create an event for recording imported.
542 542
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -554,8 +554,8 @@  discard block
 block discarded – undo
554 554
         $decodedparameters = JWT::decode($params['signed_parameters'], \mod_bigbluebuttonbn\locallib\config::get('shared_secret'),
555 555
             array('HS256'));
556 556
     } catch (Exception $e) {
557
-        $error = 'Caught exception: '.$e->getMessage();
558
-        header('HTTP/1.0 400 Bad Request. '.$error);
557
+        $error = 'Caught exception: ' . $e->getMessage();
558
+        header('HTTP/1.0 400 Bad Request. ' . $error);
559 559
         return;
560 560
     }
561 561
 
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 
594 594
     $action = strtolower($params['action']);
595 595
     if (!array_key_exists($action, $requiredparams)) {
596
-        return 'Action '.$params['action'].' can not be performed.';
596
+        return 'Action ' . $params['action'] . ' can not be performed.';
597 597
     }
598 598
 
599 599
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
Please login to merge, or discard this patch.
mod_form.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 defined('MOODLE_INTERNAL') || die();
28 28
 
29
-require_once(dirname(__FILE__).'/locallib.php');
30
-require_once($CFG->dirroot.'/course/moodleform_mod.php');
29
+require_once(dirname(__FILE__) . '/locallib.php');
30
+require_once($CFG->dirroot . '/course/moodleform_mod.php');
31 31
 
32 32
 class mod_bigbluebuttonbn_mod_form extends moodleform_mod {
33 33
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $serverversion = bigbluebuttonbn_get_server_version();
39 39
         if (is_null($serverversion)) {
40 40
             print_error('general_error_unable_connect', 'bigbluebuttonbn',
41
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
41
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
42 42
         }
43 43
 
44 44
         $bigbluebuttonbn = null;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                 );
130 130
                 $defaultvalues['presentation'] = $draftitemid;
131 131
             } catch (Exception $e) {
132
-                debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER);
132
+                debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER);
133 133
                 return null;
134 134
             }
135 135
         }
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
             html_writer::select($participantselection['type_options'], 'bigbluebuttonbn_participant_selection_type',
310 310
                 $participantselection['type_selected'], array(),
311 311
                 array('id' => 'bigbluebuttonbn_participant_selection_type',
312
-                      'onchange' => 'M.mod_bigbluebuttonbn.modform.participant_selection_set(); return 0;')).'  '.
312
+                      'onchange' => 'M.mod_bigbluebuttonbn.modform.participant_selection_set(); return 0;')) . '  ' .
313 313
             html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection',
314 314
                 $participantselection['selected'], array(),
315
-                array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')).'  '.
315
+                array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')) . '  ' .
316 316
             html_writer::tag('input', '', array('id' => 'id_addselectionid', 'type' => 'button', 'class' => 'btn btn-secondary',
317 317
                 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'),
318 318
                 'onclick' => 'M.mod_bigbluebuttonbn.modform.participant_add(); return 0;'
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         // Render elements for participant list.
333 333
         $htmllist = html_writer::tag('div',
334 334
             html_writer::label(get_string('mod_form_field_participant_list', 'bigbluebuttonbn'),
335
-                'bigbluebuttonbn_participant_list').
335
+                'bigbluebuttonbn_participant_list') .
336 336
             html_writer::table($table)
337 337
         );
338 338
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
         }
366 366
 
367 367
         $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options);
368
-        if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) {
368
+        if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) {
369 369
             $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn');
370 370
         }
371 371
         if (!empty($rule)) {
Please login to merge, or discard this patch.
bbb_view.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -178,10 +178,10 @@  discard block
 block discarded – undo
178 178
 
179 179
 function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession, $bigbluebuttonbn) {
180 180
     $data = ['meetingID' => $bbbsession['meetingid'],
181
-              'name' => $bbbsession['meetingname'],
182
-              'attendeePW' => $bbbsession['viewerPW'],
183
-              'moderatorPW' => $bbbsession['modPW'],
184
-              'logoutURL' => $bbbsession['logoutURL'],
181
+                'name' => $bbbsession['meetingname'],
182
+                'attendeePW' => $bbbsession['viewerPW'],
183
+                'moderatorPW' => $bbbsession['modPW'],
184
+                'logoutURL' => $bbbsession['logoutURL'],
185 185
             ];
186 186
 
187 187
     $data['record'] = 'false';
@@ -219,14 +219,14 @@  discard block
 block discarded – undo
219 219
 
220 220
 function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) {
221 221
     $metadata = ['bbb-origin' => $bbbsession['origin'],
222
-                 'bbb-origin-version' => $bbbsession['originVersion'],
223
-                 'bbb-origin-server-name' => $bbbsession['originServerName'],
224
-                 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
225
-                 'bbb-origin-tag' => $bbbsession['originTag'],
226
-                 'bbb-context' => $bbbsession['course']->fullname,
227
-                 'bbb-recording-name' => $bbbsession['meetingname'],
228
-                 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
229
-                 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
222
+                    'bbb-origin-version' => $bbbsession['originVersion'],
223
+                    'bbb-origin-server-name' => $bbbsession['originServerName'],
224
+                    'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
225
+                    'bbb-origin-tag' => $bbbsession['originTag'],
226
+                    'bbb-context' => $bbbsession['course']->fullname,
227
+                    'bbb-recording-name' => $bbbsession['meetingname'],
228
+                    'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
229
+                    'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
230 230
                 ];
231 231
 
232 232
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
@@ -234,8 +234,8 @@  discard block
 block discarded – undo
234 234
             array(
235 235
                 'email' => bigbluebuttonbn_get_moderator_email($bbbsession['context']),
236 236
                 'context' => $bbbsession['bigbluebuttonbnURL']
237
-              )
238
-          );
237
+                )
238
+            );
239 239
     }
240 240
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
241 241
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
Please login to merge, or discard this patch.