Completed
Pull Request — v2.2-stable (#330)
by Jesus
02:19
created
classes/settings/renderer.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
                 !isset($CFG->bigbluebuttonbn['recordings_imported_editable']) ||
206 206
                 !isset($CFG->bigbluebuttonbn['recordings_preview_default']) ||
207 207
                 !isset($CFG->bigbluebuttonbn['recordings_preview_editable'])
208
-              );
208
+                );
209 209
     }
210 210
 
211 211
     /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 defined('MOODLE_INTERNAL') || die();
29 29
 
30 30
 require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
31
-require_once($CFG->libdir.'/adminlib.php');
31
+require_once($CFG->libdir . '/adminlib.php');
32 32
 
33 33
 /**
34 34
  * Helper class for rendering HTML for settings.php.
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             $itemname = get_string('config_' . $name, 'bigbluebuttonbn');
67 67
         }
68 68
         if ($itemdescription === null) {
69
-            $itemdescription = get_string('config_' .$name . '_description', 'bigbluebuttonbn');
69
+            $itemdescription = get_string('config_' . $name . '_description', 'bigbluebuttonbn');
70 70
         }
71 71
         $item = new \admin_setting_heading('bigbluebuttonbn_config_' . $name, $itemname, $itemdescription);
72 72
         $this->settings->add($item);
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     public function render_warning_message($name, $message, $type = 'warning', $closable = true) {
149 149
         global $OUTPUT;
150 150
         $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
151
-            'bigbluebuttonbn_' . $name)."\n";
151
+            'bigbluebuttonbn_' . $name) . "\n";
152 152
         if ($closable) {
153 153
             $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>' . "\n";
154 154
         }
Please login to merge, or discard this patch.
classes/locallib/notifier.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public static function notification_process($context, $bigbluebuttonbn, $action) {
48 48
         global $USER;
49 49
         // Prepare message.
50
-        $msg = (object) array();
50
+        $msg = (object)array();
51 51
         // Build the message_body.
52 52
         $msg->action = $action;
53 53
         $msg->activity_type = '';
@@ -72,26 +72,26 @@  discard block
 block discarded – undo
72 72
      * @return string
73 73
      */
74 74
     public static function notification_msg_html($msg) {
75
-        $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '.
76
-            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n";
77
-        $messagetext .= '<p><b>'.$msg->activity_title.'</b> '.
78
-            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n";
79
-        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n";
80
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
81
-            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n";
82
-        $messagetext .= $msg->activity_title.'</td></tr>'."\n";
83
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
84
-            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n";
85
-        $messagetext .= $msg->activity_description.'</td></tr>'."\n";
86
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
87
-            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n";
88
-        $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n";
89
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
90
-            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n";
91
-        $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n";
92
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '.
93
-            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n";
94
-        $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n";
75
+        $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' .
76
+            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n";
77
+        $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' .
78
+            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n";
79
+        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n";
80
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
81
+            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n";
82
+        $messagetext .= $msg->activity_title . '</td></tr>' . "\n";
83
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
84
+            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n";
85
+        $messagetext .= $msg->activity_description . '</td></tr>' . "\n";
86
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
87
+            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
88
+        $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n";
89
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
90
+            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
91
+        $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n";
92
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' .
93
+            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n";
94
+        $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n";
95 95
         return $messagetext;
96 96
     }
97 97
 
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
         global $DB;
109 109
         $course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST);
110 110
         // Complete message.
111
-        $msg = (object) array();
111
+        $msg = (object)array();
112 112
         $msg->user_name = fullname($sender);
113 113
         $msg->user_email = $sender->email;
114 114
         $msg->course_name = "$course->fullname";
115
-        $message .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '.
116
-            $msg->user_name.'('.$msg->user_email.') ';
117
-        $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>';
118
-        $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
115
+        $message .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' .
116
+            $msg->user_name . '(' . $msg->user_email . ') ';
117
+        $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>';
118
+        $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
119 119
         foreach ($users as $user) {
120 120
             if ($user->id != $sender->id) {
121 121
                 message_post_message($sender, $user, $message, FORMAT_HTML);
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
  * @author    Fred Dixon  (ffdixon [at] blindsidenetworks [dt] com)
25 25
  */
26 26
 
27
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
28
-require_once(dirname(__FILE__).'/locallib.php');
27
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
28
+require_once(dirname(__FILE__) . '/locallib.php');
29 29
 
30 30
 $id = required_param('id', PARAM_INT);
31 31
 $a = optional_param('a', 0, PARAM_INT);
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
     if ($moderator || $administrator) {
90 90
         bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $cm);
91 91
         echo get_string('index_ending', 'bigbluebuttonbn');
92
-        $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
92
+        $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
93 93
         if ($g != '0') {
94
-            $meetingid .= '['.$g.']';
94
+            $meetingid .= '[' . $g . ']';
95 95
         }
96 96
 
97 97
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
98
-        redirect('index.php?id='.$id);
98
+        redirect('index.php?id=' . $id);
99 99
     }
100 100
 }
101 101
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         // Add a the data for the bigbluebuttonbn instance.
111 111
         $groupobj = null;
112 112
         if (groups_get_activity_groupmode($cm) > 0) {
113
-            $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants'));
113
+            $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants'));
114 114
         }
115 115
         $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj);
116 116
         // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any.
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
  * @return array
137 137
  */
138 138
 function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
139
-    $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
139
+    $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
140 140
     $paramgroup = '';
141 141
     $groupname = '';
142 142
     if ($groupobj) {
143
-        $meetingid .= '['.$groupobj->id.']';
144
-        $paramgroup = '&group='.$groupobj->id;
143
+        $meetingid .= '[' . $groupobj->id . ']';
144
+        $paramgroup = '&group=' . $groupobj->id;
145 145
         $groupname = $groupobj->name;
146 146
     }
147 147
     $meetinginfo = bigbluebuttonbn_get_meeting_info_array($meetingid);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         return;
157 157
     }
158 158
     // Output Users in the meeting.
159
-    $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>';
159
+    $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>';
160 160
     $group = $groupname;
161 161
     $users = '';
162 162
     $viewerlist = '';
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $attendeecount = 0;
202 202
         foreach ($meetinginfo['attendees']->attendee as $attendee) {
203 203
             if ($attendee->role == $role) {
204
-                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName;
204
+                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName;
205 205
             }
206 206
         }
207 207
     }
@@ -235,17 +235,17 @@  discard block
 block discarded – undo
235 235
 function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
236 236
     $actions = '';
237 237
     if ($moderator) {
238
-        $actions .= '<form name="form1" method="post" action="">'."\n";
239
-        $actions .= '  <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n";
240
-        $actions .= '  <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n";
238
+        $actions .= '<form name="form1" method="post" action="">' . "\n";
239
+        $actions .= '  <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n";
240
+        $actions .= '  <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n";
241 241
         if ($groupobj != null) {
242
-            $actions .= '  <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n";
242
+            $actions .= '  <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n";
243 243
         }
244 244
         $actions .= '  <INPUT type="submit" name="submit" value="' .
245 245
             get_string('view_conference_action_end', 'bigbluebuttonbn') .
246 246
             '" class="btn btn-primary btn-sm" onclick="return confirm(\'' .
247 247
             get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n";
248
-        $actions .= '</form>'."\n";
248
+        $actions .= '</form>' . "\n";
249 249
     }
250 250
     return $actions;
251 251
 }
Please login to merge, or discard this patch.
classes/locallib/bigbluebutton.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
             $params .= '&' . $key . '=' . urlencode($value);
53 53
         }
54 54
         foreach ($metadata as $key => $value) {
55
-            $params .= '&' . 'meta_' . $key.'=' . urlencode($value);
55
+            $params .= '&' . 'meta_' . $key . '=' . urlencode($value);
56 56
         }
57 57
         return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret());
58 58
     }
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_deleted.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() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' has deleted a recording with id ".
43
+        $this->description = "The user with id '##userid' has deleted a recording with id " .
44 44
             "'##other' from the course id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_meeting_ended.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id ".
44
-            "'##objectid' for the course id '##contextinstanceid' has been forcibly ".
43
+        $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id " .
44
+            "'##objectid' for the course id '##contextinstanceid' has been forcibly " .
45 45
             "ended by the user with id '##userid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_edited.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() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' has edited a recording with id ".
43
+        $this->description = "The user with id '##userid' has edited a recording with id " .
44 44
             "'##other' in the course id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_recording_published.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() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' has published a recording with id ".
43
+        $this->description = "The user with id '##userid' has published a recording with id " .
44 44
             "'##other' in the course id '##contextinstanceid'.";
45 45
     }
46 46
 
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_meeting_left.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
      */
41 41
     protected function init() {
42 42
         parent::init();
43
-        $this->description = "The user with id '##userid' has left a bigbluebutton meeting for ".
44
-            "the bigbluebuttonbn activity with id '##objectid' for the course id ".
43
+        $this->description = "The user with id '##userid' has left a bigbluebutton meeting for " .
44
+            "the bigbluebuttonbn activity with id '##objectid' for the course id " .
45 45
             "'##contextinstanceid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.