Completed
Push — master ( 31f885...de0e82 )
by Jesus
01:58
created
bbb_ajax.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require(__DIR__.'/../../config.php');
27
-require_once(__DIR__.'/locallib.php');
28
-require_once(__DIR__.'/brokerlib.php');
26
+require(__DIR__ . '/../../config.php');
27
+require_once(__DIR__ . '/locallib.php');
28
+require_once(__DIR__ . '/brokerlib.php');
29 29
 
30 30
 global $PAGE, $USER, $CFG, $SESSION, $DB;
31 31
 
@@ -41,13 +41,13 @@  discard block
 block discarded – undo
41 41
 require_login(null, true);
42 42
 
43 43
 if (empty($params['action'])) {
44
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
44
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
45 45
     return;
46 46
 }
47 47
 
48 48
 $error = bigbluebuttonbn_broker_validate_parameters($params);
49 49
 if (!empty($error)) {
50
-    header('HTTP/1.0 400 Bad Request. '.$error);
50
+    header('HTTP/1.0 400 Bad Request. ' . $error);
51 51
     return;
52 52
 }
53 53
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         echo bigbluebuttonbn_broker_recording_import($bbbsession, $params);
122 122
         return;
123 123
     }
124
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
124
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
125 125
 } catch (Exception $e) {
126
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
126
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
127 127
 }
Please login to merge, or discard this patch.
bbb_broker.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
  * @author    Darko Miletic  (darko.miletic [at] gmail [dt] com)
25 25
  */
26 26
 
27
-require(__DIR__.'/../../config.php');
28
-require_once(__DIR__.'/locallib.php');
29
-require_once(__DIR__.'/brokerlib.php');
27
+require(__DIR__ . '/../../config.php');
28
+require_once(__DIR__ . '/locallib.php');
29
+require_once(__DIR__ . '/brokerlib.php');
30 30
 
31 31
 use \Firebase\JWT\JWT;
32 32
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 $params['meta'] = optional_param('meta', '', PARAM_TEXT);
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
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 $error = bigbluebuttonbn_broker_validate_parameters($params);
62 62
 if (!empty($error)) {
63
-    header('HTTP/1.0 400 Bad Request. '.$error);
63
+    header('HTTP/1.0 400 Bad Request. ' . $error);
64 64
     return;
65 65
 }
66 66
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn);
80 80
         return;
81 81
     }
82
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
82
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
83 83
 } catch (Exception $e) {
84
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
84
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
85 85
 }
Please login to merge, or discard this patch.
lib.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
  * @uses FEATURE_GRADE_OUTCOMES
102 102
  * @uses FEATURE_SHOW_DESCRIPTION
103 103
  * @param string $feature
104
- * @return mixed True if yes (some features may use other values)
104
+ * @return null|boolean True if yes (some features may use other values)
105 105
  */
106 106
 function bigbluebuttonbn_supports($feature) {
107 107
     if (!$feature) {
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
  *
221 221
  * @param object $bigbluebuttonbn Id of the module instance
222 222
  *
223
- * @return bool Success/Failure
223
+ * @return boolean|null Success/Failure
224 224
  */
225 225
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
226 226
     global $DB;
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
  * @param object $mod
242 242
  * @param object $bigbluebuttonbn
243 243
  *
244
- * @return bool
244
+ * @return string
245 245
  */
246 246
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
247 247
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn)) {
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
  * @param stdClass $context       context object
783 783
  * @param string   $filearea      file area
784 784
  *
785
- * @return false|null false if file not valid
785
+ * @return boolean false if file not valid
786 786
  */
787 787
 function bigbluebuttonbn_pluginfile_valid($context, $filearea) {
788 788
 
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
  * Remove this block when restored
65 65
  */
66 66
 
67
- /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
67
+    /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
68 68
 const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/';
69 69
 /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */
70 70
 const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6';
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
279 279
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
280 280
     $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,
281
-                                              BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
281
+                                                BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
282 282
     return $result;
283 283
 }
284 284
 
@@ -507,12 +507,12 @@  discard block
 block discarded – undo
507 507
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
508 508
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
509 509
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
510
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
510
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
511 511
     $str .= '  </div>'."\n";
512 512
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
513 513
         '</div>'."\n";
514 514
     $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
515
-      .'</div>'."\n";
515
+        .'</div>'."\n";
516 516
     $str .= '</div>'."\n";
517 517
     return $str;
518 518
 }
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
             $bigbluebuttonbn->coursemodule,
718 718
             'bigbluebuttonbn',
719 719
             $bigbluebuttonbn->id, $bigbluebuttonbn->completionexpected
720
-          );
720
+            );
721 721
     }
722 722
 }
723 723
 /**
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -28,23 +28,23 @@  discard block
 block discarded – undo
28 28
 
29 29
 global $CFG;
30 30
 
31
-require_once($CFG->dirroot.'/calendar/lib.php');
32
-require_once($CFG->dirroot.'/message/lib.php');
33
-require_once($CFG->dirroot.'/mod/lti/OAuth.php');
34
-require_once($CFG->dirroot.'/tag/lib.php');
35
-require_once($CFG->libdir.'/accesslib.php');
36
-require_once($CFG->libdir.'/completionlib.php');
37
-require_once($CFG->libdir.'/datalib.php');
38
-require_once($CFG->libdir.'/enrollib.php');
39
-require_once($CFG->libdir.'/filelib.php');
40
-require_once($CFG->libdir.'/formslib.php');
31
+require_once($CFG->dirroot . '/calendar/lib.php');
32
+require_once($CFG->dirroot . '/message/lib.php');
33
+require_once($CFG->dirroot . '/mod/lti/OAuth.php');
34
+require_once($CFG->dirroot . '/tag/lib.php');
35
+require_once($CFG->libdir . '/accesslib.php');
36
+require_once($CFG->libdir . '/completionlib.php');
37
+require_once($CFG->libdir . '/datalib.php');
38
+require_once($CFG->libdir . '/enrollib.php');
39
+require_once($CFG->libdir . '/filelib.php');
40
+require_once($CFG->libdir . '/formslib.php');
41 41
 
42 42
 // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility.
43 43
 if (!class_exists('\Firebase\JWT\JWT')) {
44
-    if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) {
45
-        require_once($CFG->libdir.'/php-jwt/src/JWT.php');
44
+    if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) {
45
+        require_once($CFG->libdir . '/php-jwt/src/JWT.php');
46 46
     } else {
47
-        require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
47
+        require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
48 48
     }
49 49
 }
50 50
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     $CFG->bigbluebuttonbn = array();
53 53
 }
54 54
 
55
-if (file_exists(dirname(__FILE__).'/config.php')) {
56
-    require_once(dirname(__FILE__).'/config.php');
55
+if (file_exists(dirname(__FILE__) . '/config.php')) {
56
+    require_once(dirname(__FILE__) . '/config.php');
57 57
 }
58 58
 
59 59
 /*
@@ -108,18 +108,18 @@  discard block
 block discarded – undo
108 108
         return null;
109 109
     }
110 110
     $features = array(
111
-        (string) FEATURE_IDNUMBER => true,
112
-        (string) FEATURE_GROUPS => true,
113
-        (string) FEATURE_GROUPINGS => true,
114
-        (string) FEATURE_GROUPMEMBERSONLY => true,
115
-        (string) FEATURE_MOD_INTRO => true,
116
-        (string) FEATURE_BACKUP_MOODLE2 => true,
117
-        (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,
118
-        (string) FEATURE_GRADE_HAS_GRADE => false,
119
-        (string) FEATURE_GRADE_OUTCOMES => false,
120
-        (string) FEATURE_SHOW_DESCRIPTION => true,
111
+        (string)FEATURE_IDNUMBER => true,
112
+        (string)FEATURE_GROUPS => true,
113
+        (string)FEATURE_GROUPINGS => true,
114
+        (string)FEATURE_GROUPMEMBERSONLY => true,
115
+        (string)FEATURE_MOD_INTRO => true,
116
+        (string)FEATURE_BACKUP_MOODLE2 => true,
117
+        (string)FEATURE_COMPLETION_TRACKS_VIEWS => true,
118
+        (string)FEATURE_GRADE_HAS_GRADE => false,
119
+        (string)FEATURE_GRADE_OUTCOMES => false,
120
+        (string)FEATURE_SHOW_DESCRIPTION => true,
121 121
     );
122
-    if (isset($features[(string) $feature])) {
122
+    if (isset($features[(string)$feature])) {
123 123
         return $features[$feature];
124 124
     }
125 125
     return null;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
226 226
     global $DB;
227 227
     $sql  = "SELECT * FROM {bigbluebuttonbn_logs} ";
228
-    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
228
+    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?";
229 229
     $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
230 230
     $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}";
231 231
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
  */
246 246
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
247 247
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn)) {
248
-        return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '.
249
-            get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '.
248
+        return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' .
249
+            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' .
250 250
             get_string('view_message_times', 'bigbluebuttonbn');
251 251
     }
252 252
     return '';
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
  * @return array status array
437 437
  */
438 438
 function bigbluebuttonbn_reset_recordings($courseid) {
439
-    require_once(__DIR__.'/locallib.php');
439
+    require_once(__DIR__ . '/locallib.php');
440 440
     // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true].
441 441
     $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true);
442 442
     // Remove all the recordings.
@@ -504,16 +504,16 @@  discard block
 block discarded – undo
504 504
     if ($bigbluebuttonbn->visible) {
505 505
         $classes = 'class="dimmed" ';
506 506
     }
507
-    $str  = '<div class="bigbluebuttonbn overview">'."\n";
508
-    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
509
-    $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
510
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
511
-    $str .= '  </div>'."\n";
512
-    $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
513
-        '</div>'."\n";
514
-    $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
515
-      .'</div>'."\n";
516
-    $str .= '</div>'."\n";
507
+    $str  = '<div class="bigbluebuttonbn overview">' . "\n";
508
+    $str .= '  <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ':&nbsp;' . "\n";
509
+    $str .= '    <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule .
510
+      '">' . $bigbluebuttonbn->name . '</a>' . "\n";
511
+    $str .= '  </div>' . "\n";
512
+    $str .= '  <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) .
513
+        '</div>' . "\n";
514
+    $str .= '  <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime)
515
+      .'</div>' . "\n";
516
+    $str .= '</div>' . "\n";
517 517
     return $str;
518 518
 }
519 519
 
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
     if (count($files) == 1) {
746 746
         // Get the first (and only) file.
747 747
         $file = reset($files);
748
-        $filesrc = '/'.$file->get_filename();
748
+        $filesrc = '/' . $file->get_filename();
749 749
     }
750 750
     return $filesrc;
751 751
 }
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
     if (!$filename) {
815 815
         return false;
816 816
     }
817
-    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;
817
+    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename;
818 818
     $fs = get_file_storage();
819 819
     $file = $fs->get_file_by_hash(sha1($fullpath));
820 820
     if (!$file || $file->is_directory()) {
Please login to merge, or discard this patch.
classes/locallib/notifier.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public static function notification_process($bigbluebuttonbn, $action) {
47 47
         global $USER;
48 48
         // Prepare message.
49
-        $msg = (object) array();
49
+        $msg = (object)array();
50 50
         // Build the message_body.
51 51
         $msg->action = $action;
52 52
         $msg->activity_type = '';
@@ -71,26 +71,26 @@  discard block
 block discarded – undo
71 71
      * @return string
72 72
      */
73 73
     public static function notification_msg_html($msg) {
74
-        $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '.
75
-            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n";
76
-        $messagetext .= '<p><b>'.$msg->activity_title.'</b> '.
77
-            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n";
78
-        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n";
79
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
80
-            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n";
81
-        $messagetext .= $msg->activity_title.'</td></tr>'."\n";
82
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
83
-            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n";
84
-        $messagetext .= $msg->activity_description.'</td></tr>'."\n";
85
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
86
-            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n";
87
-        $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n";
88
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
89
-            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n";
90
-        $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n";
91
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '.
92
-            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n";
93
-        $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n";
74
+        $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' .
75
+            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n";
76
+        $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' .
77
+            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n";
78
+        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n";
79
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
80
+            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n";
81
+        $messagetext .= $msg->activity_title . '</td></tr>' . "\n";
82
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
83
+            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n";
84
+        $messagetext .= $msg->activity_description . '</td></tr>' . "\n";
85
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
86
+            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
87
+        $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n";
88
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
89
+            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
90
+        $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n";
91
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' .
92
+            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n";
93
+        $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n";
94 94
         return $messagetext;
95 95
     }
96 96
 
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
     public static function notification_send($sender, $bigbluebuttonbn, $message = '') {
106 106
         list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn');
107 107
         // Complete message.
108
-        $msg = (object) array();
108
+        $msg = (object)array();
109 109
         $msg->user_name = fullname($sender);
110 110
         $msg->user_email = $sender->email;
111 111
         $msg->course_name = $course->fullname;
112
-        $message .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '.
113
-            $msg->user_name.'('.$msg->user_email.') ';
114
-        $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>';
112
+        $message .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' .
113
+            $msg->user_name . '(' . $msg->user_email . ') ';
114
+        $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>';
115 115
         // Process the message sending.
116 116
         foreach (self::users_to_notify($cm) as $user) {
117 117
             if ($user->id != $sender->id) {
Please login to merge, or discard this patch.
brokerlib.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 function bigbluebuttonbn_broker_recording_info_current($recording, $params) {
209 209
     $callbackresponse['status'] = true;
210 210
     $callbackresponse['found'] = true;
211
-    $callbackresponse['published'] = (string) $recording['published'];
211
+    $callbackresponse['published'] = (string)$recording['published'];
212 212
     if (!isset($params['meta']) || empty($params['meta'])) {
213 213
         return $callbackresponse;
214 214
     }
@@ -535,8 +535,8 @@  discard block
 block discarded – undo
535 535
         $decodedparameters = \Firebase\JWT\JWT::decode($params['signed_parameters'],
536 536
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
537 537
     } catch (Exception $e) {
538
-        $error = 'Caught exception: '.$e->getMessage();
539
-        header('HTTP/1.0 400 Bad Request. '.$error);
538
+        $error = 'Caught exception: ' . $e->getMessage();
539
+        header('HTTP/1.0 400 Bad Request. ' . $error);
540 540
         return;
541 541
     }
542 542
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -561,13 +561,13 @@  discard block
 block discarded – undo
561 561
             bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn);
562 562
         }
563 563
         $overrides = array('meetingid' => $decodedparameters->meeting_id);
564
-        $meta = '{"recordid":'.$decodedparameters->record_id.'}';
565
-        $meta = '{"recordid":"'.$decodedparameters->record_id.'"}';
564
+        $meta = '{"recordid":' . $decodedparameters->record_id . '}';
565
+        $meta = '{"recordid":"' . $decodedparameters->record_id . '"}';
566 566
         bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, $meta);
567 567
         header('HTTP/1.0 202 Accepted');
568 568
     } catch (Exception $e) {
569
-        $error = 'Caught exception: '.$e->getMessage();
570
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
569
+        $error = 'Caught exception: ' . $e->getMessage();
570
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
571 571
     }
572 572
 }
573 573
 
@@ -588,13 +588,13 @@  discard block
 block discarded – undo
588 588
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
589 589
     if (!isset($importrecordings[$params['id']])) {
590 590
         $error = "Recording {$params['id']} could not be found. It can not be imported";
591
-        header('HTTP/1.0 404 Not found. '.$error);
591
+        header('HTTP/1.0 404 Not found. ' . $error);
592 592
         return;
593 593
     }
594 594
     $callbackresponse = array('status' => true);
595 595
     $importrecordings[$params['id']]['imported'] = true;
596 596
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
597
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
597
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
598 598
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
599 599
     // Moodle event logger: Create an event for recording imported.
600 600
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -619,8 +619,8 @@  discard block
 block discarded – undo
619 619
         $decodedparameters = \Firebase\JWT\JWT::decode($params['signed_parameters'],
620 620
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
621 621
     } catch (Exception $e) {
622
-        $error = 'Caught exception: '.$e->getMessage();
623
-        header('HTTP/1.0 400 Bad Request. '.$error);
622
+        $error = 'Caught exception: ' . $e->getMessage();
623
+        header('HTTP/1.0 400 Bad Request. ' . $error);
624 624
         return;
625 625
     }
626 626
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
     }
662 662
     $action = strtolower($params['action']);
663 663
     if (!array_key_exists($action, $requiredparams)) {
664
-        return 'Action '.$params['action'].' can not be performed.';
664
+        return 'Action ' . $params['action'] . ' can not be performed.';
665 665
     }
666 666
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
667 667
 }
Please login to merge, or discard this patch.