@@ -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', |
@@ -121,8 +121,8 @@ discard block |
||
| 121 | 121 | if (isset($CFG->bigbluebuttonbn[$setting])) { |
| 122 | 122 | return (string)$CFG->bigbluebuttonbn[$setting]; |
| 123 | 123 | } |
| 124 | - if (isset($CFG->{'bigbluebuttonbn_'.$setting})) { |
|
| 125 | - return (string)$CFG->{'bigbluebuttonbn_'.$setting}; |
|
| 124 | + if (isset($CFG->{'bigbluebuttonbn_' . $setting})) { |
|
| 125 | + return (string)$CFG->{'bigbluebuttonbn_' . $setting}; |
|
| 126 | 126 | } |
| 127 | 127 | return self::defaultvalue($setting); |
| 128 | 128 | } |
@@ -154,35 +154,35 @@ |
||
| 154 | 154 | */ |
| 155 | 155 | public static function get_options() { |
| 156 | 156 | return array( |
| 157 | - 'version_major' => self::get_moodle_version_major(), |
|
| 158 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 159 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
| 160 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
| 161 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 162 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 163 | - 'userlimit_default' => self::get('userlimit_default'), |
|
| 164 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 165 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 166 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 167 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 168 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 169 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 170 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 171 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 172 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 173 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 174 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 175 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 176 | - 'recording_default' => self::get('recording_default'), |
|
| 177 | - 'recording_editable' => self::get('recording_editable'), |
|
| 178 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 179 | - 'general_warning_message' => self::get('general_warning_message'), |
|
| 180 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 181 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 182 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 183 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 184 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
| 185 | - 'clienttype_default' => self::get('clienttype_default'), |
|
| 186 | - ); |
|
| 157 | + 'version_major' => self::get_moodle_version_major(), |
|
| 158 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 159 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
| 160 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
| 161 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 162 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 163 | + 'userlimit_default' => self::get('userlimit_default'), |
|
| 164 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 165 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 166 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 167 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 168 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 169 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 170 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 171 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 172 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 173 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 174 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 175 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 176 | + 'recording_default' => self::get('recording_default'), |
|
| 177 | + 'recording_editable' => self::get('recording_editable'), |
|
| 178 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 179 | + 'general_warning_message' => self::get('general_warning_message'), |
|
| 180 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 181 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 182 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 183 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 184 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
| 185 | + 'clienttype_default' => self::get('clienttype_default'), |
|
| 186 | + ); |
|
| 187 | 187 | } |
| 188 | 188 | } |
@@ -440,26 +440,26 @@ discard block |
||
| 440 | 440 | return array( |
| 441 | 441 | 'status' => false, |
| 442 | 442 | 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn') |
| 443 | - ); |
|
| 443 | + ); |
|
| 444 | 444 | } |
| 445 | 445 | if ($realrecordings[$params['id']]['published'] !== 'true') { |
| 446 | 446 | return array( |
| 447 | 447 | 'status' => false, |
| 448 | 448 | 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn') |
| 449 | - ); |
|
| 449 | + ); |
|
| 450 | 450 | } |
| 451 | 451 | return array( |
| 452 | 452 | 'status' => bigbluebuttonbn_publish_recording_imported( |
| 453 | 453 | $recordings[$params['id']]['imported'], true |
| 454 | 454 | ) |
| 455 | - ); |
|
| 455 | + ); |
|
| 456 | 456 | } |
| 457 | 457 | // As the recordingid was not identified as imported recording link, execute actual publish. |
| 458 | 458 | return array( |
| 459 | 459 | 'status' => bigbluebuttonbn_publish_recordings( |
| 460 | 460 | $params['id'], 'true' |
| 461 | 461 | ) |
| 462 | - ); |
|
| 462 | + ); |
|
| 463 | 463 | } |
| 464 | 464 | |
| 465 | 465 | /** |
@@ -480,26 +480,26 @@ discard block |
||
| 480 | 480 | return array( |
| 481 | 481 | 'status' => false, |
| 482 | 482 | 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn') |
| 483 | - ); |
|
| 483 | + ); |
|
| 484 | 484 | } |
| 485 | 485 | if ($realrecordings[$params['id']]['protected'] === 'true') { |
| 486 | 486 | return array( |
| 487 | 487 | 'status' => false, |
| 488 | 488 | 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn') |
| 489 | - ); |
|
| 489 | + ); |
|
| 490 | 490 | } |
| 491 | 491 | return array( |
| 492 | 492 | 'status' => bigbluebuttonbn_protect_recording_imported( |
| 493 | 493 | $recordings[$params['id']]['imported'], false |
| 494 | 494 | ) |
| 495 | - ); |
|
| 495 | + ); |
|
| 496 | 496 | } |
| 497 | 497 | // As the recordingid was not identified as imported recording link, execute actual uprotect. |
| 498 | 498 | return array( |
| 499 | 499 | 'status' => bigbluebuttonbn_update_recordings( |
| 500 | 500 | $params['id'], array('protect' => 'false') |
| 501 | 501 | ) |
| 502 | - ); |
|
| 502 | + ); |
|
| 503 | 503 | } |
| 504 | 504 | |
| 505 | 505 | /** |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | 'status' => bigbluebuttonbn_publish_recording_imported( |
| 519 | 519 | $recordings[$params['id']]['imported'], false |
| 520 | 520 | ) |
| 521 | - ); |
|
| 521 | + ); |
|
| 522 | 522 | } |
| 523 | 523 | // As the recordingid was not identified as imported recording link, execute unpublish on a real recording. |
| 524 | 524 | // First: Unpublish imported links associated to the recording. |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | 'status' => bigbluebuttonbn_publish_recordings( |
| 537 | 537 | $params['id'], 'false' |
| 538 | 538 | ) |
| 539 | - ); |
|
| 539 | + ); |
|
| 540 | 540 | } |
| 541 | 541 | |
| 542 | 542 | /** |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | 'status' => bigbluebuttonbn_protect_recording_imported( |
| 556 | 556 | $recordings[$params['id']]['imported'], true |
| 557 | 557 | ) |
| 558 | - ); |
|
| 558 | + ); |
|
| 559 | 559 | } |
| 560 | 560 | // As the recordingid was not identified as imported recording link, execute protect on a real recording. |
| 561 | 561 | // First: Protect imported links associated to the recording. |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | 'status' => bigbluebuttonbn_update_recordings( |
| 574 | 574 | $params['id'], array('protect' => 'true') |
| 575 | 575 | ) |
| 576 | - ); |
|
| 576 | + ); |
|
| 577 | 577 | } |
| 578 | 578 | |
| 579 | 579 | /** |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | 'status' => bigbluebuttonbn_delete_recording_imported( |
| 593 | 593 | $recordings[$params['id']]['imported'] |
| 594 | 594 | ) |
| 595 | - ); |
|
| 595 | + ); |
|
| 596 | 596 | } |
| 597 | 597 | // As the recordingid was not identified as imported recording link, execute delete on a real recording. |
| 598 | 598 | // First: Delete imported links associated to the recording. |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | // Second: Execute the actual delete. |
| 607 | 607 | return array( |
| 608 | 608 | 'status' => bigbluebuttonbn_delete_recordings($params['id']) |
| 609 | - ); |
|
| 609 | + ); |
|
| 610 | 610 | } |
| 611 | 611 | |
| 612 | 612 | /** |
@@ -624,7 +624,7 @@ discard block |
||
| 624 | 624 | 'status' => bigbluebuttonbn_update_recording_imported( |
| 625 | 625 | $recordings[$params['id']]['imported'], json_decode($params['meta'], true) |
| 626 | 626 | ) |
| 627 | - ); |
|
| 627 | + ); |
|
| 628 | 628 | } |
| 629 | 629 | |
| 630 | 630 | // As the recordingid was not identified as imported recording link, execute update on a real recording. |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | 'status' => bigbluebuttonbn_update_recordings( |
| 635 | 635 | $params['id'], json_decode($params['meta']) |
| 636 | 636 | ) |
| 637 | - ); |
|
| 637 | + ); |
|
| 638 | 638 | } |
| 639 | 639 | |
| 640 | 640 | /** |
@@ -800,11 +800,11 @@ discard block |
||
| 800 | 800 | $params['recording_ready'] = [ |
| 801 | 801 | 'bigbluebuttonbn' => 'An id for the bigbluebuttonbn instance should be included.', |
| 802 | 802 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
| 803 | - ]; |
|
| 803 | + ]; |
|
| 804 | 804 | $params['live_session_events'] = [ |
| 805 | 805 | 'bigbluebuttonbn' => 'An id for the bigbluebuttonbn instance should be included.', |
| 806 | 806 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
| 807 | - ]; |
|
| 807 | + ]; |
|
| 808 | 808 | return $params; |
| 809 | 809 | } |
| 810 | 810 | |
@@ -815,9 +815,9 @@ discard block |
||
| 815 | 815 | */ |
| 816 | 816 | function bigbluebuttonbn_broker_required_parameters_default($id) { |
| 817 | 817 | return [ |
| 818 | - 'id' => "The {$id} must be specified.", |
|
| 819 | - 'callback' => 'This call must include a javascript callback.' |
|
| 820 | - ]; |
|
| 818 | + 'id' => "The {$id} must be specified.", |
|
| 819 | + 'callback' => 'This call must include a javascript callback.' |
|
| 820 | + ]; |
|
| 821 | 821 | } |
| 822 | 822 | |
| 823 | 823 | /** |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | 26 | |
| 27 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 28 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 27 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 28 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 29 | 29 | |
| 30 | 30 | use \Firebase\JWT\JWT; |
| 31 | 31 | |
@@ -41,13 +41,13 @@ discard block |
||
| 41 | 41 | $params['meta'] = optional_param('meta', '', PARAM_TEXT); |
| 42 | 42 | |
| 43 | 43 | if (empty($params['action'])) { |
| 44 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
| 44 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
| 45 | 45 | return; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
| 49 | 49 | if (!empty($error)) { |
| 50 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 50 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 51 | 51 | return; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -132,11 +132,11 @@ discard block |
||
| 132 | 132 | bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn, $cm); |
| 133 | 133 | return; |
| 134 | 134 | } |
| 135 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 135 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
| 136 | 136 | return; |
| 137 | 137 | |
| 138 | 138 | } catch (Exception $e) { |
| 139 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
| 139 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
| 140 | 140 | return; |
| 141 | 141 | } |
| 142 | 142 | |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | function bigbluebuttonbn_broker_recording_info_current($recording, $params) { |
| 323 | 323 | $callbackresponse['status'] = true; |
| 324 | 324 | $callbackresponse['found'] = true; |
| 325 | - $callbackresponse['published'] = (string) $recording['published']; |
|
| 325 | + $callbackresponse['published'] = (string)$recording['published']; |
|
| 326 | 326 | if (!isset($params['meta']) || empty($params['meta'])) { |
| 327 | 327 | return $callbackresponse; |
| 328 | 328 | } |
@@ -651,8 +651,8 @@ discard block |
||
| 651 | 651 | $decodedparameters = JWT::decode($params['signed_parameters'], |
| 652 | 652 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
| 653 | 653 | } catch (Exception $e) { |
| 654 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 655 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 654 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 655 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 656 | 656 | return; |
| 657 | 657 | } |
| 658 | 658 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -668,8 +668,8 @@ discard block |
||
| 668 | 668 | bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn); |
| 669 | 669 | header('HTTP/1.0 202 Accepted'); |
| 670 | 670 | } catch (Exception $e) { |
| 671 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 672 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
| 671 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 672 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
| 673 | 673 | } |
| 674 | 674 | } |
| 675 | 675 | |
@@ -690,13 +690,13 @@ discard block |
||
| 690 | 690 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
| 691 | 691 | if (!isset($importrecordings[$params['id']])) { |
| 692 | 692 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
| 693 | - header('HTTP/1.0 404 Not found. '.$error); |
|
| 693 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
| 694 | 694 | return; |
| 695 | 695 | } |
| 696 | 696 | $callbackresponse = array('status' => true); |
| 697 | 697 | $importrecordings[$params['id']]['imported'] = true; |
| 698 | 698 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
| 699 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
| 699 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
| 700 | 700 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
| 701 | 701 | // Moodle event logger: Create an event for recording imported. |
| 702 | 702 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -722,8 +722,8 @@ discard block |
||
| 722 | 722 | $decodedparameters = JWT::decode($params['signed_parameters'], |
| 723 | 723 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
| 724 | 724 | } catch (Exception $e) { |
| 725 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 726 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 725 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 726 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 727 | 727 | return; |
| 728 | 728 | } |
| 729 | 729 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | $requiredparams = bigbluebuttonbn_broker_required_parameters(); |
| 759 | 759 | $action = strtolower($params['action']); |
| 760 | 760 | if (!array_key_exists($action, $requiredparams)) { |
| 761 | - return 'Action '.$params['action'].' can not be performed.'; |
|
| 761 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
| 762 | 762 | } |
| 763 | 763 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
| 764 | 764 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public static function notification_process($context, $bigbluebuttonbn, $action) { |
| 48 | 48 | global $USER; |
| 49 | 49 | // Prepare message. |
| 50 | - $msg = (object) array(); |
|
| 50 | + $msg = (object)array(); |
|
| 51 | 51 | // Build the message_body. |
| 52 | 52 | $msg->action = $action; |
| 53 | 53 | $msg->activity_type = ''; |
@@ -72,26 +72,26 @@ discard block |
||
| 72 | 72 | * @return string |
| 73 | 73 | */ |
| 74 | 74 | public static function notification_msg_html($msg) { |
| 75 | - $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '. |
|
| 76 | - get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n"; |
|
| 77 | - $messagetext .= '<p><b>'.$msg->activity_title.'</b> '. |
|
| 78 | - get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n"; |
|
| 79 | - $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n"; |
|
| 80 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 81 | - get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 82 | - $messagetext .= $msg->activity_title.'</td></tr>'."\n"; |
|
| 83 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 84 | - get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 85 | - $messagetext .= $msg->activity_description.'</td></tr>'."\n"; |
|
| 86 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 87 | - get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 88 | - $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n"; |
|
| 89 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 90 | - get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 91 | - $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n"; |
|
| 92 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '. |
|
| 93 | - get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 94 | - $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n"; |
|
| 75 | + $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' . |
|
| 76 | + get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n"; |
|
| 77 | + $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' . |
|
| 78 | + get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n"; |
|
| 79 | + $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n"; |
|
| 80 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 81 | + get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 82 | + $messagetext .= $msg->activity_title . '</td></tr>' . "\n"; |
|
| 83 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 84 | + get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 85 | + $messagetext .= $msg->activity_description . '</td></tr>' . "\n"; |
|
| 86 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 87 | + get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 88 | + $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n"; |
|
| 89 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 90 | + get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 91 | + $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n"; |
|
| 92 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' . |
|
| 93 | + get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 94 | + $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n"; |
|
| 95 | 95 | return $messagetext; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -108,14 +108,14 @@ discard block |
||
| 108 | 108 | global $DB; |
| 109 | 109 | $course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST); |
| 110 | 110 | // Complete message. |
| 111 | - $msg = (object) array(); |
|
| 111 | + $msg = (object)array(); |
|
| 112 | 112 | $msg->user_name = fullname($sender); |
| 113 | 113 | $msg->user_email = $sender->email; |
| 114 | 114 | $msg->course_name = "$course->fullname"; |
| 115 | - $message .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '. |
|
| 116 | - $msg->user_name.'('.$msg->user_email.') '; |
|
| 117 | - $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>'; |
|
| 118 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 115 | + $message .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' . |
|
| 116 | + $msg->user_name . '(' . $msg->user_email . ') '; |
|
| 117 | + $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>'; |
|
| 118 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 119 | 119 | foreach ($users as $user) { |
| 120 | 120 | if ($user->id != $sender->id) { |
| 121 | 121 | message_post_message($sender, $user, $message, FORMAT_MOODLE); |
@@ -216,8 +216,8 @@ discard block |
||
| 216 | 216 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 217 | 217 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
| 218 | 218 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
| 219 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 220 | - ); |
|
| 219 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 220 | + ); |
|
| 221 | 221 | } else { |
| 222 | 222 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 223 | 223 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | */ |
| 256 | 256 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
| 257 | 257 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
| 258 | - 'description_key' => null]; |
|
| 258 | + 'description_key' => null]; |
|
| 259 | 259 | if ($cfg['recordings_html_editable']) { |
| 260 | 260 | $field['type'] = 'checkbox'; |
| 261 | 261 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 264 | 264 | $field['description_key'], $cfg['recordings_html_default']); |
| 265 | 265 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
| 266 | - 'description_key' => null]; |
|
| 266 | + 'description_key' => null]; |
|
| 267 | 267 | if ($cfg['recordings_deleted_editable']) { |
| 268 | 268 | $field['type'] = 'checkbox'; |
| 269 | 269 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 272 | 272 | $field['description_key'], $cfg['recordings_deleted_default']); |
| 273 | 273 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
| 274 | - 'description_key' => null]; |
|
| 274 | + 'description_key' => null]; |
|
| 275 | 275 | if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) { |
| 276 | 276 | $field['type'] = 'checkbox'; |
| 277 | 277 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 280 | 280 | $field['description_key'], $cfg['recordings_imported_default']); |
| 281 | 281 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
| 282 | - 'description_key' => null]; |
|
| 282 | + 'description_key' => null]; |
|
| 283 | 283 | if ($cfg['recordings_preview_editable']) { |
| 284 | 284 | $field['type'] = 'checkbox'; |
| 285 | 285 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
| 351 | 351 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
| 352 | 352 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
| 353 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 353 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 354 | 354 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
| 355 | 355 | $participantselection['selected'], array(), |
| 356 | 356 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | 'type' => 'button', 'class' => 'btn btn-secondary', |
| 359 | 359 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
| 360 | 360 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
| 361 | - )); |
|
| 361 | + )); |
|
| 362 | 362 | $htmladdparticipant = html_writer::tag('div', |
| 363 | 363 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
| 364 | 364 | $mform->addElement('html', "\n\n"); |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | $field['description_key'], $cfg['clienttype_default'] ,$clienttype_select_choices); |
| 402 | 402 | } else { |
| 403 | 403 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null,$cfg['clienttype_default']); |
| 404 | - } |
|
| 404 | + } |
|
| 405 | 405 | |
| 406 | 406 | } |
| 407 | 407 | |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | defined('MOODLE_INTERNAL') || die(); |
| 28 | 28 | |
| 29 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 30 | -require_once($CFG->dirroot.'/course/moodleform_mod.php'); |
|
| 29 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot . '/course/moodleform_mod.php'); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Moodle class for mod_form. |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $serverversion = bigbluebuttonbn_get_server_version(); |
| 49 | 49 | if (is_null($serverversion)) { |
| 50 | 50 | print_error('general_error_unable_connect', 'bigbluebuttonbn', |
| 51 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 51 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 52 | 52 | return; |
| 53 | 53 | } |
| 54 | 54 | // Context. |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $context = context_course::instance($course->id); |
| 70 | 70 | // UI configuration options. |
| 71 | 71 | $cfg = \mod_bigbluebuttonbn\locallib\config::get_options(); |
| 72 | -error_log("RABSER DEBUG ".print_r($cfg,true)); |
|
| 72 | +error_log("RABSER DEBUG " . print_r($cfg, true)); |
|
| 73 | 73 | $mform = &$this->_form; |
| 74 | 74 | $jsvars = array(); |
| 75 | 75 | $jsvars['instanceTypeRoomOnly'] = BIGBLUEBUTTONBN_TYPE_ROOM_ONLY; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | ); |
| 120 | 120 | $defaultvalues['presentation'] = $draftitemid; |
| 121 | 121 | } catch (Exception $e) { |
| 122 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
| 122 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
| 123 | 123 | return; |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -398,9 +398,9 @@ discard block |
||
| 398 | 398 | |
| 399 | 399 | $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
| 400 | 400 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 401 | - $field['description_key'], $cfg['clienttype_default'] ,$clienttype_select_choices); |
|
| 401 | + $field['description_key'], $cfg['clienttype_default'], $clienttype_select_choices); |
|
| 402 | 402 | } else { |
| 403 | - $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null,$cfg['clienttype_default']); |
|
| 403 | + $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null, $cfg['clienttype_default']); |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | } |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | return; |
| 448 | 448 | } |
| 449 | 449 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
| 450 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
| 450 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
| 451 | 451 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
| 452 | 452 | } |
| 453 | 453 | if (!empty($rule)) { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * recordings from a different activity even from a different course. |
| 99 | 99 | **/ |
| 100 | 100 | |
| 101 | - /* |
|
| 101 | + /* |
|
| 102 | 102 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 103 | 103 | * activities will have the 'import recordings' capability enabled. |
| 104 | 104 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | * 'Join session' button enabled |
| 120 | 120 | **/ |
| 121 | 121 | |
| 122 | - /* |
|
| 122 | + /* |
|
| 123 | 123 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 124 | 124 | * activities will have the 'wait for moderator' capability enabled by |
| 125 | 125 | * default. |
@@ -259,32 +259,32 @@ discard block |
||
| 259 | 259 | * $CFG->bigbluebuttonbn['recordings_imported_editable'] = 1; |
| 260 | 260 | */ |
| 261 | 261 | |
| 262 | - /* |
|
| 262 | + /* |
|
| 263 | 263 | * When the value is set to 1 (checked) the bigbluebuttonbn resources |
| 264 | 264 | * will show the recodings with thumbnails. |
| 265 | 265 | * $CFG->bigbluebuttonbn['recordings_preview_default'] = 1; |
| 266 | 266 | */ |
| 267 | 267 | |
| 268 | - /* |
|
| 268 | + /* |
|
| 269 | 269 | * When the value is set to 1 (checked) the 'preview ui' capability can be |
| 270 | 270 | * enabled/disabled by the user creating or editing the resource. |
| 271 | 271 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
| 272 | 272 | */ |
| 273 | 273 | |
| 274 | - /* |
|
| 274 | + /* |
|
| 275 | 275 | * The WebClient by default is the Flash one (value = 0) or |
| 276 | 276 | * the HTML5 one (value = 1) |
| 277 | 277 | * $CFG->bigbluebuttonbn['clienttype_default'] = 0; |
| 278 | 278 | */ |
| 279 | 279 | |
| 280 | - /* |
|
| 280 | + /* |
|
| 281 | 281 | * When the value is set to 1 (checked) the 'clienttype' |
| 282 | 282 | * capability is enabled, meaning that the administrator can choose the default web client type |
| 283 | 283 | * and if can be editable in each room through the plugin configuration |
| 284 | 284 | * $CFG->bigbluebuttonbn['clienttype_enabled'] = 0; |
| 285 | 285 | */ |
| 286 | 286 | |
| 287 | - /* |
|
| 287 | + /* |
|
| 288 | 288 | * When the value is set to 1 (checked) the WebClient can be chosen |
| 289 | 289 | * the user creating or editing the resource. |
| 290 | 290 | * $CFG->bigbluebuttonbn['clienttype_editable'] = 0; |
@@ -330,27 +330,27 @@ discard block |
||
| 330 | 330 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
| 331 | 331 | */ |
| 332 | 332 | |
| 333 | - /* |
|
| 333 | + /* |
|
| 334 | 334 | * The warning box is always shown to administrators, but it is also possible to define other roles |
| 335 | 335 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
| 336 | 336 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
| 337 | 337 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
| 338 | 338 | */ |
| 339 | 339 | |
| 340 | - /* |
|
| 340 | + /* |
|
| 341 | 341 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
| 342 | 342 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
| 343 | 343 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
| 344 | 344 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
| 345 | 345 | */ |
| 346 | 346 | |
| 347 | - /* |
|
| 347 | + /* |
|
| 348 | 348 | * Additionally, when general_warning_button_href value is different than "", a button |
| 349 | 349 | * can also be shown right after the message. |
| 350 | 350 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
| 351 | 351 | */ |
| 352 | 352 | |
| 353 | - /* |
|
| 353 | + /* |
|
| 354 | 354 | * Finally, the text and class for the button can be modified |
| 355 | 355 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
| 356 | 356 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |