@@ -24,8 +24,8 @@ discard block |
||
| 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 | $bn = optional_param('bn', 0, PARAM_INT); |
@@ -57,19 +57,19 @@ discard block |
||
| 57 | 57 | if (is_null($serverversion)) { |
| 58 | 58 | if ($bbbsession['administrator']) { |
| 59 | 59 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 60 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 60 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 61 | 61 | exit; |
| 62 | 62 | } |
| 63 | 63 | if ($bbbsession['moderator']) { |
| 64 | 64 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 65 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 65 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 66 | 66 | exit; |
| 67 | 67 | } |
| 68 | 68 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 69 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 69 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 70 | 70 | exit; |
| 71 | 71 | } |
| 72 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
| 72 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
| 73 | 73 | |
| 74 | 74 | // Mark viewed by user (if required). |
| 75 | 75 | $completion = new completion_info($course); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | // Print the page header. |
| 79 | 79 | $PAGE->set_context($context); |
| 80 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 80 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 81 | 81 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
| 82 | 82 | $PAGE->set_cacheable(false); |
| 83 | 83 | $PAGE->set_heading($course->fullname); |
@@ -87,11 +87,11 @@ discard block |
||
| 87 | 87 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
| 88 | 88 | echo $OUTPUT->header(); |
| 89 | 89 | if (isguestuser()) { |
| 90 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
| 91 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
| 90 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 91 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 92 | 92 | } else { |
| 93 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', '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_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 95 | 95 | } |
| 96 | 96 | echo $OUTPUT->footer(); |
| 97 | 97 | exit; |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | // Operation URLs. |
| 101 | 101 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
| 102 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
| 102 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
| 103 | 103 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
| 104 | 104 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
| 105 | 105 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | echo $OUTPUT->footer(); |
| 120 | 120 | |
| 121 | 121 | // Shows version as a comment. |
| 122 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
| 122 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
| 123 | 123 | |
| 124 | 124 | // Initialize session variable used across views. |
| 125 | 125 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -151,8 +151,8 @@ discard block |
||
| 151 | 151 | $groupname = groups_get_group_name($bbbsession['group']); |
| 152 | 152 | } |
| 153 | 153 | // Assign group default values. |
| 154 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 155 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 154 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 155 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 156 | 156 | if (count($groups) == 0) { |
| 157 | 157 | // Only the All participants group exists. |
| 158 | 158 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | if (has_capability('moodle/site:accessallgroups', $context)) { |
| 163 | 163 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
| 164 | 164 | } |
| 165 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 165 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 166 | 166 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
| 167 | 167 | echo '<br><br>'; |
| 168 | 168 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 230 | 230 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 231 | 231 | } |
| 232 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 232 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 233 | 233 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 234 | 234 | } |
| 235 | 235 | |
@@ -298,12 +298,12 @@ discard block |
||
| 298 | 298 | // JavaScript variables for room. |
| 299 | 299 | $openingtime = ''; |
| 300 | 300 | if ($bbbsession['openingtime']) { |
| 301 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 301 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 302 | 302 | userdate($bbbsession['openingtime']); |
| 303 | 303 | } |
| 304 | 304 | $closingtime = ''; |
| 305 | 305 | if ($bbbsession['closingtime']) { |
| 306 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 306 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 307 | 307 | userdate($bbbsession['closingtime']); |
| 308 | 308 | } |
| 309 | 309 | $jsvars += array( |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | $output .= $OUTPUT->box_end(); |
| 321 | 321 | // Action button box. |
| 322 | 322 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 323 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 323 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 324 | 324 | $output .= $OUTPUT->box_end(); |
| 325 | 325 | if ($activity == 'ended') { |
| 326 | 326 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | // If there are meetings with recordings load the data to the table. |
| 374 | 374 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 375 | 375 | // Render a plain html table. |
| 376 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 376 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 377 | 377 | } |
| 378 | 378 | // JavaScript variables for recordings with YUI. |
| 379 | 379 | $jsvars += array( |
@@ -401,8 +401,8 @@ discard block |
||
| 401 | 401 | array('type' => 'button', |
| 402 | 402 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 403 | 403 | 'class' => 'btn btn-secondary', |
| 404 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 405 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 404 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 405 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 406 | 406 | $output = html_writer::empty_tag('br'); |
| 407 | 407 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 408 | 408 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -421,10 +421,10 @@ discard block |
||
| 421 | 421 | if (!is_null($bbbsession['presentation']['url'])) { |
| 422 | 422 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 423 | 423 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 424 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 425 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 424 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 425 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 426 | 426 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 427 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 427 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 428 | 428 | } |
| 429 | 429 | return ''; |
| 430 | 430 | } |
@@ -260,7 +260,6 @@ |
||
| 260 | 260 | /** |
| 261 | 261 | * Add Join Session button. |
| 262 | 262 | * |
| 263 | - * @param boolean $moderator |
|
| 264 | 263 | * @param object $course |
| 265 | 264 | * @param object $bigbluebuttonbn |
| 266 | 265 | * @param object $groupobj |
@@ -24,8 +24,8 @@ discard block |
||
| 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 |
||
| 89 | 89 | if ($moderator || $administrator) { |
| 90 | 90 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_end'], $bigbluebuttonbn); |
| 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 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | $groupmode = groups_get_activity_groupmode($cm) > 0; |
| 114 | 114 | if ($groupmode) { |
| 115 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 115 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 116 | 116 | } |
| 117 | 117 | $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 118 | 118 | if ($groupmode) { |
@@ -142,12 +142,12 @@ discard block |
||
| 142 | 142 | * @return array |
| 143 | 143 | */ |
| 144 | 144 | function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 145 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
| 145 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
| 146 | 146 | $paramgroup = ''; |
| 147 | 147 | $groupname = ''; |
| 148 | 148 | if ($groupobj) { |
| 149 | - $meetingid .= '['.$groupobj->id.']'; |
|
| 150 | - $paramgroup = '&group='.$groupobj->id; |
|
| 149 | + $meetingid .= '[' . $groupobj->id . ']'; |
|
| 150 | + $paramgroup = '&group=' . $groupobj->id; |
|
| 151 | 151 | $groupname = $groupobj->name; |
| 152 | 152 | } |
| 153 | 153 | $meetinginfo = bigbluebuttonbn_get_meeting_info_array($meetingid); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | return; |
| 163 | 163 | } |
| 164 | 164 | // Output Users in the meeting. |
| 165 | - $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>'; |
|
| 165 | + $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>'; |
|
| 166 | 166 | $group = $groupname; |
| 167 | 167 | $users = ''; |
| 168 | 168 | $viewerlist = ''; |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $attendeecount = 0; |
| 208 | 208 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 209 | 209 | if ($attendee->role == $role) { |
| 210 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 210 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 211 | 211 | } |
| 212 | 212 | } |
| 213 | 213 | } |
@@ -241,18 +241,18 @@ discard block |
||
| 241 | 241 | function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 242 | 242 | $actions = ''; |
| 243 | 243 | if ($moderator) { |
| 244 | - $actions .= '<form name="form1" method="post" action="" class="bbb_index_form">'."\n"; |
|
| 245 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
| 246 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
| 247 | - $actions .= ' <INPUT type="hidden" name="action" value="end">'."\n"; |
|
| 244 | + $actions .= '<form name="form1" method="post" action="" class="bbb_index_form">' . "\n"; |
|
| 245 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
| 246 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
| 247 | + $actions .= ' <INPUT type="hidden" name="action" value="end">' . "\n"; |
|
| 248 | 248 | if ($groupobj != null) { |
| 249 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
| 249 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
| 250 | 250 | } |
| 251 | 251 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
| 252 | 252 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
| 253 | 253 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
| 254 | 254 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
| 255 | - $actions .= '</form>'."\n"; |
|
| 255 | + $actions .= '</form>' . "\n"; |
|
| 256 | 256 | } |
| 257 | 257 | return $actions; |
| 258 | 258 | } |
@@ -287,15 +287,15 @@ discard block |
||
| 287 | 287 | $cm = get_fast_modinfo($course->id)->instances['bigbluebuttonbn'][$bigbluebuttonbn->id]; |
| 288 | 288 | $url = new \moodle_url('/mod/bigbluebuttonbn/bbb_view.php'); |
| 289 | 289 | |
| 290 | - $actions .= '<form action="'.$url->out().'" target="_blank" class="bbb_index_form">'."\n"; |
|
| 291 | - $actions .= '<input type="hidden" name="action" value="join">'."\n"; |
|
| 292 | - $actions .= '<input type="hidden" name="id" value="'.$cm->id.'">'."\n"; |
|
| 293 | - $actions .= '<input type="hidden" name="bn" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
| 294 | - $actions .= '<input type="hidden" name="index" value="1">'."\n"; |
|
| 290 | + $actions .= '<form action="' . $url->out() . '" target="_blank" class="bbb_index_form">' . "\n"; |
|
| 291 | + $actions .= '<input type="hidden" name="action" value="join">' . "\n"; |
|
| 292 | + $actions .= '<input type="hidden" name="id" value="' . $cm->id . '">' . "\n"; |
|
| 293 | + $actions .= '<input type="hidden" name="bn" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
| 294 | + $actions .= '<input type="hidden" name="index" value="1">' . "\n"; |
|
| 295 | 295 | if ($groupobj) { |
| 296 | - $actions .= '<input type="hidden" name="group" value="'.$groupobj->id.'">'."\n"; |
|
| 296 | + $actions .= '<input type="hidden" name="group" value="' . $groupobj->id . '">' . "\n"; |
|
| 297 | 297 | } |
| 298 | - $actions .= '<input type="submit" value="'.get_string('view_conference_action_join', 'bigbluebuttonbn').'" />'."\n"; |
|
| 298 | + $actions .= '<input type="submit" value="' . get_string('view_conference_action_join', 'bigbluebuttonbn') . '" />' . "\n"; |
|
| 299 | 299 | $actions .= '</form>'; |
| 300 | 300 | |
| 301 | 301 | return $actions; |
@@ -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 | |
@@ -70,23 +70,23 @@ discard block |
||
| 70 | 70 | if (is_null($serverversion)) { |
| 71 | 71 | if ($bbbsession['administrator']) { |
| 72 | 72 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 73 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 73 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 74 | 74 | exit; |
| 75 | 75 | } |
| 76 | 76 | if ($bbbsession['moderator']) { |
| 77 | 77 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 78 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 78 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 79 | 79 | exit; |
| 80 | 80 | } |
| 81 | 81 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 82 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 82 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 83 | 83 | exit; |
| 84 | 84 | } |
| 85 | - $bbbsession['serverversion'] = (string) $serverversion; |
|
| 85 | + $bbbsession['serverversion'] = (string)$serverversion; |
|
| 86 | 86 | |
| 87 | 87 | // Operation URLs. |
| 88 | 88 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
| 89 | - $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
| 89 | + $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
| 90 | 90 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
| 91 | 91 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
| 92 | 92 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -114,8 +114,8 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // Assign group default values. |
| 117 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 118 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 117 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 118 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | // Initialize session variable used across views. |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | } |
| 179 | 179 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
| 180 | 180 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
| 181 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 181 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 182 | 182 | break; |
| 183 | 183 | } |
| 184 | 184 | // As the meeting doesn't exist, try to create it. |
@@ -192,16 +192,16 @@ discard block |
||
| 192 | 192 | // The server is unreachable. |
| 193 | 193 | if ($bbbsession['administrator']) { |
| 194 | 194 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 195 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 195 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 196 | 196 | break; |
| 197 | 197 | } |
| 198 | 198 | if ($bbbsession['moderator']) { |
| 199 | 199 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 200 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 200 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 201 | 201 | break; |
| 202 | 202 | } |
| 203 | 203 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 204 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 204 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 205 | 205 | break; |
| 206 | 206 | } |
| 207 | 207 | if ($response['returncode'] == 'FAILED') { |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
| 223 | 223 | // Internal logger: Insert a record with the meeting created. |
| 224 | 224 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 225 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 225 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 226 | 226 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
| 227 | 227 | // Since the meeting is already running, we just join the session. |
| 228 | 228 | bigbluebutton_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin); |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['recording_play'], $bigbluebuttonbn, |
| 234 | 234 | ['other' => $rid]); |
| 235 | 235 | // Execute the redirect. |
| 236 | - header('Location: '.urldecode($href)); |
|
| 236 | + header('Location: ' . urldecode($href)); |
|
| 237 | 237 | break; |
| 238 | 238 | default: |
| 239 | 239 | bigbluebutton_bbb_view_close_window(); |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | $data['welcome'] .= '<br><br>'; |
| 319 | 319 | $data['welcome'] .= str_replace( |
| 320 | 320 | '%duration%', |
| 321 | - (string) $durationtime, |
|
| 321 | + (string)$durationtime, |
|
| 322 | 322 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 323 | 323 | ); |
| 324 | 324 | } |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
| 409 | 409 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
| 410 | 410 | // No more users allowed to join. |
| 411 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 411 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 412 | 412 | return; |
| 413 | 413 | } |
| 414 | 414 | // Build the URL. |
@@ -422,13 +422,13 @@ discard block |
||
| 422 | 422 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
| 423 | 423 | // Internal logger: Instert a record with the meeting created. |
| 424 | 424 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 425 | - $meta = '{"origin":'.$origin.'}'; |
|
| 425 | + $meta = '{"origin":' . $origin . '}'; |
|
| 426 | 426 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
| 427 | 427 | // Before executing the redirect, increment the number of participants. |
| 428 | 428 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
| 429 | 429 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
| 430 | 430 | // Execute the redirect. |
| 431 | - header('Location: '.$joinurl); |
|
| 431 | + header('Location: ' . $joinurl); |
|
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | /** |
@@ -440,13 +440,13 @@ discard block |
||
| 440 | 440 | */ |
| 441 | 441 | function bigbluebutton_bbb_view_errors($serrors, $id) { |
| 442 | 442 | global $CFG, $OUTPUT; |
| 443 | - $errors = (array) json_decode(urldecode($serrors)); |
|
| 443 | + $errors = (array)json_decode(urldecode($serrors)); |
|
| 444 | 444 | $msgerrors = ''; |
| 445 | 445 | foreach ($errors as $error) { |
| 446 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
| 446 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
| 447 | 447 | } |
| 448 | 448 | echo $OUTPUT->header(); |
| 449 | 449 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
| 450 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
| 450 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
| 451 | 451 | echo $OUTPUT->footer(); |
| 452 | 452 | } |