@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
24 | 24 | */ |
25 | 25 | |
26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
28 | 28 | |
29 | 29 | global $SESSION; |
30 | 30 | |
@@ -68,23 +68,23 @@ discard block |
||
68 | 68 | if (is_null($serverversion)) { |
69 | 69 | if ($bbbsession['administrator']) { |
70 | 70 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
71 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
71 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
72 | 72 | exit; |
73 | 73 | } |
74 | 74 | if ($bbbsession['moderator']) { |
75 | 75 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
76 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
76 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
77 | 77 | exit; |
78 | 78 | } |
79 | 79 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
80 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
80 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
81 | 81 | exit; |
82 | 82 | } |
83 | - $bbbsession['serverversion'] = (string) $serverversion; |
|
83 | + $bbbsession['serverversion'] = (string)$serverversion; |
|
84 | 84 | |
85 | 85 | // Operation URLs. |
86 | 86 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
87 | - $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
87 | + $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
88 | 88 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
89 | 89 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
90 | 90 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
163 | 163 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
164 | - header('Location: '.$bbbsession['logoutURL']); |
|
164 | + header('Location: ' . $bbbsession['logoutURL']); |
|
165 | 165 | break; |
166 | 166 | } |
167 | 167 | // As the meeting doesn't exist, try to create it. |
@@ -175,16 +175,16 @@ discard block |
||
175 | 175 | // The server is unreachable. |
176 | 176 | if ($bbbsession['administrator']) { |
177 | 177 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
178 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
178 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
179 | 179 | break; |
180 | 180 | } |
181 | 181 | if ($bbbsession['moderator']) { |
182 | 182 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
183 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
183 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
184 | 184 | break; |
185 | 185 | } |
186 | 186 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
187 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
187 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
188 | 188 | break; |
189 | 189 | } |
190 | 190 | if ($response['returncode'] == 'FAILED') { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
206 | 206 | // Internal logger: Insert a record with the meeting created. |
207 | 207 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
208 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
208 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
209 | 209 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
210 | 210 | // Since the meeting is already running, we just join the session. |
211 | 211 | bigbluebutton_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['recording_play'], $bigbluebuttonbn, |
217 | 217 | ['other' => $rid]); |
218 | 218 | // Execute the redirect. |
219 | - header('Location: '.urldecode($href)); |
|
219 | + header('Location: ' . urldecode($href)); |
|
220 | 220 | break; |
221 | 221 | default: |
222 | 222 | bigbluebutton_bbb_view_close_window(); |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $data['welcome'] .= '<br><br>'; |
302 | 302 | $data['welcome'] .= str_replace( |
303 | 303 | '%duration%', |
304 | - (string) $durationtime, |
|
304 | + (string)$durationtime, |
|
305 | 305 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
306 | 306 | ); |
307 | 307 | } |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
392 | 392 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
393 | 393 | // No more users allowed to join. |
394 | - header('Location: '.$bbbsession['logoutURL']); |
|
394 | + header('Location: ' . $bbbsession['logoutURL']); |
|
395 | 395 | return; |
396 | 396 | } |
397 | 397 | // Build the URL. |
@@ -405,13 +405,13 @@ discard block |
||
405 | 405 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
406 | 406 | // Internal logger: Instert a record with the meeting created. |
407 | 407 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
408 | - $meta = '{"origin":'.$origin.'}'; |
|
408 | + $meta = '{"origin":' . $origin . '}'; |
|
409 | 409 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
410 | 410 | // Before executing the redirect, increment the number of participants. |
411 | 411 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
412 | 412 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
413 | 413 | // Execute the redirect. |
414 | - header('Location: '.$joinurl); |
|
414 | + header('Location: ' . $joinurl); |
|
415 | 415 | } |
416 | 416 | |
417 | 417 | /** |
@@ -423,13 +423,13 @@ discard block |
||
423 | 423 | */ |
424 | 424 | function bigbluebutton_bbb_view_errors($serrors, $id) { |
425 | 425 | global $CFG, $OUTPUT; |
426 | - $errors = (array) json_decode(urldecode($serrors)); |
|
426 | + $errors = (array)json_decode(urldecode($serrors)); |
|
427 | 427 | $msgerrors = ''; |
428 | 428 | foreach ($errors as $error) { |
429 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
429 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
430 | 430 | } |
431 | 431 | echo $OUTPUT->header(); |
432 | 432 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
433 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
433 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
434 | 434 | echo $OUTPUT->footer(); |
435 | 435 | } |