@@ -52,7 +52,7 @@ |
||
52 | 52 | $params .= '&' . $key . '=' . urlencode($value); |
53 | 53 | } |
54 | 54 | foreach ($metadata as $key => $value) { |
55 | - $params .= '&' . 'meta_' . $key.'=' . urlencode($value); |
|
55 | + $params .= '&' . 'meta_' . $key . '=' . urlencode($value); |
|
56 | 56 | } |
57 | 57 | return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret()); |
58 | 58 | } |
@@ -437,26 +437,26 @@ discard block |
||
437 | 437 | return array( |
438 | 438 | 'status' => false, |
439 | 439 | 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn') |
440 | - ); |
|
440 | + ); |
|
441 | 441 | } |
442 | 442 | if ($realrecordings[$params['id']]['published'] !== 'true') { |
443 | 443 | return array( |
444 | 444 | 'status' => false, |
445 | 445 | 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn') |
446 | - ); |
|
446 | + ); |
|
447 | 447 | } |
448 | 448 | return array( |
449 | 449 | 'status' => bigbluebuttonbn_publish_recording_imported( |
450 | 450 | $recordings[$params['id']]['imported'], true |
451 | 451 | ) |
452 | - ); |
|
452 | + ); |
|
453 | 453 | } |
454 | 454 | // As the recordingid was not identified as imported recording link, execute actual publish. |
455 | 455 | return array( |
456 | 456 | 'status' => bigbluebuttonbn_publish_recordings( |
457 | 457 | $params['id'], 'true' |
458 | 458 | ) |
459 | - ); |
|
459 | + ); |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | /** |
@@ -477,26 +477,26 @@ discard block |
||
477 | 477 | return array( |
478 | 478 | 'status' => false, |
479 | 479 | 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn') |
480 | - ); |
|
480 | + ); |
|
481 | 481 | } |
482 | 482 | if ($realrecordings[$params['id']]['protected'] === 'true') { |
483 | 483 | return array( |
484 | 484 | 'status' => false, |
485 | 485 | 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn') |
486 | - ); |
|
486 | + ); |
|
487 | 487 | } |
488 | 488 | return array( |
489 | 489 | 'status' => bigbluebuttonbn_protect_recording_imported( |
490 | 490 | $recordings[$params['id']]['imported'], false |
491 | 491 | ) |
492 | - ); |
|
492 | + ); |
|
493 | 493 | } |
494 | 494 | // As the recordingid was not identified as imported recording link, execute actual uprotect. |
495 | 495 | return array( |
496 | 496 | 'status' => bigbluebuttonbn_update_recordings( |
497 | 497 | $params['id'], array('protect' => 'false') |
498 | 498 | ) |
499 | - ); |
|
499 | + ); |
|
500 | 500 | } |
501 | 501 | |
502 | 502 | /** |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | 'status' => bigbluebuttonbn_publish_recording_imported( |
516 | 516 | $recordings[$params['id']]['imported'], false |
517 | 517 | ) |
518 | - ); |
|
518 | + ); |
|
519 | 519 | } |
520 | 520 | // As the recordingid was not identified as imported recording link, execute unpublish on a real recording. |
521 | 521 | // First: Unpublish imported links associated to the recording. |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | 'status' => bigbluebuttonbn_publish_recordings( |
534 | 534 | $params['id'], 'false' |
535 | 535 | ) |
536 | - ); |
|
536 | + ); |
|
537 | 537 | } |
538 | 538 | |
539 | 539 | /** |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | 'status' => bigbluebuttonbn_protect_recording_imported( |
553 | 553 | $recordings[$params['id']]['imported'], true |
554 | 554 | ) |
555 | - ); |
|
555 | + ); |
|
556 | 556 | } |
557 | 557 | // As the recordingid was not identified as imported recording link, execute protect on a real recording. |
558 | 558 | // First: Protect imported links associated to the recording. |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | 'status' => bigbluebuttonbn_update_recordings( |
571 | 571 | $params['id'], array('protect' => 'true') |
572 | 572 | ) |
573 | - ); |
|
573 | + ); |
|
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | 'status' => bigbluebuttonbn_delete_recording_imported( |
590 | 590 | $recordings[$params['id']]['imported'] |
591 | 591 | ) |
592 | - ); |
|
592 | + ); |
|
593 | 593 | } |
594 | 594 | // As the recordingid was not identified as imported recording link, execute delete on a real recording. |
595 | 595 | // First: Delete imported links associated to the recording. |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | // Second: Execute the actual delete. |
604 | 604 | return array( |
605 | 605 | 'status' => bigbluebuttonbn_delete_recordings($params['id']) |
606 | - ); |
|
606 | + ); |
|
607 | 607 | } |
608 | 608 | |
609 | 609 | /** |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | 'status' => bigbluebuttonbn_update_recording_imported( |
622 | 622 | $recordings[$params['id']]['imported'], json_decode($params['meta'], true) |
623 | 623 | ) |
624 | - ); |
|
624 | + ); |
|
625 | 625 | } |
626 | 626 | |
627 | 627 | // As the recordingid was not identified as imported recording link, execute update on a real recording. |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | 'status' => bigbluebuttonbn_update_recordings( |
632 | 632 | $params['id'], json_decode($params['meta']) |
633 | 633 | ) |
634 | - ); |
|
634 | + ); |
|
635 | 635 | } |
636 | 636 | |
637 | 637 | /** |
@@ -802,10 +802,10 @@ discard block |
||
802 | 802 | $params['recording_import'] = ['id' => 'The recordingID must be specified.']; |
803 | 803 | $params['recording_ready'] = [ |
804 | 804 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
805 | - ]; |
|
805 | + ]; |
|
806 | 806 | $params['live_session_events'] = [ |
807 | 807 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
808 | - ]; |
|
808 | + ]; |
|
809 | 809 | return $params; |
810 | 810 | } |
811 | 811 |
@@ -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 | use \Firebase\JWT\JWT; |
30 | 30 | |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | require_login(0, false); |
43 | 43 | |
44 | 44 | if (empty($params['action'])) { |
45 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
45 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
46 | 46 | return; |
47 | 47 | } |
48 | 48 | |
49 | 49 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
50 | 50 | if (!empty($error)) { |
51 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
51 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
52 | 52 | return; |
53 | 53 | } |
54 | 54 | |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn); |
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 | |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | function bigbluebuttonbn_broker_recording_info_current($recording, $params) { |
322 | 322 | $callbackresponse['status'] = true; |
323 | 323 | $callbackresponse['found'] = true; |
324 | - $callbackresponse['published'] = (string) $recording['published']; |
|
324 | + $callbackresponse['published'] = (string)$recording['published']; |
|
325 | 325 | if (!isset($params['meta']) || empty($params['meta'])) { |
326 | 326 | return $callbackresponse; |
327 | 327 | } |
@@ -648,8 +648,8 @@ discard block |
||
648 | 648 | $decodedparameters = JWT::decode($params['signed_parameters'], |
649 | 649 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
650 | 650 | } catch (Exception $e) { |
651 | - $error = 'Caught exception: '.$e->getMessage(); |
|
652 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
651 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
652 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
653 | 653 | return; |
654 | 654 | } |
655 | 655 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -674,12 +674,12 @@ discard block |
||
674 | 674 | bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn); |
675 | 675 | } |
676 | 676 | $overrides = array('meetingid' => $decodedparameters->meeting_id); |
677 | - $meta = '{"recordid":'.$decodedparameters->record_id.'}'; |
|
677 | + $meta = '{"recordid":' . $decodedparameters->record_id . '}'; |
|
678 | 678 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, $meta); |
679 | 679 | header('HTTP/1.0 202 Accepted'); |
680 | 680 | } catch (Exception $e) { |
681 | - $error = 'Caught exception: '.$e->getMessage(); |
|
682 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
681 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
682 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
683 | 683 | } |
684 | 684 | } |
685 | 685 | |
@@ -700,13 +700,13 @@ discard block |
||
700 | 700 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
701 | 701 | if (!isset($importrecordings[$params['id']])) { |
702 | 702 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
703 | - header('HTTP/1.0 404 Not found. '.$error); |
|
703 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
704 | 704 | return; |
705 | 705 | } |
706 | 706 | $callbackresponse = array('status' => true); |
707 | 707 | $importrecordings[$params['id']]['imported'] = true; |
708 | 708 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
709 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
709 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
710 | 710 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
711 | 711 | // Moodle event logger: Create an event for recording imported. |
712 | 712 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -731,8 +731,8 @@ discard block |
||
731 | 731 | $decodedparameters = JWT::decode($params['signed_parameters'], |
732 | 732 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
733 | 733 | } catch (Exception $e) { |
734 | - $error = 'Caught exception: '.$e->getMessage(); |
|
735 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
734 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
735 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
736 | 736 | return; |
737 | 737 | } |
738 | 738 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -773,7 +773,7 @@ discard block |
||
773 | 773 | } |
774 | 774 | $action = strtolower($params['action']); |
775 | 775 | if (!array_key_exists($action, $requiredparams)) { |
776 | - return 'Action '.$params['action'].' can not be performed.'; |
|
776 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
777 | 777 | } |
778 | 778 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
779 | 779 | } |
@@ -205,7 +205,7 @@ |
||
205 | 205 | !isset($CFG->bigbluebuttonbn['recordings_imported_editable']) || |
206 | 206 | !isset($CFG->bigbluebuttonbn['recordings_preview_default']) || |
207 | 207 | !isset($CFG->bigbluebuttonbn['recordings_preview_editable']) |
208 | - ); |
|
208 | + ); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -28,7 +28,7 @@ |
||
28 | 28 | defined('MOODLE_INTERNAL') || die(); |
29 | 29 | |
30 | 30 | require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
31 | -require_once($CFG->libdir.'/adminlib.php'); |
|
31 | +require_once($CFG->libdir . '/adminlib.php'); |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Helper class for validating settings used HTML for settings.php. |
@@ -80,7 +80,7 @@ |
||
80 | 80 | 'objectid' => $this->objectid, |
81 | 81 | 'contextinstanceid' => $this->contextinstanceid, |
82 | 82 | 'other' => $this->other |
83 | - ); |
|
83 | + ); |
|
84 | 84 | $string = $this->description; |
85 | 85 | foreach ($vars as $key => $value) { |
86 | 86 | $string = str_replace("##" . $key, $value, $string); |
@@ -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. |
@@ -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 | $a = optional_param('a', 0, PARAM_INT); |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | if ($moderator || $administrator) { |
90 | 90 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_end'], $bigbluebuttonbn); |
91 | 91 | echo get_string('index_ending', 'bigbluebuttonbn'); |
92 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
92 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
93 | 93 | if ($g != '0') { |
94 | - $meetingid .= '['.$g.']'; |
|
94 | + $meetingid .= '[' . $g . ']'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
98 | - redirect('index.php?id='.$id); |
|
98 | + redirect('index.php?id=' . $id); |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | // Add a the data for the bigbluebuttonbn instance. |
111 | 111 | $groupobj = null; |
112 | 112 | if (groups_get_activity_groupmode($cm) > 0) { |
113 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
113 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
114 | 114 | } |
115 | 115 | $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
116 | 116 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -136,12 +136,12 @@ discard block |
||
136 | 136 | * @return array |
137 | 137 | */ |
138 | 138 | function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
139 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
139 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
140 | 140 | $paramgroup = ''; |
141 | 141 | $groupname = ''; |
142 | 142 | if ($groupobj) { |
143 | - $meetingid .= '['.$groupobj->id.']'; |
|
144 | - $paramgroup = '&group='.$groupobj->id; |
|
143 | + $meetingid .= '[' . $groupobj->id . ']'; |
|
144 | + $paramgroup = '&group=' . $groupobj->id; |
|
145 | 145 | $groupname = $groupobj->name; |
146 | 146 | } |
147 | 147 | $meetinginfo = bigbluebuttonbn_get_meeting_info_array($meetingid); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | return; |
157 | 157 | } |
158 | 158 | // Output Users in the meeting. |
159 | - $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>'; |
|
159 | + $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>'; |
|
160 | 160 | $group = $groupname; |
161 | 161 | $users = ''; |
162 | 162 | $viewerlist = ''; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $attendeecount = 0; |
202 | 202 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
203 | 203 | if ($attendee->role == $role) { |
204 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
204 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | } |
@@ -235,17 +235,17 @@ discard block |
||
235 | 235 | function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
236 | 236 | $actions = ''; |
237 | 237 | if ($moderator) { |
238 | - $actions .= '<form name="form1" method="post" action="">'."\n"; |
|
239 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
240 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
238 | + $actions .= '<form name="form1" method="post" action="">' . "\n"; |
|
239 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
240 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
241 | 241 | if ($groupobj != null) { |
242 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
242 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
243 | 243 | } |
244 | 244 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
245 | 245 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
246 | 246 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
247 | 247 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
248 | - $actions .= '</form>'."\n"; |
|
248 | + $actions .= '</form>' . "\n"; |
|
249 | 249 | } |
250 | 250 | return $actions; |
251 | 251 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * Remove this block when restored |
62 | 62 | */ |
63 | 63 | |
64 | - /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
64 | + /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
65 | 65 | const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/'; |
66 | 66 | /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */ |
67 | 67 | const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6'; |
@@ -339,12 +339,12 @@ discard block |
||
339 | 339 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
340 | 340 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
341 | 341 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
342 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
342 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
343 | 343 | $str .= ' </div>'."\n"; |
344 | 344 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
345 | 345 | '</div>'."\n"; |
346 | 346 | $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
347 | - .'</div>'."\n"; |
|
347 | + .'</div>'."\n"; |
|
348 | 348 | $str .= '</div>'."\n"; |
349 | 349 | return $str; |
350 | 350 | } |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | $bigbluebuttonbn->coursemodule, |
530 | 530 | 'bigbluebuttonbn', |
531 | 531 | $bigbluebuttonbn->id, $bigbluebuttonbn->completionexpected |
532 | - ); |
|
532 | + ); |
|
533 | 533 | } |
534 | 534 | } |
535 | 535 | /** |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * @uses FEATURE_GRADE_OUTCOMES |
103 | 103 | * @uses FEATURE_SHOW_DESCRIPTION |
104 | 104 | * @param string $feature |
105 | - * @return mixed True if yes (some features may use other values) |
|
105 | + * @return null|boolean True if yes (some features may use other values) |
|
106 | 106 | */ |
107 | 107 | function bigbluebuttonbn_supports($feature) { |
108 | 108 | if (!$feature) { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * |
188 | 188 | * @param int $id Id of the module instance |
189 | 189 | * |
190 | - * @return bool Success/Failure |
|
190 | + * @return boolean|null Success/Failure |
|
191 | 191 | */ |
192 | 192 | function bigbluebuttonbn_delete_instance($id) { |
193 | 193 | global $DB; |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * |
215 | 215 | * @param object $bigbluebuttonbn Id of the module instance |
216 | 216 | * |
217 | - * @return bool Success/Failure |
|
217 | + * @return boolean|null Success/Failure |
|
218 | 218 | */ |
219 | 219 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
220 | 220 | global $DB; |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | * @param object $mod |
236 | 236 | * @param object $bigbluebuttonbn |
237 | 237 | * |
238 | - * @return bool |
|
238 | + * @return string |
|
239 | 239 | */ |
240 | 240 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
241 | 241 | global $DB; |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | * @param stdClass $context context object |
593 | 593 | * @param string $filearea file area |
594 | 594 | * |
595 | - * @return false|null false if file not valid |
|
595 | + * @return boolean false if file not valid |
|
596 | 596 | */ |
597 | 597 | function bigbluebuttonbn_pluginfile_valid($context, $filearea) { |
598 | 598 | if ($context->contextlevel != CONTEXT_MODULE) { |
@@ -28,28 +28,28 @@ discard block |
||
28 | 28 | |
29 | 29 | global $CFG; |
30 | 30 | |
31 | -require_once($CFG->dirroot.'/calendar/lib.php'); |
|
32 | -require_once($CFG->dirroot.'/message/lib.php'); |
|
33 | -require_once($CFG->dirroot.'/mod/lti/OAuth.php'); |
|
34 | -require_once($CFG->dirroot.'/tag/lib.php'); |
|
35 | -require_once($CFG->libdir.'/accesslib.php'); |
|
36 | -require_once($CFG->libdir.'/completionlib.php'); |
|
37 | -require_once($CFG->libdir.'/datalib.php'); |
|
38 | -require_once($CFG->libdir.'/enrollib.php'); |
|
39 | -require_once($CFG->libdir.'/filelib.php'); |
|
40 | -require_once($CFG->libdir.'/formslib.php'); |
|
31 | +require_once($CFG->dirroot . '/calendar/lib.php'); |
|
32 | +require_once($CFG->dirroot . '/message/lib.php'); |
|
33 | +require_once($CFG->dirroot . '/mod/lti/OAuth.php'); |
|
34 | +require_once($CFG->dirroot . '/tag/lib.php'); |
|
35 | +require_once($CFG->libdir . '/accesslib.php'); |
|
36 | +require_once($CFG->libdir . '/completionlib.php'); |
|
37 | +require_once($CFG->libdir . '/datalib.php'); |
|
38 | +require_once($CFG->libdir . '/enrollib.php'); |
|
39 | +require_once($CFG->libdir . '/filelib.php'); |
|
40 | +require_once($CFG->libdir . '/formslib.php'); |
|
41 | 41 | |
42 | 42 | |
43 | -if (file_exists(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php')) { |
|
44 | - require_once(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php'); |
|
43 | +if (file_exists(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php')) { |
|
44 | + require_once(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | if (!isset($CFG->bigbluebuttonbn)) { |
48 | 48 | $CFG->bigbluebuttonbn = array(); |
49 | 49 | } |
50 | 50 | |
51 | -if (file_exists(dirname(__FILE__).'/config.php')) { |
|
52 | - require_once(dirname(__FILE__).'/config.php'); |
|
51 | +if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
52 | + require_once(dirname(__FILE__) . '/config.php'); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /* |
@@ -101,18 +101,18 @@ discard block |
||
101 | 101 | return null; |
102 | 102 | } |
103 | 103 | $features = array( |
104 | - (string) FEATURE_IDNUMBER => true, |
|
105 | - (string) FEATURE_GROUPS => true, |
|
106 | - (string) FEATURE_GROUPINGS => true, |
|
107 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
108 | - (string) FEATURE_MOD_INTRO => true, |
|
109 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
110 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
111 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
112 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
113 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
104 | + (string)FEATURE_IDNUMBER => true, |
|
105 | + (string)FEATURE_GROUPS => true, |
|
106 | + (string)FEATURE_GROUPINGS => true, |
|
107 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
108 | + (string)FEATURE_MOD_INTRO => true, |
|
109 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
110 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
111 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
112 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
113 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
114 | 114 | ); |
115 | - if (isset($features[(string) $feature])) { |
|
115 | + if (isset($features[(string)$feature])) { |
|
116 | 116 | return $features[$feature]; |
117 | 117 | } |
118 | 118 | return null; |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
212 | 212 | global $DB; |
213 | 213 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
214 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
214 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
215 | 215 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
216 | 216 | $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; |
217 | 217 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); |
@@ -234,10 +234,10 @@ discard block |
||
234 | 234 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
235 | 235 | global $DB; |
236 | 236 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
237 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), '*'); |
|
237 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), '*'); |
|
238 | 238 | if ($completed > 0) { |
239 | - return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. |
|
240 | - get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. |
|
239 | + return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
|
240 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
241 | 241 | get_string('view_message_times', 'bigbluebuttonbn'); |
242 | 242 | } |
243 | 243 | return ''; |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) { |
258 | 258 | global $DB; |
259 | 259 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
260 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), |
|
260 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), |
|
261 | 261 | '*', IGNORE_MULTIPLE); |
262 | 262 | return $completed > 0; |
263 | 263 | } |
@@ -332,16 +332,16 @@ discard block |
||
332 | 332 | if ($bigbluebuttonbn->visible) { |
333 | 333 | $classes = 'class="dimmed" '; |
334 | 334 | } |
335 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
336 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
337 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
338 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
339 | - $str .= ' </div>'."\n"; |
|
340 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
341 | - '</div>'."\n"; |
|
342 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
343 | - .'</div>'."\n"; |
|
344 | - $str .= '</div>'."\n"; |
|
335 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
336 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
337 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
338 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
339 | + $str .= ' </div>' . "\n"; |
|
340 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
341 | + '</div>' . "\n"; |
|
342 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
343 | + .'</div>' . "\n"; |
|
344 | + $str .= '</div>' . "\n"; |
|
345 | 345 | return $str; |
346 | 346 | } |
347 | 347 | |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | if (count($files) == 1) { |
560 | 560 | // Get the first (and only) file. |
561 | 561 | $file = reset($files); |
562 | - $filesrc = '/'.$file->get_filename(); |
|
562 | + $filesrc = '/' . $file->get_filename(); |
|
563 | 563 | } |
564 | 564 | return $filesrc; |
565 | 565 | } |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | if (!$filename) { |
628 | 628 | return false; |
629 | 629 | } |
630 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
630 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
631 | 631 | $fs = get_file_storage(); |
632 | 632 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
633 | 633 | if (!$file || $file->is_directory()) { |
@@ -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('bn', 0, PARAM_INT); |
@@ -57,19 +57,19 @@ discard block |
||
57 | 57 | if (is_null($serverversion)) { |
58 | 58 | if ($bbbsession['administrator']) { |
59 | 59 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
60 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
60 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
61 | 61 | exit; |
62 | 62 | } |
63 | 63 | if ($bbbsession['moderator']) { |
64 | 64 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
65 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
65 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
66 | 66 | exit; |
67 | 67 | } |
68 | 68 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
69 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
69 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
70 | 70 | exit; |
71 | 71 | } |
72 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
72 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
73 | 73 | |
74 | 74 | // Mark viewed by user (if required). |
75 | 75 | $completion = new completion_info($course); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | // Print the page header. |
79 | 79 | $PAGE->set_context($context); |
80 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
80 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
81 | 81 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
82 | 82 | $PAGE->set_cacheable(false); |
83 | 83 | $PAGE->set_heading($course->fullname); |
@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
88 | 88 | echo $OUTPUT->header(); |
89 | 89 | if (isguestuser()) { |
90 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
91 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
90 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
91 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
92 | 92 | } else { |
93 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', '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_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
95 | 95 | } |
96 | 96 | echo $OUTPUT->footer(); |
97 | 97 | exit; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | // Operation URLs. |
101 | 101 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
102 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
102 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
103 | 103 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
104 | 104 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
105 | 105 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | echo $OUTPUT->footer(); |
120 | 120 | |
121 | 121 | // Shows version as a comment. |
122 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
122 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
123 | 123 | |
124 | 124 | // Initialize session variable used across views. |
125 | 125 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
148 | 148 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
149 | 149 | // Database info related to the activity. |
150 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
150 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
151 | 151 | $bbbsession['bigbluebuttonbn']->id; |
152 | 152 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
153 | 153 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
168 | 168 | } |
169 | 169 | if ($bbbsession['bigbluebuttonbn']->record) { |
170 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
170 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
171 | 171 | } |
172 | 172 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
173 | 173 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $bbbsession['originServerName'] = $parsedurl['host']; |
181 | 181 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
182 | 182 | $bbbsession['originServerCommonName'] = ''; |
183 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
183 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
184 | 184 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
185 | 185 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
186 | 186 | $bbbsession['clienttype'] = \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'); |
@@ -243,8 +243,8 @@ discard block |
||
243 | 243 | $groupname = groups_get_group_name($bbbsession['group']); |
244 | 244 | } |
245 | 245 | // Assign group default values. |
246 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
247 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
246 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
247 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
248 | 248 | if (count($groups) == 0) { |
249 | 249 | // Only the All participants group exists. |
250 | 250 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | if (has_capability('moodle/site:accessallgroups', $context)) { |
255 | 255 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
256 | 256 | } |
257 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
257 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
258 | 258 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
259 | 259 | echo '<br><br>'; |
260 | 260 | } |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
322 | 322 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
323 | 323 | } |
324 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
324 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
325 | 325 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
326 | 326 | } |
327 | 327 | |
@@ -390,12 +390,12 @@ discard block |
||
390 | 390 | // JavaScript variables for room. |
391 | 391 | $openingtime = ''; |
392 | 392 | if ($bbbsession['openingtime']) { |
393 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
393 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
394 | 394 | userdate($bbbsession['openingtime']); |
395 | 395 | } |
396 | 396 | $closingtime = ''; |
397 | 397 | if ($bbbsession['closingtime']) { |
398 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
398 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
399 | 399 | userdate($bbbsession['closingtime']); |
400 | 400 | } |
401 | 401 | $jsvars += array( |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | $output .= $OUTPUT->box_end(); |
413 | 413 | // Action button box. |
414 | 414 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
415 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
415 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
416 | 416 | $output .= $OUTPUT->box_end(); |
417 | 417 | if ($activity == 'ended') { |
418 | 418 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | // If there are meetings with recordings load the data to the table. |
466 | 466 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
467 | 467 | // Render a plain html table. |
468 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
468 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
469 | 469 | } |
470 | 470 | // JavaScript variables for recordings with YUI. |
471 | 471 | $jsvars += array( |
@@ -493,8 +493,8 @@ discard block |
||
493 | 493 | array('type' => 'button', |
494 | 494 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
495 | 495 | 'class' => 'btn btn-secondary', |
496 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
497 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
496 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
497 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
498 | 498 | $output = html_writer::empty_tag('br'); |
499 | 499 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
500 | 500 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -513,10 +513,10 @@ discard block |
||
513 | 513 | if (!is_null($bbbsession['presentation']['url'])) { |
514 | 514 | $attributes = array('title' => $bbbsession['presentation']['name']); |
515 | 515 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
516 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
517 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
516 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
517 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
518 | 518 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
519 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
519 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
520 | 520 | } |
521 | 521 | return ''; |
522 | 522 | } |