@@ -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 @@ discard block |
||
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. |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | !isset($CFG->bigbluebuttonbn['recording_all_from_start_default']) || |
63 | 63 | !isset($CFG->bigbluebuttonbn['recording_all_from_start_editable']) || |
64 | 64 | !isset($CFG->bigbluebuttonbn['recording_hide_button_default']) || |
65 | - !isset($CFG->bigbluebuttonbn['recording_hide_button_editable']) ); |
|
65 | + !isset($CFG->bigbluebuttonbn['recording_hide_button_editable'])); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -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. |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | * Helper function to retrieve imported recordings from the Moodle database. |
263 | 263 | * The references are stored as events in bigbluebuttonbn_logs. |
264 | 264 | * |
265 | - * @param string $courseid |
|
265 | + * @param integer $courseid |
|
266 | 266 | * @param string $bigbluebuttonbnid |
267 | 267 | * @param bool $subset |
268 | 268 | * |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | /** |
291 | 291 | * Helper function to retrive the default config.xml file. |
292 | 292 | * |
293 | - * @return string |
|
293 | + * @return null|SimpleXMLElement |
|
294 | 294 | */ |
295 | 295 | function bigbluebuttonbn_get_default_config_xml() { |
296 | 296 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | * @param object $a |
373 | 373 | * @param object $b |
374 | 374 | * |
375 | - * @return array |
|
375 | + * @return integer |
|
376 | 376 | */ |
377 | 377 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
378 | 378 | if ($a['startTime'] < $b['startTime']) { |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | * @param string $data |
499 | 499 | * @param string $contenttype |
500 | 500 | * |
501 | - * @return object |
|
501 | + * @return null|SimpleXMLElement |
|
502 | 502 | */ |
503 | 503 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
504 | 504 | if (extension_loaded('curl')) { |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | * @param string $data |
540 | 540 | * @param string $contenttype |
541 | 541 | * |
542 | - * @return object |
|
542 | + * @return string |
|
543 | 543 | */ |
544 | 544 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
545 | 545 | $c = new curl(); |
@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | * @param integer $instance |
905 | 905 | * @param integer $voicebridge |
906 | 906 | * |
907 | - * @return string |
|
907 | + * @return boolean |
|
908 | 908 | */ |
909 | 909 | function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) { |
910 | 910 | global $DB; |
@@ -1170,7 +1170,7 @@ discard block |
||
1170 | 1170 | * @param string $meetingid |
1171 | 1171 | * @param string $configxml |
1172 | 1172 | * |
1173 | - * @return object |
|
1173 | + * @return null|SimpleXMLElement |
|
1174 | 1174 | */ |
1175 | 1175 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1176 | 1176 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
@@ -1219,7 +1219,7 @@ discard block |
||
1219 | 1219 | * @param array $recording |
1220 | 1220 | * @param array $tools |
1221 | 1221 | * |
1222 | - * @return array |
|
1222 | + * @return null|stdClass |
|
1223 | 1223 | */ |
1224 | 1224 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
1225 | 1225 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -1723,7 +1723,7 @@ discard block |
||
1723 | 1723 | * |
1724 | 1724 | * @param array $bbbsession |
1725 | 1725 | * @param array $recording |
1726 | - * @param object $rowdata |
|
1726 | + * @param stdClass $rowdata |
|
1727 | 1727 | * |
1728 | 1728 | * @return object |
1729 | 1729 | */ |
@@ -1918,7 +1918,7 @@ discard block |
||
1918 | 1918 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
1919 | 1919 | * in the getRecordings request considering only those that belong to deleted activities. |
1920 | 1920 | * |
1921 | - * @param string $courseid |
|
1921 | + * @param integer $courseid |
|
1922 | 1922 | * @param string $bigbluebuttonbnid |
1923 | 1923 | * @param bool $subset |
1924 | 1924 | * |
@@ -1942,7 +1942,7 @@ discard block |
||
1942 | 1942 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
1943 | 1943 | * in the getRecordings request considering only those that belong to imported recordings. |
1944 | 1944 | * |
1945 | - * @param string $courseid |
|
1945 | + * @param integer $courseid |
|
1946 | 1946 | * @param string $bigbluebuttonbnid |
1947 | 1947 | * @param bool $subset |
1948 | 1948 | * |
@@ -1965,7 +1965,7 @@ discard block |
||
1965 | 1965 | /** |
1966 | 1966 | * Helper function to get recordings and imported recordings together. |
1967 | 1967 | * |
1968 | - * @param string $courseid |
|
1968 | + * @param integer $courseid |
|
1969 | 1969 | * @param string $bigbluebuttonbnid |
1970 | 1970 | * @param bool $subset |
1971 | 1971 | * @param bool $includedeleted |
@@ -1983,7 +1983,7 @@ discard block |
||
1983 | 1983 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
1984 | 1984 | * in bigbluebuttonbn_logs. |
1985 | 1985 | * |
1986 | - * @param string $courseid |
|
1986 | + * @param integer $courseid |
|
1987 | 1987 | * @param string $bigbluebuttonbnid |
1988 | 1988 | * @param bool $subset |
1989 | 1989 | * @param bool $includedeleted |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, |
96 | 96 | $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) { |
97 | 97 | $data = ['meetingID' => $meetingid, |
98 | - 'fullName' => $username, |
|
99 | - 'password' => $pw, |
|
100 | - 'logoutURL' => $logouturl, |
|
98 | + 'fullName' => $username, |
|
99 | + 'password' => $pw, |
|
100 | + 'logoutURL' => $logouturl, |
|
101 | 101 | ]; |
102 | 102 | // Choose between Adobe Flash or HTML5 Client. |
103 | 103 | if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
@@ -153,23 +153,23 @@ discard block |
||
153 | 153 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
154 | 154 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
155 | 155 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
156 | - ); |
|
156 | + ); |
|
157 | 157 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
158 | 158 | // Meeting info was returned. |
159 | 159 | return array('returncode' => $xml->returncode, |
160 | - 'meetingID' => $xml->meetingID, |
|
161 | - 'moderatorPW' => $xml->moderatorPW, |
|
162 | - 'attendeePW' => $xml->attendeePW, |
|
163 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
164 | - 'running' => $xml->running, |
|
165 | - 'recording' => $xml->recording, |
|
166 | - 'startTime' => $xml->startTime, |
|
167 | - 'endTime' => $xml->endTime, |
|
168 | - 'participantCount' => $xml->participantCount, |
|
169 | - 'moderatorCount' => $xml->moderatorCount, |
|
170 | - 'attendees' => $xml->attendees, |
|
171 | - 'metadata' => $xml->metadata, |
|
172 | - ); |
|
160 | + 'meetingID' => $xml->meetingID, |
|
161 | + 'moderatorPW' => $xml->moderatorPW, |
|
162 | + 'attendeePW' => $xml->attendeePW, |
|
163 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
164 | + 'running' => $xml->running, |
|
165 | + 'recording' => $xml->recording, |
|
166 | + 'startTime' => $xml->startTime, |
|
167 | + 'endTime' => $xml->endTime, |
|
168 | + 'participantCount' => $xml->participantCount, |
|
169 | + 'moderatorCount' => $xml->moderatorCount, |
|
170 | + 'attendees' => $xml->attendees, |
|
171 | + 'metadata' => $xml->metadata, |
|
172 | + ); |
|
173 | 173 | } |
174 | 174 | if ($xml) { |
175 | 175 | // Either failure or success without meeting info. |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | function bigbluebuttonbn_get_default_config_xml() { |
306 | 306 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
307 | 307 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
308 | - ); |
|
308 | + ); |
|
309 | 309 | return $xml; |
310 | 310 | } |
311 | 311 | |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | foreach ($ids as $id) { |
407 | 407 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
408 | 408 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
409 | - ); |
|
409 | + ); |
|
410 | 410 | if ($xml && $xml->returncode != 'SUCCESS') { |
411 | 411 | return false; |
412 | 412 | } |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | foreach ($ids as $id) { |
426 | 426 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
427 | 427 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
428 | - ); |
|
428 | + ); |
|
429 | 429 | if ($xml && $xml->returncode != 'SUCCESS') { |
430 | 430 | return false; |
431 | 431 | } |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | foreach ($ids as $id) { |
445 | 445 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
446 | 446 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
447 | - ); |
|
447 | + ); |
|
448 | 448 | if ($xml && $xml->returncode != 'SUCCESS') { |
449 | 449 | return false; |
450 | 450 | } |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
462 | 462 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
463 | 463 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
464 | - ); |
|
464 | + ); |
|
465 | 465 | if ($xml) { |
466 | 466 | // If the xml packet returned failure it displays the message to the user. |
467 | 467 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | function bigbluebuttonbn_get_server_version() { |
479 | 479 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
480 | 480 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
481 | - ); |
|
481 | + ); |
|
482 | 482 | if ($xml && $xml->returncode == 'SUCCESS') { |
483 | 483 | return $xml->version; |
484 | 484 | } |
@@ -545,10 +545,10 @@ discard block |
||
545 | 545 | } |
546 | 546 | $options = array(); |
547 | 547 | $options['CURLOPT_HTTPHEADER'] = array( |
548 | - 'Content-Type: '.$contenttype, |
|
549 | - 'Content-Length: '.strlen($data), |
|
550 | - 'Content-Language: en-US', |
|
551 | - ); |
|
548 | + 'Content-Type: '.$contenttype, |
|
549 | + 'Content-Length: '.strlen($data), |
|
550 | + 'Content-Language: en-US', |
|
551 | + ); |
|
552 | 552 | |
553 | 553 | return $c->post($url, $data, $options); |
554 | 554 | } |
@@ -695,16 +695,16 @@ discard block |
||
695 | 695 | 'all' => array( |
696 | 696 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
697 | 697 | 'children' => [] |
698 | - ) |
|
699 | - ); |
|
698 | + ) |
|
699 | + ); |
|
700 | 700 | $data['role'] = array( |
701 | 701 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
702 | 702 | 'children' => bigbluebuttonbn_get_roles_select($context) |
703 | - ); |
|
703 | + ); |
|
704 | 704 | $data['user'] = array( |
705 | 705 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
706 | 706 | 'children' => bigbluebuttonbn_get_users_select($context) |
707 | - ); |
|
707 | + ); |
|
708 | 708 | return $data; |
709 | 709 | } |
710 | 710 | |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | 'selectiontype' => 'all', |
748 | 748 | 'selectionid' => 'all', |
749 | 749 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER |
750 | - ); |
|
750 | + ); |
|
751 | 751 | $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); |
752 | 752 | foreach ($defaultrules as $defaultrule) { |
753 | 753 | if ($defaultrule == '0') { |
@@ -760,9 +760,9 @@ discard block |
||
760 | 760 | continue; |
761 | 761 | } |
762 | 762 | $participantlist[] = array( |
763 | - 'selectiontype' => 'role', |
|
764 | - 'selectionid' => $defaultrule, |
|
765 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
763 | + 'selectiontype' => 'role', |
|
764 | + 'selectionid' => $defaultrule, |
|
765 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
766 | 766 | } |
767 | 767 | return $participantlist; |
768 | 768 | } |
@@ -801,11 +801,11 @@ discard block |
||
801 | 801 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
802 | 802 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
803 | 803 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
804 | - ], |
|
804 | + ], |
|
805 | 805 | 'type_selected' => 'all', |
806 | 806 | 'options' => ['all' => '---------------'], |
807 | 807 | 'selected' => 'all', |
808 | - ]; |
|
808 | + ]; |
|
809 | 809 | } |
810 | 810 | |
811 | 811 | /** |
@@ -1080,7 +1080,7 @@ discard block |
||
1080 | 1080 | // Ping again and refresh the cache. |
1081 | 1081 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
1082 | 1082 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1083 | - ); |
|
1083 | + ); |
|
1084 | 1084 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
1085 | 1085 | return $meetinginfo; |
1086 | 1086 | } |
@@ -1492,8 +1492,8 @@ discard block |
||
1492 | 1492 | } |
1493 | 1493 | $id = 'playbacks-'.$recording['recordID']; |
1494 | 1494 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1495 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1496 | - 'title' => $title, $visibility => $visibility)); |
|
1495 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1496 | + 'title' => $title, $visibility => $visibility)); |
|
1497 | 1497 | foreach ($recording['playbacks'] as $playback) { |
1498 | 1498 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
1499 | 1499 | } |
@@ -1517,7 +1517,7 @@ discard block |
||
1517 | 1517 | } |
1518 | 1518 | $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
1519 | 1519 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1520 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1520 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1521 | 1521 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1522 | 1522 | $href .= '&href='.urlencode(trim($playback['url'])); |
1523 | 1523 | } |
@@ -1528,7 +1528,7 @@ discard block |
||
1528 | 1528 | 'data-action' => 'play', |
1529 | 1529 | 'data-target' => $playback['type'], |
1530 | 1530 | 'data-href' => $href, |
1531 | - ); |
|
1531 | + ); |
|
1532 | 1532 | if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
1533 | 1533 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
1534 | 1534 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -1678,10 +1678,10 @@ discard block |
||
1678 | 1678 | 'id' => $id, |
1679 | 1679 | 'onclick' => $onclick, |
1680 | 1680 | 'data-action' => $data['action'] |
1681 | - ); |
|
1681 | + ); |
|
1682 | 1682 | if (!isset($recording['imported'])) { |
1683 | 1683 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
1684 | - $recording['recordID']); |
|
1684 | + $recording['recordID']); |
|
1685 | 1685 | } |
1686 | 1686 | if (isset($data['disabled'])) { |
1687 | 1687 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2167,17 +2167,17 @@ discard block |
||
2167 | 2167 | function bigbluebuttonbn_get_instance_type_profiles() { |
2168 | 2168 | $instanceprofiles = array( |
2169 | 2169 | BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL, |
2170 | - 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
2171 | - 'features' => array('all')), |
|
2170 | + 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
2171 | + 'features' => array('all')), |
|
2172 | 2172 | BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY, |
2173 | - 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
2174 | - 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
2175 | - 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
2176 | - 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
2177 | - 'clienttype')), |
|
2173 | + 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
2174 | + 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
2175 | + 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
2176 | + 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
2177 | + 'clienttype')), |
|
2178 | 2178 | BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY, |
2179 | - 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
2180 | - 'features' => array('showrecordings', 'importrecordings')) |
|
2179 | + 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
2180 | + 'features' => array('showrecordings', 'importrecordings')) |
|
2181 | 2181 | ); |
2182 | 2182 | return $instanceprofiles; |
2183 | 2183 | } |
@@ -2244,8 +2244,8 @@ discard block |
||
2244 | 2244 | $activitytime = ''; |
2245 | 2245 | if ($time) { |
2246 | 2246 | $activitytime = calendar_day_representation($time).' '. |
2247 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2248 | - calendar_time_representation($time); |
|
2247 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2248 | + calendar_time_representation($time); |
|
2249 | 2249 | } |
2250 | 2250 | return $activitytime; |
2251 | 2251 | } |
@@ -2545,7 +2545,7 @@ discard block |
||
2545 | 2545 | $renderer->render_group_element('participant_moderator_default', |
2546 | 2546 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
2547 | 2547 | array_keys($owner), array_merge($owner, $roles)) |
2548 | - ); |
|
2548 | + ); |
|
2549 | 2549 | } |
2550 | 2550 | } |
2551 | 2551 | |
@@ -2581,7 +2581,7 @@ discard block |
||
2581 | 2581 | // Web Client default. |
2582 | 2582 | $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
2583 | 2583 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
2584 | - BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
2584 | + BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
2585 | 2585 | $renderer->render_group_element('clienttype_default', |
2586 | 2586 | $renderer->render_group_element_configselect('clienttype_default', |
2587 | 2587 | $default, $choices)); |
@@ -2674,7 +2674,7 @@ discard block |
||
2674 | 2674 | return $output; |
2675 | 2675 | } |
2676 | 2676 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
2677 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2677 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2678 | 2678 | $output .= ' ' . $message . "\n"; |
2679 | 2679 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
2680 | 2680 | if (!empty($href)) { |
@@ -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; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | 'logoutURL' => $logouturl, |
107 | 107 | ]; |
108 | 108 | // Choose between Adobe Flash or HTML5 Client. |
109 | - if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
|
109 | + if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) { |
|
110 | 110 | $data['joinViaHtml5'] = 'true'; |
111 | 111 | } |
112 | 112 | if (!is_null($configtoken)) { |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | $data = null; |
135 | 135 | if (!is_null($pname) && !is_null($purl)) { |
136 | 136 | $method = 'POST'; |
137 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
138 | - $purl."' /></module></modules>"; |
|
137 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
138 | + $purl . "' /></module></modules>"; |
|
139 | 139 | } |
140 | 140 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
141 | 141 | if ($xml) { |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | if (isset($recordingxml->breakoutRooms->breakoutRoom)) { |
258 | 258 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
259 | 259 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getRecordings', |
260 | - ['recordID' => implode(',', (array) $breakoutroom)]); |
|
260 | + ['recordID' => implode(',', (array)$breakoutroom)]); |
|
261 | 261 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
262 | 262 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
263 | 263 | // If there were meetings already created. |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | // Override imported flag with actual ID. |
313 | 313 | $recording['imported'] = $recordimported->id; |
314 | 314 | if (isset($recordimported->protected)) { |
315 | - $recording['protected'] = (string) $recordimported->protected; |
|
315 | + $recording['protected'] = (string)$recordimported->protected; |
|
316 | 316 | } |
317 | 317 | $recordsimportedarray[$recording['recordID']] = $recording; |
318 | 318 | } |
@@ -342,21 +342,21 @@ discard block |
||
342 | 342 | // Add formats. |
343 | 343 | $playbackarray = array(); |
344 | 344 | foreach ($recording->playback->format as $format) { |
345 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
346 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
345 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
346 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
347 | 347 | // Add preview per format when existing. |
348 | 348 | if ($format->preview) { |
349 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
349 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
350 | 350 | } |
351 | 351 | } |
352 | 352 | // Add the metadata to the recordings array. |
353 | 353 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
354 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
355 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
356 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
357 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
354 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
355 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
356 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
357 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
358 | 358 | if (isset($recording->protected)) { |
359 | - $recordingarray['protected'] = (string) $recording->protected; |
|
359 | + $recordingarray['protected'] = (string)$recording->protected; |
|
360 | 360 | } |
361 | 361 | return $recordingarray + $metadataarray; |
362 | 362 | } |
@@ -371,9 +371,9 @@ discard block |
||
371 | 371 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
372 | 372 | $imagesarray = array(); |
373 | 373 | foreach ($preview->images->image as $image) { |
374 | - $imagearray = array('url' => trim((string) $image)); |
|
374 | + $imagearray = array('url' => trim((string)$image)); |
|
375 | 375 | foreach ($image->attributes() as $attkey => $attvalue) { |
376 | - $imagearray[$attkey] = (string) $attvalue; |
|
376 | + $imagearray[$attkey] = (string)$attvalue; |
|
377 | 377 | } |
378 | 378 | array_push($imagesarray, $imagearray); |
379 | 379 | } |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | if (is_object($value)) { |
394 | 394 | $value = ''; |
395 | 395 | } |
396 | - $metadataarray['meta_'.$key] = $value; |
|
396 | + $metadataarray['meta_' . $key] = $value; |
|
397 | 397 | } |
398 | 398 | return $metadataarray; |
399 | 399 | } |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | $ids = explode(',', $recordids); |
466 | 466 | foreach ($ids as $id) { |
467 | 467 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
468 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
468 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
469 | 469 | ); |
470 | 470 | if ($xml && $xml->returncode != 'SUCCESS') { |
471 | 471 | return false; |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | return $xml; |
531 | 531 | } catch (Exception $e) { |
532 | 532 | libxml_use_internal_errors($previous); |
533 | - $error = 'Caught exception: '.$e->getMessage(); |
|
533 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
534 | 534 | debugging($error, DEBUG_DEVELOPER); |
535 | 535 | return null; |
536 | 536 | } |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
542 | 542 | return $response; |
543 | 543 | } catch (Exception $e) { |
544 | - $error = 'Caught exception: '.$e->getMessage(); |
|
544 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
545 | 545 | debugging($error, DEBUG_DEVELOPER); |
546 | 546 | libxml_use_internal_errors($previous); |
547 | 547 | return null; |
@@ -567,8 +567,8 @@ discard block |
||
567 | 567 | } |
568 | 568 | $options = array(); |
569 | 569 | $options['CURLOPT_HTTPHEADER'] = array( |
570 | - 'Content-Type: '.$contenttype, |
|
571 | - 'Content-Length: '.strlen($data), |
|
570 | + 'Content-Type: ' . $contenttype, |
|
571 | + 'Content-Length: ' . strlen($data), |
|
572 | 572 | 'Content-Language: en-US', |
573 | 573 | ); |
574 | 574 | |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | * @return void |
590 | 590 | */ |
591 | 591 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
592 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
592 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
593 | 593 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
594 | 594 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
595 | 595 | } |
@@ -609,9 +609,9 @@ discard block |
||
609 | 609 | if ($userroles) { |
610 | 610 | $where = ''; |
611 | 611 | foreach ($userroles as $userrole) { |
612 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
612 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
613 | 613 | } |
614 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
614 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
615 | 615 | } |
616 | 616 | return $userroles; |
617 | 617 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | * @return array $users |
635 | 635 | */ |
636 | 636 | function bigbluebuttonbn_get_users(context $context = null) { |
637 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
637 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
638 | 638 | foreach ($users as $key => $value) { |
639 | 639 | $users[$key] = fullname($value); |
640 | 640 | } |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | * @return array $users |
650 | 650 | */ |
651 | 651 | function bigbluebuttonbn_get_users_select(context $context = null) { |
652 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
652 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
653 | 653 | foreach ($users as $key => $value) { |
654 | 654 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
655 | 655 | } |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | * @return array $roles |
665 | 665 | */ |
666 | 666 | function bigbluebuttonbn_get_roles(context $context = null) { |
667 | - $roles = (array) role_get_names($context); |
|
667 | + $roles = (array)role_get_names($context); |
|
668 | 668 | foreach ($roles as $key => $value) { |
669 | 669 | $roles[$key] = $value->localname; |
670 | 670 | } |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | * @return array $users |
680 | 680 | */ |
681 | 681 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
682 | - $roles = (array) role_get_names($context); |
|
682 | + $roles = (array)role_get_names($context); |
|
683 | 683 | foreach ($roles as $key => $value) { |
684 | 684 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
685 | 685 | } |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | * @return object $role |
695 | 695 | */ |
696 | 696 | function bigbluebuttonbn_get_role($id) { |
697 | - $roles = (array) role_get_names(); |
|
697 | + $roles = (array)role_get_names(); |
|
698 | 698 | if (is_numeric($id) && isset($roles[$id])) { |
699 | 699 | return (object)$roles[$id]; |
700 | 700 | } |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | if (!isguestuser()) { |
852 | 852 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
853 | 853 | } |
854 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
854 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
855 | 855 | } |
856 | 856 | |
857 | 857 | /** |
@@ -1051,7 +1051,7 @@ discard block |
||
1051 | 1051 | function bigbluebuttonbn_generate_nonce() { |
1052 | 1052 | $mt = microtime(); |
1053 | 1053 | $rand = mt_rand(); |
1054 | - return md5($mt.$rand); |
|
1054 | + return md5($mt . $rand); |
|
1055 | 1055 | } |
1056 | 1056 | |
1057 | 1057 | /** |
@@ -1141,10 +1141,10 @@ discard block |
||
1141 | 1141 | $now = time(); |
1142 | 1142 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
1143 | 1143 | // Use the value in the cache. |
1144 | - return (array) json_decode($result['meeting_info']); |
|
1144 | + return (array)json_decode($result['meeting_info']); |
|
1145 | 1145 | } |
1146 | 1146 | // Ping again and refresh the cache. |
1147 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1147 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1148 | 1148 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1149 | 1149 | ); |
1150 | 1150 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | * @return object |
1256 | 1256 | */ |
1257 | 1257 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1258 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
1258 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
1259 | 1259 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
1260 | 1260 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
1261 | 1261 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1271,8 +1271,8 @@ discard block |
||
1271 | 1271 | * @return string |
1272 | 1272 | */ |
1273 | 1273 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
1274 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
1275 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1274 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
1275 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1276 | 1276 | return $configxmlparams; |
1277 | 1277 | } |
1278 | 1278 | |
@@ -1286,7 +1286,7 @@ discard block |
||
1286 | 1286 | */ |
1287 | 1287 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1288 | 1288 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
1289 | - $configxmlarray = (array) $configxml; |
|
1289 | + $configxmlarray = (array)$configxml; |
|
1290 | 1290 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1291 | 1291 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1292 | 1292 | return ''; |
@@ -1380,7 +1380,7 @@ discard block |
||
1380 | 1380 | global $USER; |
1381 | 1381 | $starttime = $starttime - ($starttime % 1000); |
1382 | 1382 | // Set formatted date. |
1383 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
1383 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
1384 | 1384 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
1385 | 1385 | } |
1386 | 1386 | |
@@ -1496,7 +1496,7 @@ discard block |
||
1496 | 1496 | * @return string |
1497 | 1497 | */ |
1498 | 1498 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
1499 | - $options = array('id' => 'preview-'.$recording['recordID']); |
|
1499 | + $options = array('id' => 'preview-' . $recording['recordID']); |
|
1500 | 1500 | if ($recording['published'] === 'false') { |
1501 | 1501 | $options['hidden'] = 'hidden'; |
1502 | 1502 | } |
@@ -1558,7 +1558,7 @@ discard block |
||
1558 | 1558 | if ($recording['published'] === 'false') { |
1559 | 1559 | $visibility = 'hidden '; |
1560 | 1560 | } |
1561 | - $id = 'playbacks-'.$recording['recordID']; |
|
1561 | + $id = 'playbacks-' . $recording['recordID']; |
|
1562 | 1562 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1563 | 1563 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
1564 | 1564 | 'title' => $title, $visibility => $visibility)); |
@@ -1583,11 +1583,11 @@ discard block |
||
1583 | 1583 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
1584 | 1584 | return ''; |
1585 | 1585 | } |
1586 | - $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
1586 | + $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
1587 | 1587 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1588 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1588 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1589 | 1589 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1590 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
1590 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
1591 | 1591 | } |
1592 | 1592 | $linkattributes = array( |
1593 | 1593 | 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
@@ -1776,7 +1776,7 @@ discard block |
||
1776 | 1776 | $linkattributes['class'] = 'disabled'; |
1777 | 1777 | unset($linkattributes['onclick']); |
1778 | 1778 | } |
1779 | - $icon = new pix_icon('i/'.$data['tag'], |
|
1779 | + $icon = new pix_icon('i/' . $data['tag'], |
|
1780 | 1780 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
1781 | 1781 | 'moodle', $iconattributes); |
1782 | 1782 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1894,7 +1894,7 @@ discard block |
||
1894 | 1894 | */ |
1895 | 1895 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
1896 | 1896 | $row = new html_table_row(); |
1897 | - $row->id = 'recording-tr-'.$recording['recordID']; |
|
1897 | + $row->id = 'recording-tr-' . $recording['recordID']; |
|
1898 | 1898 | $row->attributes['data-imported'] = 'false'; |
1899 | 1899 | $texthead = ''; |
1900 | 1900 | $texttail = ''; |
@@ -1907,7 +1907,7 @@ discard block |
||
1907 | 1907 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
1908 | 1908 | $row->cells = array(); |
1909 | 1909 | $row->cells[] = $texthead . $rowdata->recording . $texttail; |
1910 | - $row->cells[] = $texthead . $rowdata->meeting . $texttail;; |
|
1910 | + $row->cells[] = $texthead . $rowdata->meeting . $texttail; ; |
|
1911 | 1911 | $row->cells[] = $texthead . $rowdata->activity . $texttail; |
1912 | 1912 | $row->cells[] = $texthead . $rowdata->description . $texttail; |
1913 | 1913 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
@@ -1955,9 +1955,9 @@ discard block |
||
1955 | 1955 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
1956 | 1956 | $sender = get_admin(); |
1957 | 1957 | // Prepare message. |
1958 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
1959 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
1960 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
1958 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
1959 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
1960 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
1961 | 1961 | $context = context_course::instance($bigbluebuttonbn->course); |
1962 | 1962 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
1963 | 1963 | } |
@@ -2179,7 +2179,7 @@ discard block |
||
2179 | 2179 | } |
2180 | 2180 | // Prepare select for loading records based on existent bigbluebuttonbns. |
2181 | 2181 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
2182 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
2182 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
2183 | 2183 | // Include only Create events and exclude those with record not true. |
2184 | 2184 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
2185 | 2185 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2353,8 +2353,8 @@ discard block |
||
2353 | 2353 | function bigbluebuttonbn_format_activity_time($time) { |
2354 | 2354 | $activitytime = ''; |
2355 | 2355 | if ($time) { |
2356 | - $activitytime = calendar_day_representation($time).' '. |
|
2357 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2356 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
2357 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
2358 | 2358 | calendar_time_representation($time); |
2359 | 2359 | } |
2360 | 2360 | return $activitytime; |
@@ -2822,7 +2822,7 @@ discard block |
||
2822 | 2822 | * |
2823 | 2823 | * @return string |
2824 | 2824 | */ |
2825 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
2825 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2826 | 2826 | global $OUTPUT; |
2827 | 2827 | $output = "\n"; |
2828 | 2828 | // Evaluates if config_warning is enabled. |
@@ -2861,11 +2861,11 @@ discard block |
||
2861 | 2861 | if ($class == '') { |
2862 | 2862 | $class = 'btn btn-secondary'; |
2863 | 2863 | } |
2864 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2865 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2866 | - $output .= ' title="' . $title . '"'."\n"; |
|
2867 | - $output .= ' >' . $text . '</button>'."\n"; |
|
2868 | - $output .= ' </form>'."\n"; |
|
2864 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
2865 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
2866 | + $output .= ' title="' . $title . '"' . "\n"; |
|
2867 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
2868 | + $output .= ' </form>' . "\n"; |
|
2869 | 2869 | return $output; |
2870 | 2870 | } |
2871 | 2871 | |
@@ -3030,7 +3030,7 @@ discard block |
||
3030 | 3030 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
3031 | 3031 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
3032 | 3032 | // Database info related to the activity. |
3033 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
3033 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
3034 | 3034 | $bbbsession['bigbluebuttonbn']->id; |
3035 | 3035 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
3036 | 3036 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -3062,10 +3062,10 @@ discard block |
||
3062 | 3062 | if ($bbbsession['bigbluebuttonbn']->record) { |
3063 | 3063 | // Check if is enable record all from start. |
3064 | 3064 | if ($bbbsession['recordallfromstart']) { |
3065 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning', |
|
3065 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning', |
|
3066 | 3066 | 'bigbluebuttonbn'); |
3067 | 3067 | } else { |
3068 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
3068 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
3069 | 3069 | } |
3070 | 3070 | } |
3071 | 3071 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -3080,7 +3080,7 @@ discard block |
||
3080 | 3080 | $bbbsession['originServerName'] = $parsedurl['host']; |
3081 | 3081 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
3082 | 3082 | $bbbsession['originServerCommonName'] = ''; |
3083 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
3083 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
3084 | 3084 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
3085 | 3085 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
3086 | 3086 | $bbbsession['clienttype'] = \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'); |
@@ -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) { |
@@ -109,7 +109,7 @@ |
||
109 | 109 | * @since Moodle 3.3 |
110 | 110 | */ |
111 | 111 | public static function get_bigbluebuttonbns_by_courses_parameters() { |
112 | - return new external_function_parameters ( |
|
112 | + return new external_function_parameters( |
|
113 | 113 | array( |
114 | 114 | 'courseids' => new external_multiple_structure( |
115 | 115 | new external_value(PARAM_INT, 'Course id'), 'Array of course ids', VALUE_DEFAULT, array() |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public static function defaultvalues() { |
57 | 57 | return array( |
58 | - 'server_url' => (string) BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
59 | - 'shared_secret' => (string) BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
58 | + 'server_url' => (string)BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
59 | + 'shared_secret' => (string)BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
60 | 60 | 'voicebridge_editable' => false, |
61 | 61 | 'importrecordings_enabled' => false, |
62 | 62 | 'importrecordings_from_deleted_enabled' => false, |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | if (isset($CFG->bigbluebuttonbn[$setting])) { |
125 | 125 | return (string)$CFG->bigbluebuttonbn[$setting]; |
126 | 126 | } |
127 | - if (isset($CFG->{'bigbluebuttonbn_'.$setting})) { |
|
128 | - return (string)$CFG->{'bigbluebuttonbn_'.$setting}; |
|
127 | + if (isset($CFG->{'bigbluebuttonbn_' . $setting})) { |
|
128 | + return (string)$CFG->{'bigbluebuttonbn_' . $setting}; |
|
129 | 129 | } |
130 | 130 | return self::defaultvalue($setting); |
131 | 131 | } |
@@ -171,42 +171,42 @@ |
||
171 | 171 | */ |
172 | 172 | public static function get_options() { |
173 | 173 | return array( |
174 | - 'version_major' => self::get_moodle_version_major(), |
|
175 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
176 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
177 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
178 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
179 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
180 | - 'userlimit_default' => self::get('userlimit_default'), |
|
181 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
182 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
183 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
184 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
185 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
186 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
187 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
188 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
189 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
190 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
191 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
192 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
193 | - 'recording_default' => self::get('recording_default'), |
|
194 | - 'recording_editable' => self::get('recording_editable'), |
|
195 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
196 | - 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
197 | - 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
198 | - 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
199 | - 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
200 | - 'general_warning_message' => self::get('general_warning_message'), |
|
201 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
202 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
203 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
204 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
205 | - 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
206 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
207 | - 'clienttype_default' => self::get('clienttype_default'), |
|
208 | - 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
209 | - 'muteonstart_default' => self::get('muteonstart_default'), |
|
210 | - ); |
|
174 | + 'version_major' => self::get_moodle_version_major(), |
|
175 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
176 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
177 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
178 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
179 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
180 | + 'userlimit_default' => self::get('userlimit_default'), |
|
181 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
182 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
183 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
184 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
185 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
186 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
187 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
188 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
189 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
190 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
191 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
192 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
193 | + 'recording_default' => self::get('recording_default'), |
|
194 | + 'recording_editable' => self::get('recording_editable'), |
|
195 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
196 | + 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
197 | + 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
198 | + 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
199 | + 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
200 | + 'general_warning_message' => self::get('general_warning_message'), |
|
201 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
202 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
203 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
204 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
205 | + 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
206 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
207 | + 'clienttype_default' => self::get('clienttype_default'), |
|
208 | + 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
209 | + 'muteonstart_default' => self::get('muteonstart_default'), |
|
210 | + ); |
|
211 | 211 | } |
212 | 212 | } |
@@ -41,8 +41,8 @@ |
||
41 | 41 | */ |
42 | 42 | protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) { |
43 | 43 | parent::init($crud, $edulevel); |
44 | - $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id ". |
|
45 | - "'##objectid' for the course id '##courseid' has been forcibly ". |
|
44 | + $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id " . |
|
45 | + "'##objectid' for the course id '##courseid' has been forcibly " . |
|
46 | 46 | "ended by the user with id '##userid'."; |
47 | 47 | } |
48 | 48 |