@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | defined('MOODLE_INTERNAL') || die(); |
28 | 28 | |
29 | -require_once(dirname(dirname(__FILE__)).'/locallib.php'); |
|
29 | +require_once(dirname(dirname(__FILE__)) . '/locallib.php'); |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Performs data migrations and updates on upgrade. |
@@ -212,7 +212,7 @@ |
||
212 | 212 | function($instanceid, $data) use ($user, $instanceidstocmids) { |
213 | 213 | $context = \context_module::instance($instanceidstocmids[$instanceid]); |
214 | 214 | $contextdata = helper::get_context_data($context, $user); |
215 | - $finaldata = (object) array_merge((array) $contextdata, ['logs' => $data]); |
|
215 | + $finaldata = (object)array_merge((array)$contextdata, ['logs' => $data]); |
|
216 | 216 | helper::export_context_files($context, $user); |
217 | 217 | writer::with_context($context)->export_data([], $finaldata); |
218 | 218 | } |
@@ -61,11 +61,11 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public static function _get_metadata(collection $collection) { |
63 | 63 | |
64 | - // The table bigbluebuttonbn stores only the room properties. |
|
65 | - // However, there is a chance that some personal information is stored as metadata. |
|
66 | - // This would be done in the column 'participants' where rules can be set to define BBB roles. |
|
67 | - // It is fair to say that only the userid is stored, which is useless if user is removed. |
|
68 | - // But if this is a concern a refactoring on the way the rules are stored will be required. |
|
64 | + // The table bigbluebuttonbn stores only the room properties. |
|
65 | + // However, there is a chance that some personal information is stored as metadata. |
|
66 | + // This would be done in the column 'participants' where rules can be set to define BBB roles. |
|
67 | + // It is fair to say that only the userid is stored, which is useless if user is removed. |
|
68 | + // But if this is a concern a refactoring on the way the rules are stored will be required. |
|
69 | 69 | $collection->add_database_table('bigbluebuttonbn', [ |
70 | 70 | 'participants' => 'privacy:metadata:bigbluebuttonbn:participants', |
71 | 71 | ], 'privacy:metadata:bigbluebuttonbn'); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | 'meetingid' => $record->meetingid, |
209 | 209 | 'log' => $record->log, |
210 | 210 | 'meta' => $record->meta, |
211 | - ]; |
|
211 | + ]; |
|
212 | 212 | return $carry; |
213 | 213 | }, |
214 | 214 | function($instanceid, $data) use ($user, $instanceidstocmids) { |
@@ -434,12 +434,12 @@ discard block |
||
434 | 434 | $recordings = bigbluebuttonbn_get_recordings( |
435 | 435 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'], |
436 | 436 | $bbbsession['bigbluebuttonbn']->recordings_deleted |
437 | - ); |
|
437 | + ); |
|
438 | 438 | if ($enabledfeatures['importrecordings']) { |
439 | 439 | // Get recording links. |
440 | 440 | $recordingsimported = bigbluebuttonbn_get_recordings_imported_array( |
441 | 441 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'] |
442 | - ); |
|
442 | + ); |
|
443 | 443 | /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent |
444 | 444 | * recordings are not included. */ |
445 | 445 | if ($bbbsession['bigbluebuttonbn']->recordings_imported) { |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | // JavaScript variables for recordings. |
458 | 458 | $jsvars += array( |
459 | 459 | 'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1', |
460 | - ); |
|
460 | + ); |
|
461 | 461 | // If there are meetings with recordings load the data to the table. |
462 | 462 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
463 | 463 | // Render a plain html table. |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | $jsvars += array( |
468 | 468 | 'columns' => bigbluebuttonbn_get_recording_columns($bbbsession), |
469 | 469 | 'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings), |
470 | - ); |
|
470 | + ); |
|
471 | 471 | // Render a YUI table. |
472 | 472 | return html_writer::div('', '', array('id' => 'bigbluebuttonbn_recordings_table')); |
473 | 473 | } |
@@ -487,10 +487,10 @@ discard block |
||
487 | 487 | } |
488 | 488 | $button = html_writer::tag('input', '', |
489 | 489 | array('type' => 'button', |
490 | - 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
491 | - 'class' => 'btn btn-secondary', |
|
492 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
493 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
490 | + 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
491 | + 'class' => 'btn btn-secondary', |
|
492 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
493 | + $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
494 | 494 | $output = html_writer::empty_tag('br'); |
495 | 495 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
496 | 496 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -569,5 +569,5 @@ discard block |
||
569 | 569 | (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'), |
570 | 570 | (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'), |
571 | 571 | (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class') |
572 | - ); |
|
572 | + ); |
|
573 | 573 | } |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | * @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com) |
25 | 25 | */ |
26 | 26 | |
27 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
28 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
27 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
28 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
29 | 29 | |
30 | 30 | $id = required_param('id', PARAM_INT); |
31 | 31 | $bn = optional_param('n', 0, PARAM_INT); |
@@ -60,19 +60,19 @@ discard block |
||
60 | 60 | if (is_null($serverversion)) { |
61 | 61 | if ($bbbsession['administrator']) { |
62 | 62 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
63 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
63 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
64 | 64 | exit; |
65 | 65 | } |
66 | 66 | if ($bbbsession['moderator']) { |
67 | 67 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
68 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
68 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
69 | 69 | exit; |
70 | 70 | } |
71 | 71 | print_error('view_error_unable_join_student', '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 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
75 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
76 | 76 | |
77 | 77 | // Mark viewed by user (if required). |
78 | 78 | $completion = new completion_info($course); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | // Print the page header. |
82 | 82 | $PAGE->set_context($context); |
83 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
83 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
84 | 84 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
85 | 85 | $PAGE->set_cacheable(false); |
86 | 86 | $PAGE->set_heading($course->fullname); |
@@ -90,11 +90,11 @@ discard block |
||
90 | 90 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
91 | 91 | echo $OUTPUT->header(); |
92 | 92 | if (isguestuser()) { |
93 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
94 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
93 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
95 | 95 | } else { |
96 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
97 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
96 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
97 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
98 | 98 | } |
99 | 99 | echo $OUTPUT->footer(); |
100 | 100 | exit; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | // Operation URLs. |
104 | 104 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
105 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
105 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
106 | 106 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
107 | 107 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
108 | 108 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | echo $OUTPUT->footer(); |
123 | 123 | |
124 | 124 | // Shows version as a comment. |
125 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
125 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
126 | 126 | |
127 | 127 | // Initialize session variable used across views. |
128 | 128 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
151 | 151 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
152 | 152 | // Database info related to the activity. |
153 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
153 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
154 | 154 | $bbbsession['bigbluebuttonbn']->id; |
155 | 155 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
156 | 156 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
171 | 171 | } |
172 | 172 | if ($bbbsession['bigbluebuttonbn']->record) { |
173 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
173 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
174 | 174 | } |
175 | 175 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
176 | 176 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $bbbsession['originServerName'] = $parsedurl['host']; |
184 | 184 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
185 | 185 | $bbbsession['originServerCommonName'] = ''; |
186 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
186 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
187 | 187 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
188 | 188 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
189 | 189 | $bbbsession['clienttype'] = \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'); |
@@ -246,8 +246,8 @@ discard block |
||
246 | 246 | $groupname = groups_get_group_name($bbbsession['group']); |
247 | 247 | } |
248 | 248 | // Assign group default values. |
249 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
250 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
249 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
250 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
251 | 251 | if (count($groups) == 0) { |
252 | 252 | // Only the All participants group exists. |
253 | 253 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | if (has_capability('moodle/site:accessallgroups', $context)) { |
258 | 258 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
259 | 259 | } |
260 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
260 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
261 | 261 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
262 | 262 | echo '<br><br>'; |
263 | 263 | } |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
325 | 325 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
326 | 326 | } |
327 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
327 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
328 | 328 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
329 | 329 | } |
330 | 330 | |
@@ -393,12 +393,12 @@ discard block |
||
393 | 393 | // JavaScript variables for room. |
394 | 394 | $openingtime = ''; |
395 | 395 | if ($bbbsession['openingtime']) { |
396 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
396 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
397 | 397 | userdate($bbbsession['openingtime']); |
398 | 398 | } |
399 | 399 | $closingtime = ''; |
400 | 400 | if ($bbbsession['closingtime']) { |
401 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
401 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
402 | 402 | userdate($bbbsession['closingtime']); |
403 | 403 | } |
404 | 404 | $jsvars += array( |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | $output .= $OUTPUT->box_end(); |
416 | 416 | // Action button box. |
417 | 417 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
418 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
418 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
419 | 419 | $output .= $OUTPUT->box_end(); |
420 | 420 | if ($activity == 'ended') { |
421 | 421 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | // If there are meetings with recordings load the data to the table. |
469 | 469 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
470 | 470 | // Render a plain html table. |
471 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
471 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
472 | 472 | } |
473 | 473 | // JavaScript variables for recordings with YUI. |
474 | 474 | $jsvars += array( |
@@ -496,8 +496,8 @@ discard block |
||
496 | 496 | array('type' => 'button', |
497 | 497 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
498 | 498 | 'class' => 'btn btn-secondary', |
499 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
500 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
499 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
500 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
501 | 501 | $output = html_writer::empty_tag('br'); |
502 | 502 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
503 | 503 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -516,10 +516,10 @@ discard block |
||
516 | 516 | if (!is_null($bbbsession['presentation']['url'])) { |
517 | 517 | $attributes = array('title' => $bbbsession['presentation']['name']); |
518 | 518 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
519 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
520 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
519 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
520 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
521 | 521 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
522 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
522 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
523 | 523 | } |
524 | 524 | return ''; |
525 | 525 | } |
@@ -440,26 +440,26 @@ discard block |
||
440 | 440 | return array( |
441 | 441 | 'status' => false, |
442 | 442 | 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn') |
443 | - ); |
|
443 | + ); |
|
444 | 444 | } |
445 | 445 | if ($realrecordings[$params['id']]['published'] !== 'true') { |
446 | 446 | return array( |
447 | 447 | 'status' => false, |
448 | 448 | 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn') |
449 | - ); |
|
449 | + ); |
|
450 | 450 | } |
451 | 451 | return array( |
452 | 452 | 'status' => bigbluebuttonbn_publish_recording_imported( |
453 | 453 | $recordings[$params['id']]['imported'], true |
454 | 454 | ) |
455 | - ); |
|
455 | + ); |
|
456 | 456 | } |
457 | 457 | // As the recordingid was not identified as imported recording link, execute actual publish. |
458 | 458 | return array( |
459 | 459 | 'status' => bigbluebuttonbn_publish_recordings( |
460 | 460 | $params['id'], 'true' |
461 | 461 | ) |
462 | - ); |
|
462 | + ); |
|
463 | 463 | } |
464 | 464 | |
465 | 465 | /** |
@@ -480,26 +480,26 @@ discard block |
||
480 | 480 | return array( |
481 | 481 | 'status' => false, |
482 | 482 | 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn') |
483 | - ); |
|
483 | + ); |
|
484 | 484 | } |
485 | 485 | if ($realrecordings[$params['id']]['protected'] === 'true') { |
486 | 486 | return array( |
487 | 487 | 'status' => false, |
488 | 488 | 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn') |
489 | - ); |
|
489 | + ); |
|
490 | 490 | } |
491 | 491 | return array( |
492 | 492 | 'status' => bigbluebuttonbn_protect_recording_imported( |
493 | 493 | $recordings[$params['id']]['imported'], false |
494 | 494 | ) |
495 | - ); |
|
495 | + ); |
|
496 | 496 | } |
497 | 497 | // As the recordingid was not identified as imported recording link, execute actual uprotect. |
498 | 498 | return array( |
499 | 499 | 'status' => bigbluebuttonbn_update_recordings( |
500 | 500 | $params['id'], array('protect' => 'false') |
501 | 501 | ) |
502 | - ); |
|
502 | + ); |
|
503 | 503 | } |
504 | 504 | |
505 | 505 | /** |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | 'status' => bigbluebuttonbn_publish_recording_imported( |
519 | 519 | $recordings[$params['id']]['imported'], false |
520 | 520 | ) |
521 | - ); |
|
521 | + ); |
|
522 | 522 | } |
523 | 523 | // As the recordingid was not identified as imported recording link, execute unpublish on a real recording. |
524 | 524 | // First: Unpublish imported links associated to the recording. |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | 'status' => bigbluebuttonbn_publish_recordings( |
537 | 537 | $params['id'], 'false' |
538 | 538 | ) |
539 | - ); |
|
539 | + ); |
|
540 | 540 | } |
541 | 541 | |
542 | 542 | /** |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | 'status' => bigbluebuttonbn_protect_recording_imported( |
556 | 556 | $recordings[$params['id']]['imported'], true |
557 | 557 | ) |
558 | - ); |
|
558 | + ); |
|
559 | 559 | } |
560 | 560 | // As the recordingid was not identified as imported recording link, execute protect on a real recording. |
561 | 561 | // First: Protect imported links associated to the recording. |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | 'status' => bigbluebuttonbn_update_recordings( |
574 | 574 | $params['id'], array('protect' => 'true') |
575 | 575 | ) |
576 | - ); |
|
576 | + ); |
|
577 | 577 | } |
578 | 578 | |
579 | 579 | /** |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | 'status' => bigbluebuttonbn_delete_recording_imported( |
593 | 593 | $recordings[$params['id']]['imported'] |
594 | 594 | ) |
595 | - ); |
|
595 | + ); |
|
596 | 596 | } |
597 | 597 | // As the recordingid was not identified as imported recording link, execute delete on a real recording. |
598 | 598 | // First: Delete imported links associated to the recording. |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | // Second: Execute the actual delete. |
607 | 607 | return array( |
608 | 608 | 'status' => bigbluebuttonbn_delete_recordings($params['id']) |
609 | - ); |
|
609 | + ); |
|
610 | 610 | } |
611 | 611 | |
612 | 612 | /** |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | 'status' => bigbluebuttonbn_update_recording_imported( |
625 | 625 | $recordings[$params['id']]['imported'], json_decode($params['meta'], true) |
626 | 626 | ) |
627 | - ); |
|
627 | + ); |
|
628 | 628 | } |
629 | 629 | |
630 | 630 | // As the recordingid was not identified as imported recording link, execute update on a real recording. |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | 'status' => bigbluebuttonbn_update_recordings( |
635 | 635 | $params['id'], json_decode($params['meta']) |
636 | 636 | ) |
637 | - ); |
|
637 | + ); |
|
638 | 638 | } |
639 | 639 | |
640 | 640 | /** |
@@ -800,11 +800,11 @@ discard block |
||
800 | 800 | $params['recording_ready'] = [ |
801 | 801 | 'bigbluebuttonbn' => 'An id for the bigbluebuttonbn instance should be included.', |
802 | 802 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
803 | - ]; |
|
803 | + ]; |
|
804 | 804 | $params['live_session_events'] = [ |
805 | 805 | 'bigbluebuttonbn' => 'An id for the bigbluebuttonbn instance should be included.', |
806 | 806 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
807 | - ]; |
|
807 | + ]; |
|
808 | 808 | return $params; |
809 | 809 | } |
810 | 810 | |
@@ -815,9 +815,9 @@ discard block |
||
815 | 815 | */ |
816 | 816 | function bigbluebuttonbn_broker_required_parameters_default($id) { |
817 | 817 | return [ |
818 | - 'id' => "The {$id} must be specified.", |
|
819 | - 'callback' => 'This call must include a javascript callback.' |
|
820 | - ]; |
|
818 | + 'id' => "The {$id} must be specified.", |
|
819 | + 'callback' => 'This call must include a javascript callback.' |
|
820 | + ]; |
|
821 | 821 | } |
822 | 822 | |
823 | 823 | /** |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | */ |
25 | 25 | |
26 | 26 | |
27 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
28 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
27 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
28 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
29 | 29 | |
30 | 30 | use \Firebase\JWT\JWT; |
31 | 31 | |
@@ -41,13 +41,13 @@ discard block |
||
41 | 41 | $params['meta'] = optional_param('meta', '', PARAM_TEXT); |
42 | 42 | |
43 | 43 | if (empty($params['action'])) { |
44 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
44 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
45 | 45 | return; |
46 | 46 | } |
47 | 47 | |
48 | 48 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
49 | 49 | if (!empty($error)) { |
50 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
50 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
51 | 51 | return; |
52 | 52 | } |
53 | 53 | |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn, $cm); |
133 | 133 | return; |
134 | 134 | } |
135 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
135 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
136 | 136 | return; |
137 | 137 | |
138 | 138 | } catch (Exception $e) { |
139 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
139 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
140 | 140 | return; |
141 | 141 | } |
142 | 142 | |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | function bigbluebuttonbn_broker_recording_info_current($recording, $params) { |
323 | 323 | $callbackresponse['status'] = true; |
324 | 324 | $callbackresponse['found'] = true; |
325 | - $callbackresponse['published'] = (string) $recording['published']; |
|
325 | + $callbackresponse['published'] = (string)$recording['published']; |
|
326 | 326 | if (!isset($params['meta']) || empty($params['meta'])) { |
327 | 327 | return $callbackresponse; |
328 | 328 | } |
@@ -651,8 +651,8 @@ discard block |
||
651 | 651 | $decodedparameters = JWT::decode($params['signed_parameters'], |
652 | 652 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
653 | 653 | } catch (Exception $e) { |
654 | - $error = 'Caught exception: '.$e->getMessage(); |
|
655 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
654 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
655 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
656 | 656 | return; |
657 | 657 | } |
658 | 658 | |
@@ -678,12 +678,12 @@ discard block |
||
678 | 678 | bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn); |
679 | 679 | } |
680 | 680 | $overrides = array('meetingid' => $decodedparameters->meeting_id); |
681 | - $meta = '{"recordid":"'.$decodedparameters->record_id.'"}'; |
|
681 | + $meta = '{"recordid":"' . $decodedparameters->record_id . '"}'; |
|
682 | 682 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, $meta); |
683 | 683 | header('HTTP/1.0 202 Accepted'); |
684 | 684 | } catch (Exception $e) { |
685 | - $error = 'Caught exception: '.$e->getMessage(); |
|
686 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
685 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
686 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
687 | 687 | } |
688 | 688 | } |
689 | 689 | |
@@ -704,13 +704,13 @@ discard block |
||
704 | 704 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
705 | 705 | if (!isset($importrecordings[$params['id']])) { |
706 | 706 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
707 | - header('HTTP/1.0 404 Not found. '.$error); |
|
707 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
708 | 708 | return; |
709 | 709 | } |
710 | 710 | $callbackresponse = array('status' => true); |
711 | 711 | $importrecordings[$params['id']]['imported'] = true; |
712 | 712 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
713 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
713 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
714 | 714 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
715 | 715 | // Moodle event logger: Create an event for recording imported. |
716 | 716 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -736,8 +736,8 @@ discard block |
||
736 | 736 | $decodedparameters = JWT::decode($params['signed_parameters'], |
737 | 737 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
738 | 738 | } catch (Exception $e) { |
739 | - $error = 'Caught exception: '.$e->getMessage(); |
|
740 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
739 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
740 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
741 | 741 | return; |
742 | 742 | } |
743 | 743 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -772,7 +772,7 @@ discard block |
||
772 | 772 | $requiredparams = bigbluebuttonbn_broker_required_parameters(); |
773 | 773 | $action = strtolower($params['action']); |
774 | 774 | if (!array_key_exists($action, $requiredparams)) { |
775 | - return 'Action '.$params['action'].' can not be performed.'; |
|
775 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
776 | 776 | } |
777 | 777 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
778 | 778 | } |
@@ -165,36 +165,36 @@ |
||
165 | 165 | */ |
166 | 166 | public static function get_options() { |
167 | 167 | return array( |
168 | - 'version_major' => self::get_moodle_version_major(), |
|
169 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
170 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
171 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
172 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
173 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
174 | - 'userlimit_default' => self::get('userlimit_default'), |
|
175 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
176 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
177 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
178 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
179 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
180 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
181 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
182 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
183 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
184 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
185 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
186 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
187 | - 'recording_default' => self::get('recording_default'), |
|
188 | - 'recording_editable' => self::get('recording_editable'), |
|
189 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
190 | - 'general_warning_message' => self::get('general_warning_message'), |
|
191 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
192 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
193 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
194 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
195 | - 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
196 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
197 | - 'clienttype_default' => self::get('clienttype_default'), |
|
198 | - ); |
|
168 | + 'version_major' => self::get_moodle_version_major(), |
|
169 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
170 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
171 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
172 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
173 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
174 | + 'userlimit_default' => self::get('userlimit_default'), |
|
175 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
176 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
177 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
178 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
179 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
180 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
181 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
182 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
183 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
184 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
185 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
186 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
187 | + 'recording_default' => self::get('recording_default'), |
|
188 | + 'recording_editable' => self::get('recording_editable'), |
|
189 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
190 | + 'general_warning_message' => self::get('general_warning_message'), |
|
191 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
192 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
193 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
194 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
195 | + 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
196 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
197 | + 'clienttype_default' => self::get('clienttype_default'), |
|
198 | + ); |
|
199 | 199 | } |
200 | 200 | } |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public static function defaultvalues() { |
57 | 57 | return array( |
58 | - 'server_url' => (string) BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
59 | - 'shared_secret' => (string) BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
58 | + 'server_url' => (string)BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
59 | + 'shared_secret' => (string)BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
60 | 60 | 'voicebridge_editable' => false, |
61 | 61 | 'importrecordings_enabled' => false, |
62 | 62 | 'importrecordings_from_deleted_enabled' => false, |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | if (isset($CFG->bigbluebuttonbn[$setting])) { |
125 | 125 | return (string)$CFG->bigbluebuttonbn[$setting]; |
126 | 126 | } |
127 | - if (isset($CFG->{'bigbluebuttonbn_'.$setting})) { |
|
128 | - return (string)$CFG->{'bigbluebuttonbn_'.$setting}; |
|
127 | + if (isset($CFG->{'bigbluebuttonbn_' . $setting})) { |
|
128 | + return (string)$CFG->{'bigbluebuttonbn_' . $setting}; |
|
129 | 129 | } |
130 | 130 | return self::defaultvalue($setting); |
131 | 131 | } |