@@ -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); |
@@ -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 |
@@ -113,7 +113,7 @@ |
||
113 | 113 | $data['welcome'] .= '<br><br>'; |
114 | 114 | $data['welcome'] .= str_replace( |
115 | 115 | '%duration%', |
116 | - (string) $durationtime, |
|
116 | + (string)$durationtime, |
|
117 | 117 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
118 | 118 | ); |
119 | 119 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | self::view_bbbsession_set($context, $bbbsession); |
150 | 150 | |
151 | 151 | $serverversion = bigbluebuttonbn_get_server_version(); |
152 | - $bbbsession['serverversion'] = (string) $serverversion; |
|
152 | + $bbbsession['serverversion'] = (string)$serverversion; |
|
153 | 153 | |
154 | 154 | // Operation URLs. |
155 | 155 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id; |
@@ -187,12 +187,12 @@ discard block |
||
187 | 187 | $bbbsession['importrecordings'] = ($bbbsession['managerecordings']); |
188 | 188 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
189 | 189 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
190 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
190 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
191 | 191 | $bbbsession['bigbluebuttonbn']->id; |
192 | 192 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
193 | 193 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
194 | - $bbbsession['userlimit'] = intval((int) config::get('userlimit_default')); |
|
195 | - if ((boolean) config::get('userlimit_editable')) { |
|
194 | + $bbbsession['userlimit'] = intval((int)config::get('userlimit_default')); |
|
195 | + if ((boolean)config::get('userlimit_editable')) { |
|
196 | 196 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
197 | 197 | } |
198 | 198 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -216,10 +216,10 @@ discard block |
||
216 | 216 | if ($bbbsession['bigbluebuttonbn']->record) { |
217 | 217 | // Check if is enable record all from start. |
218 | 218 | if ($bbbsession['recordallfromstart']) { |
219 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning', |
|
219 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning', |
|
220 | 220 | 'bigbluebuttonbn'); |
221 | 221 | } else { |
222 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
222 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $bbbsession['originServerName'] = $parsedurl['host']; |
245 | 245 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
246 | 246 | $bbbsession['originServerCommonName'] = ''; |
247 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
247 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
248 | 248 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
249 | 249 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
250 | 250 | $bbbsession['clienttype'] = config::get('clienttype_default'); |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | |
26 | 26 | define('AJAX_SCRIPT', true); |
27 | 27 | |
28 | -require(__DIR__.'/../../config.php'); |
|
29 | -require_once(__DIR__.'/locallib.php'); |
|
30 | -require_once(__DIR__.'/brokerlib.php'); |
|
28 | +require(__DIR__ . '/../../config.php'); |
|
29 | +require_once(__DIR__ . '/locallib.php'); |
|
30 | +require_once(__DIR__ . '/brokerlib.php'); |
|
31 | 31 | |
32 | 32 | global $PAGE, $USER, $CFG, $SESSION, $DB; |
33 | 33 | |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | require_sesskey(); |
45 | 45 | |
46 | 46 | if (empty($params['action'])) { |
47 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
47 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
48 | 48 | return; |
49 | 49 | } |
50 | 50 | |
51 | 51 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
52 | 52 | if (!empty($error)) { |
53 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
53 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
54 | 54 | return; |
55 | 55 | } |
56 | 56 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | echo $completionvalidate; |
136 | 136 | return; |
137 | 137 | } |
138 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
138 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
139 | 139 | } catch (Exception $e) { |
140 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
140 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
141 | 141 | } |
@@ -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. |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $serverversion = bigbluebuttonbn_get_server_version(); |
51 | 51 | if (is_null($serverversion)) { |
52 | 52 | print_error('general_error_unable_connect', 'bigbluebuttonbn', |
53 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
53 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
54 | 54 | return; |
55 | 55 | } |
56 | 56 | $bigbluebuttonbn = null; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | // If still 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 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | ); |
141 | 141 | $defaultvalues['presentation'] = $draftitemid; |
142 | 142 | } catch (Exception $e) { |
143 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
143 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
144 | 144 | return; |
145 | 145 | } |
146 | 146 | // Completion: tick if completion attendance settings is set to 1 or more. |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | return; |
694 | 694 | } |
695 | 695 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
696 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
696 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
697 | 697 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
698 | 698 | } |
699 | 699 | if (!empty($rule)) { |
@@ -313,8 +313,8 @@ discard block |
||
313 | 313 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
314 | 314 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
315 | 315 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
316 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
317 | - ); |
|
316 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
317 | + ); |
|
318 | 318 | } else { |
319 | 319 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
320 | 320 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
487 | 487 | $recordingsettings = false; |
488 | 488 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
489 | - 'description_key' => null]; |
|
489 | + 'description_key' => null]; |
|
490 | 490 | if ($cfg['recordings_html_editable']) { |
491 | 491 | $field['type'] = 'checkbox'; |
492 | 492 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
496 | 496 | $field['description_key'], $cfg['recordings_html_default']); |
497 | 497 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
498 | - 'description_key' => null]; |
|
498 | + 'description_key' => null]; |
|
499 | 499 | if ($cfg['recordings_deleted_editable']) { |
500 | 500 | $field['type'] = 'checkbox'; |
501 | 501 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
505 | 505 | $field['description_key'], $cfg['recordings_deleted_default']); |
506 | 506 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
507 | - 'description_key' => null]; |
|
507 | + 'description_key' => null]; |
|
508 | 508 | if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) { |
509 | 509 | $field['type'] = 'checkbox'; |
510 | 510 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
514 | 514 | $field['description_key'], $cfg['recordings_imported_default']); |
515 | 515 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
516 | - 'description_key' => null]; |
|
516 | + 'description_key' => null]; |
|
517 | 517 | if ($cfg['recordings_preview_editable']) { |
518 | 518 | $field['type'] = 'checkbox'; |
519 | 519 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
591 | 591 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
592 | 592 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
593 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
593 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
594 | 594 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
595 | 595 | $participantselection['selected'], array(), |
596 | 596 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | 'type' => 'button', 'class' => 'btn btn-secondary', |
599 | 599 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
600 | 600 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
601 | - )); |
|
601 | + )); |
|
602 | 602 | $htmladdparticipant = html_writer::tag('div', |
603 | 603 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
604 | 604 | $mform->addElement('html', "\n\n"); |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | $field['data_type'] = PARAM_TEXT; |
642 | 642 | $field['description_key'] = 'mod_form_field_block_clienttype'; |
643 | 643 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
644 | - BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
644 | + BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
645 | 645 | $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
646 | 646 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
647 | 647 | $field['description_key'], $cfg['clienttype_default'], $choices); |