@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | return $output; |
409 | 409 | } |
410 | 410 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
411 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
411 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
412 | 412 | $output .= ' ' . $message . "\n"; |
413 | 413 | $output .= ' <div class="singlebutton">' . "\n"; |
414 | 414 | if (!empty($href)) { |
@@ -505,12 +505,12 @@ discard block |
||
505 | 505 | $recordings = bigbluebuttonbn_get_recordings( |
506 | 506 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'], |
507 | 507 | $bbbsession['bigbluebuttonbn']->recordings_deleted |
508 | - ); |
|
508 | + ); |
|
509 | 509 | if ($enabledfeatures['importrecordings']) { |
510 | 510 | // Get recording links. |
511 | 511 | $recordingsimported = bigbluebuttonbn_get_recordings_imported_array( |
512 | 512 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'] |
513 | - ); |
|
513 | + ); |
|
514 | 514 | /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent |
515 | 515 | * recordings are not included. */ |
516 | 516 | $recordings += $recordingsimported; |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | // JavaScript variables for recordings. |
525 | 525 | $jsvars += array( |
526 | 526 | 'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1', |
527 | - ); |
|
527 | + ); |
|
528 | 528 | // If there are meetings with recordings load the data to the table. |
529 | 529 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
530 | 530 | // Render a plain html table. |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | $jsvars += array( |
535 | 535 | 'columns' => bigbluebuttonbn_get_recording_columns($bbbsession), |
536 | 536 | 'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings), |
537 | - ); |
|
537 | + ); |
|
538 | 538 | // Render a YUI table. |
539 | 539 | return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table')); |
540 | 540 | } |
@@ -554,10 +554,10 @@ discard block |
||
554 | 554 | } |
555 | 555 | $button = html_writer::tag('input', '', |
556 | 556 | array('type' => 'button', |
557 | - 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
558 | - 'class' => 'btn btn-secondary', |
|
559 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
560 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
557 | + 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
558 | + 'class' => 'btn btn-secondary', |
|
559 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
560 | + $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
561 | 561 | $output = html_writer::start_tag('br'); |
562 | 562 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
563 | 563 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -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; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
153 | 153 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
154 | 154 | // Database info related to the activity. |
155 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
155 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
156 | 156 | $bbbsession['bigbluebuttonbn']->id; |
157 | 157 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
158 | 158 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
173 | 173 | } |
174 | 174 | if ($bbbsession['bigbluebuttonbn']->record) { |
175 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
175 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
176 | 176 | } |
177 | 177 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
178 | 178 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $bbbsession['originServerName'] = $parsedurl['host']; |
186 | 186 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
187 | 187 | $bbbsession['originServerCommonName'] = ''; |
188 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
188 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
189 | 189 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
190 | 190 | } |
191 | 191 | |
@@ -257,8 +257,8 @@ discard block |
||
257 | 257 | $groupname = groups_get_group_name($bbbsession['group']); |
258 | 258 | } |
259 | 259 | // Assign group default values. |
260 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
261 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
260 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
261 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
262 | 262 | if (count($groups) == 0) { |
263 | 263 | // Only the All participants group exists. |
264 | 264 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | return; |
270 | 270 | } |
271 | 271 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
272 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
272 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
273 | 273 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
274 | 274 | echo '<br><br>'; |
275 | 275 | } |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | 'locale' => bigbluebuttonbn_get_localcode(), 'profile_features' => $typeprofiles[0]['features']); |
317 | 317 | // Renders general warning when configured. |
318 | 318 | $cfg = \mod_bigbluebuttonbn\locallib\config::get_options(); |
319 | - $output = ''; |
|
319 | + $output = ''; |
|
320 | 320 | if (bigbluebuttonbn_view_warning_shown($bbbsession)) { |
321 | 321 | $output .= bigbluebuttonbn_view_render_warning( |
322 | 322 | (string)$cfg['general_warning_message'], |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
341 | 341 | $output .= bigbluebuttonbn_view_render_warning($recordingsdisabled, 'danger'); |
342 | 342 | } |
343 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
343 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
344 | 344 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
345 | 345 | } |
346 | 346 | |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | * |
401 | 401 | * @return string |
402 | 402 | */ |
403 | -function bigbluebuttonbn_view_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
403 | +function bigbluebuttonbn_view_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
404 | 404 | global $OUTPUT; |
405 | 405 | $output = "\n"; |
406 | 406 | // Evaluates if config_warning is enabled. |
@@ -435,11 +435,11 @@ discard block |
||
435 | 435 | if ($class == '') { |
436 | 436 | $class = 'btn btn-secondary'; |
437 | 437 | } |
438 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
439 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
440 | - $output .= ' title=""'."\n"; |
|
441 | - $output .= ' >' . $text . '</button>'."\n"; |
|
442 | - $output .= ' </form>'."\n"; |
|
438 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
439 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
440 | + $output .= ' title=""' . "\n"; |
|
441 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
442 | + $output .= ' </form>' . "\n"; |
|
443 | 443 | return $output; |
444 | 444 | } |
445 | 445 | |
@@ -457,12 +457,12 @@ discard block |
||
457 | 457 | // JavaScript variables for room. |
458 | 458 | $openingtime = ''; |
459 | 459 | if ($bbbsession['openingtime']) { |
460 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
460 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
461 | 461 | userdate($bbbsession['openingtime']); |
462 | 462 | } |
463 | 463 | $closingtime = ''; |
464 | 464 | if ($bbbsession['closingtime']) { |
465 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
465 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
466 | 466 | userdate($bbbsession['closingtime']); |
467 | 467 | } |
468 | 468 | $jsvars += array( |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | $output .= $OUTPUT->box_end(); |
480 | 480 | // Action button box. |
481 | 481 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
482 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
482 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
483 | 483 | $output .= $OUTPUT->box_end(); |
484 | 484 | if ($activity == 'ended') { |
485 | 485 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | // If there are meetings with recordings load the data to the table. |
529 | 529 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
530 | 530 | // Render a plain html table. |
531 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
531 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
532 | 532 | } |
533 | 533 | // JavaScript variables for recordings with YUI. |
534 | 534 | $jsvars += array( |
@@ -556,8 +556,8 @@ discard block |
||
556 | 556 | array('type' => 'button', |
557 | 557 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
558 | 558 | 'class' => 'btn btn-secondary', |
559 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
560 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
559 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
560 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
561 | 561 | $output = html_writer::start_tag('br'); |
562 | 562 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
563 | 563 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -576,10 +576,10 @@ discard block |
||
576 | 576 | if (!is_null($bbbsession['presentation']['url'])) { |
577 | 577 | $attributes = array('title' => $bbbsession['presentation']['name']); |
578 | 578 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
579 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
580 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
579 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
580 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
581 | 581 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
582 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
582 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
583 | 583 | } |
584 | 584 | return ''; |
585 | 585 | } |
@@ -119,9 +119,9 @@ discard block |
||
119 | 119 | */ |
120 | 120 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
121 | 121 | $data = ['meetingID' => $meetingid, |
122 | - 'fullName' => $username, |
|
123 | - 'password' => $pw, |
|
124 | - 'logoutURL' => $logouturl, |
|
122 | + 'fullName' => $username, |
|
123 | + 'password' => $pw, |
|
124 | + 'logoutURL' => $logouturl, |
|
125 | 125 | ]; |
126 | 126 | if (!is_null($configtoken)) { |
127 | 127 | $data['configToken'] = $configtoken; |
@@ -173,23 +173,23 @@ discard block |
||
173 | 173 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
174 | 174 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
175 | 175 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
176 | - ); |
|
176 | + ); |
|
177 | 177 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
178 | 178 | // Meeting info was returned. |
179 | 179 | return array('returncode' => $xml->returncode, |
180 | - 'meetingID' => $xml->meetingID, |
|
181 | - 'moderatorPW' => $xml->moderatorPW, |
|
182 | - 'attendeePW' => $xml->attendeePW, |
|
183 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
184 | - 'running' => $xml->running, |
|
185 | - 'recording' => $xml->recording, |
|
186 | - 'startTime' => $xml->startTime, |
|
187 | - 'endTime' => $xml->endTime, |
|
188 | - 'participantCount' => $xml->participantCount, |
|
189 | - 'moderatorCount' => $xml->moderatorCount, |
|
190 | - 'attendees' => $xml->attendees, |
|
191 | - 'metadata' => $xml->metadata, |
|
192 | - ); |
|
180 | + 'meetingID' => $xml->meetingID, |
|
181 | + 'moderatorPW' => $xml->moderatorPW, |
|
182 | + 'attendeePW' => $xml->attendeePW, |
|
183 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
184 | + 'running' => $xml->running, |
|
185 | + 'recording' => $xml->recording, |
|
186 | + 'startTime' => $xml->startTime, |
|
187 | + 'endTime' => $xml->endTime, |
|
188 | + 'participantCount' => $xml->participantCount, |
|
189 | + 'moderatorCount' => $xml->moderatorCount, |
|
190 | + 'attendees' => $xml->attendees, |
|
191 | + 'metadata' => $xml->metadata, |
|
192 | + ); |
|
193 | 193 | } |
194 | 194 | if ($xml) { |
195 | 195 | // Either failure or success without meeting info. |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | function bigbluebuttonbn_get_default_config_xml() { |
326 | 326 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
327 | 327 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
328 | - ); |
|
328 | + ); |
|
329 | 329 | return $xml; |
330 | 330 | } |
331 | 331 | |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | foreach ($ids as $id) { |
427 | 427 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
428 | 428 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
429 | - ); |
|
429 | + ); |
|
430 | 430 | if ($xml && $xml->returncode != 'SUCCESS') { |
431 | 431 | return false; |
432 | 432 | } |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | foreach ($ids as $id) { |
446 | 446 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
447 | 447 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
448 | - ); |
|
448 | + ); |
|
449 | 449 | if ($xml && $xml->returncode != 'SUCCESS') { |
450 | 450 | return false; |
451 | 451 | } |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | foreach ($ids as $id) { |
465 | 465 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
466 | 466 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
467 | - ); |
|
467 | + ); |
|
468 | 468 | if ($xml && $xml->returncode != 'SUCCESS') { |
469 | 469 | return false; |
470 | 470 | } |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
482 | 482 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
483 | 483 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
484 | - ); |
|
484 | + ); |
|
485 | 485 | if ($xml) { |
486 | 486 | // If the xml packet returned failure it displays the message to the user. |
487 | 487 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | */ |
502 | 502 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
503 | 503 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
504 | - ); |
|
504 | + ); |
|
505 | 505 | return ($xml && $xml->returncode == 'SUCCESS'); |
506 | 506 | } |
507 | 507 | |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | function bigbluebuttonbn_get_server_version() { |
514 | 514 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
515 | 515 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
516 | - ); |
|
516 | + ); |
|
517 | 517 | if ($xml && $xml->returncode == 'SUCCESS') { |
518 | 518 | return $xml->version; |
519 | 519 | } |
@@ -581,10 +581,10 @@ discard block |
||
581 | 581 | |
582 | 582 | $options = array(); |
583 | 583 | $options['CURLOPT_HTTPHEADER'] = array( |
584 | - 'Content-Type: '.$contenttype, |
|
585 | - 'Content-Length: '.strlen($data), |
|
586 | - 'Content-Language: en-US', |
|
587 | - ); |
|
584 | + 'Content-Type: '.$contenttype, |
|
585 | + 'Content-Length: '.strlen($data), |
|
586 | + 'Content-Language: en-US', |
|
587 | + ); |
|
588 | 588 | |
589 | 589 | return $c->post($url, $data, $options); |
590 | 590 | } |
@@ -727,16 +727,16 @@ discard block |
||
727 | 727 | 'all' => array( |
728 | 728 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
729 | 729 | 'children' => [] |
730 | - ) |
|
731 | - ); |
|
730 | + ) |
|
731 | + ); |
|
732 | 732 | $data['role'] = array( |
733 | 733 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
734 | 734 | 'children' => bigbluebuttonbn_get_roles_select($context) |
735 | - ); |
|
735 | + ); |
|
736 | 736 | $data['user'] = array( |
737 | 737 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
738 | 738 | 'children' => bigbluebuttonbn_get_users_select($context) |
739 | - ); |
|
739 | + ); |
|
740 | 740 | return $data; |
741 | 741 | } |
742 | 742 | |
@@ -781,9 +781,9 @@ discard block |
||
781 | 781 | continue; |
782 | 782 | } |
783 | 783 | $participantlistarray[] = array( |
784 | - 'selectiontype' => 'role', |
|
785 | - 'selectionid' => $moderatordefault, |
|
786 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
784 | + 'selectiontype' => 'role', |
|
785 | + 'selectionid' => $moderatordefault, |
|
786 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
787 | 787 | } |
788 | 788 | return $participantlistarray; |
789 | 789 | } |
@@ -826,11 +826,11 @@ discard block |
||
826 | 826 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
827 | 827 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
828 | 828 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
829 | - ], |
|
829 | + ], |
|
830 | 830 | 'type_selected' => 'all', |
831 | 831 | 'options' => ['all' => '---------------'], |
832 | 832 | 'selected' => 'all', |
833 | - ]; |
|
833 | + ]; |
|
834 | 834 | } |
835 | 835 | |
836 | 836 | /** |
@@ -1107,7 +1107,7 @@ discard block |
||
1107 | 1107 | $eventproperties['other'] = $options['other']; |
1108 | 1108 | } |
1109 | 1109 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
1110 | - array($eventproperties)); |
|
1110 | + array($eventproperties)); |
|
1111 | 1111 | $event->trigger(); |
1112 | 1112 | } |
1113 | 1113 | |
@@ -1151,7 +1151,7 @@ discard block |
||
1151 | 1151 | // Ping again and refresh the cache. |
1152 | 1152 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
1153 | 1153 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1154 | - ); |
|
1154 | + ); |
|
1155 | 1155 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
1156 | 1156 | return $meetinginfo; |
1157 | 1157 | } |
@@ -1521,8 +1521,8 @@ discard block |
||
1521 | 1521 | } |
1522 | 1522 | $id = 'playbacks-'.$recording['recordID']; |
1523 | 1523 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1524 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1525 | - 'title' => $title, $visibility => $visibility)); |
|
1524 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1525 | + 'title' => $title, $visibility => $visibility)); |
|
1526 | 1526 | foreach ($recording['playbacks'] as $playback) { |
1527 | 1527 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
1528 | 1528 | } |
@@ -1547,7 +1547,7 @@ discard block |
||
1547 | 1547 | $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
1548 | 1548 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
1549 | 1549 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1550 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1550 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1551 | 1551 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1552 | 1552 | $href .= '&href='.urlencode(trim($playback['url'])); |
1553 | 1553 | } |
@@ -1559,7 +1559,7 @@ discard block |
||
1559 | 1559 | 'data-target' => $playback['type'], |
1560 | 1560 | 'data-href' => $href, |
1561 | 1561 | 'class' => 'btn btn-sm btn-default' |
1562 | - ); |
|
1562 | + ); |
|
1563 | 1563 | return $OUTPUT->action_link('#', $title, null, $linkattributes) . ' '; |
1564 | 1564 | } |
1565 | 1565 | |
@@ -1673,10 +1673,10 @@ discard block |
||
1673 | 1673 | 'id' => $id, |
1674 | 1674 | 'onclick' => $onclick, |
1675 | 1675 | 'data-action' => $data['action'] |
1676 | - ); |
|
1676 | + ); |
|
1677 | 1677 | if (!isset($recording['imported'])) { |
1678 | 1678 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
1679 | - $recording['recordID']); |
|
1679 | + $recording['recordID']); |
|
1680 | 1680 | } |
1681 | 1681 | if (isset($data['disabled'])) { |
1682 | 1682 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2214,8 +2214,8 @@ discard block |
||
2214 | 2214 | $activitytime = ''; |
2215 | 2215 | if ($time) { |
2216 | 2216 | $activitytime = calendar_day_representation($time).' '. |
2217 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2218 | - calendar_time_representation($time); |
|
2217 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2218 | + calendar_time_representation($time); |
|
2219 | 2219 | } |
2220 | 2220 | return $activitytime; |
2221 | 2221 | } |
@@ -2515,7 +2515,7 @@ discard block |
||
2515 | 2515 | $renderer->render_group_element('participant_moderator_default', |
2516 | 2516 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
2517 | 2517 | array_keys($owner), array_merge($owner, $roles)) |
2518 | - ); |
|
2518 | + ); |
|
2519 | 2519 | } |
2520 | 2520 | } |
2521 | 2521 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | global $CFG; |
30 | 30 | |
31 | -require_once(dirname(__FILE__).'/lib.php'); |
|
31 | +require_once(dirname(__FILE__) . '/lib.php'); |
|
32 | 32 | |
33 | 33 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
34 | 34 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | if (isset($meta)) { |
101 | 101 | $log->meta = $meta; |
102 | 102 | } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) { |
103 | - $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
103 | + $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
104 | 104 | } |
105 | 105 | $DB->insert_record('bigbluebuttonbn_logs', $log); |
106 | 106 | } |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | $data = null; |
149 | 149 | if (!is_null($pname) && !is_null($purl)) { |
150 | 150 | $method = 'POST'; |
151 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
152 | - $purl."' /></module></modules>"; |
|
151 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
152 | + $purl . "' /></module></modules>"; |
|
153 | 153 | } |
154 | 154 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
155 | 155 | if ($xml) { |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | // Override imported flag with actual ID. |
311 | 311 | $recording['imported'] = $recordimported->id; |
312 | 312 | if (isset($recordimported->protected)) { |
313 | - $recording['protected'] = (string) $recordimported->protected; |
|
313 | + $recording['protected'] = (string)$recordimported->protected; |
|
314 | 314 | } |
315 | 315 | $recordsimportedarray[$recording['recordID']] = $recording; |
316 | 316 | } |
@@ -340,21 +340,21 @@ discard block |
||
340 | 340 | // Add formats. |
341 | 341 | $playbackarray = array(); |
342 | 342 | foreach ($recording->playback->format as $format) { |
343 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
344 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
343 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
344 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
345 | 345 | // Add preview per format when existing. |
346 | 346 | if ($format->preview) { |
347 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
347 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
348 | 348 | } |
349 | 349 | } |
350 | 350 | // Add the metadata to the recordings array. |
351 | 351 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
352 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
353 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
354 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
355 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
352 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
353 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
354 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
355 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
356 | 356 | if (isset($recording->protected)) { |
357 | - $recordingarray['protected'] = (string) $recording->protected; |
|
357 | + $recordingarray['protected'] = (string)$recording->protected; |
|
358 | 358 | } |
359 | 359 | return $recordingarray + $metadataarray; |
360 | 360 | } |
@@ -369,9 +369,9 @@ discard block |
||
369 | 369 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
370 | 370 | $imagesarray = array(); |
371 | 371 | foreach ($preview->images->image as $image) { |
372 | - $imagearray = array('url' => trim((string) $image)); |
|
372 | + $imagearray = array('url' => trim((string)$image)); |
|
373 | 373 | foreach ($image->attributes() as $attkey => $attvalue) { |
374 | - $imagearray[$attkey] = (string) $attvalue; |
|
374 | + $imagearray[$attkey] = (string)$attvalue; |
|
375 | 375 | } |
376 | 376 | array_push($imagesarray, $imagearray); |
377 | 377 | } |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | if (is_object($value)) { |
392 | 392 | $value = ''; |
393 | 393 | } |
394 | - $metadataarray['meta_'.$key] = $value; |
|
394 | + $metadataarray['meta_' . $key] = $value; |
|
395 | 395 | } |
396 | 396 | return $metadataarray; |
397 | 397 | } |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | $ids = explode(',', $recordids); |
464 | 464 | foreach ($ids as $id) { |
465 | 465 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
466 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
466 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
467 | 467 | ); |
468 | 468 | if ($xml && $xml->returncode != 'SUCCESS') { |
469 | 469 | return false; |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | return $xml; |
544 | 544 | } catch (Exception $e) { |
545 | 545 | libxml_use_internal_errors($previous); |
546 | - $error = 'Caught exception: '.$e->getMessage(); |
|
546 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
547 | 547 | debugging($error, DEBUG_DEVELOPER); |
548 | 548 | return null; |
549 | 549 | } |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
555 | 555 | return $response; |
556 | 556 | } catch (Exception $e) { |
557 | - $error = 'Caught exception: '.$e->getMessage(); |
|
557 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
558 | 558 | debugging($error, DEBUG_DEVELOPER); |
559 | 559 | libxml_use_internal_errors($previous); |
560 | 560 | return null; |
@@ -581,8 +581,8 @@ discard block |
||
581 | 581 | |
582 | 582 | $options = array(); |
583 | 583 | $options['CURLOPT_HTTPHEADER'] = array( |
584 | - 'Content-Type: '.$contenttype, |
|
585 | - 'Content-Length: '.strlen($data), |
|
584 | + 'Content-Type: ' . $contenttype, |
|
585 | + 'Content-Length: ' . strlen($data), |
|
586 | 586 | 'Content-Language: en-US', |
587 | 587 | ); |
588 | 588 | |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | * @return void |
600 | 600 | */ |
601 | 601 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
602 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
602 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
603 | 603 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
604 | 604 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
605 | 605 | } |
@@ -619,9 +619,9 @@ discard block |
||
619 | 619 | if ($userroles) { |
620 | 620 | $where = ''; |
621 | 621 | foreach ($userroles as $userrole) { |
622 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
622 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
623 | 623 | } |
624 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
624 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
625 | 625 | } |
626 | 626 | return $userroles; |
627 | 627 | } |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | * @return array $users |
645 | 645 | */ |
646 | 646 | function bigbluebuttonbn_get_users(context $context = null) { |
647 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
647 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
648 | 648 | foreach ($users as $key => $value) { |
649 | 649 | $users[$key] = fullname($value); |
650 | 650 | } |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | * @return array $users |
660 | 660 | */ |
661 | 661 | function bigbluebuttonbn_get_users_select(context $context = null) { |
662 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
662 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
663 | 663 | foreach ($users as $key => $value) { |
664 | 664 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
665 | 665 | } |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | * @return array $roles |
675 | 675 | */ |
676 | 676 | function bigbluebuttonbn_get_roles(context $context = null) { |
677 | - $roles = (array) role_get_names($context); |
|
677 | + $roles = (array)role_get_names($context); |
|
678 | 678 | foreach ($roles as $key => $value) { |
679 | 679 | $roles[$key] = $value->localname; |
680 | 680 | } |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | * @return array $users |
690 | 690 | */ |
691 | 691 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
692 | - $roles = (array) role_get_names($context); |
|
692 | + $roles = (array)role_get_names($context); |
|
693 | 693 | foreach ($roles as $key => $value) { |
694 | 694 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
695 | 695 | } |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | * @return object $role |
705 | 705 | */ |
706 | 706 | function bigbluebuttonbn_get_role($id) { |
707 | - $roles = (array) role_get_names(); |
|
707 | + $roles = (array)role_get_names(); |
|
708 | 708 | if (is_numeric($id)) { |
709 | 709 | return (object)$roles[$id]; |
710 | 710 | } |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | if (empty($userroles)) { |
860 | 860 | $userroles = get_user_roles($context, $userid, true); |
861 | 861 | } |
862 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
862 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
863 | 863 | } |
864 | 864 | |
865 | 865 | /** |
@@ -1010,7 +1010,7 @@ discard block |
||
1010 | 1010 | function bigbluebuttonbn_generate_nonce() { |
1011 | 1011 | $mt = microtime(); |
1012 | 1012 | $rand = mt_rand(); |
1013 | - return md5($mt.$rand); |
|
1013 | + return md5($mt . $rand); |
|
1014 | 1014 | } |
1015 | 1015 | |
1016 | 1016 | /** |
@@ -1036,21 +1036,21 @@ discard block |
||
1036 | 1036 | */ |
1037 | 1037 | function bigbluebuttonbn_events() { |
1038 | 1038 | return array( |
1039 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1040 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1041 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1042 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1043 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1044 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1045 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1046 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1047 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1048 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1049 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1050 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1051 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1052 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1053 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1039 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1040 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1041 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1042 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1043 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1044 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1045 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1046 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1047 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1048 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1049 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1050 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1051 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1052 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1053 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1054 | 1054 | ); |
1055 | 1055 | } |
1056 | 1056 | |
@@ -1061,21 +1061,21 @@ discard block |
||
1061 | 1061 | */ |
1062 | 1062 | function bigbluebuttonbn_events_action() { |
1063 | 1063 | return array( |
1064 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1065 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1066 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1067 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1068 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1069 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1070 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1071 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1072 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1073 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1074 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1075 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1076 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1077 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1078 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1064 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1065 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1066 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1067 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1068 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1069 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1070 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1071 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1072 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1073 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1074 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1075 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1076 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1077 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1078 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1079 | 1079 | ); |
1080 | 1080 | } |
1081 | 1081 | |
@@ -1106,7 +1106,7 @@ discard block |
||
1106 | 1106 | if (array_key_exists('other', $options)) { |
1107 | 1107 | $eventproperties['other'] = $options['other']; |
1108 | 1108 | } |
1109 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
1109 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
1110 | 1110 | array($eventproperties)); |
1111 | 1111 | $event->trigger(); |
1112 | 1112 | } |
@@ -1146,10 +1146,10 @@ discard block |
||
1146 | 1146 | $now = time(); |
1147 | 1147 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
1148 | 1148 | // Use the value in the cache. |
1149 | - return (array) json_decode($result['meeting_info']); |
|
1149 | + return (array)json_decode($result['meeting_info']); |
|
1150 | 1150 | } |
1151 | 1151 | // Ping again and refresh the cache. |
1152 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1152 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1153 | 1153 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1154 | 1154 | ); |
1155 | 1155 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1244,7 +1244,7 @@ discard block |
||
1244 | 1244 | * @return object |
1245 | 1245 | */ |
1246 | 1246 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1247 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
1247 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
1248 | 1248 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
1249 | 1249 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
1250 | 1250 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1260,8 +1260,8 @@ discard block |
||
1260 | 1260 | * @return string |
1261 | 1261 | */ |
1262 | 1262 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
1263 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
1264 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1263 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
1264 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1265 | 1265 | return $configxmlparams; |
1266 | 1266 | } |
1267 | 1267 | |
@@ -1275,7 +1275,7 @@ discard block |
||
1275 | 1275 | */ |
1276 | 1276 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1277 | 1277 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
1278 | - $configxmlarray = (array) $configxml; |
|
1278 | + $configxmlarray = (array)$configxml; |
|
1279 | 1279 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1280 | 1280 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1281 | 1281 | return ''; |
@@ -1367,7 +1367,7 @@ discard block |
||
1367 | 1367 | global $USER; |
1368 | 1368 | $starttime = $starttime - ($starttime % 1000); |
1369 | 1369 | // Set formatted date. |
1370 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
1370 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
1371 | 1371 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
1372 | 1372 | } |
1373 | 1373 | |
@@ -1483,7 +1483,7 @@ discard block |
||
1483 | 1483 | $visibility = 'hidden '; |
1484 | 1484 | } |
1485 | 1485 | $recordingpreview = html_writer::start_tag('div', |
1486 | - array('id' => 'preview-'.$recording['recordID'], $visibility => $visibility)); |
|
1486 | + array('id' => 'preview-' . $recording['recordID'], $visibility => $visibility)); |
|
1487 | 1487 | foreach ($recording['playbacks'] as $playback) { |
1488 | 1488 | if (isset($playback['preview'])) { |
1489 | 1489 | foreach ($playback['preview'] as $image) { |
@@ -1519,7 +1519,7 @@ discard block |
||
1519 | 1519 | if ($recording['published'] === 'false') { |
1520 | 1520 | $visibility = 'hidden '; |
1521 | 1521 | } |
1522 | - $id = 'playbacks-'.$recording['recordID']; |
|
1522 | + $id = 'playbacks-' . $recording['recordID']; |
|
1523 | 1523 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1524 | 1524 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
1525 | 1525 | 'title' => $title, $visibility => $visibility)); |
@@ -1544,12 +1544,12 @@ discard block |
||
1544 | 1544 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
1545 | 1545 | return ''; |
1546 | 1546 | } |
1547 | - $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
1547 | + $title = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
1548 | 1548 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
1549 | 1549 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1550 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1550 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1551 | 1551 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1552 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
1552 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
1553 | 1553 | } |
1554 | 1554 | $id = 'recording-play-' . $playback['type'] . '-' . $recording['recordID']; |
1555 | 1555 | $linkattributes = array( |
@@ -1683,7 +1683,7 @@ discard block |
||
1683 | 1683 | $linkattributes['class'] = 'disabled'; |
1684 | 1684 | unset($linkattributes['onclick']); |
1685 | 1685 | } |
1686 | - $icon = new pix_icon('i/'.$data['tag'], |
|
1686 | + $icon = new pix_icon('i/' . $data['tag'], |
|
1687 | 1687 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
1688 | 1688 | 'moodle', $iconattributes); |
1689 | 1689 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1800,7 +1800,7 @@ discard block |
||
1800 | 1800 | */ |
1801 | 1801 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
1802 | 1802 | $row = new html_table_row(); |
1803 | - $row->id = 'recording-td-'.$recording['recordID']; |
|
1803 | + $row->id = 'recording-td-' . $recording['recordID']; |
|
1804 | 1804 | $row->attributes['data-imported'] = 'false'; |
1805 | 1805 | $texthead = ''; |
1806 | 1806 | $texttail = ''; |
@@ -1859,9 +1859,9 @@ discard block |
||
1859 | 1859 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
1860 | 1860 | $sender = get_admin(); |
1861 | 1861 | // Prepare message. |
1862 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
1863 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
1864 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
1862 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
1863 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
1864 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
1865 | 1865 | $context = context_course::instance($bigbluebuttonbn->course); |
1866 | 1866 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
1867 | 1867 | } |
@@ -2081,7 +2081,7 @@ discard block |
||
2081 | 2081 | } |
2082 | 2082 | // Prepare select for loading records based on existent bigbluebuttonbns. |
2083 | 2083 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
2084 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
2084 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
2085 | 2085 | // Include only Create events and exclude those with record not true. |
2086 | 2086 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
2087 | 2087 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2213,8 +2213,8 @@ discard block |
||
2213 | 2213 | function bigbluebuttonbn_format_activity_time($time) { |
2214 | 2214 | $activitytime = ''; |
2215 | 2215 | if ($time) { |
2216 | - $activitytime = calendar_day_representation($time).' '. |
|
2217 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2216 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
2217 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
2218 | 2218 | calendar_time_representation($time); |
2219 | 2219 | } |
2220 | 2220 | return $activitytime; |