@@ -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); |
@@ -88,12 +88,12 @@ discard block |
||
| 88 | 88 | if ($moderator || $administrator) { |
| 89 | 89 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $cm); |
| 90 | 90 | echo get_string('index_ending', 'bigbluebuttonbn'); |
| 91 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
| 91 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
| 92 | 92 | if ($g != '0') { |
| 93 | - $meetingid .= '['.$g.']'; |
|
| 93 | + $meetingid .= '[' . $g . ']'; |
|
| 94 | 94 | } |
| 95 | 95 | bigbluebuttonbn_wrap_xml_load_file(bigbluebuttonbn_getEndMeetingURL($meetingid)); |
| 96 | - redirect('index.php?id='.$id); |
|
| 96 | + redirect('index.php?id=' . $id); |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | // Add a the data for the bigbluebuttonbn instance. |
| 108 | 108 | $groupobj = null; |
| 109 | 109 | if (groups_get_activity_groupmode($cm) > 0) { |
| 110 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 110 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 111 | 111 | } |
| 112 | 112 | $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 113 | 113 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -124,12 +124,12 @@ discard block |
||
| 124 | 124 | echo $OUTPUT->footer(); |
| 125 | 125 | |
| 126 | 126 | function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 127 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
| 127 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
| 128 | 128 | $paramgroup = ''; |
| 129 | 129 | $groupname = ''; |
| 130 | 130 | if ($groupobj) { |
| 131 | - $meetingid .= '['.$groupobj->id.']'; |
|
| 132 | - $paramgroup = '&group='.$groupobj->id; |
|
| 131 | + $meetingid .= '[' . $groupobj->id . ']'; |
|
| 132 | + $paramgroup = '&group=' . $groupobj->id; |
|
| 133 | 133 | $groupname = $groupobj->name; |
| 134 | 134 | } |
| 135 | 135 | $meetinginfo = bigbluebuttonbn_get_meeting_info_array($meetingid); |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | return; |
| 145 | 145 | } |
| 146 | 146 | // Output Users in the meeting. |
| 147 | - $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>'; |
|
| 147 | + $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>'; |
|
| 148 | 148 | $group = $groupname; |
| 149 | 149 | $users = ''; |
| 150 | 150 | $viewerlist = ''; |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $attendeecount = 0; |
| 177 | 177 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 178 | 178 | if ($attendee->role == $role) { |
| 179 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 179 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 180 | 180 | } |
| 181 | 181 | } |
| 182 | 182 | } |
@@ -195,15 +195,15 @@ discard block |
||
| 195 | 195 | function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 196 | 196 | $actions = ''; |
| 197 | 197 | if ($moderator) { |
| 198 | - $actions .= '<form name="form1" method="post" action="">'.'/n'; |
|
| 199 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'.'/n'; |
|
| 200 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'.'/n'; |
|
| 198 | + $actions .= '<form name="form1" method="post" action="">' . '/n'; |
|
| 199 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . '/n'; |
|
| 200 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . '/n'; |
|
| 201 | 201 | if ($groupobj != null) { |
| 202 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'.'/n'; |
|
| 202 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . '/n'; |
|
| 203 | 203 | } |
| 204 | - $actions .= ' <INPUT type="submit" name="submit" value="end" onclick="return confirm(\''. |
|
| 205 | - get_string('index_confirm_end', 'bigbluebuttonbn').'\')">'.'/n'; |
|
| 206 | - $actions .= '</form>'.'/n'; |
|
| 204 | + $actions .= ' <INPUT type="submit" name="submit" value="end" onclick="return confirm(\'' . |
|
| 205 | + get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . '/n'; |
|
| 206 | + $actions .= '</form>' . '/n'; |
|
| 207 | 207 | } |
| 208 | 208 | return $actions; |
| 209 | 209 | } |
@@ -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 | $bn = required_param('bn', PARAM_INT); |
| 30 | 30 | $tc = optional_param('tc', 0, PARAM_INT); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $output .= html_writer::tag('input', '', |
| 100 | 100 | array('type' => 'button', 'class' => 'btn btn-secondary', |
| 101 | 101 | 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
| 102 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
| 102 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\'')); |
|
| 103 | 103 | |
| 104 | 104 | // JavaScript for locales. |
| 105 | 105 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
@@ -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 | $action = required_param('action', PARAM_TEXT); |
| 30 | 30 | $id = optional_param('id', 0, PARAM_INT); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
| 93 | 93 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
| 94 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 94 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 95 | 95 | break; |
| 96 | 96 | } |
| 97 | 97 | // As the meeting doesn't exist, try to create it. |
@@ -105,16 +105,16 @@ discard block |
||
| 105 | 105 | // The server is unreachable. |
| 106 | 106 | if ($bbbsession['administrator']) { |
| 107 | 107 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 108 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 108 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 109 | 109 | break; |
| 110 | 110 | } |
| 111 | 111 | if ($bbbsession['moderator']) { |
| 112 | 112 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 113 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 113 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 114 | 114 | break; |
| 115 | 115 | } |
| 116 | 116 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 117 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 117 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 118 | 118 | break; |
| 119 | 119 | } |
| 120 | 120 | if ($response['returncode'] == 'FAILED') { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | // Moodle event logger: Create an event for meeting left. |
| 144 | 144 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]); |
| 145 | 145 | // Execute the redirect. |
| 146 | - header('Location: '.urldecode($href)); |
|
| 146 | + header('Location: ' . urldecode($href)); |
|
| 147 | 147 | break; |
| 148 | 148 | default: |
| 149 | 149 | bigbluebutton_bbb_view_close_window(); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $data['welcome'] .= '<br><br>'; |
| 213 | 213 | $data['welcome'] .= str_replace( |
| 214 | 214 | '%duration%', |
| 215 | - (string) $durationtime, |
|
| 215 | + (string)$durationtime, |
|
| 216 | 216 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 217 | 217 | ); |
| 218 | 218 | } |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_FORCED); |
| 288 | 288 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
| 289 | 289 | // No more users allowed to join. |
| 290 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 290 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 291 | 291 | return; |
| 292 | 292 | } |
| 293 | 293 | // Build the URL. |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
| 306 | 306 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
| 307 | 307 | // Execute the redirect. |
| 308 | - header('Location: '.$joinurl); |
|
| 308 | + header('Location: ' . $joinurl); |
|
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | /** |
@@ -313,13 +313,13 @@ discard block |
||
| 313 | 313 | */ |
| 314 | 314 | function bigbluebutton_bbb_view_errors($serrors, $id) { |
| 315 | 315 | global $CFG, $OUTPUT; |
| 316 | - $errors = (array) json_decode(urldecode($serrors)); |
|
| 316 | + $errors = (array)json_decode(urldecode($serrors)); |
|
| 317 | 317 | $msgerrors = ''; |
| 318 | 318 | foreach ($errors as $error) { |
| 319 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
| 319 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
| 320 | 320 | } |
| 321 | 321 | echo $OUTPUT->header(); |
| 322 | 322 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
| 323 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
| 323 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
| 324 | 324 | echo $OUTPUT->footer(); |
| 325 | 325 | } |
@@ -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 | use \Firebase\JWT\JWT; |
| 30 | 30 | |
@@ -40,13 +40,13 @@ discard block |
||
| 40 | 40 | $params['meta'] = optional_param('meta', '', PARAM_TEXT); |
| 41 | 41 | |
| 42 | 42 | if (empty($params['action'])) { |
| 43 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
| 43 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
| 44 | 44 | return; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
| 48 | 48 | if (!empty($error)) { |
| 49 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 49 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 50 | 50 | return; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -130,11 +130,11 @@ discard block |
||
| 130 | 130 | bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn, $cm); |
| 131 | 131 | return; |
| 132 | 132 | } |
| 133 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 133 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
| 134 | 134 | return; |
| 135 | 135 | |
| 136 | 136 | } catch (Exception $e) { |
| 137 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
| 137 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
| 138 | 138 | return; |
| 139 | 139 | } |
| 140 | 140 | |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | function bigbluebuttonbn_broker_recording_info_current($recording, $params) { |
| 271 | 271 | $callbackresponse['status'] = true; |
| 272 | 272 | $callbackresponse['found'] = true; |
| 273 | - $callbackresponse['published'] = (string) $recording['published']; |
|
| 273 | + $callbackresponse['published'] = (string)$recording['published']; |
|
| 274 | 274 | if (!isset($params['meta']) || empty($params['meta'])) { |
| 275 | 275 | return $callbackresponse; |
| 276 | 276 | } |
@@ -549,8 +549,8 @@ discard block |
||
| 549 | 549 | $decodedparameters = JWT::decode($params['signed_parameters'], |
| 550 | 550 | (string)\mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
| 551 | 551 | } catch (Exception $e) { |
| 552 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 553 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 552 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 553 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 554 | 554 | return; |
| 555 | 555 | } |
| 556 | 556 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -566,8 +566,8 @@ discard block |
||
| 566 | 566 | bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn); |
| 567 | 567 | header('HTTP/1.0 202 Accepted'); |
| 568 | 568 | } catch (Exception $e) { |
| 569 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 570 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
| 569 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 570 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
| 571 | 571 | } |
| 572 | 572 | } |
| 573 | 573 | |
@@ -583,13 +583,13 @@ discard block |
||
| 583 | 583 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
| 584 | 584 | if (!isset($importrecordings[$params['id']])) { |
| 585 | 585 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
| 586 | - header('HTTP/1.0 404 Not found. '.$error); |
|
| 586 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
| 587 | 587 | return; |
| 588 | 588 | } |
| 589 | 589 | $callbackresponse = array('status' => true); |
| 590 | 590 | $importrecordings[$params['id']]['imported'] = true; |
| 591 | 591 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
| 592 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
| 592 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
| 593 | 593 | bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
| 594 | 594 | // Moodle event logger: Create an event for recording imported. |
| 595 | 595 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -609,8 +609,8 @@ discard block |
||
| 609 | 609 | $decodedparameters = JWT::decode($params['signed_parameters'], |
| 610 | 610 | (string)\mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
| 611 | 611 | } catch (Exception $e) { |
| 612 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 613 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 612 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 613 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 614 | 614 | return; |
| 615 | 615 | } |
| 616 | 616 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | } |
| 647 | 647 | $action = strtolower($params['action']); |
| 648 | 648 | if (!array_key_exists($action, $requiredparams)) { |
| 649 | - return 'Action '.$params['action'].' can not be performed.'; |
|
| 649 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
| 650 | 650 | } |
| 651 | 651 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
| 652 | 652 | } |
@@ -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('n', 0, PARAM_INT); |
@@ -58,21 +58,21 @@ discard block |
||
| 58 | 58 | if (is_null($serverversion)) { |
| 59 | 59 | if ($bbbsession['administrator']) { |
| 60 | 60 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 61 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 61 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 62 | 62 | exit; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | if ($bbbsession['moderator']) { |
| 66 | 66 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 67 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 67 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 68 | 68 | exit; |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 72 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 72 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 73 | 73 | exit; |
| 74 | 74 | } |
| 75 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
| 75 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
| 76 | 76 | |
| 77 | 77 | // Mark viewed by user (if required). |
| 78 | 78 | $completion = new completion_info($course); |
@@ -80,7 +80,7 @@ discard block |
||
| 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,11 +90,11 @@ discard block |
||
| 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; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // Operation URLs. |
| 104 | 104 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
| 105 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
| 105 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
| 106 | 106 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
| 107 | 107 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
| 108 | 108 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -122,7 +122,7 @@ discard block |
||
| 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; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
| 150 | 150 | |
| 151 | 151 | // Database info related to the activity. |
| 152 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 152 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 153 | 153 | $bbbsession['bigbluebuttonbn']->id; |
| 154 | 154 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 155 | 155 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
| 171 | 171 | } |
| 172 | 172 | if ($bbbsession['bigbluebuttonbn']->record) { |
| 173 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 173 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 187 | 187 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 188 | 188 | $bbbsession['originServerCommonName'] = ''; |
| 189 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 189 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | function bigbluebuttonbn_view_bbbsession_roles($context, $userid) { |
@@ -248,9 +248,9 @@ discard block |
||
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | // Assign group default values. |
| 251 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 252 | - $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']'; |
|
| 253 | - $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')'; |
|
| 251 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 252 | + $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']'; |
|
| 253 | + $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')'; |
|
| 254 | 254 | |
| 255 | 255 | if (count($groups) == 0) { |
| 256 | 256 | // Only the All participants group exists. |
@@ -265,12 +265,12 @@ discard block |
||
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'), 'warning'); |
| 268 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 268 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 269 | 269 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
| 270 | 270 | echo '<br><br>'; |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | -function bigbluebuttonbn_view_message_box(&$bbbsession, $message, $type='warning', $onlymoderator=false) { |
|
| 273 | +function bigbluebuttonbn_view_message_box(&$bbbsession, $message, $type = 'warning', $onlymoderator = false) { |
|
| 274 | 274 | global $OUTPUT; |
| 275 | 275 | if ($onlymoderator && !$bbbsession['moderator'] && !$bbbsession['administrator']) { |
| 276 | 276 | return; |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | |
| 302 | 302 | // Renders general warning when configured. |
| 303 | 303 | $cfg = \mod_bigbluebuttonbn\locallib\config::get_options(); |
| 304 | - $output = bigbluebuttonbn_view_render_warning( |
|
| 304 | + $output = bigbluebuttonbn_view_render_warning( |
|
| 305 | 305 | (string)$cfg['general_warning_message'], |
| 306 | 306 | (string)$cfg['general_warning_box_type'], |
| 307 | 307 | (string)$cfg['general_warning_button_href'], |
@@ -323,7 +323,7 @@ discard block |
||
| 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 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 328 | 328 | } |
| 329 | 329 | |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | return $output; |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | -function bigbluebuttonbn_view_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
| 351 | +function bigbluebuttonbn_view_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
| 352 | 352 | global $OUTPUT; |
| 353 | 353 | $output = "\n"; |
| 354 | 354 | // Evaluates if config_warning is enabled. |
@@ -356,14 +356,14 @@ discard block |
||
| 356 | 356 | return $output; |
| 357 | 357 | } |
| 358 | 358 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
| 359 | - 'bigbluebuttonbn_view_general_warning')."\n"; |
|
| 360 | - $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>'.$message."\n"; |
|
| 361 | - $output .= ' <div class="singlebutton">'."\n"; |
|
| 359 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 360 | + $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>' . $message . "\n"; |
|
| 361 | + $output .= ' <div class="singlebutton">' . "\n"; |
|
| 362 | 362 | if (!empty($href)) { |
| 363 | 363 | $output .= bigbluebuttonbn_view_render_warning_button($href, $text, $class); |
| 364 | 364 | } |
| 365 | - $output .= ' </div>'."\n"; |
|
| 366 | - $output .= $OUTPUT->box_end()."\n"; |
|
| 365 | + $output .= ' </div>' . "\n"; |
|
| 366 | + $output .= $OUTPUT->box_end() . "\n"; |
|
| 367 | 367 | return $output; |
| 368 | 368 | } |
| 369 | 369 | |
@@ -374,11 +374,11 @@ discard block |
||
| 374 | 374 | if ($class == '') { |
| 375 | 375 | $class = 'btn btn-secondary'; |
| 376 | 376 | } |
| 377 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
| 378 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
| 379 | - $output .= ' title=""'."\n"; |
|
| 380 | - $output .= ' >' . $text . '</button>'."\n"; |
|
| 381 | - $output .= ' </form>'."\n"; |
|
| 377 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
| 378 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
| 379 | + $output .= ' title=""' . "\n"; |
|
| 380 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
| 381 | + $output .= ' </form>' . "\n"; |
|
| 382 | 382 | return $output; |
| 383 | 383 | } |
| 384 | 384 | |
@@ -388,12 +388,12 @@ discard block |
||
| 388 | 388 | // JavaScript variables for room. |
| 389 | 389 | $openingtime = ''; |
| 390 | 390 | if ($bbbsession['openingtime']) { |
| 391 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 391 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 392 | 392 | userdate($bbbsession['openingtime']); |
| 393 | 393 | } |
| 394 | 394 | $closingtime = ''; |
| 395 | 395 | if ($bbbsession['closingtime']) { |
| 396 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 396 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 397 | 397 | userdate($bbbsession['closingtime']); |
| 398 | 398 | } |
| 399 | 399 | $jsvars += array( |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | $output .= $OUTPUT->box_end(); |
| 411 | 411 | |
| 412 | 412 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 413 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 413 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 414 | 414 | $output .= $OUTPUT->box_end(); |
| 415 | 415 | |
| 416 | 416 | if ($activity == 'ended') { |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | |
| 437 | 437 | // Get recordings. |
| 438 | 438 | $recordings = array(); |
| 439 | - if ( bigbluebuttonbn_view_include_recordings($bbbsession) ) { |
|
| 439 | + if (bigbluebuttonbn_view_include_recordings($bbbsession)) { |
|
| 440 | 440 | $recordings = bigbluebuttonbn_get_recordings( |
| 441 | 441 | $bbbsession['course']->id, $bigbluebuttonbnid, $showroom, |
| 442 | 442 | $bbbsession['bigbluebuttonbn']->recordings_deleted |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | // If there are meetings with recordings load the data to the table. |
| 468 | 468 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 469 | 469 | // Render a plain html table. |
| 470 | - return bigbluebutton_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 470 | + return bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | // JavaScript variables for recordings with YUI. |
@@ -487,8 +487,8 @@ discard block |
||
| 487 | 487 | array('type' => 'button', |
| 488 | 488 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 489 | 489 | 'class' => 'btn btn-secondary', |
| 490 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 491 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 490 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 491 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 492 | 492 | $output = html_writer::start_tag('br'); |
| 493 | 493 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 494 | 494 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -503,10 +503,10 @@ discard block |
||
| 503 | 503 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 504 | 504 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 505 | 505 | |
| 506 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 507 | - ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
|
| 508 | - ''.$OUTPUT->action_link($bbbsession['presentation']['url'], |
|
| 509 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 506 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 507 | + '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' . |
|
| 508 | + '' . $OUTPUT->action_link($bbbsession['presentation']['url'], |
|
| 509 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | return ''; |