@@ -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_HTML); |
@@ -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,13 +259,13 @@ 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; |
@@ -310,27 +310,27 @@ discard block |
||
310 | 310 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
311 | 311 | */ |
312 | 312 | |
313 | - /* |
|
313 | + /* |
|
314 | 314 | * The warning box is always shown to administrators, but it is also possible to define other roles |
315 | 315 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
316 | 316 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
317 | 317 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
318 | 318 | */ |
319 | 319 | |
320 | - /* |
|
320 | + /* |
|
321 | 321 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
322 | 322 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
323 | 323 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
324 | 324 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
325 | 325 | */ |
326 | 326 | |
327 | - /* |
|
327 | + /* |
|
328 | 328 | * Additionally, when general_warning_button_href value is different than "", a button |
329 | 329 | * can also be shown right after the message. |
330 | 330 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
331 | 331 | */ |
332 | 332 | |
333 | - /* |
|
333 | + /* |
|
334 | 334 | * Finally, the text and class for the button can be modified |
335 | 335 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
336 | 336 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |
@@ -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 rendering HTML for settings.php. |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $itemname = get_string('config_' . $name, 'bigbluebuttonbn'); |
67 | 67 | } |
68 | 68 | if ($itemdescription === null) { |
69 | - $itemdescription = get_string('config_' .$name . '_description', 'bigbluebuttonbn'); |
|
69 | + $itemdescription = get_string('config_' . $name . '_description', 'bigbluebuttonbn'); |
|
70 | 70 | } |
71 | 71 | $item = new \admin_setting_heading('bigbluebuttonbn_config_' . $name, $itemname, $itemdescription); |
72 | 72 | $this->settings->add($item); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | public function render_warning_message($name, $message, $type = 'warning', $closable = true) { |
149 | 149 | global $OUTPUT; |
150 | 150 | $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
151 | - 'bigbluebuttonbn_' . $name)."\n"; |
|
151 | + 'bigbluebuttonbn_' . $name) . "\n"; |
|
152 | 152 | if ($closable) { |
153 | 153 | $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>' . "\n"; |
154 | 154 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | $params .= '&' . $key . '=' . urlencode($value); |
53 | 53 | } |
54 | 54 | foreach ($metadata as $key => $value) { |
55 | - $params .= '&' . 'meta_' . $key.'=' . urlencode($value); |
|
55 | + $params .= '&' . 'meta_' . $key . '=' . urlencode($value); |
|
56 | 56 | } |
57 | 57 | return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret()); |
58 | 58 | } |
@@ -437,26 +437,26 @@ discard block |
||
437 | 437 | return array( |
438 | 438 | 'status' => false, |
439 | 439 | 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn') |
440 | - ); |
|
440 | + ); |
|
441 | 441 | } |
442 | 442 | if ($realrecordings[$params['id']]['published'] !== 'true') { |
443 | 443 | return array( |
444 | 444 | 'status' => false, |
445 | 445 | 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn') |
446 | - ); |
|
446 | + ); |
|
447 | 447 | } |
448 | 448 | return array( |
449 | 449 | 'status' => bigbluebuttonbn_publish_recording_imported( |
450 | 450 | $recordings[$params['id']]['imported'], true |
451 | 451 | ) |
452 | - ); |
|
452 | + ); |
|
453 | 453 | } |
454 | 454 | // As the recordingid was not identified as imported recording link, execute actual publish. |
455 | 455 | return array( |
456 | 456 | 'status' => bigbluebuttonbn_publish_recordings( |
457 | 457 | $params['id'], 'true' |
458 | 458 | ) |
459 | - ); |
|
459 | + ); |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | /** |
@@ -477,26 +477,26 @@ discard block |
||
477 | 477 | return array( |
478 | 478 | 'status' => false, |
479 | 479 | 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn') |
480 | - ); |
|
480 | + ); |
|
481 | 481 | } |
482 | 482 | if ($realrecordings[$params['id']]['protected'] === 'true') { |
483 | 483 | return array( |
484 | 484 | 'status' => false, |
485 | 485 | 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn') |
486 | - ); |
|
486 | + ); |
|
487 | 487 | } |
488 | 488 | return array( |
489 | 489 | 'status' => bigbluebuttonbn_protect_recording_imported( |
490 | 490 | $recordings[$params['id']]['imported'], false |
491 | 491 | ) |
492 | - ); |
|
492 | + ); |
|
493 | 493 | } |
494 | 494 | // As the recordingid was not identified as imported recording link, execute actual uprotect. |
495 | 495 | return array( |
496 | 496 | 'status' => bigbluebuttonbn_update_recordings( |
497 | 497 | $params['id'], array('protect' => 'false') |
498 | 498 | ) |
499 | - ); |
|
499 | + ); |
|
500 | 500 | } |
501 | 501 | |
502 | 502 | /** |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | 'status' => bigbluebuttonbn_publish_recording_imported( |
516 | 516 | $recordings[$params['id']]['imported'], false |
517 | 517 | ) |
518 | - ); |
|
518 | + ); |
|
519 | 519 | } |
520 | 520 | // As the recordingid was not identified as imported recording link, execute unpublish on a real recording. |
521 | 521 | // First: Unpublish imported links associated to the recording. |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | 'status' => bigbluebuttonbn_publish_recordings( |
534 | 534 | $params['id'], 'false' |
535 | 535 | ) |
536 | - ); |
|
536 | + ); |
|
537 | 537 | } |
538 | 538 | |
539 | 539 | /** |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | 'status' => bigbluebuttonbn_protect_recording_imported( |
553 | 553 | $recordings[$params['id']]['imported'], true |
554 | 554 | ) |
555 | - ); |
|
555 | + ); |
|
556 | 556 | } |
557 | 557 | // As the recordingid was not identified as imported recording link, execute protect on a real recording. |
558 | 558 | // First: Protect imported links associated to the recording. |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | 'status' => bigbluebuttonbn_update_recordings( |
571 | 571 | $params['id'], array('protect' => 'true') |
572 | 572 | ) |
573 | - ); |
|
573 | + ); |
|
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | 'status' => bigbluebuttonbn_delete_recording_imported( |
590 | 590 | $recordings[$params['id']]['imported'] |
591 | 591 | ) |
592 | - ); |
|
592 | + ); |
|
593 | 593 | } |
594 | 594 | // As the recordingid was not identified as imported recording link, execute delete on a real recording. |
595 | 595 | // First: Delete imported links associated to the recording. |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | // Second: Execute the actual delete. |
604 | 604 | return array( |
605 | 605 | 'status' => bigbluebuttonbn_delete_recordings($params['id']) |
606 | - ); |
|
606 | + ); |
|
607 | 607 | } |
608 | 608 | |
609 | 609 | /** |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | 'status' => bigbluebuttonbn_update_recording_imported( |
622 | 622 | $recordings[$params['id']]['imported'], json_decode($params['meta'], true) |
623 | 623 | ) |
624 | - ); |
|
624 | + ); |
|
625 | 625 | } |
626 | 626 | |
627 | 627 | // As the recordingid was not identified as imported recording link, execute update on a real recording. |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | 'status' => bigbluebuttonbn_update_recordings( |
632 | 632 | $params['id'], json_decode($params['meta']) |
633 | 633 | ) |
634 | - ); |
|
634 | + ); |
|
635 | 635 | } |
636 | 636 | |
637 | 637 | /** |
@@ -802,10 +802,10 @@ discard block |
||
802 | 802 | $params['recording_import'] = ['id' => 'The recordingID must be specified.']; |
803 | 803 | $params['recording_ready'] = [ |
804 | 804 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
805 | - ]; |
|
805 | + ]; |
|
806 | 806 | $params['live_session_events'] = [ |
807 | 807 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
808 | - ]; |
|
808 | + ]; |
|
809 | 809 | return $params; |
810 | 810 | } |
811 | 811 |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
24 | 24 | */ |
25 | 25 | |
26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
28 | 28 | |
29 | 29 | use \Firebase\JWT\JWT; |
30 | 30 | |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | require_login(0, false); |
43 | 43 | |
44 | 44 | if (empty($params['action'])) { |
45 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
45 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
46 | 46 | return; |
47 | 47 | } |
48 | 48 | |
49 | 49 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
50 | 50 | if (!empty($error)) { |
51 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
51 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
52 | 52 | return; |
53 | 53 | } |
54 | 54 | |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn, $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 | } |
@@ -650,8 +650,8 @@ discard block |
||
650 | 650 | $decodedparameters = JWT::decode($params['signed_parameters'], |
651 | 651 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
652 | 652 | } catch (Exception $e) { |
653 | - $error = 'Caught exception: '.$e->getMessage(); |
|
654 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
653 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
654 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
655 | 655 | return; |
656 | 656 | } |
657 | 657 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -667,8 +667,8 @@ discard block |
||
667 | 667 | bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn); |
668 | 668 | header('HTTP/1.0 202 Accepted'); |
669 | 669 | } catch (Exception $e) { |
670 | - $error = 'Caught exception: '.$e->getMessage(); |
|
671 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
670 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
671 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
672 | 672 | } |
673 | 673 | } |
674 | 674 | |
@@ -689,13 +689,13 @@ discard block |
||
689 | 689 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
690 | 690 | if (!isset($importrecordings[$params['id']])) { |
691 | 691 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
692 | - header('HTTP/1.0 404 Not found. '.$error); |
|
692 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
693 | 693 | return; |
694 | 694 | } |
695 | 695 | $callbackresponse = array('status' => true); |
696 | 696 | $importrecordings[$params['id']]['imported'] = true; |
697 | 697 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
698 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
698 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
699 | 699 | bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
700 | 700 | // Moodle event logger: Create an event for recording imported. |
701 | 701 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -721,8 +721,8 @@ discard block |
||
721 | 721 | $decodedparameters = JWT::decode($params['signed_parameters'], |
722 | 722 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
723 | 723 | } catch (Exception $e) { |
724 | - $error = 'Caught exception: '.$e->getMessage(); |
|
725 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
724 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
725 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
726 | 726 | return; |
727 | 727 | } |
728 | 728 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | } |
764 | 764 | $action = strtolower($params['action']); |
765 | 765 | if (!array_key_exists($action, $requiredparams)) { |
766 | - return 'Action '.$params['action'].' can not be performed.'; |
|
766 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
767 | 767 | } |
768 | 768 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
769 | 769 | } |
@@ -205,7 +205,7 @@ |
||
205 | 205 | !isset($CFG->bigbluebuttonbn['recordings_imported_editable']) || |
206 | 206 | !isset($CFG->bigbluebuttonbn['recordings_preview_default']) || |
207 | 207 | !isset($CFG->bigbluebuttonbn['recordings_preview_editable']) |
208 | - ); |
|
208 | + ); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -28,7 +28,7 @@ |
||
28 | 28 | defined('MOODLE_INTERNAL') || die(); |
29 | 29 | |
30 | 30 | require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
31 | -require_once($CFG->libdir.'/adminlib.php'); |
|
31 | +require_once($CFG->libdir . '/adminlib.php'); |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Helper class for validating settings used HTML for settings.php. |
@@ -434,12 +434,12 @@ discard block |
||
434 | 434 | $recordings = bigbluebuttonbn_get_recordings( |
435 | 435 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'], |
436 | 436 | $bbbsession['bigbluebuttonbn']->recordings_deleted |
437 | - ); |
|
437 | + ); |
|
438 | 438 | if ($enabledfeatures['importrecordings']) { |
439 | 439 | // Get recording links. |
440 | 440 | $recordingsimported = bigbluebuttonbn_get_recordings_imported_array( |
441 | 441 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'] |
442 | - ); |
|
442 | + ); |
|
443 | 443 | /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent |
444 | 444 | * recordings are not included. */ |
445 | 445 | $recordings += $recordingsimported; |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | // JavaScript variables for recordings. |
454 | 454 | $jsvars += array( |
455 | 455 | 'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1', |
456 | - ); |
|
456 | + ); |
|
457 | 457 | // If there are meetings with recordings load the data to the table. |
458 | 458 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
459 | 459 | // Render a plain html table. |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | $jsvars += array( |
464 | 464 | 'columns' => bigbluebuttonbn_get_recording_columns($bbbsession), |
465 | 465 | 'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings), |
466 | - ); |
|
466 | + ); |
|
467 | 467 | // Render a YUI table. |
468 | 468 | return html_writer::div('', '', array('id' => 'bigbluebuttonbn_recordings_table')); |
469 | 469 | } |
@@ -483,10 +483,10 @@ discard block |
||
483 | 483 | } |
484 | 484 | $button = html_writer::tag('input', '', |
485 | 485 | array('type' => 'button', |
486 | - 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
487 | - 'class' => 'btn btn-secondary', |
|
488 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
489 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
486 | + 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
487 | + 'class' => 'btn btn-secondary', |
|
488 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
489 | + $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
490 | 490 | $output = html_writer::empty_tag('br'); |
491 | 491 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
492 | 492 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -565,5 +565,5 @@ discard block |
||
565 | 565 | (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'), |
566 | 566 | (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'), |
567 | 567 | (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class') |
568 | - ); |
|
568 | + ); |
|
569 | 569 | } |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | * @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com) |
25 | 25 | */ |
26 | 26 | |
27 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
28 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
27 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
28 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
29 | 29 | |
30 | 30 | $id = required_param('id', PARAM_INT); |
31 | 31 | $bn = optional_param('bn', 0, PARAM_INT); |
@@ -57,19 +57,19 @@ discard block |
||
57 | 57 | if (is_null($serverversion)) { |
58 | 58 | if ($bbbsession['administrator']) { |
59 | 59 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
60 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
60 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
61 | 61 | exit; |
62 | 62 | } |
63 | 63 | if ($bbbsession['moderator']) { |
64 | 64 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
65 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
65 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
66 | 66 | exit; |
67 | 67 | } |
68 | 68 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
69 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
69 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
70 | 70 | exit; |
71 | 71 | } |
72 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
72 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
73 | 73 | |
74 | 74 | // Mark viewed by user (if required). |
75 | 75 | $completion = new completion_info($course); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | // Print the page header. |
79 | 79 | $PAGE->set_context($context); |
80 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
80 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
81 | 81 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
82 | 82 | $PAGE->set_cacheable(false); |
83 | 83 | $PAGE->set_heading($course->fullname); |
@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
88 | 88 | echo $OUTPUT->header(); |
89 | 89 | if (isguestuser()) { |
90 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
91 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
90 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
91 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
92 | 92 | } else { |
93 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
94 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
93 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
95 | 95 | } |
96 | 96 | echo $OUTPUT->footer(); |
97 | 97 | exit; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | // Operation URLs. |
101 | 101 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
102 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
102 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
103 | 103 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
104 | 104 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
105 | 105 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | echo $OUTPUT->footer(); |
120 | 120 | |
121 | 121 | // Shows version as a comment. |
122 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
122 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
123 | 123 | |
124 | 124 | // Initialize session variable used across views. |
125 | 125 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
149 | 149 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
150 | 150 | // Database info related to the activity. |
151 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
151 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
152 | 152 | $bbbsession['bigbluebuttonbn']->id; |
153 | 153 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
154 | 154 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
169 | 169 | } |
170 | 170 | if ($bbbsession['bigbluebuttonbn']->record) { |
171 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
171 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
172 | 172 | } |
173 | 173 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
174 | 174 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $bbbsession['originServerName'] = $parsedurl['host']; |
182 | 182 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
183 | 183 | $bbbsession['originServerCommonName'] = ''; |
184 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
184 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
185 | 185 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
186 | 186 | } |
187 | 187 | |
@@ -236,8 +236,8 @@ discard block |
||
236 | 236 | $groupname = groups_get_group_name($bbbsession['group']); |
237 | 237 | } |
238 | 238 | // Assign group default values. |
239 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
240 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
239 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
240 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
241 | 241 | if (count($groups) == 0) { |
242 | 242 | // Only the All participants group exists. |
243 | 243 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | if (has_capability('moodle/site:accessallgroups', $context)) { |
248 | 248 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
249 | 249 | } |
250 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
250 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
251 | 251 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
252 | 252 | echo '<br><br>'; |
253 | 253 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
315 | 315 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
316 | 316 | } |
317 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
317 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
318 | 318 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
319 | 319 | } |
320 | 320 | |
@@ -383,12 +383,12 @@ discard block |
||
383 | 383 | // JavaScript variables for room. |
384 | 384 | $openingtime = ''; |
385 | 385 | if ($bbbsession['openingtime']) { |
386 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
386 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
387 | 387 | userdate($bbbsession['openingtime']); |
388 | 388 | } |
389 | 389 | $closingtime = ''; |
390 | 390 | if ($bbbsession['closingtime']) { |
391 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
391 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
392 | 392 | userdate($bbbsession['closingtime']); |
393 | 393 | } |
394 | 394 | $jsvars += array( |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | $output .= $OUTPUT->box_end(); |
406 | 406 | // Action button box. |
407 | 407 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
408 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
408 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
409 | 409 | $output .= $OUTPUT->box_end(); |
410 | 410 | if ($activity == 'ended') { |
411 | 411 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | // If there are meetings with recordings load the data to the table. |
455 | 455 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
456 | 456 | // Render a plain html table. |
457 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
457 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
458 | 458 | } |
459 | 459 | // JavaScript variables for recordings with YUI. |
460 | 460 | $jsvars += array( |
@@ -482,8 +482,8 @@ discard block |
||
482 | 482 | array('type' => 'button', |
483 | 483 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
484 | 484 | 'class' => 'btn btn-secondary', |
485 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
486 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
485 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
486 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
487 | 487 | $output = html_writer::empty_tag('br'); |
488 | 488 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
489 | 489 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -502,10 +502,10 @@ discard block |
||
502 | 502 | if (!is_null($bbbsession['presentation']['url'])) { |
503 | 503 | $attributes = array('title' => $bbbsession['presentation']['name']); |
504 | 504 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
505 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
506 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
505 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
506 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
507 | 507 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
508 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
508 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
509 | 509 | } |
510 | 510 | return ''; |
511 | 511 | } |
@@ -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. |