Completed
Push — master ( 33683d...349104 )
by Jesus
02:36
created
backup/moodle2/backup_bigbluebuttonbn_stepslib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
                             'moderatorpass', 'viewerpass', 'wait', 'record', 'tagging',
41 41
                             'welcome', 'voicebridge', 'openingtime', 'closingtime',
42 42
                             'timecreated', 'timemodified', 'presentation', 'participants',
43
-                            'userlimit', ));
43
+                            'userlimit',));
44 44
 
45 45
         $logs = new backup_nested_element('logs');
46 46
 
47 47
         $log = new backup_nested_element('log', array('id'), array(
48
-                'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', ));
48
+                'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',));
49 49
 
50 50
         // Build the tree.
51 51
         $bigbluebuttonbn->add_child($logs);
Please login to merge, or discard this patch.
settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 global $CFG;
29 29
 
30
-require_once(dirname(__FILE__).'/locallib.php');
30
+require_once(dirname(__FILE__) . '/locallib.php');
31 31
 
32 32
 if ($ADMIN->fulltree) {
33 33
     if (!isset($CFG->bigbluebuttonbn['server_url']) ||
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
         } else {
259 259
             $settings->add(new admin_setting_heading('bigbluebuttonbn_feature_preuploadpresentation',
260 260
                 get_string('config_feature_preuploadpresentation', 'bigbluebuttonbn'),
261
-                get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn').'<br><br>'.
262
-                '<div class="form-defaultinfo">'.get_string('config_warning_curl_not_installed', 'bigbluebuttonbn').'</div><br>'
261
+                get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn') . '<br><br>' .
262
+                '<div class="form-defaultinfo">' . get_string('config_warning_curl_not_installed', 'bigbluebuttonbn') . '</div><br>'
263 263
                 ));
264 264
         }
265 265
     }
Please login to merge, or discard this patch.
classes/event/bigbluebuttonbn_live_session_event.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
      * @return string
53 53
      */
54 54
     public function get_description() {
55
-        $a = (object) array('userid' => $this->userid,
55
+        $a = (object)array('userid' => $this->userid,
56 56
                             'bigbluebuttonbnid' => $this->objectid,
57 57
                             'courseid' => $this->contextinstanceid,
58 58
                             'action' => $this->other);
59 59
 
60
-        return "The user with id '$a->userid' triggered action $a->action in a ".
61
-        "bigbluebutton meeting for the bigbluebuttonbn activity with id ".
60
+        return "The user with id '$a->userid' triggered action $a->action in a " .
61
+        "bigbluebutton meeting for the bigbluebuttonbn activity with id " .
62 62
         "'$a->bigbluebuttonbnid' for the course id '$a->courseid'.";
63 63
     }
64 64
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     protected function get_legacy_logdata() {
71 71
         return array($this->courseid, 'bigbluebuttonbn', 'meeting left',
72
-                'view.php?pageid='.$this->objectid, 'BigBlueButtonBN meeting live session event',
72
+                'view.php?pageid=' . $this->objectid, 'BigBlueButtonBN meeting live session event',
73 73
                 $this->contextinstanceid);
74 74
     }
75 75
 
Please login to merge, or discard this patch.
config-dist.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
  * recordings from a different activity even from a different course.
95 95
  **/
96 96
 
97
- /*
97
+    /*
98 98
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
99 99
  * activities will have the 'import recordings' capability enabled.
100 100
  */
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
  * 'Join session' button enabled
116 116
  **/
117 117
 
118
- /*
118
+    /*
119 119
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
120 120
  * activities will have the 'wait for moderator' capability enabled by
121 121
  * default.
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
  * 5. CONFIGURATION FOR "STATIC VOICE BRIDGE" FEATURE
150 150
  *
151 151
  **/
152
- /*
152
+    /*
153 153
  * A conference voice bridge number can be permanently assigned to a room
154 154
  * or activity.
155 155
  */
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
  * 6. CONFIGURATION FOR "PRE-UPLOAD PRESENTATION" FEATURE
160 160
  *
161 161
  **/
162
- /*
162
+    /*
163 163
  * Since version 0.8, BigBluebutton has an implementation for allowing
164 164
  * preuploading presentation. When this feature is enabled, users creating or
165 165
  * editing a room or activity can upload a PDF or Office document to the
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
  * applied to each room or activity, or globally.
177 177
  **/
178 178
 
179
- /*
179
+    /*
180 180
  * The number of users allowed in a session by default when a new room or
181 181
  * conference is added. If the number is set to 0, no limit is established.
182 182
  * $CFG->bigbluebuttonbn['userlimit_default'] = 0;
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
  * By default only the owner is assigned.
198 198
  **/
199 199
 
200
- /*
200
+    /*
201 201
  * The values for this parameter can be 'owner' and/or any of the roles defined in
202 202
  * Moodle (including the custom parameters). The value used will be the key for the role.
203 203
  * [owner|manager|coursecreator|editingteacher|teacher|student|guest|user|frontpage|ANY_CUSTOM_ROLE]
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
  * 9. CONFIGURATION FOR "NOTIFICATION SENDING" FEATURE
209 209
  *
210 210
  **/
211
- /*
211
+    /*
212 212
  * When the value is set to 1 (checked) the 'notification sending'
213 213
  * capability can be used by the user creating or editing the room or
214 214
  * activity.
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
  * 10. CONFIGURATION FOR "RECORDING READY" FEATURE
223 223
  *
224 224
  **/
225
- /*
225
+    /*
226 226
  * When the value is set to 1 (checked) the 'notify users when recording ready'
227 227
  * capability is enabled, meaning that a message will be sent to all enrolled
228 228
  * users in a course when a recording is ready
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
  * 12. GENERAL CONFIGURATION FOR RECORDINGS UI
246 246
  *
247 247
  **/
248
- /*
248
+    /*
249 249
  * When the value is set to 1 (checked) the bigbluebuttonbn resources
250 250
  * will show the recodings in an html table by default.
251 251
  * $CFG->bigbluebuttonbn['recordings_html_default'] = 0;
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
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
 $id = required_param('id', PARAM_INT);
30 30
 $a = optional_param('a', 0, PARAM_INT);
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
 
93 93
         echo get_string('index_ending', 'bigbluebuttonbn');
94 94
 
95
-        $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
95
+        $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
96 96
         if ($g != '0') {
97
-            $meetingid .= '['.$g.']';
97
+            $meetingid .= '[' . $g . ']';
98 98
         }
99 99
         bigbluebuttonbn_wrap_xml_load_file(bigbluebuttonbn_getEndMeetingURL($meetingid));
100
-        redirect('index.php?id='.$id);
100
+        redirect('index.php?id=' . $id);
101 101
     }
102 102
 }
103 103
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         // Add a the data for the bigbluebuttonbn instance.
115 115
         $groupobj = null;
116 116
         if (groups_get_activity_groupmode($cm) > 0) {
117
-            $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants'));
117
+            $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants'));
118 118
         }
119 119
         $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj);
120 120
 
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
 
136 136
 // Functions.
137 137
 function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
138
-    $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
138
+    $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
139 139
     $paramgroup = '';
140 140
     $groupname = '';
141 141
 
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
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     }
161 161
 
162 162
     // Output Users in the meeting.
163
-    $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>';
163
+    $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>';
164 164
     $group = $groupname;
165 165
     $users = '';
166 166
     $viewerlist = '';
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         $attendeecount = 0;
198 198
         foreach ($meetinginfo['attendees']->attendee as $attendee) {
199 199
             if ($attendee->role == $role) {
200
-                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName;
200
+                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName;
201 201
             }
202 202
         }
203 203
     }
@@ -220,15 +220,15 @@  discard block
 block discarded – undo
220 220
     $actions = '';
221 221
 
222 222
     if ($moderator) {
223
-        $actions .= '<form name="form1" method="post" action="">'.'/n';
224
-        $actions .= '  <INPUT type="hidden" name="id" value="'.$course->id.'">'.'/n';
225
-        $actions .= '  <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'.'/n';
223
+        $actions .= '<form name="form1" method="post" action="">' . '/n';
224
+        $actions .= '  <INPUT type="hidden" name="id" value="' . $course->id . '">' . '/n';
225
+        $actions .= '  <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . '/n';
226 226
         if ($groupobj != null) {
227
-            $actions .= '  <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'.'/n';
227
+            $actions .= '  <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . '/n';
228 228
         }
229
-        $actions .= '  <INPUT type="submit" name="submit" value="end" onclick="return confirm(\''.
230
-            get_string('index_confirm_end', 'bigbluebuttonbn').'\')">'.'/n';
231
-        $actions .= '</form>'.'/n';
229
+        $actions .= '  <INPUT type="submit" name="submit" value="end" onclick="return confirm(\'' .
230
+            get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . '/n';
231
+        $actions .= '</form>' . '/n';
232 232
     }
233 233
 
234 234
     return $actions;
Please login to merge, or discard this patch.
db/upgrade.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -36,23 +36,23 @@  discard block
 block discarded – undo
36 36
 
37 37
         // Change welcome, allow null.
38 38
         $fielddefinition = array('type' => XMLDB_TYPE_TEXT,
39
-                                  'precision' => null,
40
-                                  'unsigned' => null,
41
-                                  'notnull' => XMLDB_NOTNULL,
42
-                                  'sequence' => null,
43
-                                  'default' => null,
44
-                                  'previous' => 'type');
39
+                                    'precision' => null,
40
+                                    'unsigned' => null,
41
+                                    'notnull' => XMLDB_NOTNULL,
42
+                                    'sequence' => null,
43
+                                    'default' => null,
44
+                                    'previous' => 'type');
45 45
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'welcome',
46 46
             $fielddefinition);
47 47
 
48 48
         // Change userid definition in bigbluebuttonbn_log.
49 49
         $fielddefinition = array('type' => XMLDB_TYPE_INTEGER,
50
-                                  'precision' => '10',
51
-                                  'unsigned' => null,
52
-                                  'notnull' => XMLDB_NOTNULL,
53
-                                  'sequence' => null,
54
-                                  'default' => null,
55
-                                  'previous' => 'bigbluebuttonbnid');
50
+                                    'precision' => '10',
51
+                                    'unsigned' => null,
52
+                                    'notnull' => XMLDB_NOTNULL,
53
+                                    'sequence' => null,
54
+                                    'default' => null,
55
+                                    'previous' => 'bigbluebuttonbnid');
56 56
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn_log', 'userid',
57 57
             $fielddefinition);
58 58
 
@@ -78,34 +78,34 @@  discard block
 block discarded – undo
78 78
 
79 79
         // Add field type.
80 80
         $fielddefinition = array('type' => XMLDB_TYPE_INTEGER,
81
-                                  'precision' => '2',
82
-                                  'unsigned' => null,
83
-                                  'notnull' => XMLDB_NOTNULL,
84
-                                  'sequence' => null,
85
-                                  'default' => 0,
86
-                                  'previous' => 'id');
81
+                                    'precision' => '2',
82
+                                    'unsigned' => null,
83
+                                    'notnull' => XMLDB_NOTNULL,
84
+                                    'sequence' => null,
85
+                                    'default' => 0,
86
+                                    'previous' => 'id');
87 87
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'type',
88 88
             $fielddefinition);
89 89
 
90 90
         // Add field recordings_html.
91 91
         $fielddefinition = array('type' => XMLDB_TYPE_INTEGER,
92
-                                  'precision' => '1',
93
-                                  'unsigned' => null,
94
-                                  'notnull' => XMLDB_NOTNULL,
95
-                                  'sequence' => null,
96
-                                  'default' => 0,
97
-                                  'previous' => null);
92
+                                    'precision' => '1',
93
+                                    'unsigned' => null,
94
+                                    'notnull' => XMLDB_NOTNULL,
95
+                                    'sequence' => null,
96
+                                    'default' => 0,
97
+                                    'previous' => null);
98 98
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'recordings_html',
99 99
             $fielddefinition);
100 100
 
101 101
         // Add field recordings_deleted_activities.
102 102
         $fielddefinition = array('type' => XMLDB_TYPE_INTEGER,
103
-                                  'precision' => '1',
104
-                                  'unsigned' => null,
105
-                                  'notnull' => XMLDB_NOTNULL,
106
-                                  'sequence' => null,
107
-                                  'default' => 1,
108
-                                  'previous' => null);
103
+                                    'precision' => '1',
104
+                                    'unsigned' => null,
105
+                                    'notnull' => XMLDB_NOTNULL,
106
+                                    'sequence' => null,
107
+                                    'default' => 1,
108
+                                    'previous' => null);
109 109
         xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'recordings_deleted_activities',
110 110
             $fielddefinition);
111 111
 
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
     $table = new xmldb_table($tablename);
123 123
     $field = new xmldb_field($fieldname);
124 124
     $field->set_attributes($fielddefinition['type'],
125
-                           $fielddefinition['precision'],
126
-                           $fielddefinition['unsigned'],
127
-                           $fielddefinition['notnull'],
128
-                           $fielddefinition['sequence'],
129
-                           $fielddefinition['default'],
130
-                           $fielddefinition['previous']);
125
+                            $fielddefinition['precision'],
126
+                            $fielddefinition['unsigned'],
127
+                            $fielddefinition['notnull'],
128
+                            $fielddefinition['sequence'],
129
+                            $fielddefinition['default'],
130
+                            $fielddefinition['previous']);
131 131
     if ($dbman->field_exists($table, $field)) {
132 132
         $dbman->change_field_type($table, $field, true, true);
133 133
         $dbman->change_field_precision($table, $field, true, true);
Please login to merge, or discard this patch.
import_view.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,8 @@
 block discarded – undo
96 96
     $output .= html_writer::start_tag('br');
97 97
     $output .= html_writer::tag('input', '',
98 98
         array('type' => 'button', 'class' => 'btn btn-secondary',
99
-              'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
100
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
99
+                'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
100
+                'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
101 101
 
102 102
     // JavaScript for locales.
103 103
     $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 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
 $bn = required_param('bn', PARAM_INT);
29 29
 $tc = optional_param('tc', 0, PARAM_INT);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     $output .= html_writer::tag('input', '',
98 98
         array('type' => 'button', 'class' => 'btn btn-secondary',
99 99
               'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
100
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
100
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\''));
101 101
 
102 102
     // JavaScript for locales.
103 103
     $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
Please login to merge, or discard this patch.
bbb_view.php 3 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -166,10 +166,10 @@  discard block
 block discarded – undo
166 166
 
167 167
 function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession, $bigbluebuttonbn) {
168 168
     $data = ['meetingID' => $bbbsession['meetingid'],
169
-              'name' => $bbbsession['meetingname'],
170
-              'attendeePW' => $bbbsession['viewerPW'],
171
-              'moderatorPW' => $bbbsession['modPW'],
172
-              'logoutURL' => $bbbsession['logoutURL'],
169
+                'name' => $bbbsession['meetingname'],
170
+                'attendeePW' => $bbbsession['viewerPW'],
171
+                'moderatorPW' => $bbbsession['modPW'],
172
+                'logoutURL' => $bbbsession['logoutURL'],
173 173
             ];
174 174
 
175 175
     $data['record'] = 'false';
@@ -206,16 +206,16 @@  discard block
 block discarded – undo
206 206
 }
207 207
 
208 208
 function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) {
209
-      $metadata = ['bbb-origin' => $bbbsession['origin'],
210
-                   'bbb-origin-version' => $bbbsession['originVersion'],
211
-                   'bbb-origin-server-name' => $bbbsession['originServerName'],
212
-                   'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
213
-                   'bbb-origin-tag' => $bbbsession['originTag'],
214
-                   'bbb-context' => $bbbsession['course']->fullname,
215
-                   'bbb-recording-name' => $bbbsession['meetingname'],
216
-                   'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
217
-                   'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
218
-                  ];
209
+        $metadata = ['bbb-origin' => $bbbsession['origin'],
210
+                    'bbb-origin-version' => $bbbsession['originVersion'],
211
+                    'bbb-origin-server-name' => $bbbsession['originServerName'],
212
+                    'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
213
+                    'bbb-origin-tag' => $bbbsession['originTag'],
214
+                    'bbb-context' => $bbbsession['course']->fullname,
215
+                    'bbb-recording-name' => $bbbsession['meetingname'],
216
+                    'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
217
+                    'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
218
+                    ];
219 219
 
220 220
     if (bigbluebuttonbn_is_bn_server()) {
221 221
         if (bigbluebuttonbn_get_cfg_recordingready_enabled()) {
Please login to merge, or discard this patch.
Switch Indentation   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -62,106 +62,106 @@
 block discarded – undo
62 62
 }
63 63
 
64 64
 switch (strtolower($action)) {
65
-    case 'logout':
66
-        if (isset($errors) && $errors != '') {
67
-            bigbluebutton_bbb_view_errors($errors, $id);
68
-            break;
69
-        }
70
-
71
-        if (is_null($bbbsession)) {
72
-            bigbluebutton_bbb_view_close_window_manually();
73
-            break;
74
-        }
65
+        case 'logout':
66
+            if (isset($errors) && $errors != '') {
67
+                bigbluebutton_bbb_view_errors($errors, $id);
68
+                break;
69
+            }
75 70
 
76
-        // Moodle event logger: Create an event for meeting left.
77
-        bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm);
71
+            if (is_null($bbbsession)) {
72
+                bigbluebutton_bbb_view_close_window_manually();
73
+                break;
74
+            }
78 75
 
79
-        // Update the cache.
80
-        $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_FORCED);
76
+            // Moodle event logger: Create an event for meeting left.
77
+            bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm);
81 78
 
82
-        // Close the tab or window where BBB was opened.
83
-        bigbluebutton_bbb_view_close_window();
84
-        break;
85
-    case 'join':
86
-        if (is_null($bbbsession)) {
87
-            print_error('view_error_unable_join', 'bigbluebuttonbn');
88
-            break;
89
-        }
79
+            // Update the cache.
80
+            $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_FORCED);
90 81
 
91
-        // See if the session is in progress.
92
-        if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) {
93
-            // Since the meeting is already running, we just join the session.
94
-            bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn);
82
+            // Close the tab or window where BBB was opened.
83
+            bigbluebutton_bbb_view_close_window();
95 84
             break;
96
-        }
85
+        case 'join':
86
+            if (is_null($bbbsession)) {
87
+                print_error('view_error_unable_join', 'bigbluebuttonbn');
88
+                break;
89
+            }
97 90
 
98
-        // If user is not administrator nor moderator (user is steudent) and waiting is required.
99
-        if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
100
-            header('Location: '.$bbbsession['logoutURL']);
101
-            break;
102
-        }
91
+            // See if the session is in progress.
92
+            if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) {
93
+                // Since the meeting is already running, we just join the session.
94
+                bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn);
95
+                break;
96
+            }
103 97
 
104
-        // As the meeting doesn't exist, try to create it.
105
-        $response = bigbluebuttonbn_get_create_meeting_array(
106
-            bigbluebutton_bbb_view_create_meeting_data($bbbsession, $bigbluebuttonbn),
107
-            bigbluebutton_bbb_view_create_meeting_metadata($bbbsession),
108
-            $bbbsession['presentation']['name'],
109
-            $bbbsession['presentation']['url']
110
-        );
111
-
112
-        if (!$response) {
113
-            // The server is unreachable.
114
-            if ($bbbsession['administrator']) {
115
-                print_error('view_error_unable_join', 'bigbluebuttonbn',
116
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
98
+            // If user is not administrator nor moderator (user is steudent) and waiting is required.
99
+            if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
100
+                header('Location: '.$bbbsession['logoutURL']);
117 101
                 break;
118 102
             }
119
-            if ($bbbsession['moderator']) {
120
-                print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
103
+
104
+            // As the meeting doesn't exist, try to create it.
105
+            $response = bigbluebuttonbn_get_create_meeting_array(
106
+                bigbluebutton_bbb_view_create_meeting_data($bbbsession, $bigbluebuttonbn),
107
+                bigbluebutton_bbb_view_create_meeting_metadata($bbbsession),
108
+                $bbbsession['presentation']['name'],
109
+                $bbbsession['presentation']['url']
110
+            );
111
+
112
+            if (!$response) {
113
+                // The server is unreachable.
114
+                if ($bbbsession['administrator']) {
115
+                    print_error('view_error_unable_join', 'bigbluebuttonbn',
116
+                        $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
117
+                    break;
118
+                }
119
+                if ($bbbsession['moderator']) {
120
+                    print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
121
+                        $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
122
+                    break;
123
+                }
124
+
125
+                print_error('view_error_unable_join_student', 'bigbluebuttonbn',
121 126
                     $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
122 127
                 break;
123 128
             }
124 129
 
125
-            print_error('view_error_unable_join_student', 'bigbluebuttonbn',
126
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
127
-            break;
128
-        }
130
+            if ($response['returncode'] == 'FAILED') {
131
+                // The meeting was not created.
132
+                if (!$printerrorkey) {
133
+                    print_error($response['message'], 'bigbluebuttonbn');
134
+                    break;
135
+                }
136
+                $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create');
137
+                print_error($printerrorkey, 'bigbluebuttonbn');
138
+                break;
139
+            }
129 140
 
130
-        if ($response['returncode'] == 'FAILED') {
131
-            // The meeting was not created.
132
-            if (!$printerrorkey) {
133
-                print_error($response['message'], 'bigbluebuttonbn');
141
+            if ($response['hasBeenForciblyEnded'] == 'true') {
142
+                print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn'));
134 143
                 break;
135 144
             }
136
-            $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create');
137
-            print_error($printerrorkey, 'bigbluebuttonbn');
138
-            break;
139
-        }
140 145
 
141
-        if ($response['hasBeenForciblyEnded'] == 'true') {
142
-            print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn'));
146
+            // Moodle event logger: Create an event for meeting created.
147
+            bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm);
148
+            // Internal logger: Insert a record with the meeting created.
149
+            bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE);
150
+            // Since the meeting is already running, we just join the session.
151
+            bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn);
143 152
             break;
144
-        }
145
-
146
-        // Moodle event logger: Create an event for meeting created.
147
-        bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm);
148
-        // Internal logger: Insert a record with the meeting created.
149
-        bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE);
150
-        // Since the meeting is already running, we just join the session.
151
-        bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn);
152
-        break;
153
-    case 'playback':
154
-        if ($href == '') {
153
+        case 'playback':
154
+            if ($href == '') {
155
+                bigbluebutton_bbb_view_close_window();
156
+                return;
157
+            }
158
+            // Moodle event logger: Create an event for meeting left.
159
+            bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]);
160
+            // Execute the redirect.
161
+            header('Location: '.urldecode($href));
162
+            break;
163
+        default:
155 164
             bigbluebutton_bbb_view_close_window();
156
-            return;
157
-        }
158
-        // Moodle event logger: Create an event for meeting left.
159
-        bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]);
160
-        // Execute the redirect.
161
-        header('Location: '.urldecode($href));
162
-        break;
163
-    default:
164
-        bigbluebutton_bbb_view_close_window();
165 165
 }
166 166
 
167 167
 function bigbluebutton_bbb_view_close_window() {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 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
 $action = required_param('action', PARAM_TEXT);
29 29
 $id = optional_param('id', 0, PARAM_INT);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
         // If user is not administrator nor moderator (user is steudent) and waiting is required.
99 99
         if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
100
-            header('Location: '.$bbbsession['logoutURL']);
100
+            header('Location: ' . $bbbsession['logoutURL']);
101 101
             break;
102 102
         }
103 103
 
@@ -113,17 +113,17 @@  discard block
 block discarded – undo
113 113
             // The server is unreachable.
114 114
             if ($bbbsession['administrator']) {
115 115
                 print_error('view_error_unable_join', 'bigbluebuttonbn',
116
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
116
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
117 117
                 break;
118 118
             }
119 119
             if ($bbbsession['moderator']) {
120 120
                 print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
121
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
121
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
122 122
                 break;
123 123
             }
124 124
 
125 125
             print_error('view_error_unable_join_student', 'bigbluebuttonbn',
126
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
126
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
127 127
             break;
128 128
         }
129 129
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         // Moodle event logger: Create an event for meeting left.
159 159
         bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]);
160 160
         // Execute the redirect.
161
-        header('Location: '.urldecode($href));
161
+        header('Location: ' . urldecode($href));
162 162
         break;
163 163
     default:
164 164
         bigbluebutton_bbb_view_close_window();
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     }
202 202
     if ($durationtime > 0) {
203 203
         $data['duration'] = $durationtime;
204
-        $data['welcome'] .= '<br><br>'.str_replace('%duration%', ''.$durationtime, get_string('bbbdurationwarning', 'bigbluebuttonbn'));
204
+        $data['welcome'] .= '<br><br>' . str_replace('%duration%', '' . $durationtime, get_string('bbbdurationwarning', 'bigbluebuttonbn'));
205 205
     }
206 206
 
207 207
     $voicebridge = intval($bbbsession['voicebridge']);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
     if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) {
249 249
         // No more users allowed to join.
250
-        header('Location: '.$bbbsession['logoutURL']);
250
+        header('Location: ' . $bbbsession['logoutURL']);
251 251
         return;
252 252
     }
253 253
 
@@ -266,20 +266,20 @@  discard block
 block discarded – undo
266 266
     bigbluebuttonbn_participant_joined($bbbsession['meetingid'],
267 267
         ($bbbsession['administrator'] || $bbbsession['moderator']));
268 268
     // Execute the redirect.
269
-    header('Location: '.$joinurl);
269
+    header('Location: ' . $joinurl);
270 270
 }
271 271
 
272 272
 function bigbluebutton_bbb_view_errors($serrors, $id) {
273 273
     global $CFG, $OUTPUT;
274 274
 
275
-    $errors = (array) json_decode(urldecode($serrors));
275
+    $errors = (array)json_decode(urldecode($serrors));
276 276
     $msgerrors = '';
277 277
     foreach ($errors as $error) {
278
-        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n";
278
+        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n";
279 279
     }
280 280
 
281 281
     echo $OUTPUT->header();
282 282
     print_error('view_error_bigbluebutton', 'bigbluebuttonbn',
283
-        $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors);
283
+        $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors);
284 284
     echo $OUTPUT->footer();
285 285
 }
Please login to merge, or discard this patch.
view.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
 function bigbluebuttonbn_view_bbbsession_roles($context, $userid) {
198 198
     if (isguestuser()) {
199
-      return bigbluebuttonbn_get_guest_role();
199
+        return bigbluebuttonbn_get_guest_role();
200 200
     }
201 201
     return bigbluebuttonbn_get_user_roles($context, $userid);
202 202
 }
@@ -277,11 +277,11 @@  discard block
 block discarded – undo
277 277
 
278 278
     echo $OUTPUT->box_start('generalbox boxaligncenter');
279 279
     echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn').
280
-      '</div>';
280
+        '</div>';
281 281
     echo $OUTPUT->box_end();
282 282
 
283 283
     groups_print_activity_menu(
284
-      $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups);
284
+        $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups);
285 285
     echo '<br><br>';
286 286
 }
287 287
 
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
     // JavaScript variables for recordings.
388 388
     $jsvars += array(
389 389
             'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1',
390
-          );
390
+            );
391 391
 
392 392
     // If there are meetings with recordings load the data to the table.
393 393
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     $jsvars += array(
400 400
             'columns' => bigbluebuttonbn_get_recording_columns($bbbsession),
401 401
             'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings),
402
-          );
402
+            );
403 403
 
404 404
     // Render a YUI table.
405 405
     return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table'));
@@ -410,10 +410,10 @@  discard block
 block discarded – undo
410 410
 
411 411
     $button = html_writer::tag('input', '',
412 412
         array('type' => 'button',
413
-              'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
414
-              'class' => 'btn btn-secondary',
415
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
416
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
413
+                'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
414
+                'class' => 'btn btn-secondary',
415
+                'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
416
+                    $bbbsession['bigbluebuttonbn']->id.'\''));
417 417
     $output = html_writer::start_tag('br');
418 418
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
419 419
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
         return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
432 432
                 ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''.
433 433
                 ''.$OUTPUT->action_link($bbbsession['presentation']['url'],
434
-                      $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
434
+                        $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
435 435
     }
436 436
 
437 437
     return '';
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
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
 $id = required_param('id', PARAM_INT);
30 30
 $b = optional_param('n', 0, PARAM_INT);
@@ -59,18 +59,18 @@  discard block
 block discarded – undo
59 59
 if (is_null($serverversion)) {
60 60
     if ($bbbsession['administrator']) {
61 61
         print_error('view_error_unable_join', 'bigbluebuttonbn',
62
-            $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
62
+            $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
63 63
         exit;
64 64
     }
65 65
 
66 66
     if ($bbbsession['moderator']) {
67 67
         print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
68
-            $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
68
+            $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
69 69
         exit;
70 70
     }
71 71
 
72 72
     print_error('view_error_unable_join_student', 'bigbluebuttonbn',
73
-        $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
73
+        $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
74 74
     exit;
75 75
 }
76 76
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 // Print the page header.
82 82
 $PAGE->set_context($context);
83
-$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
83
+$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
84 84
 $PAGE->set_title(format_string($bigbluebuttonbn->name));
85 85
 $PAGE->set_cacheable(false);
86 86
 $PAGE->set_heading($course->fullname);
@@ -90,26 +90,26 @@  discard block
 block discarded – undo
90 90
 if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) {
91 91
     echo $OUTPUT->header();
92 92
     if (isguestuser()) {
93
-        echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
94
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
93
+        echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
94
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
95 95
     } else {
96
-        echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
97
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
96
+        echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
97
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
98 98
     }
99 99
     echo $OUTPUT->footer();
100 100
     exit;
101 101
 }
102 102
 
103 103
 // Operation URLs.
104
-$bbbsession['courseURL'] = $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course;
105
-$bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id.
106
-    '&bn='.$bbbsession['bigbluebuttonbn']->id;
107
-$bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_'.
108
-    'ready&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id;
109
-$bbbsession['meetingEventsURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=meeting'.
110
-    '_events&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id;
111
-$bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$id.
112
-    '&bn='.$bbbsession['bigbluebuttonbn']->id;
104
+$bbbsession['courseURL'] = $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course;
105
+$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id .
106
+    '&bn=' . $bbbsession['bigbluebuttonbn']->id;
107
+$bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
108
+    'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
109
+$bbbsession['meetingEventsURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=meeting' .
110
+    '_events&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
111
+$bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $id .
112
+    '&bn=' . $bbbsession['bigbluebuttonbn']->id;
113 113
 
114 114
 // Output starts.
115 115
 echo $OUTPUT->header();
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 echo $OUTPUT->footer();
123 123
 
124 124
 // Shows version as a comment.
125
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
125
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
126 126
 
127 127
 // Initialize session variable used across views.
128 128
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     $bbbsession['viewerPW'] = $bigbluebuttonbn->viewerpass;
155 155
 
156 156
     // Database info related to the activity.
157
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
157
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
158 158
         $bbbsession['bigbluebuttonbn']->id;
159 159
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
160 160
     $bbbsession['meetingdescription'] = $bigbluebuttonbn->intro;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn');
176 176
     }
177 177
     if ($bigbluebuttonbn->record) {
178
-        $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
178
+        $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
179 179
     }
180 180
 
181 181
     $bbbsession['openingtime'] = $bigbluebuttonbn->openingtime;
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     $bbbsession['originServerName'] = $parsedurl['host'];
192 192
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
193 193
     $bbbsession['originServerCommonName'] = '';
194
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
194
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
195 195
 }
196 196
 
197 197
 function bigbluebuttonbn_view_bbbsession_roles($context, $userid) {
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
     $bbbsession['group'] = groups_get_activity_group($bbbsession['cm'], true);
251 251
 
252 252
     // Assign group default values.
253
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
254
-        $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']';
253
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
254
+        $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']';
255 255
     $groupname = get_string('allparticipants');
256
-    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')';
256
+    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')';
257 257
 
258 258
 
259 259
     if (sizeof($groups) == 0) {
@@ -265,10 +265,10 @@  discard block
 block discarded – undo
265 265
         $bbbsession['group'] = array_values($groups)[0]->id;
266 266
     }
267 267
 
268
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
269
-        $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']';
268
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
269
+        $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']';
270 270
     $groupname = groups_get_group_name($bbbsession['group']);
271
-    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')';
271
+    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')';
272 272
 
273 273
     if (sizeof($groups) == 1) {
274 274
         // There only one group and the user has access to.
@@ -276,12 +276,12 @@  discard block
 block discarded – undo
276 276
     }
277 277
 
278 278
     echo $OUTPUT->box_start('generalbox boxaligncenter');
279
-    echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn').
279
+    echo '<br><div class="alert alert-warning">' . get_string('view_groups_selection_warning', 'bigbluebuttonbn') .
280 280
       '</div>';
281 281
     echo $OUTPUT->box_end();
282 282
 
283 283
     groups_print_activity_menu(
284
-      $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups);
284
+      $bbbsession['cm'], $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id, false, $onlyexistentgroups);
285 285
     echo '<br><br>';
286 286
 }
287 287
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
             'M.mod_bigbluebuttonbn.recordings.init', array($jsvars));
324 324
     }
325 325
 
326
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
326
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
327 327
 
328 328
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
329 329
 }
@@ -334,12 +334,12 @@  discard block
 block discarded – undo
334 334
     // JavaScript variables for room.
335 335
     $openingtime = '';
336 336
     if ($bbbsession['openingtime']) {
337
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
337
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
338 338
             userdate($bbbsession['openingtime']);
339 339
     }
340 340
     $closingtime = '';
341 341
     if ($bbbsession['closingtime']) {
342
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
342
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
343 343
             userdate($bbbsession['closingtime']);
344 344
     }
345 345
     $jsvars += array(
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     $output .= $OUTPUT->box_end();
357 357
 
358 358
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
359
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
359
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
360 360
     $output .= $OUTPUT->box_end();
361 361
 
362 362
     if ($activity == 'ended') {
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
     // If there are meetings with recordings load the data to the table.
393 393
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
394 394
         // Render a plain html table.
395
-        return bigbluebutton_output_recording_table($bbbsession, $recordings)."\n";
395
+        return bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n";
396 396
     }
397 397
 
398 398
     // JavaScript variables for recordings with YUI.
@@ -412,8 +412,8 @@  discard block
 block discarded – undo
412 412
         array('type' => 'button',
413 413
               'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
414 414
               'class' => 'btn btn-secondary',
415
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
416
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
415
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
416
+                  $bbbsession['bigbluebuttonbn']->id . '\''));
417 417
     $output = html_writer::start_tag('br');
418 418
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
419 419
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -428,10 +428,10 @@  discard block
 block discarded – undo
428 428
         $attributes = array('title' => $bbbsession['presentation']['name']);
429 429
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
430 430
 
431
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
432
-                ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''.
433
-                ''.$OUTPUT->action_link($bbbsession['presentation']['url'],
434
-                      $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
431
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
432
+                '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' .
433
+                '' . $OUTPUT->action_link($bbbsession['presentation']['url'],
434
+                      $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
435 435
     }
436 436
 
437 437
     return '';
Please login to merge, or discard this patch.