@@ -23,8 +23,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -41,8 +41,8 @@ |
||
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 |
@@ -41,8 +41,8 @@ |
||
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 |
@@ -41,7 +41,7 @@ |
||
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 |
@@ -41,7 +41,7 @@ |
||
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 |
@@ -40,7 +40,7 @@ |
||
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 |
@@ -41,7 +41,7 @@ |
||
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 |
@@ -41,7 +41,7 @@ |
||
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 |
@@ -41,7 +41,7 @@ |
||
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 unpublished a recording with id ". |
|
44 | + $this->description = "The user with id '##userid' has unpublished a recording with id " . |
|
45 | 45 | "'##other' in the course id '##courseid'."; |
46 | 46 | } |
47 | 47 |