@@ -27,8 +27,8 @@ |
||
| 27 | 27 | use mod_bigbluebuttonbn\output\import_view; |
| 28 | 28 | use mod_bigbluebuttonbn\output\renderer; |
| 29 | 29 | |
| 30 | -require(__DIR__.'/../../config.php'); |
|
| 31 | -require_once(__DIR__.'/locallib.php'); |
|
| 30 | +require(__DIR__ . '/../../config.php'); |
|
| 31 | +require_once(__DIR__ . '/locallib.php'); |
|
| 32 | 32 | |
| 33 | 33 | $bn = required_param('bn', PARAM_INT); |
| 34 | 34 | $tc = optional_param('tc', 0, PARAM_INT); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | global $CFG; |
| 30 | 30 | |
| 31 | -require_once(__DIR__.'/locallib.php'); |
|
| 31 | +require_once(__DIR__ . '/locallib.php'); |
|
| 32 | 32 | |
| 33 | 33 | if ($hassiteconfig) { |
| 34 | 34 | // Configuration for BigBlueButton. |
@@ -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 | bigbluebuttonbn_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); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | echo $OUTPUT->footer(); |
| 117 | 117 | |
| 118 | 118 | // Shows version as a comment. |
| 119 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
| 119 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
| 120 | 120 | |
| 121 | 121 | // Initialize session variable used across views. |
| 122 | 122 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
| 123 | 123 | \ No newline at end of file |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | defined('MOODLE_INTERNAL') || die(); |
| 38 | 38 | |
| 39 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 39 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * Class import_view |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | defined('MOODLE_INTERNAL') || die(); |
| 36 | 36 | |
| 37 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 37 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Class index |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | // Add a the data for the bigbluebuttonbn instance. |
| 93 | 93 | $groupobj = null; |
| 94 | 94 | if (groups_get_activity_groupmode($cm) > 0) { |
| 95 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 95 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 96 | 96 | } |
| 97 | 97 | $table->data[] = self::bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 98 | 98 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $attendeecount = 0; |
| 183 | 183 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 184 | 184 | if ($attendee->role == $role) { |
| 185 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 185 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | } |
@@ -216,17 +216,17 @@ discard block |
||
| 216 | 216 | public static function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 217 | 217 | $actions = ''; |
| 218 | 218 | if ($moderator) { |
| 219 | - $actions .= '<form name="form1" method="post" action="">'."\n"; |
|
| 220 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
| 221 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
| 219 | + $actions .= '<form name="form1" method="post" action="">' . "\n"; |
|
| 220 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
| 221 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
| 222 | 222 | if ($groupobj != null) { |
| 223 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
| 223 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
| 224 | 224 | } |
| 225 | 225 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
| 226 | 226 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
| 227 | 227 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
| 228 | 228 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
| 229 | - $actions .= '</form>'."\n"; |
|
| 229 | + $actions .= '</form>' . "\n"; |
|
| 230 | 230 | } |
| 231 | 231 | return $actions; |
| 232 | 232 | } |
@@ -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 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 138 | 138 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 139 | 139 | } |
| 140 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 140 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 141 | 141 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 142 | 142 | } |
| 143 | 143 | |
@@ -206,12 +206,12 @@ discard block |
||
| 206 | 206 | // JavaScript variables for room. |
| 207 | 207 | $openingtime = ''; |
| 208 | 208 | if ($bbbsession['openingtime']) { |
| 209 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 209 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 210 | 210 | userdate($bbbsession['openingtime']); |
| 211 | 211 | } |
| 212 | 212 | $closingtime = ''; |
| 213 | 213 | if ($bbbsession['closingtime']) { |
| 214 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 214 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 215 | 215 | userdate($bbbsession['closingtime']); |
| 216 | 216 | } |
| 217 | 217 | $jsvars += array( |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $output .= $OUTPUT->box_end(); |
| 229 | 229 | // Action button box. |
| 230 | 230 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 231 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 231 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 232 | 232 | $output .= $OUTPUT->box_end(); |
| 233 | 233 | if ($activity == 'ended') { |
| 234 | 234 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | // If there are meetings with recordings load the data to the table. |
| 282 | 282 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 283 | 283 | // Render a plain html table. |
| 284 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 284 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 285 | 285 | } |
| 286 | 286 | // JavaScript variables for recordings with YUI. |
| 287 | 287 | $jsvars += array( |
@@ -318,8 +318,8 @@ discard block |
||
| 318 | 318 | array('type' => 'button', |
| 319 | 319 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 320 | 320 | 'class' => 'btn btn-secondary', |
| 321 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 322 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 321 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 322 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 323 | 323 | $output = html_writer::empty_tag('br'); |
| 324 | 324 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 325 | 325 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -338,10 +338,10 @@ discard block |
||
| 338 | 338 | if (!is_null($bbbsession['presentation']['url'])) { |
| 339 | 339 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 340 | 340 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 341 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 342 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 341 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 342 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 343 | 343 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 344 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 344 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 345 | 345 | } |
| 346 | 346 | return ''; |
| 347 | 347 | } |
@@ -28,8 +28,8 @@ |
||
| 28 | 28 | use mod_bigbluebuttonbn\output\renderer; |
| 29 | 29 | use mod_bigbluebuttonbn\output\index; |
| 30 | 30 | |
| 31 | -require(__DIR__.'/../../config.php'); |
|
| 32 | -require_once(__DIR__.'/locallib.php'); |
|
| 31 | +require(__DIR__ . '/../../config.php'); |
|
| 32 | +require_once(__DIR__ . '/locallib.php'); |
|
| 33 | 33 | |
| 34 | 34 | $id = required_param('id', PARAM_INT); |
| 35 | 35 | $a = optional_param('a', 0, PARAM_INT); |
@@ -219,8 +219,8 @@ discard block |
||
| 219 | 219 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 220 | 220 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
| 221 | 221 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
| 222 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 223 | - ); |
|
| 222 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 223 | + ); |
|
| 224 | 224 | } else { |
| 225 | 225 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 226 | 226 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
| 291 | 291 | $recordingsettings = false; |
| 292 | 292 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
| 293 | - 'description_key' => null]; |
|
| 293 | + 'description_key' => null]; |
|
| 294 | 294 | if ($cfg['recordings_html_editable']) { |
| 295 | 295 | $field['type'] = 'checkbox'; |
| 296 | 296 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 300 | 300 | $field['description_key'], $cfg['recordings_html_default']); |
| 301 | 301 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
| 302 | - 'description_key' => null]; |
|
| 302 | + 'description_key' => null]; |
|
| 303 | 303 | if ($cfg['recordings_deleted_editable']) { |
| 304 | 304 | $field['type'] = 'checkbox'; |
| 305 | 305 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 309 | 309 | $field['description_key'], $cfg['recordings_deleted_default']); |
| 310 | 310 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
| 311 | - 'description_key' => null]; |
|
| 311 | + 'description_key' => null]; |
|
| 312 | 312 | if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) { |
| 313 | 313 | $field['type'] = 'checkbox'; |
| 314 | 314 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 318 | 318 | $field['description_key'], $cfg['recordings_imported_default']); |
| 319 | 319 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
| 320 | - 'description_key' => null]; |
|
| 320 | + 'description_key' => null]; |
|
| 321 | 321 | if ($cfg['recordings_preview_editable']) { |
| 322 | 322 | $field['type'] = 'checkbox'; |
| 323 | 323 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
| 395 | 395 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
| 396 | 396 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
| 397 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 397 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 398 | 398 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
| 399 | 399 | $participantselection['selected'], array(), |
| 400 | 400 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | 'type' => 'button', 'class' => 'btn btn-secondary', |
| 403 | 403 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
| 404 | 404 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
| 405 | - )); |
|
| 405 | + )); |
|
| 406 | 406 | $htmladdparticipant = html_writer::tag('div', |
| 407 | 407 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
| 408 | 408 | $mform->addElement('html', "\n\n"); |
@@ -444,9 +444,9 @@ discard block |
||
| 444 | 444 | $field['type'] = 'select'; |
| 445 | 445 | $field['data_type'] = PARAM_TEXT; |
| 446 | 446 | $field['description_key'] = 'mod_form_field_block_clienttype'; |
| 447 | - $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
| 448 | - BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 449 | - $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
|
| 447 | + $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
| 448 | + BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 449 | + $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
|
| 450 | 450 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 451 | 451 | $field['description_key'], $cfg['clienttype_default'], $choices); |
| 452 | 452 | return; |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | defined('MOODLE_INTERNAL') || die(); |
| 28 | 28 | |
| 29 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 30 | -require_once($CFG->dirroot.'/course/moodleform_mod.php'); |
|
| 29 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot . '/course/moodleform_mod.php'); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Moodle class for mod_form. |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $serverversion = bigbluebuttonbn_get_server_version(); |
| 49 | 49 | if (is_null($serverversion)) { |
| 50 | 50 | print_error('general_error_unable_connect', 'bigbluebuttonbn', |
| 51 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 51 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 52 | 52 | return; |
| 53 | 53 | } |
| 54 | 54 | // Context. |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // If none is allowed, fail and return. |
| 81 | 81 | if (empty($jsvars['instanceTypeProfiles'])) { |
| 82 | 82 | print_error('general_error_not_allowed_to_create_instances)', 'bigbluebuttonbn', |
| 83 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 83 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 84 | 84 | return; |
| 85 | 85 | } |
| 86 | 86 | $this->bigbluebuttonbn_mform_add_block_profiles($mform, $jsvars['instanceTypeProfiles']); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | ); |
| 137 | 137 | $defaultvalues['presentation'] = $draftitemid; |
| 138 | 138 | } catch (Exception $e) { |
| 139 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
| 139 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
| 140 | 140 | return; |
| 141 | 141 | } |
| 142 | 142 | // Completion: tick if completion attendance settings is set to 1 or more. |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | return; |
| 565 | 565 | } |
| 566 | 566 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
| 567 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
| 567 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
| 568 | 568 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
| 569 | 569 | } |
| 570 | 570 | if (!empty($rule)) { |
@@ -309,10 +309,10 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | function bigbluebuttonbn_bbb_view_create_meeting_data(&$bbbsession) { |
| 311 | 311 | $data = ['meetingID' => $bbbsession['meetingid'], |
| 312 | - 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 313 | - 'attendeePW' => $bbbsession['viewerPW'], |
|
| 314 | - 'moderatorPW' => $bbbsession['modPW'], |
|
| 315 | - 'logoutURL' => $bbbsession['logoutURL'], |
|
| 312 | + 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 313 | + 'attendeePW' => $bbbsession['viewerPW'], |
|
| 314 | + 'moderatorPW' => $bbbsession['modPW'], |
|
| 315 | + 'logoutURL' => $bbbsession['logoutURL'], |
|
| 316 | 316 | ]; |
| 317 | 317 | $data['record'] = bigbluebuttonbn_bbb_view_create_meeting_data_record($bbbsession['record']); |
| 318 | 318 | // Check if auto_start_record is enable. |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | '%duration%', |
| 335 | 335 | (string) $durationtime, |
| 336 | 336 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 337 | - ); |
|
| 337 | + ); |
|
| 338 | 338 | } |
| 339 | 339 | $voicebridge = intval($bbbsession['voicebridge']); |
| 340 | 340 | if ($voicebridge > 0 && $voicebridge < 79999) { |
@@ -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. |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
| 182 | 182 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
| 183 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 183 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 184 | 184 | break; |
| 185 | 185 | } |
| 186 | 186 | // As the meeting doesn't exist, try to create it. |
@@ -194,16 +194,16 @@ discard block |
||
| 194 | 194 | // The server is unreachable. |
| 195 | 195 | if ($bbbsession['administrator']) { |
| 196 | 196 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 197 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 197 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 198 | 198 | break; |
| 199 | 199 | } |
| 200 | 200 | if ($bbbsession['moderator']) { |
| 201 | 201 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 202 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 202 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 203 | 203 | break; |
| 204 | 204 | } |
| 205 | 205 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 206 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 206 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 207 | 207 | break; |
| 208 | 208 | } |
| 209 | 209 | if ($response['returncode'] == 'FAILED') { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
| 225 | 225 | // Internal logger: Insert a record with the meeting created. |
| 226 | 226 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 227 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 227 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 228 | 228 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
| 229 | 229 | // Since the meeting is already running, we just join the session. |
| 230 | 230 | bigbluebuttonbn_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin); |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 239 | 239 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_PLAYED, $overrides); |
| 240 | 240 | // Execute the redirect. |
| 241 | - header('Location: '.urldecode($href)); |
|
| 241 | + header('Location: ' . urldecode($href)); |
|
| 242 | 242 | break; |
| 243 | 243 | default: |
| 244 | 244 | bigbluebuttonbn_bbb_view_close_window(); |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | $data['welcome'] .= '<br><br>'; |
| 333 | 333 | $data['welcome'] .= str_replace( |
| 334 | 334 | '%duration%', |
| 335 | - (string) $durationtime, |
|
| 335 | + (string)$durationtime, |
|
| 336 | 336 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 337 | 337 | ); |
| 338 | 338 | } |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
| 399 | 399 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
| 400 | 400 | // No more users allowed to join. |
| 401 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 401 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 402 | 402 | return; |
| 403 | 403 | } |
| 404 | 404 | // Build the URL. |
@@ -412,13 +412,13 @@ discard block |
||
| 412 | 412 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
| 413 | 413 | // Internal logger: Instert a record with the meeting created. |
| 414 | 414 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 415 | - $meta = '{"origin":'.$origin.'}'; |
|
| 415 | + $meta = '{"origin":' . $origin . '}'; |
|
| 416 | 416 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
| 417 | 417 | // Before executing the redirect, increment the number of participants. |
| 418 | 418 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
| 419 | 419 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
| 420 | 420 | // Execute the redirect. |
| 421 | - header('Location: '.$joinurl); |
|
| 421 | + header('Location: ' . $joinurl); |
|
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | /** |
@@ -430,13 +430,13 @@ discard block |
||
| 430 | 430 | */ |
| 431 | 431 | function bigbluebuttonbn_bbb_view_errors($serrors, $id) { |
| 432 | 432 | global $CFG, $OUTPUT; |
| 433 | - $errors = (array) json_decode(urldecode($serrors)); |
|
| 433 | + $errors = (array)json_decode(urldecode($serrors)); |
|
| 434 | 434 | $msgerrors = ''; |
| 435 | 435 | foreach ($errors as $error) { |
| 436 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
| 436 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
| 437 | 437 | } |
| 438 | 438 | echo $OUTPUT->header(); |
| 439 | 439 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
| 440 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
| 440 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
| 441 | 441 | echo $OUTPUT->footer(); |
| 442 | 442 | } |