@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | use mod_bigbluebuttonbn\plugin; |
| 29 | 29 | |
| 30 | -require(__DIR__.'/../../config.php'); |
|
| 31 | -require_once(__DIR__.'/locallib.php'); |
|
| 32 | -require_once(__DIR__.'/viewlib.php'); |
|
| 30 | +require(__DIR__ . '/../../config.php'); |
|
| 31 | +require_once(__DIR__ . '/locallib.php'); |
|
| 32 | +require_once(__DIR__ . '/viewlib.php'); |
|
| 33 | 33 | |
| 34 | 34 | $id = required_param('id', PARAM_INT); |
| 35 | 35 | $bn = optional_param('bn', 0, PARAM_INT); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | mod_bigbluebuttonbn\locallib\bigbluebutton::view_bbbsession_set($PAGE->context, $bbbsession); |
| 59 | 59 | |
| 60 | 60 | // Validates if the BigBlueButton server is working. |
| 61 | -$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
| 61 | +$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
| 62 | 62 | if ($serverversion === null) { |
| 63 | 63 | $errmsg = 'view_error_unable_join_student'; |
| 64 | 64 | $errurl = '/course/view.php'; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | print_error($errmsg, plugin::COMPONENT, new moodle_url($errurl, $errurlparams)); |
| 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); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | //echo $OUTPUT->footer(); |
| 115 | 115 | |
| 116 | 116 | // Shows version as a comment. |
| 117 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
| 117 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
| 118 | 118 | |
| 119 | 119 | // Initialize session variable used across views. |
| 120 | 120 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
| 121 | 121 | \ No newline at end of file |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @return string |
| 77 | 77 | */ |
| 78 | 78 | public static function sanitized_url($secondary = false) { |
| 79 | - $pfx=$secondary? 'secondary_' : ''; |
|
| 79 | + $pfx = $secondary ? 'secondary_' : ''; |
|
| 80 | 80 | $serverurl = trim(config::get($pfx . 'server_url')); |
| 81 | 81 | if (empty($serverurl)) { |
| 82 | 82 | $serverurl = trim(config::get('server_url')); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * @return string |
| 97 | 97 | */ |
| 98 | 98 | public static function sanitized_secret($secondary = false) { |
| 99 | - $pfx=$secondary? 'secondary_' : ''; |
|
| 99 | + $pfx = $secondary ? 'secondary_' : ''; |
|
| 100 | 100 | $sharedsecret = trim(config::get($pfx . 'shared_secret')); |
| 101 | 101 | if (empty($sharedsecret)) { |
| 102 | 102 | $sharedsecret = trim(config::get('shared_secret')); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @return string |
| 111 | 111 | */ |
| 112 | 112 | public static function root($secondary = false) { |
| 113 | - $pfx=$secondary? 'secondary_' : ''; |
|
| 113 | + $pfx = $secondary ? 'secondary_' : ''; |
|
| 114 | 114 | $pserverurl = parse_url(trim(config::get($pfx . 'server_url'))); |
| 115 | 115 | $pserverurlport = ""; |
| 116 | 116 | if (isset($pserverurl['port'])) { |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | self::view_bbbsession_set($context, $bbbsession); |
| 168 | 168 | |
| 169 | 169 | $serverversion = bigbluebuttonbn_get_server_version(); |
| 170 | - $bbbsession['serverversion'] = (string) $serverversion; |
|
| 170 | + $bbbsession['serverversion'] = (string)$serverversion; |
|
| 171 | 171 | |
| 172 | 172 | // Operation URLs. |
| 173 | 173 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id; |
@@ -205,12 +205,12 @@ discard block |
||
| 205 | 205 | $bbbsession['importrecordings'] = ($bbbsession['managerecordings']); |
| 206 | 206 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
| 207 | 207 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
| 208 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 208 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 209 | 209 | $bbbsession['bigbluebuttonbn']->id; |
| 210 | 210 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 211 | 211 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
| 212 | - $bbbsession['userlimit'] = intval((int) config::get('userlimit_default')); |
|
| 213 | - if ((boolean) config::get('userlimit_editable')) { |
|
| 212 | + $bbbsession['userlimit'] = intval((int)config::get('userlimit_default')); |
|
| 213 | + if ((boolean)config::get('userlimit_editable')) { |
|
| 214 | 214 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
| 215 | 215 | } |
| 216 | 216 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -234,10 +234,10 @@ discard block |
||
| 234 | 234 | if ($bbbsession['bigbluebuttonbn']->record) { |
| 235 | 235 | // Check if is enable record all from start. |
| 236 | 236 | if ($bbbsession['recordallfromstart']) { |
| 237 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning', |
|
| 237 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning', |
|
| 238 | 238 | 'bigbluebuttonbn'); |
| 239 | 239 | } else { |
| 240 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 240 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 263 | 263 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 264 | 264 | $bbbsession['originServerCommonName'] = ''; |
| 265 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 265 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 266 | 266 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
| 267 | 267 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
| 268 | 268 | $bbbsession['clienttype'] = config::get('clienttype_default'); |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public static function defaultvalues() { |
| 57 | 57 | return array( |
| 58 | - 'server_url' => (string) BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
| 59 | - 'shared_secret' => (string) BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
| 58 | + 'server_url' => (string)BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
| 59 | + 'shared_secret' => (string)BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
| 60 | 60 | 'secondary_server_url' => '', |
| 61 | 61 | 'secondary_shared_secret' => '', |
| 62 | 62 | 'voicebridge_editable' => false, |
@@ -152,8 +152,8 @@ discard block |
||
| 152 | 152 | if (isset($CFG->bigbluebuttonbn[$setting])) { |
| 153 | 153 | return (string)$CFG->bigbluebuttonbn[$setting]; |
| 154 | 154 | } |
| 155 | - if (isset($CFG->{'bigbluebuttonbn_'.$setting})) { |
|
| 156 | - return (string)$CFG->{'bigbluebuttonbn_'.$setting}; |
|
| 155 | + if (isset($CFG->{'bigbluebuttonbn_' . $setting})) { |
|
| 156 | + return (string)$CFG->{'bigbluebuttonbn_' . $setting}; |
|
| 157 | 157 | } |
| 158 | 158 | return self::defaultvalue($setting); |
| 159 | 159 | } |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | $groupname = groups_get_group_name($bbbsession['group']); |
| 55 | 55 | } |
| 56 | 56 | // Assign group default values. |
| 57 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 58 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 57 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 58 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 59 | 59 | if (count($groups) == 0) { |
| 60 | 60 | // Only the All participants group exists. |
| 61 | 61 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if (has_capability('moodle/site:accessallgroups', $context)) { |
| 66 | 66 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
| 67 | 67 | } |
| 68 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 68 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 69 | 69 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
| 70 | 70 | echo '<br><br>'; |
| 71 | 71 | } |
@@ -96,14 +96,14 @@ discard block |
||
| 96 | 96 | $groupname = groups_get_group_name($bbbsession['group']); |
| 97 | 97 | } |
| 98 | 98 | // Assign group default values. |
| 99 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 100 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 99 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 100 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 101 | 101 | if (count($groups) == 0) { |
| 102 | 102 | // Only the All participants group exists. |
| 103 | 103 | return; |
| 104 | 104 | } |
| 105 | 105 | $context = context_module::instance($bbbsession['cm']->id); |
| 106 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 106 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 184 | 184 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 185 | 185 | } |
| 186 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 186 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 187 | 187 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 188 | 188 | } |
| 189 | 189 | |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | $output = ''; |
| 219 | 219 | |
| 220 | 220 | $output .= bigbluebuttonbn_view_render_recording_section($bbbsession, $type, $enabledfeatures, $jsvars); |
| 221 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 221 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 222 | 222 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-recordings', |
| 223 | 223 | 'M.mod_bigbluebuttonbn.recordings.init', array($jsvars)); |
| 224 | 224 | } |
@@ -288,12 +288,12 @@ discard block |
||
| 288 | 288 | // JavaScript variables for room. |
| 289 | 289 | $openingtime = ''; |
| 290 | 290 | if ($bbbsession['openingtime']) { |
| 291 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 291 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 292 | 292 | userdate($bbbsession['openingtime']); |
| 293 | 293 | } |
| 294 | 294 | $closingtime = ''; |
| 295 | 295 | if ($bbbsession['closingtime']) { |
| 296 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 296 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 297 | 297 | userdate($bbbsession['closingtime']); |
| 298 | 298 | } |
| 299 | 299 | $jsvars += array( |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | $output .= $OUTPUT->box_end(); |
| 311 | 311 | // Action button box. |
| 312 | 312 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 313 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 313 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 314 | 314 | $output .= $OUTPUT->box_end(); |
| 315 | 315 | if ($activity == 'ended') { |
| 316 | 316 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | // If there are meetings with recordings load the data to the table. |
| 344 | 344 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 345 | 345 | // Render a plain html table. |
| 346 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 346 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 347 | 347 | } |
| 348 | 348 | // JavaScript variables for recordings with YUI. |
| 349 | 349 | $jsvars += array( |
@@ -379,8 +379,8 @@ discard block |
||
| 379 | 379 | array('type' => 'button', |
| 380 | 380 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 381 | 381 | 'class' => 'btn btn-secondary', |
| 382 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 383 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 382 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 383 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 384 | 384 | $output = html_writer::empty_tag('br'); |
| 385 | 385 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 386 | 386 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -399,10 +399,10 @@ discard block |
||
| 399 | 399 | if (!is_null($bbbsession['presentation']['url'])) { |
| 400 | 400 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 401 | 401 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 402 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 403 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 402 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 403 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 404 | 404 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 405 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 405 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 406 | 406 | } |
| 407 | 407 | return ''; |
| 408 | 408 | } |