@@ -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 | } |
@@ -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 | } |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
24 | 24 | */ |
25 | 25 | |
26 | -require(__DIR__.'/../../config.php'); |
|
27 | -require_once(__DIR__.'/locallib.php'); |
|
28 | -require_once(__DIR__.'/brokerlib.php'); |
|
26 | +require(__DIR__ . '/../../config.php'); |
|
27 | +require_once(__DIR__ . '/locallib.php'); |
|
28 | +require_once(__DIR__ . '/brokerlib.php'); |
|
29 | 29 | |
30 | 30 | global $PAGE, $USER, $CFG, $SESSION, $DB; |
31 | 31 | |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | require_sesskey(); |
44 | 44 | |
45 | 45 | if (empty($params['action'])) { |
46 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
46 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
50 | 50 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
51 | 51 | if (!empty($error)) { |
52 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
52 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
53 | 53 | return; |
54 | 54 | } |
55 | 55 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | echo $password; |
140 | 140 | return; |
141 | 141 | } |
142 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
142 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
143 | 143 | } catch (Exception $e) { |
144 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
144 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
145 | 145 | } |
@@ -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()) { |
@@ -201,63 +201,63 @@ |
||
201 | 201 | */ |
202 | 202 | public static function get_options() { |
203 | 203 | return array( |
204 | - 'version_major' => self::get_moodle_version_major(), |
|
205 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
206 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
207 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
208 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
209 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
210 | - 'userlimit_default' => self::get('userlimit_default'), |
|
211 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
212 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
213 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
214 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
215 | - 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
216 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
217 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
218 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
219 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
220 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
221 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
222 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
223 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
224 | - 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
225 | - 'recording_default' => self::get('recording_default'), |
|
226 | - 'recording_editable' => self::get('recording_editable'), |
|
227 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
228 | - 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
229 | - 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
230 | - 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
231 | - 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
232 | - 'general_warning_message' => self::get('general_warning_message'), |
|
233 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
234 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
235 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
236 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
237 | - 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
238 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
239 | - 'clienttype_default' => self::get('clienttype_default'), |
|
240 | - 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
241 | - 'muteonstart_default' => self::get('muteonstart_default'), |
|
242 | - 'disablecam_editable' => self::get('disablecam_editable'), |
|
243 | - 'disablecam_default' => self::get('disablecam_default'), |
|
244 | - 'disablemic_editable' => self::get('disablemic_editable'), |
|
245 | - 'disablemic_default' => self::get('disablemic_default'), |
|
246 | - 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
247 | - 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
248 | - 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
249 | - 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
250 | - 'disablenote_editable' => self::get('disablenote_editable'), |
|
251 | - 'disablenote_default' => self::get('disablenote_default'), |
|
252 | - 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
253 | - 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
254 | - 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
255 | - 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
256 | - 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
257 | - 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
258 | - 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
259 | - 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
260 | - 'custom_logo' => self::get('custom_logo'), |
|
261 | - ); |
|
204 | + 'version_major' => self::get_moodle_version_major(), |
|
205 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
206 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
207 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
208 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
209 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
210 | + 'userlimit_default' => self::get('userlimit_default'), |
|
211 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
212 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
213 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
214 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
215 | + 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
216 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
217 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
218 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
219 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
220 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
221 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
222 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
223 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
224 | + 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
225 | + 'recording_default' => self::get('recording_default'), |
|
226 | + 'recording_editable' => self::get('recording_editable'), |
|
227 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
228 | + 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
229 | + 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
230 | + 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
231 | + 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
232 | + 'general_warning_message' => self::get('general_warning_message'), |
|
233 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
234 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
235 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
236 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
237 | + 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
238 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
239 | + 'clienttype_default' => self::get('clienttype_default'), |
|
240 | + 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
241 | + 'muteonstart_default' => self::get('muteonstart_default'), |
|
242 | + 'disablecam_editable' => self::get('disablecam_editable'), |
|
243 | + 'disablecam_default' => self::get('disablecam_default'), |
|
244 | + 'disablemic_editable' => self::get('disablemic_editable'), |
|
245 | + 'disablemic_default' => self::get('disablemic_default'), |
|
246 | + 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
247 | + 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
248 | + 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
249 | + 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
250 | + 'disablenote_editable' => self::get('disablenote_editable'), |
|
251 | + 'disablenote_default' => self::get('disablenote_default'), |
|
252 | + 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
253 | + 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
254 | + 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
255 | + 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
256 | + 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
257 | + 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
258 | + 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
259 | + 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
260 | + 'custom_logo' => self::get('custom_logo'), |
|
261 | + ); |
|
262 | 262 | } |
263 | 263 | } |
@@ -145,8 +145,8 @@ discard block |
||
145 | 145 | $payload = null; |
146 | 146 | if (!is_null($pname) && !is_null($purl)) { |
147 | 147 | $method = 'POST'; |
148 | - $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
149 | - $purl."' /></module></modules>"; |
|
148 | + $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
149 | + $purl . "' /></module></modules>"; |
|
150 | 150 | } |
151 | 151 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $payload); |
152 | 152 | if ($xml) { |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | } |
191 | 191 | if ($xml) { |
192 | 192 | // Either failure or success without meeting info. |
193 | - return (array) $xml; |
|
193 | + return (array)$xml; |
|
194 | 194 | } |
195 | 195 | // If the server is unreachable, then prompts the user of the necessary action. |
196 | 196 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
284 | 284 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
285 | 285 | 'getRecordings', |
286 | - ['recordID' => implode(',', (array) $breakoutroom)] |
|
286 | + ['recordID' => implode(',', (array)$breakoutroom)] |
|
287 | 287 | ); |
288 | 288 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
289 | 289 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | // Override imported flag with actual ID. |
340 | 340 | $recording['imported'] = $recordimported->id; |
341 | 341 | if (isset($recordimported->protected)) { |
342 | - $recording['protected'] = (string) $recordimported->protected; |
|
342 | + $recording['protected'] = (string)$recordimported->protected; |
|
343 | 343 | } |
344 | 344 | $recordsimportedarray[$recording['recordID']] = $recording; |
345 | 345 | } |
@@ -369,21 +369,21 @@ discard block |
||
369 | 369 | // Add formats. |
370 | 370 | $playbackarray = array(); |
371 | 371 | foreach ($recording->playback->format as $format) { |
372 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
373 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
372 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
373 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
374 | 374 | // Add preview per format when existing. |
375 | 375 | if ($format->preview) { |
376 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
376 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
377 | 377 | } |
378 | 378 | } |
379 | 379 | // Add the metadata to the recordings array. |
380 | 380 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
381 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
382 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
383 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
384 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
381 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
382 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
383 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
384 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
385 | 385 | if (isset($recording->protected)) { |
386 | - $recordingarray['protected'] = (string) $recording->protected; |
|
386 | + $recordingarray['protected'] = (string)$recording->protected; |
|
387 | 387 | } |
388 | 388 | return $recordingarray + $metadataarray; |
389 | 389 | } |
@@ -398,9 +398,9 @@ discard block |
||
398 | 398 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
399 | 399 | $imagesarray = array(); |
400 | 400 | foreach ($preview->images->image as $image) { |
401 | - $imagearray = array('url' => trim((string) $image)); |
|
401 | + $imagearray = array('url' => trim((string)$image)); |
|
402 | 402 | foreach ($image->attributes() as $attkey => $attvalue) { |
403 | - $imagearray[$attkey] = (string) $attvalue; |
|
403 | + $imagearray[$attkey] = (string)$attvalue; |
|
404 | 404 | } |
405 | 405 | array_push($imagesarray, $imagearray); |
406 | 406 | } |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | $ids = explode(',', $recordids); |
496 | 496 | foreach ($ids as $id) { |
497 | 497 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
498 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
498 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
499 | 499 | ); |
500 | 500 | if ($xml && $xml->returncode != 'SUCCESS') { |
501 | 501 | return false; |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | * @return array $users |
667 | 667 | */ |
668 | 668 | function bigbluebuttonbn_get_users(context $context = null) { |
669 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
669 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
670 | 670 | foreach ($users as $key => $value) { |
671 | 671 | $users[$key] = fullname($value); |
672 | 672 | } |
@@ -685,7 +685,7 @@ discard block |
||
685 | 685 | function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) { |
686 | 686 | // CONTRIB-7972, check the group of current user and course group mode. |
687 | 687 | $groups = null; |
688 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
688 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
689 | 689 | $course = get_course($context->instanceid); |
690 | 690 | $groupmode = groups_get_course_groupmode($course); |
691 | 691 | if ($bbactivity) { |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | $groups = groups_get_all_groups($course->id, $USER->id); |
699 | 699 | $users = []; |
700 | 700 | foreach ($groups as $g) { |
701 | - $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
701 | + $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
702 | 702 | } |
703 | 703 | } |
704 | 704 | return array_map( |
@@ -720,12 +720,12 @@ discard block |
||
720 | 720 | global $CFG; |
721 | 721 | |
722 | 722 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
723 | - $roles = (array) get_viewable_roles($context); |
|
723 | + $roles = (array)get_viewable_roles($context); |
|
724 | 724 | foreach ($roles as $key => $value) { |
725 | 725 | $roles[$key] = $value; |
726 | 726 | } |
727 | 727 | } else { |
728 | - $roles = (array) role_get_names($context); |
|
728 | + $roles = (array)role_get_names($context); |
|
729 | 729 | foreach ($roles as $key => $value) { |
730 | 730 | $roles[$key] = $value->localname; |
731 | 731 | } |
@@ -746,12 +746,12 @@ discard block |
||
746 | 746 | global $CFG; |
747 | 747 | |
748 | 748 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
749 | - $roles = (array) get_viewable_roles($context); |
|
749 | + $roles = (array)get_viewable_roles($context); |
|
750 | 750 | foreach ($roles as $key => $value) { |
751 | 751 | $roles[$key] = array('id' => $key, 'name' => $value); |
752 | 752 | } |
753 | 753 | } else { |
754 | - $roles = (array) role_get_names($context); |
|
754 | + $roles = (array)role_get_names($context); |
|
755 | 755 | foreach ($roles as $key => $value) { |
756 | 756 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
757 | 757 | } |
@@ -768,9 +768,9 @@ discard block |
||
768 | 768 | * @return object $role |
769 | 769 | */ |
770 | 770 | function bigbluebuttonbn_get_role($id) { |
771 | - $roles = (array) role_get_names(); |
|
771 | + $roles = (array)role_get_names(); |
|
772 | 772 | if (is_numeric($id) && isset($roles[$id])) { |
773 | - return (object) $roles[$id]; |
|
773 | + return (object)$roles[$id]; |
|
774 | 774 | } |
775 | 775 | foreach ($roles as $role) { |
776 | 776 | if ($role->shortname == $id) { |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
851 | 851 | $participantlist[] = array( |
852 | 852 | 'selectiontype' => 'user', |
853 | - 'selectionid' => (string) $ownerid, |
|
853 | + 'selectionid' => (string)$ownerid, |
|
854 | 854 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
855 | 855 | } |
856 | 856 | continue; |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | $now = time(); |
1033 | 1033 | if ($closingtime > 0 && $now < $closingtime) { |
1034 | 1034 | $duration = ceil(($closingtime - $now) / 60); |
1035 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1035 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1036 | 1036 | $duration = intval($duration) + $compensationtime; |
1037 | 1037 | } |
1038 | 1038 | return $duration; |
@@ -1234,16 +1234,16 @@ discard block |
||
1234 | 1234 | * @return array |
1235 | 1235 | */ |
1236 | 1236 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
1237 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1237 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1238 | 1238 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
1239 | 1239 | $result = $cache->get($meetingid); |
1240 | 1240 | $now = time(); |
1241 | 1241 | if (!$updatecache && !empty($result) && $now < ($result['creation_time'] + $cachettl)) { |
1242 | 1242 | // Use the value in the cache. |
1243 | - return (array) json_decode($result['meeting_info']); |
|
1243 | + return (array)json_decode($result['meeting_info']); |
|
1244 | 1244 | } |
1245 | 1245 | // Ping again and refresh the cache. |
1246 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1246 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1247 | 1247 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1248 | 1248 | ); |
1249 | 1249 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1390,7 +1390,7 @@ discard block |
||
1390 | 1390 | */ |
1391 | 1391 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1392 | 1392 | $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml); |
1393 | - $configxmlarray = (array) $configxml; |
|
1393 | + $configxmlarray = (array)$configxml; |
|
1394 | 1394 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1395 | 1395 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1396 | 1396 | return ''; |
@@ -1443,7 +1443,7 @@ discard block |
||
1443 | 1443 | * @return boolean |
1444 | 1444 | */ |
1445 | 1445 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
1446 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1446 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1447 | 1447 | } |
1448 | 1448 | |
1449 | 1449 | /** |
@@ -1454,7 +1454,7 @@ discard block |
||
1454 | 1454 | * @return boolean |
1455 | 1455 | */ |
1456 | 1456 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
1457 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1457 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1458 | 1458 | } |
1459 | 1459 | |
1460 | 1460 | /** |
@@ -1880,7 +1880,7 @@ discard block |
||
1880 | 1880 | } |
1881 | 1881 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
1882 | 1882 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
1883 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1883 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1884 | 1884 | // With icon for $manageaction. |
1885 | 1885 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
1886 | 1886 | $linkattributes = array( |
@@ -2143,7 +2143,7 @@ discard block |
||
2143 | 2143 | // Enqueue it. |
2144 | 2144 | \core\task\manager::queue_adhoc_task($task); |
2145 | 2145 | } catch (Exception $e) { |
2146 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
2146 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
2147 | 2147 | } |
2148 | 2148 | } |
2149 | 2149 | |
@@ -2157,7 +2157,7 @@ discard block |
||
2157 | 2157 | */ |
2158 | 2158 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
2159 | 2159 | global $CFG; |
2160 | - require_once($CFG->libdir.'/completionlib.php'); |
|
2160 | + require_once($CFG->libdir . '/completionlib.php'); |
|
2161 | 2161 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
2162 | 2162 | $completion = new completion_info($course); |
2163 | 2163 | if (!$completion->is_enabled($cm)) { |
@@ -2587,7 +2587,7 @@ discard block |
||
2587 | 2587 | */ |
2588 | 2588 | function bigbluebuttonbn_format_activity_time($time) { |
2589 | 2589 | global $CFG; |
2590 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
2590 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
2591 | 2591 | $activitytime = ''; |
2592 | 2592 | if ($time) { |
2593 | 2593 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2685,7 +2685,7 @@ discard block |
||
2685 | 2685 | */ |
2686 | 2686 | function bigbluebuttonbn_settings_general(&$renderer) { |
2687 | 2687 | // Configuration for BigBlueButton. |
2688 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2688 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2689 | 2689 | $renderer->render_group_header('general'); |
2690 | 2690 | $renderer->render_group_element( |
2691 | 2691 | 'server_url', |
@@ -2707,7 +2707,7 @@ discard block |
||
2707 | 2707 | */ |
2708 | 2708 | function bigbluebuttonbn_settings_record(&$renderer) { |
2709 | 2709 | // Configuration for 'recording' feature. |
2710 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2710 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2711 | 2711 | $renderer->render_group_header('recording'); |
2712 | 2712 | $renderer->render_group_element( |
2713 | 2713 | 'recording_default', |
@@ -2751,7 +2751,7 @@ discard block |
||
2751 | 2751 | */ |
2752 | 2752 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
2753 | 2753 | // Configuration for 'import recordings' feature. |
2754 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2754 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2755 | 2755 | $renderer->render_group_header('importrecordings'); |
2756 | 2756 | $renderer->render_group_element( |
2757 | 2757 | 'importrecordings_enabled', |
@@ -2773,7 +2773,7 @@ discard block |
||
2773 | 2773 | */ |
2774 | 2774 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
2775 | 2775 | // Configuration for 'show recordings' feature. |
2776 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2776 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2777 | 2777 | $renderer->render_group_header('recordings'); |
2778 | 2778 | $renderer->render_group_element( |
2779 | 2779 | 'recordings_html_default', |
@@ -2827,7 +2827,7 @@ discard block |
||
2827 | 2827 | */ |
2828 | 2828 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
2829 | 2829 | // Configuration for wait for moderator feature. |
2830 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2830 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2831 | 2831 | $renderer->render_group_header('waitformoderator'); |
2832 | 2832 | $renderer->render_group_element( |
2833 | 2833 | 'waitformoderator_default', |
@@ -2857,7 +2857,7 @@ discard block |
||
2857 | 2857 | */ |
2858 | 2858 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
2859 | 2859 | // Configuration for "static voice bridge" feature. |
2860 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2860 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2861 | 2861 | $renderer->render_group_header('voicebridge'); |
2862 | 2862 | $renderer->render_group_element( |
2863 | 2863 | 'voicebridge_editable', |
@@ -2875,7 +2875,7 @@ discard block |
||
2875 | 2875 | */ |
2876 | 2876 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
2877 | 2877 | // Configuration for "preupload presentation" feature. |
2878 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2878 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2879 | 2879 | // This feature only works if curl is installed. |
2880 | 2880 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
2881 | 2881 | if (!extension_loaded('curl')) { |
@@ -2903,7 +2903,7 @@ discard block |
||
2903 | 2903 | */ |
2904 | 2904 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
2905 | 2905 | // Configuration for "preupload presentation" feature. |
2906 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2906 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2907 | 2907 | if (extension_loaded('curl')) { |
2908 | 2908 | // This feature only works if curl is installed. |
2909 | 2909 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2920,7 +2920,7 @@ discard block |
||
2920 | 2920 | */ |
2921 | 2921 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
2922 | 2922 | // Configuration for "user limit" feature. |
2923 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2923 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2924 | 2924 | $renderer->render_group_header('userlimit'); |
2925 | 2925 | $renderer->render_group_element( |
2926 | 2926 | 'userlimit_default', |
@@ -2942,7 +2942,7 @@ discard block |
||
2942 | 2942 | */ |
2943 | 2943 | function bigbluebuttonbn_settings_duration(&$renderer) { |
2944 | 2944 | // Configuration for "scheduled duration" feature. |
2945 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2945 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2946 | 2946 | $renderer->render_group_header('scheduled'); |
2947 | 2947 | $renderer->render_group_element( |
2948 | 2948 | 'scheduled_duration_enabled', |
@@ -2968,7 +2968,7 @@ discard block |
||
2968 | 2968 | */ |
2969 | 2969 | function bigbluebuttonbn_settings_participants(&$renderer) { |
2970 | 2970 | // Configuration for defining the default role/user that will be moderator on new activities. |
2971 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2971 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2972 | 2972 | $renderer->render_group_header('participant'); |
2973 | 2973 | $renderer->render_group_element( |
2974 | 2974 | 'participant_guestlink', |
@@ -3001,7 +3001,7 @@ discard block |
||
3001 | 3001 | */ |
3002 | 3002 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
3003 | 3003 | // Configuration for "send notifications" feature. |
3004 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
3004 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
3005 | 3005 | $renderer->render_group_header('sendnotifications'); |
3006 | 3006 | $renderer->render_group_element( |
3007 | 3007 | 'sendnotifications_enabled', |
@@ -3019,14 +3019,14 @@ discard block |
||
3019 | 3019 | */ |
3020 | 3020 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
3021 | 3021 | // Configuration for "clienttype" feature. |
3022 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
3022 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
3023 | 3023 | $renderer->render_group_header('clienttype'); |
3024 | 3024 | $renderer->render_group_element( |
3025 | 3025 | 'clienttype_editable', |
3026 | 3026 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
3027 | 3027 | ); |
3028 | 3028 | // Web Client default. |
3029 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
3029 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
3030 | 3030 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
3031 | 3031 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
3032 | 3032 | $renderer->render_group_element( |
@@ -3049,7 +3049,7 @@ discard block |
||
3049 | 3049 | */ |
3050 | 3050 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
3051 | 3051 | // Configuration for BigBlueButton. |
3052 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
3052 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
3053 | 3053 | $renderer->render_group_header('muteonstart'); |
3054 | 3054 | $renderer->render_group_element( |
3055 | 3055 | 'muteonstart_default', |
@@ -3092,7 +3092,7 @@ discard block |
||
3092 | 3092 | */ |
3093 | 3093 | function bigbluebuttonbn_settings_disablecam(&$renderer) { |
3094 | 3094 | // Configuration for BigBlueButton. |
3095 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
3095 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
3096 | 3096 | $renderer->render_group_element( |
3097 | 3097 | 'disablecam_default', |
3098 | 3098 | $renderer->render_group_element_checkbox('disablecam_default', 0) |
@@ -3113,7 +3113,7 @@ discard block |
||
3113 | 3113 | */ |
3114 | 3114 | function bigbluebuttonbn_settings_disablemic(&$renderer) { |
3115 | 3115 | // Configuration for BigBlueButton. |
3116 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
3116 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
3117 | 3117 | $renderer->render_group_element( |
3118 | 3118 | 'disablemic_default', |
3119 | 3119 | $renderer->render_group_element_checkbox('disablemic_default', 0) |
@@ -3134,7 +3134,7 @@ discard block |
||
3134 | 3134 | */ |
3135 | 3135 | function bigbluebuttonbn_settings_disableprivatechat(&$renderer) { |
3136 | 3136 | // Configuration for BigBlueButton. |
3137 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
3137 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
3138 | 3138 | $renderer->render_group_element( |
3139 | 3139 | 'disableprivatechat_default', |
3140 | 3140 | $renderer->render_group_element_checkbox('disableprivatechat_default', 0) |
@@ -3155,7 +3155,7 @@ discard block |
||
3155 | 3155 | */ |
3156 | 3156 | function bigbluebuttonbn_settings_disablepublicchat(&$renderer) { |
3157 | 3157 | // Configuration for BigBlueButton. |
3158 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
3158 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
3159 | 3159 | $renderer->render_group_element( |
3160 | 3160 | 'disablepublicchat_default', |
3161 | 3161 | $renderer->render_group_element_checkbox('disablepublicchat_default', 0) |
@@ -3176,7 +3176,7 @@ discard block |
||
3176 | 3176 | */ |
3177 | 3177 | function bigbluebuttonbn_settings_disablenote(&$renderer) { |
3178 | 3178 | // Configuration for BigBlueButton. |
3179 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
3179 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
3180 | 3180 | $renderer->render_group_element( |
3181 | 3181 | 'disablenote_default', |
3182 | 3182 | $renderer->render_group_element_checkbox('disablenote_default', 0) |
@@ -3197,7 +3197,7 @@ discard block |
||
3197 | 3197 | */ |
3198 | 3198 | function bigbluebuttonbn_settings_hideuserlist(&$renderer) { |
3199 | 3199 | // Configuration for BigBlueButton. |
3200 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
3200 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
3201 | 3201 | $renderer->render_group_element( |
3202 | 3202 | 'hideuserlist_default', |
3203 | 3203 | $renderer->render_group_element_checkbox('hideuserlist_default', 0) |
@@ -3218,7 +3218,7 @@ discard block |
||
3218 | 3218 | */ |
3219 | 3219 | function bigbluebuttonbn_settings_lockedlayout(&$renderer) { |
3220 | 3220 | // Configuration for BigBlueButton. |
3221 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
3221 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
3222 | 3222 | $renderer->render_group_element( |
3223 | 3223 | 'lockedlayout_default', |
3224 | 3224 | $renderer->render_group_element_checkbox('lockedlayout_default', 0) |
@@ -3239,7 +3239,7 @@ discard block |
||
3239 | 3239 | */ |
3240 | 3240 | function bigbluebuttonbn_settings_lockonjoin(&$renderer) { |
3241 | 3241 | // Configuration for BigBlueButton. |
3242 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
3242 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
3243 | 3243 | $renderer->render_group_element( |
3244 | 3244 | 'lockonjoin_default', |
3245 | 3245 | $renderer->render_group_element_checkbox('lockonjoin_default', 0) |
@@ -3260,7 +3260,7 @@ discard block |
||
3260 | 3260 | */ |
3261 | 3261 | function bigbluebuttonbn_settings_lockonjoinconfigurable(&$renderer) { |
3262 | 3262 | // Configuration for BigBlueButton. |
3263 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
3263 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
3264 | 3264 | $renderer->render_group_element( |
3265 | 3265 | 'lockonjoinconfigurable_default', |
3266 | 3266 | $renderer->render_group_element_checkbox('lockonjoinconfigurable_default', 0) |
@@ -3281,7 +3281,7 @@ discard block |
||
3281 | 3281 | */ |
3282 | 3282 | function bigbluebuttonbn_settings_extended(&$renderer) { |
3283 | 3283 | // Configuration for extended capabilities. |
3284 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
3284 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
3285 | 3285 | return; |
3286 | 3286 | } |
3287 | 3287 | $renderer->render_group_header('extended_capabilities'); |
@@ -3319,7 +3319,7 @@ discard block |
||
3319 | 3319 | global $DB; |
3320 | 3320 | do { |
3321 | 3321 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
3322 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
3322 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
3323 | 3323 | } while ($meetingid == $encodedseed); |
3324 | 3324 | return $encodedseed; |
3325 | 3325 | } |
@@ -3532,7 +3532,7 @@ discard block |
||
3532 | 3532 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
3533 | 3533 | global $DB; |
3534 | 3534 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
3535 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3535 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3536 | 3536 | return $ownerid; |
3537 | 3537 | } |
3538 | 3538 | |
@@ -3639,7 +3639,7 @@ discard block |
||
3639 | 3639 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
3640 | 3640 | ]; |
3641 | 3641 | // Special metadata for recording processing. |
3642 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
3642 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
3643 | 3643 | $metadata["bn-recording-status"] = json_encode( |
3644 | 3644 | array( |
3645 | 3645 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3647,10 +3647,10 @@ discard block |
||
3647 | 3647 | ) |
3648 | 3648 | ); |
3649 | 3649 | } |
3650 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
3650 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
3651 | 3651 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
3652 | 3652 | } |
3653 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
3653 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
3654 | 3654 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
3655 | 3655 | } |
3656 | 3656 | return $metadata; |
@@ -3668,7 +3668,7 @@ discard block |
||
3668 | 3668 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
3669 | 3669 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
3670 | 3670 | // No more users allowed to join. |
3671 | - header('Location: '.$bbbsession['logoutURL']); |
|
3671 | + header('Location: ' . $bbbsession['logoutURL']); |
|
3672 | 3672 | return; |
3673 | 3673 | } |
3674 | 3674 | // Build the URL. |
@@ -3682,13 +3682,13 @@ discard block |
||
3682 | 3682 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
3683 | 3683 | // Internal logger: Instert a record with the meeting created. |
3684 | 3684 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
3685 | - $meta = '{"origin":'.$origin.'}'; |
|
3685 | + $meta = '{"origin":' . $origin . '}'; |
|
3686 | 3686 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
3687 | 3687 | // Before executing the redirect, increment the number of participants. |
3688 | 3688 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
3689 | 3689 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
3690 | 3690 | // Execute the redirect. |
3691 | - header('Location: '.$joinurl); |
|
3691 | + header('Location: ' . $joinurl); |
|
3692 | 3692 | } |
3693 | 3693 | |
3694 | 3694 | /** |