@@ -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 | } |
@@ -190,63 +190,63 @@ |
||
190 | 190 | */ |
191 | 191 | public static function get_options() { |
192 | 192 | return array( |
193 | - 'version_major' => self::get_moodle_version_major(), |
|
194 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
195 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
196 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
197 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
198 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
199 | - 'userlimit_default' => self::get('userlimit_default'), |
|
200 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
201 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
202 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
203 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
204 | - 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
205 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
206 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
207 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
208 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
209 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
210 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
211 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
212 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
213 | - 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
214 | - 'recording_default' => self::get('recording_default'), |
|
215 | - 'recording_editable' => self::get('recording_editable'), |
|
216 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
217 | - 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
218 | - 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
219 | - 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
220 | - 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
221 | - 'general_warning_message' => self::get('general_warning_message'), |
|
222 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
223 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
224 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
225 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
226 | - 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
227 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
228 | - 'clienttype_default' => self::get('clienttype_default'), |
|
229 | - 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
230 | - 'muteonstart_default' => self::get('muteonstart_default'), |
|
231 | - 'disablecam_editable' => self::get('disablecam_editable'), |
|
232 | - 'disablecam_default' => self::get('disablecam_default'), |
|
233 | - 'disablemic_editable' => self::get('disablemic_editable'), |
|
234 | - 'disablemic_default' => self::get('disablemic_default'), |
|
235 | - 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
236 | - 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
237 | - 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
238 | - 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
239 | - 'disablenote_editable' => self::get('disablenote_editable'), |
|
240 | - 'disablenote_default' => self::get('disablenote_default'), |
|
241 | - 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
242 | - 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
243 | - 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
244 | - 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
245 | - 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
246 | - 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
247 | - 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
248 | - 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
249 | - 'welcome_default' => self::get('welcome_default'), |
|
250 | - ); |
|
193 | + 'version_major' => self::get_moodle_version_major(), |
|
194 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
195 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
196 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
197 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
198 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
199 | + 'userlimit_default' => self::get('userlimit_default'), |
|
200 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
201 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
202 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
203 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
204 | + 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
205 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
206 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
207 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
208 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
209 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
210 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
211 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
212 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
213 | + 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
214 | + 'recording_default' => self::get('recording_default'), |
|
215 | + 'recording_editable' => self::get('recording_editable'), |
|
216 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
217 | + 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
218 | + 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
219 | + 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
220 | + 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
221 | + 'general_warning_message' => self::get('general_warning_message'), |
|
222 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
223 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
224 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
225 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
226 | + 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
227 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
228 | + 'clienttype_default' => self::get('clienttype_default'), |
|
229 | + 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
230 | + 'muteonstart_default' => self::get('muteonstart_default'), |
|
231 | + 'disablecam_editable' => self::get('disablecam_editable'), |
|
232 | + 'disablecam_default' => self::get('disablecam_default'), |
|
233 | + 'disablemic_editable' => self::get('disablemic_editable'), |
|
234 | + 'disablemic_default' => self::get('disablemic_default'), |
|
235 | + 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
236 | + 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
237 | + 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
238 | + 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
239 | + 'disablenote_editable' => self::get('disablenote_editable'), |
|
240 | + 'disablenote_default' => self::get('disablenote_default'), |
|
241 | + 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
242 | + 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
243 | + 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
244 | + 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
245 | + 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
246 | + 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
247 | + 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
248 | + 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
249 | + 'welcome_default' => self::get('welcome_default'), |
|
250 | + ); |
|
251 | 251 | } |
252 | 252 | } |
@@ -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 | } |
@@ -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); |
@@ -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'); |
@@ -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 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
147 | 147 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
148 | 148 | } |
149 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
149 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
150 | 150 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
151 | 151 | } |
152 | 152 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $output = ''; |
175 | 175 | |
176 | 176 | $output .= bigbluebuttonbn_view_render_recording_section($bbbsession, $type, $enabledfeatures, $jsvars); |
177 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
177 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
178 | 178 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-recordings', |
179 | 179 | 'M.mod_bigbluebuttonbn.recordings.init', array($jsvars)); |
180 | 180 | } |
@@ -244,12 +244,12 @@ discard block |
||
244 | 244 | // JavaScript variables for room. |
245 | 245 | $openingtime = ''; |
246 | 246 | if ($bbbsession['openingtime']) { |
247 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
247 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
248 | 248 | userdate($bbbsession['openingtime']); |
249 | 249 | } |
250 | 250 | $closingtime = ''; |
251 | 251 | if ($bbbsession['closingtime']) { |
252 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
252 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
253 | 253 | userdate($bbbsession['closingtime']); |
254 | 254 | } |
255 | 255 | $jsvars += array( |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | $output .= $OUTPUT->box_end(); |
267 | 267 | // Action button box. |
268 | 268 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
269 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
269 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
270 | 270 | $output .= $OUTPUT->box_end(); |
271 | 271 | if ($activity == 'ended') { |
272 | 272 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | // If there are meetings with recordings load the data to the table. |
300 | 300 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
301 | 301 | // Render a plain html table. |
302 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
302 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
303 | 303 | } |
304 | 304 | // JavaScript variables for recordings with YUI. |
305 | 305 | $jsvars += array( |
@@ -335,8 +335,8 @@ discard block |
||
335 | 335 | array('type' => 'button', |
336 | 336 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
337 | 337 | 'class' => 'btn btn-secondary', |
338 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
339 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
338 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
339 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
340 | 340 | $output = html_writer::empty_tag('br'); |
341 | 341 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
342 | 342 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -355,10 +355,10 @@ discard block |
||
355 | 355 | if (!is_null($bbbsession['presentation']['url'])) { |
356 | 356 | $attributes = array('title' => $bbbsession['presentation']['name']); |
357 | 357 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
358 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
359 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
358 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
359 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
360 | 360 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
361 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
361 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
362 | 362 | } |
363 | 363 | return ''; |
364 | 364 | } |