@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) { |
43 | 43 | parent::init($crud, $edulevel); |
44 | - $this->description = "The user with id '##userid' has viewed a recording with id ". |
|
44 | + $this->description = "The user with id '##userid' has viewed a recording with id " . |
|
45 | 45 | "'##other' from the course id '##courseid'."; |
46 | 46 | } |
47 | 47 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | defined('MOODLE_INTERNAL') || die(); |
29 | 29 | |
30 | 30 | require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
31 | -require_once($CFG->libdir.'/adminlib.php'); |
|
31 | +require_once($CFG->libdir . '/adminlib.php'); |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Helper class for validating settings used HTML for settings.php. |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | !isset($CFG->bigbluebuttonbn['recording_all_from_start_default']) || |
63 | 63 | !isset($CFG->bigbluebuttonbn['recording_all_from_start_editable']) || |
64 | 64 | !isset($CFG->bigbluebuttonbn['recording_hide_button_default']) || |
65 | - !isset($CFG->bigbluebuttonbn['recording_hide_button_editable']) ); |
|
65 | + !isset($CFG->bigbluebuttonbn['recording_hide_button_editable'])); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -92,7 +92,7 @@ |
||
92 | 92 | !isset($CFG->bigbluebuttonbn['recordings_preview_default']) || |
93 | 93 | !isset($CFG->bigbluebuttonbn['recordings_preview_editable']) || |
94 | 94 | !isset($CFG->bigbluebuttonbn['recordings_validate_url']) |
95 | - ); |
|
95 | + ); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -24,7 +24,6 @@ |
||
24 | 24 | */ |
25 | 25 | |
26 | 26 | namespace mod_bigbluebuttonbn\search; |
27 | -use core_tag\output\tag; |
|
28 | 27 | |
29 | 28 | defined('MOODLE_INTERNAL') || die(); |
30 | 29 |
@@ -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. |
@@ -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 |
@@ -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 | |
@@ -64,16 +64,16 @@ discard block |
||
64 | 64 | if (is_null($serverversion)) { |
65 | 65 | if ($bbbsession['administrator']) { |
66 | 66 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
67 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
67 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
68 | 68 | exit; |
69 | 69 | } |
70 | 70 | if ($bbbsession['moderator']) { |
71 | 71 | print_error('view_error_unable_join_teacher', '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 | 75 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
76 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
76 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
77 | 77 | exit; |
78 | 78 | } |
79 | 79 | |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | // Assign group default values. |
101 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
102 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
101 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
102 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | // Initialize session variable used across views. |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | } |
165 | 165 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
166 | 166 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
167 | - header('Location: '.$bbbsession['logoutURL']); |
|
167 | + header('Location: ' . $bbbsession['logoutURL']); |
|
168 | 168 | break; |
169 | 169 | } |
170 | 170 | // As the meeting doesn't exist, try to create it. |
@@ -178,16 +178,16 @@ discard block |
||
178 | 178 | // The server is unreachable. |
179 | 179 | if ($bbbsession['administrator']) { |
180 | 180 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
181 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
181 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
182 | 182 | break; |
183 | 183 | } |
184 | 184 | if ($bbbsession['moderator']) { |
185 | 185 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
186 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
186 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
187 | 187 | break; |
188 | 188 | } |
189 | 189 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
190 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
190 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
191 | 191 | break; |
192 | 192 | } |
193 | 193 | if ($response['returncode'] == 'FAILED') { |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
209 | 209 | // Internal logger: Insert a record with the meeting created. |
210 | 210 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
211 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
211 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
212 | 212 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
213 | 213 | // Since the meeting is already running, we just join the session. |
214 | 214 | bigbluebuttonbn_join_meeting($bbbsession, $bigbluebuttonbn, $origin); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
223 | 223 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_PLAYED, $overrides); |
224 | 224 | // Execute the redirect. |
225 | - header('Location: '.urldecode($href)); |
|
225 | + header('Location: ' . urldecode($href)); |
|
226 | 226 | break; |
227 | 227 | default: |
228 | 228 | bigbluebuttonbn_bbb_view_close_window(); |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $data['welcome'] .= '<br><br>'; |
317 | 317 | $data['welcome'] .= str_replace( |
318 | 318 | '%duration%', |
319 | - (string) $durationtime, |
|
319 | + (string)$durationtime, |
|
320 | 320 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
321 | 321 | ); |
322 | 322 | } |
@@ -381,13 +381,13 @@ discard block |
||
381 | 381 | */ |
382 | 382 | function bigbluebuttonbn_bbb_view_errors($serrors, $id) { |
383 | 383 | global $CFG, $OUTPUT; |
384 | - $errors = (array) json_decode(urldecode($serrors)); |
|
384 | + $errors = (array)json_decode(urldecode($serrors)); |
|
385 | 385 | $msgerrors = ''; |
386 | 386 | foreach ($errors as $error) { |
387 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
387 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
388 | 388 | } |
389 | 389 | echo $OUTPUT->header(); |
390 | 390 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
391 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
391 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
392 | 392 | echo $OUTPUT->footer(); |
393 | 393 | } |