@@ -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 | $guestlink = []; |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $output .= $OUTPUT->box_end(); |
254 | 254 | // Action button box. |
255 | 255 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
256 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
256 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
257 | 257 | $output .= $OUTPUT->box_end(); |
258 | 258 | if ($activity == 'ended') { |
259 | 259 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | // If there are meetings with recordings load the data to the table. |
287 | 287 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
288 | 288 | // Render a plain html table. |
289 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
289 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
290 | 290 | } |
291 | 291 | // JavaScript variables for recordings with YUI. |
292 | 292 | $jsvars += array( |
@@ -322,8 +322,8 @@ discard block |
||
322 | 322 | array('type' => 'button', |
323 | 323 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
324 | 324 | 'class' => 'btn btn-secondary', |
325 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
326 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
325 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
326 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
327 | 327 | $output = html_writer::empty_tag('br'); |
328 | 328 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
329 | 329 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -342,10 +342,10 @@ discard block |
||
342 | 342 | if (!is_null($bbbsession['presentation']['url'])) { |
343 | 343 | $attributes = array('title' => $bbbsession['presentation']['name']); |
344 | 344 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
345 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
346 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
345 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
346 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
347 | 347 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
348 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
348 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
349 | 349 | } |
350 | 350 | return ''; |
351 | 351 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | defined('MOODLE_INTERNAL') || die(); |
28 | 28 | |
29 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
29 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Define all the restore steps that will be used by the restore_url_activity_task. |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | protected function process_bigbluebuttonbn($data) { |
60 | 60 | global $DB; |
61 | - $data = (object) $data; |
|
61 | + $data = (object)$data; |
|
62 | 62 | $data->course = $this->get_courseid(); |
63 | 63 | $data->timemodified = $this->apply_date_offset($data->timemodified); |
64 | 64 | $data->guestlinkid = bigbluebuttonbn_random_password(12); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | protected function process_bigbluebuttonbn_logs($data) { |
78 | 78 | global $DB; |
79 | - $data = (object) $data; |
|
79 | + $data = (object)$data; |
|
80 | 80 | // Apply modifications. |
81 | 81 | $data->courseid = $this->get_mappingid('course', $data->courseid); |
82 | 82 | $data->bigbluebuttonbnid = $this->get_new_parentid('bigbluebuttonbn'); |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | |
31 | 31 | // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility. |
32 | 32 | if (!class_exists('\Firebase\JWT\JWT')) { |
33 | - if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) { |
|
34 | - require_once($CFG->libdir.'/php-jwt/src/JWT.php'); |
|
33 | + if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) { |
|
34 | + require_once($CFG->libdir . '/php-jwt/src/JWT.php'); |
|
35 | 35 | } else { |
36 | - require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php'); |
|
36 | + require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php'); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $CFG->bigbluebuttonbn = array(); |
45 | 45 | } |
46 | 46 | |
47 | - if (file_exists(dirname(__FILE__).'/config.php')) { |
|
48 | - require_once(dirname(__FILE__).'/config.php'); |
|
47 | + if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
48 | + require_once(dirname(__FILE__) . '/config.php'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /* |
@@ -103,19 +103,19 @@ discard block |
||
103 | 103 | return null; |
104 | 104 | } |
105 | 105 | $features = array( |
106 | - (string) FEATURE_IDNUMBER => true, |
|
107 | - (string) FEATURE_GROUPS => true, |
|
108 | - (string) FEATURE_GROUPINGS => true, |
|
109 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
110 | - (string) FEATURE_MOD_INTRO => true, |
|
111 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
112 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
113 | - (string) FEATURE_COMPLETION_HAS_RULES => true, |
|
114 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
115 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
116 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
106 | + (string)FEATURE_IDNUMBER => true, |
|
107 | + (string)FEATURE_GROUPS => true, |
|
108 | + (string)FEATURE_GROUPINGS => true, |
|
109 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
110 | + (string)FEATURE_MOD_INTRO => true, |
|
111 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
112 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
113 | + (string)FEATURE_COMPLETION_HAS_RULES => true, |
|
114 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
115 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
116 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
117 | 117 | ); |
118 | - if (isset($features[(string) $feature])) { |
|
118 | + if (isset($features[(string)$feature])) { |
|
119 | 119 | return $features[$feature]; |
120 | 120 | } |
121 | 121 | return null; |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
309 | 309 | global $DB; |
310 | 310 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
311 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
311 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
312 | 312 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
313 | 313 | $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; |
314 | 314 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
330 | 330 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
331 | 331 | return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
332 | - get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' . |
|
332 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
333 | 333 | get_string('view_message_times', 'bigbluebuttonbn'); |
334 | 334 | } |
335 | 335 | return ''; |
@@ -521,7 +521,7 @@ discard block |
||
521 | 521 | * @return array status array |
522 | 522 | */ |
523 | 523 | function bigbluebuttonbn_reset_recordings($courseid) { |
524 | - require_once(__DIR__.'/locallib.php'); |
|
524 | + require_once(__DIR__ . '/locallib.php'); |
|
525 | 525 | // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true]. |
526 | 526 | $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true); |
527 | 527 | // Remove all the recordings. |
@@ -590,18 +590,18 @@ discard block |
||
590 | 590 | if ($bigbluebuttonbn->visible) { |
591 | 591 | $classes = 'class="dimmed" '; |
592 | 592 | } |
593 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
594 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
595 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
596 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
597 | - $str .= ' </div>'."\n"; |
|
598 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
599 | - '</div>'."\n"; |
|
593 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
594 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
595 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
596 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
597 | + $str .= ' </div>' . "\n"; |
|
598 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
599 | + '</div>' . "\n"; |
|
600 | 600 | if (!empty($bigbluebuttonbn->closingtime)) { |
601 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
602 | - .'</div>'."\n"; |
|
601 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
602 | + .'</div>' . "\n"; |
|
603 | 603 | } |
604 | - $str .= '</div>'."\n"; |
|
604 | + $str .= '</div>' . "\n"; |
|
605 | 605 | return $str; |
606 | 606 | } |
607 | 607 | |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | * @return void |
690 | 690 | **/ |
691 | 691 | function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) { |
692 | - require_once(__DIR__.'/locallib.php'); |
|
692 | + require_once(__DIR__ . '/locallib.php'); |
|
693 | 693 | $bigbluebuttonbn->timemodified = time(); |
694 | 694 | if ((integer)$bigbluebuttonbn->instance == 0) { |
695 | 695 | $bigbluebuttonbn->meetingid = 0; |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | $bigbluebuttonbn->viewerpass = bigbluebuttonbn_random_password(12, $bigbluebuttonbn->moderatorpass); |
701 | 701 | $bigbluebuttonbn->guestlinkid = bigbluebuttonbn_random_password(12); |
702 | 702 | } |
703 | - if (!property_exists($bigbluebuttonbn, 'guestlinkid') ) { |
|
703 | + if (!property_exists($bigbluebuttonbn, 'guestlinkid')) { |
|
704 | 704 | $bigbluebuttonbn->guestlinkid = bigbluebuttonbn_random_password(12); |
705 | 705 | } |
706 | 706 | } |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | **/ |
827 | 827 | function bigbluebuttonbn_process_post_save_event(&$bigbluebuttonbn) { |
828 | 828 | global $CFG, $DB; |
829 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
829 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
830 | 830 | $eventid = $DB->get_field('event', 'id', array('modulename' => 'bigbluebuttonbn', |
831 | 831 | 'instance' => $bigbluebuttonbn->id)); |
832 | 832 | // Delete the event from calendar when/if openingtime is NOT set. |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | if (count($files) == 1) { |
914 | 914 | // Get the first (and only) file. |
915 | 915 | $file = reset($files); |
916 | - $filesrc = '/'.$file->get_filename(); |
|
916 | + $filesrc = '/' . $file->get_filename(); |
|
917 | 917 | } |
918 | 918 | return $filesrc; |
919 | 919 | } |
@@ -982,7 +982,7 @@ discard block |
||
982 | 982 | if (!$filename) { |
983 | 983 | return false; |
984 | 984 | } |
985 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
985 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
986 | 986 | $fs = get_file_storage(); |
987 | 987 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
988 | 988 | if (!$file || $file->is_directory()) { |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | define('READ_ONLY_SESSION', true); |
27 | 27 | define('AJAX_SCRIPT', true); |
28 | 28 | |
29 | -require(__DIR__.'/../../config.php'); |
|
30 | -require_once(__DIR__.'/locallib.php'); |
|
31 | -require_once(__DIR__.'/brokerlib.php'); |
|
29 | +require(__DIR__ . '/../../config.php'); |
|
30 | +require_once(__DIR__ . '/locallib.php'); |
|
31 | +require_once(__DIR__ . '/brokerlib.php'); |
|
32 | 32 | |
33 | 33 | global $PAGE, $USER, $CFG, $SESSION, $DB; |
34 | 34 | |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | require_sesskey(); |
47 | 47 | |
48 | 48 | if (empty($params['action'])) { |
49 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
49 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
50 | 50 | return; |
51 | 51 | } |
52 | 52 | |
53 | 53 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
54 | 54 | if (!empty($error)) { |
55 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
55 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
56 | 56 | return; |
57 | 57 | } |
58 | 58 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | echo $password; |
143 | 143 | return; |
144 | 144 | } |
145 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
145 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
146 | 146 | } catch (Exception $e) { |
147 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
147 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
148 | 148 | } |
@@ -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 | } |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
411 | 411 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
412 | 412 | // No more users allowed to join. |
413 | - header('Location: '.$bbbsession['logoutURL']); |
|
413 | + header('Location: ' . $bbbsession['logoutURL']); |
|
414 | 414 | return; |
415 | 415 | } |
416 | 416 | // Build the URL. |
@@ -425,13 +425,13 @@ discard block |
||
425 | 425 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
426 | 426 | // Internal logger: Instert a record with the meeting created. |
427 | 427 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
428 | - $meta = '{"origin":'.$origin.'}'; |
|
428 | + $meta = '{"origin":' . $origin . '}'; |
|
429 | 429 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
430 | 430 | // Before executing the redirect, increment the number of participants. |
431 | 431 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
432 | 432 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
433 | 433 | // Execute the redirect. |
434 | - header('Location: '.$joinurl); |
|
434 | + header('Location: ' . $joinurl); |
|
435 | 435 | } |
436 | 436 | |
437 | 437 | /** |
@@ -443,13 +443,13 @@ discard block |
||
443 | 443 | */ |
444 | 444 | function bigbluebuttonbn_bbb_view_errors($serrors, $id) { |
445 | 445 | global $CFG, $OUTPUT; |
446 | - $errors = (array) json_decode(urldecode($serrors)); |
|
446 | + $errors = (array)json_decode(urldecode($serrors)); |
|
447 | 447 | $msgerrors = ''; |
448 | 448 | foreach ($errors as $error) { |
449 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
449 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
450 | 450 | } |
451 | 451 | echo $OUTPUT->header(); |
452 | 452 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
453 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
453 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
454 | 454 | echo $OUTPUT->footer(); |
455 | 455 | } |
@@ -152,8 +152,8 @@ discard block |
||
152 | 152 | $payload = null; |
153 | 153 | if (!is_null($pname) && !is_null($purl)) { |
154 | 154 | $method = 'POST'; |
155 | - $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
156 | - $purl."' /></module></modules>"; |
|
155 | + $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
156 | + $purl . "' /></module></modules>"; |
|
157 | 157 | } |
158 | 158 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $payload); |
159 | 159 | if ($xml) { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | } |
198 | 198 | if ($xml) { |
199 | 199 | // Either failure or success without meeting info. |
200 | - return (array) $xml; |
|
200 | + return (array)$xml; |
|
201 | 201 | } |
202 | 202 | // If the server is unreachable, then prompts the user of the necessary action. |
203 | 203 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
291 | 291 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
292 | 292 | 'getRecordings', |
293 | - ['recordID' => implode(',', (array) $breakoutroom)] |
|
293 | + ['recordID' => implode(',', (array)$breakoutroom)] |
|
294 | 294 | ); |
295 | 295 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
296 | 296 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | // Override imported flag with actual ID. |
347 | 347 | $recording['imported'] = $recordimported->id; |
348 | 348 | if (isset($recordimported->protected)) { |
349 | - $recording['protected'] = (string) $recordimported->protected; |
|
349 | + $recording['protected'] = (string)$recordimported->protected; |
|
350 | 350 | } |
351 | 351 | $recordsimportedarray[$recording['recordID']] = $recording; |
352 | 352 | } |
@@ -376,21 +376,21 @@ discard block |
||
376 | 376 | // Add formats. |
377 | 377 | $playbackarray = array(); |
378 | 378 | foreach ($recording->playback->format as $format) { |
379 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
380 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
379 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
380 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
381 | 381 | // Add preview per format when existing. |
382 | 382 | if ($format->preview) { |
383 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
383 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
384 | 384 | } |
385 | 385 | } |
386 | 386 | // Add the metadata to the recordings array. |
387 | 387 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
388 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
389 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
390 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
391 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
388 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
389 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
390 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
391 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
392 | 392 | if (isset($recording->protected)) { |
393 | - $recordingarray['protected'] = (string) $recording->protected; |
|
393 | + $recordingarray['protected'] = (string)$recording->protected; |
|
394 | 394 | } |
395 | 395 | return $recordingarray + $metadataarray; |
396 | 396 | } |
@@ -405,9 +405,9 @@ discard block |
||
405 | 405 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
406 | 406 | $imagesarray = array(); |
407 | 407 | foreach ($preview->images->image as $image) { |
408 | - $imagearray = array('url' => trim((string) $image)); |
|
408 | + $imagearray = array('url' => trim((string)$image)); |
|
409 | 409 | foreach ($image->attributes() as $attkey => $attvalue) { |
410 | - $imagearray[$attkey] = (string) $attvalue; |
|
410 | + $imagearray[$attkey] = (string)$attvalue; |
|
411 | 411 | } |
412 | 412 | array_push($imagesarray, $imagearray); |
413 | 413 | } |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | $ids = explode(',', $recordids); |
503 | 503 | foreach ($ids as $id) { |
504 | 504 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
505 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
505 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
506 | 506 | ); |
507 | 507 | if ($xml && $xml->returncode != 'SUCCESS') { |
508 | 508 | return false; |
@@ -673,7 +673,7 @@ discard block |
||
673 | 673 | * @return array $users |
674 | 674 | */ |
675 | 675 | function bigbluebuttonbn_get_users(context $context = null) { |
676 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
676 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
677 | 677 | foreach ($users as $key => $value) { |
678 | 678 | $users[$key] = fullname($value); |
679 | 679 | } |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) { |
693 | 693 | // CONTRIB-7972, check the group of current user and course group mode. |
694 | 694 | $groups = null; |
695 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
695 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
696 | 696 | $course = get_course($context->instanceid); |
697 | 697 | $groupmode = groups_get_course_groupmode($course); |
698 | 698 | if ($bbactivity) { |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | $groups = groups_get_all_groups($course->id, $USER->id); |
706 | 706 | $users = []; |
707 | 707 | foreach ($groups as $g) { |
708 | - $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
708 | + $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
709 | 709 | } |
710 | 710 | } |
711 | 711 | return array_map( |
@@ -727,12 +727,12 @@ discard block |
||
727 | 727 | global $CFG; |
728 | 728 | |
729 | 729 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
730 | - $roles = (array) get_viewable_roles($context); |
|
730 | + $roles = (array)get_viewable_roles($context); |
|
731 | 731 | foreach ($roles as $key => $value) { |
732 | 732 | $roles[$key] = $value; |
733 | 733 | } |
734 | 734 | } else { |
735 | - $roles = (array) role_get_names($context); |
|
735 | + $roles = (array)role_get_names($context); |
|
736 | 736 | foreach ($roles as $key => $value) { |
737 | 737 | $roles[$key] = $value->localname; |
738 | 738 | } |
@@ -753,12 +753,12 @@ discard block |
||
753 | 753 | global $CFG; |
754 | 754 | |
755 | 755 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
756 | - $roles = (array) get_viewable_roles($context); |
|
756 | + $roles = (array)get_viewable_roles($context); |
|
757 | 757 | foreach ($roles as $key => $value) { |
758 | 758 | $roles[$key] = array('id' => $key, 'name' => $value); |
759 | 759 | } |
760 | 760 | } else { |
761 | - $roles = (array) role_get_names($context); |
|
761 | + $roles = (array)role_get_names($context); |
|
762 | 762 | foreach ($roles as $key => $value) { |
763 | 763 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
764 | 764 | } |
@@ -775,9 +775,9 @@ discard block |
||
775 | 775 | * @return object $role |
776 | 776 | */ |
777 | 777 | function bigbluebuttonbn_get_role($id) { |
778 | - $roles = (array) role_get_names(); |
|
778 | + $roles = (array)role_get_names(); |
|
779 | 779 | if (is_numeric($id) && isset($roles[$id])) { |
780 | - return (object) $roles[$id]; |
|
780 | + return (object)$roles[$id]; |
|
781 | 781 | } |
782 | 782 | foreach ($roles as $role) { |
783 | 783 | if ($role->shortname == $id) { |
@@ -857,7 +857,7 @@ discard block |
||
857 | 857 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
858 | 858 | $participantlist[] = array( |
859 | 859 | 'selectiontype' => 'user', |
860 | - 'selectionid' => (string) $ownerid, |
|
860 | + 'selectionid' => (string)$ownerid, |
|
861 | 861 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
862 | 862 | } |
863 | 863 | continue; |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | $now = time(); |
1040 | 1040 | if ($closingtime > 0 && $now < $closingtime) { |
1041 | 1041 | $duration = ceil(($closingtime - $now) / 60); |
1042 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1042 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1043 | 1043 | $duration = intval($duration) + $compensationtime; |
1044 | 1044 | } |
1045 | 1045 | return $duration; |
@@ -1241,16 +1241,16 @@ discard block |
||
1241 | 1241 | * @return array |
1242 | 1242 | */ |
1243 | 1243 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
1244 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1244 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1245 | 1245 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
1246 | 1246 | $result = $cache->get($meetingid); |
1247 | 1247 | $now = time(); |
1248 | 1248 | if (!$updatecache && !empty($result) && $now < ($result['creation_time'] + $cachettl)) { |
1249 | 1249 | // Use the value in the cache. |
1250 | - return (array) json_decode($result['meeting_info']); |
|
1250 | + return (array)json_decode($result['meeting_info']); |
|
1251 | 1251 | } |
1252 | 1252 | // Ping again and refresh the cache. |
1253 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1253 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1254 | 1254 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1255 | 1255 | ); |
1256 | 1256 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1397,7 +1397,7 @@ discard block |
||
1397 | 1397 | */ |
1398 | 1398 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1399 | 1399 | $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml); |
1400 | - $configxmlarray = (array) $configxml; |
|
1400 | + $configxmlarray = (array)$configxml; |
|
1401 | 1401 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1402 | 1402 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1403 | 1403 | return ''; |
@@ -1450,7 +1450,7 @@ discard block |
||
1450 | 1450 | * @return boolean |
1451 | 1451 | */ |
1452 | 1452 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
1453 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1453 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1454 | 1454 | } |
1455 | 1455 | |
1456 | 1456 | /** |
@@ -1461,7 +1461,7 @@ discard block |
||
1461 | 1461 | * @return boolean |
1462 | 1462 | */ |
1463 | 1463 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
1464 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1464 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1465 | 1465 | } |
1466 | 1466 | |
1467 | 1467 | /** |
@@ -1887,7 +1887,7 @@ discard block |
||
1887 | 1887 | } |
1888 | 1888 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
1889 | 1889 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
1890 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1890 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1891 | 1891 | // With icon for $manageaction. |
1892 | 1892 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
1893 | 1893 | $linkattributes = array( |
@@ -2150,7 +2150,7 @@ discard block |
||
2150 | 2150 | // Enqueue it. |
2151 | 2151 | \core\task\manager::queue_adhoc_task($task); |
2152 | 2152 | } catch (Exception $e) { |
2153 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
2153 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
2154 | 2154 | } |
2155 | 2155 | } |
2156 | 2156 | |
@@ -2164,7 +2164,7 @@ discard block |
||
2164 | 2164 | */ |
2165 | 2165 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
2166 | 2166 | global $CFG; |
2167 | - require_once($CFG->libdir.'/completionlib.php'); |
|
2167 | + require_once($CFG->libdir . '/completionlib.php'); |
|
2168 | 2168 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
2169 | 2169 | $completion = new completion_info($course); |
2170 | 2170 | if (!$completion->is_enabled($cm)) { |
@@ -2594,7 +2594,7 @@ discard block |
||
2594 | 2594 | */ |
2595 | 2595 | function bigbluebuttonbn_format_activity_time($time) { |
2596 | 2596 | global $CFG; |
2597 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
2597 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
2598 | 2598 | $activitytime = ''; |
2599 | 2599 | if ($time) { |
2600 | 2600 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2692,7 +2692,7 @@ discard block |
||
2692 | 2692 | */ |
2693 | 2693 | function bigbluebuttonbn_settings_general(&$renderer) { |
2694 | 2694 | // Configuration for BigBlueButton. |
2695 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2695 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2696 | 2696 | $renderer->render_group_header('general'); |
2697 | 2697 | $renderer->render_group_element( |
2698 | 2698 | 'server_url', |
@@ -2714,7 +2714,7 @@ discard block |
||
2714 | 2714 | */ |
2715 | 2715 | function bigbluebuttonbn_settings_record(&$renderer) { |
2716 | 2716 | // Configuration for 'recording' feature. |
2717 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2717 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2718 | 2718 | $renderer->render_group_header('recording'); |
2719 | 2719 | $renderer->render_group_element( |
2720 | 2720 | 'recording_default', |
@@ -2758,7 +2758,7 @@ discard block |
||
2758 | 2758 | */ |
2759 | 2759 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
2760 | 2760 | // Configuration for 'import recordings' feature. |
2761 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2761 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2762 | 2762 | $renderer->render_group_header('importrecordings'); |
2763 | 2763 | $renderer->render_group_element( |
2764 | 2764 | 'importrecordings_enabled', |
@@ -2780,7 +2780,7 @@ discard block |
||
2780 | 2780 | */ |
2781 | 2781 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
2782 | 2782 | // Configuration for 'show recordings' feature. |
2783 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2783 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2784 | 2784 | $renderer->render_group_header('recordings'); |
2785 | 2785 | $renderer->render_group_element( |
2786 | 2786 | 'recordings_html_default', |
@@ -2834,7 +2834,7 @@ discard block |
||
2834 | 2834 | */ |
2835 | 2835 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
2836 | 2836 | // Configuration for wait for moderator feature. |
2837 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2837 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2838 | 2838 | $renderer->render_group_header('waitformoderator'); |
2839 | 2839 | $renderer->render_group_element( |
2840 | 2840 | 'waitformoderator_default', |
@@ -2864,7 +2864,7 @@ discard block |
||
2864 | 2864 | */ |
2865 | 2865 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
2866 | 2866 | // Configuration for "static voice bridge" feature. |
2867 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2867 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2868 | 2868 | $renderer->render_group_header('voicebridge'); |
2869 | 2869 | $renderer->render_group_element( |
2870 | 2870 | 'voicebridge_editable', |
@@ -2882,7 +2882,7 @@ discard block |
||
2882 | 2882 | */ |
2883 | 2883 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
2884 | 2884 | // Configuration for "preupload presentation" feature. |
2885 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2885 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2886 | 2886 | // This feature only works if curl is installed. |
2887 | 2887 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
2888 | 2888 | if (!extension_loaded('curl')) { |
@@ -2910,7 +2910,7 @@ discard block |
||
2910 | 2910 | */ |
2911 | 2911 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
2912 | 2912 | // Configuration for "preupload presentation" feature. |
2913 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2913 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2914 | 2914 | if (extension_loaded('curl')) { |
2915 | 2915 | // This feature only works if curl is installed. |
2916 | 2916 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2927,7 +2927,7 @@ discard block |
||
2927 | 2927 | */ |
2928 | 2928 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
2929 | 2929 | // Configuration for "user limit" feature. |
2930 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2930 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2931 | 2931 | $renderer->render_group_header('userlimit'); |
2932 | 2932 | $renderer->render_group_element( |
2933 | 2933 | 'userlimit_default', |
@@ -2949,7 +2949,7 @@ discard block |
||
2949 | 2949 | */ |
2950 | 2950 | function bigbluebuttonbn_settings_duration(&$renderer) { |
2951 | 2951 | // Configuration for "scheduled duration" feature. |
2952 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2952 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2953 | 2953 | $renderer->render_group_header('scheduled'); |
2954 | 2954 | $renderer->render_group_element( |
2955 | 2955 | 'scheduled_duration_enabled', |
@@ -2975,7 +2975,7 @@ discard block |
||
2975 | 2975 | */ |
2976 | 2976 | function bigbluebuttonbn_settings_participants(&$renderer) { |
2977 | 2977 | // Configuration for defining the default role/user that will be moderator on new activities. |
2978 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2978 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2979 | 2979 | $renderer->render_group_header('participant'); |
2980 | 2980 | $renderer->render_group_element( |
2981 | 2981 | 'participant_guestlink', |
@@ -3004,7 +3004,7 @@ discard block |
||
3004 | 3004 | */ |
3005 | 3005 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
3006 | 3006 | // Configuration for "send notifications" feature. |
3007 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
3007 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
3008 | 3008 | $renderer->render_group_header('sendnotifications'); |
3009 | 3009 | $renderer->render_group_element( |
3010 | 3010 | 'sendnotifications_enabled', |
@@ -3022,14 +3022,14 @@ discard block |
||
3022 | 3022 | */ |
3023 | 3023 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
3024 | 3024 | // Configuration for "clienttype" feature. |
3025 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
3025 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
3026 | 3026 | $renderer->render_group_header('clienttype'); |
3027 | 3027 | $renderer->render_group_element( |
3028 | 3028 | 'clienttype_editable', |
3029 | 3029 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
3030 | 3030 | ); |
3031 | 3031 | // Web Client default. |
3032 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
3032 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
3033 | 3033 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
3034 | 3034 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
3035 | 3035 | $renderer->render_group_element( |
@@ -3052,7 +3052,7 @@ discard block |
||
3052 | 3052 | */ |
3053 | 3053 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
3054 | 3054 | // Configuration for BigBlueButton. |
3055 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
3055 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
3056 | 3056 | $renderer->render_group_header('muteonstart'); |
3057 | 3057 | $renderer->render_group_element( |
3058 | 3058 | 'muteonstart_default', |
@@ -3095,7 +3095,7 @@ discard block |
||
3095 | 3095 | */ |
3096 | 3096 | function bigbluebuttonbn_settings_disablecam(&$renderer) { |
3097 | 3097 | // Configuration for BigBlueButton. |
3098 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
3098 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
3099 | 3099 | $renderer->render_group_element( |
3100 | 3100 | 'disablecam_default', |
3101 | 3101 | $renderer->render_group_element_checkbox('disablecam_default', 0) |
@@ -3116,7 +3116,7 @@ discard block |
||
3116 | 3116 | */ |
3117 | 3117 | function bigbluebuttonbn_settings_disablemic(&$renderer) { |
3118 | 3118 | // Configuration for BigBlueButton. |
3119 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
3119 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
3120 | 3120 | $renderer->render_group_element( |
3121 | 3121 | 'disablemic_default', |
3122 | 3122 | $renderer->render_group_element_checkbox('disablemic_default', 0) |
@@ -3137,7 +3137,7 @@ discard block |
||
3137 | 3137 | */ |
3138 | 3138 | function bigbluebuttonbn_settings_disableprivatechat(&$renderer) { |
3139 | 3139 | // Configuration for BigBlueButton. |
3140 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
3140 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
3141 | 3141 | $renderer->render_group_element( |
3142 | 3142 | 'disableprivatechat_default', |
3143 | 3143 | $renderer->render_group_element_checkbox('disableprivatechat_default', 0) |
@@ -3158,7 +3158,7 @@ discard block |
||
3158 | 3158 | */ |
3159 | 3159 | function bigbluebuttonbn_settings_disablepublicchat(&$renderer) { |
3160 | 3160 | // Configuration for BigBlueButton. |
3161 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
3161 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
3162 | 3162 | $renderer->render_group_element( |
3163 | 3163 | 'disablepublicchat_default', |
3164 | 3164 | $renderer->render_group_element_checkbox('disablepublicchat_default', 0) |
@@ -3179,7 +3179,7 @@ discard block |
||
3179 | 3179 | */ |
3180 | 3180 | function bigbluebuttonbn_settings_disablenote(&$renderer) { |
3181 | 3181 | // Configuration for BigBlueButton. |
3182 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
3182 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
3183 | 3183 | $renderer->render_group_element( |
3184 | 3184 | 'disablenote_default', |
3185 | 3185 | $renderer->render_group_element_checkbox('disablenote_default', 0) |
@@ -3200,7 +3200,7 @@ discard block |
||
3200 | 3200 | */ |
3201 | 3201 | function bigbluebuttonbn_settings_hideuserlist(&$renderer) { |
3202 | 3202 | // Configuration for BigBlueButton. |
3203 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
3203 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
3204 | 3204 | $renderer->render_group_element( |
3205 | 3205 | 'hideuserlist_default', |
3206 | 3206 | $renderer->render_group_element_checkbox('hideuserlist_default', 0) |
@@ -3221,7 +3221,7 @@ discard block |
||
3221 | 3221 | */ |
3222 | 3222 | function bigbluebuttonbn_settings_lockedlayout(&$renderer) { |
3223 | 3223 | // Configuration for BigBlueButton. |
3224 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
3224 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
3225 | 3225 | $renderer->render_group_element( |
3226 | 3226 | 'lockedlayout_default', |
3227 | 3227 | $renderer->render_group_element_checkbox('lockedlayout_default', 0) |
@@ -3242,7 +3242,7 @@ discard block |
||
3242 | 3242 | */ |
3243 | 3243 | function bigbluebuttonbn_settings_lockonjoin(&$renderer) { |
3244 | 3244 | // Configuration for BigBlueButton. |
3245 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
3245 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
3246 | 3246 | $renderer->render_group_element( |
3247 | 3247 | 'lockonjoin_default', |
3248 | 3248 | $renderer->render_group_element_checkbox('lockonjoin_default', 0) |
@@ -3263,7 +3263,7 @@ discard block |
||
3263 | 3263 | */ |
3264 | 3264 | function bigbluebuttonbn_settings_lockonjoinconfigurable(&$renderer) { |
3265 | 3265 | // Configuration for BigBlueButton. |
3266 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
3266 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
3267 | 3267 | $renderer->render_group_element( |
3268 | 3268 | 'lockonjoinconfigurable_default', |
3269 | 3269 | $renderer->render_group_element_checkbox('lockonjoinconfigurable_default', 0) |
@@ -3299,7 +3299,7 @@ discard block |
||
3299 | 3299 | */ |
3300 | 3300 | function bigbluebuttonbn_settings_extended(&$renderer) { |
3301 | 3301 | // Configuration for extended capabilities. |
3302 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
3302 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
3303 | 3303 | return; |
3304 | 3304 | } |
3305 | 3305 | $renderer->render_group_header('extended_capabilities'); |
@@ -3337,7 +3337,7 @@ discard block |
||
3337 | 3337 | global $DB; |
3338 | 3338 | do { |
3339 | 3339 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
3340 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
3340 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
3341 | 3341 | } while ($meetingid == $encodedseed); |
3342 | 3342 | return $encodedseed; |
3343 | 3343 | } |
@@ -3550,7 +3550,7 @@ discard block |
||
3550 | 3550 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
3551 | 3551 | global $DB; |
3552 | 3552 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
3553 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3553 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3554 | 3554 | return $ownerid; |
3555 | 3555 | } |
3556 | 3556 | |
@@ -3657,7 +3657,7 @@ discard block |
||
3657 | 3657 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
3658 | 3658 | ]; |
3659 | 3659 | // Special metadata for recording processing. |
3660 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
3660 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
3661 | 3661 | $metadata["bn-recording-status"] = json_encode( |
3662 | 3662 | array( |
3663 | 3663 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3665,10 +3665,10 @@ discard block |
||
3665 | 3665 | ) |
3666 | 3666 | ); |
3667 | 3667 | } |
3668 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
3668 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
3669 | 3669 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
3670 | 3670 | } |
3671 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
3671 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
3672 | 3672 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
3673 | 3673 | } |
3674 | 3674 | return $metadata; |
@@ -3686,7 +3686,7 @@ discard block |
||
3686 | 3686 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
3687 | 3687 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
3688 | 3688 | // No more users allowed to join. |
3689 | - header('Location: '.$bbbsession['logoutURL']); |
|
3689 | + header('Location: ' . $bbbsession['logoutURL']); |
|
3690 | 3690 | return; |
3691 | 3691 | } |
3692 | 3692 | // Mark guests (from external guestlink) |
@@ -3705,13 +3705,13 @@ discard block |
||
3705 | 3705 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
3706 | 3706 | // Internal logger: Instert a record with the meeting created. |
3707 | 3707 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
3708 | - $meta = '{"origin":'.$origin.'}'; |
|
3708 | + $meta = '{"origin":' . $origin . '}'; |
|
3709 | 3709 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
3710 | 3710 | // Before executing the redirect, increment the number of participants. |
3711 | 3711 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
3712 | 3712 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
3713 | 3713 | // Execute the redirect. |
3714 | - header('Location: '.$joinurl); |
|
3714 | + header('Location: ' . $joinurl); |
|
3715 | 3715 | } |
3716 | 3716 | |
3717 | 3717 | /** |