@@ -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 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 | } |
@@ -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"; |
@@ -119,9 +119,9 @@ discard block |
||
119 | 119 | */ |
120 | 120 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
121 | 121 | $data = ['meetingID' => $meetingid, |
122 | - 'fullName' => $username, |
|
123 | - 'password' => $pw, |
|
124 | - 'logoutURL' => $logouturl, |
|
122 | + 'fullName' => $username, |
|
123 | + 'password' => $pw, |
|
124 | + 'logoutURL' => $logouturl, |
|
125 | 125 | ]; |
126 | 126 | if (!is_null($configtoken)) { |
127 | 127 | $data['configToken'] = $configtoken; |
@@ -173,23 +173,23 @@ discard block |
||
173 | 173 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
174 | 174 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
175 | 175 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
176 | - ); |
|
176 | + ); |
|
177 | 177 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
178 | 178 | // Meeting info was returned. |
179 | 179 | return array('returncode' => $xml->returncode, |
180 | - 'meetingID' => $xml->meetingID, |
|
181 | - 'moderatorPW' => $xml->moderatorPW, |
|
182 | - 'attendeePW' => $xml->attendeePW, |
|
183 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
184 | - 'running' => $xml->running, |
|
185 | - 'recording' => $xml->recording, |
|
186 | - 'startTime' => $xml->startTime, |
|
187 | - 'endTime' => $xml->endTime, |
|
188 | - 'participantCount' => $xml->participantCount, |
|
189 | - 'moderatorCount' => $xml->moderatorCount, |
|
190 | - 'attendees' => $xml->attendees, |
|
191 | - 'metadata' => $xml->metadata, |
|
192 | - ); |
|
180 | + 'meetingID' => $xml->meetingID, |
|
181 | + 'moderatorPW' => $xml->moderatorPW, |
|
182 | + 'attendeePW' => $xml->attendeePW, |
|
183 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
184 | + 'running' => $xml->running, |
|
185 | + 'recording' => $xml->recording, |
|
186 | + 'startTime' => $xml->startTime, |
|
187 | + 'endTime' => $xml->endTime, |
|
188 | + 'participantCount' => $xml->participantCount, |
|
189 | + 'moderatorCount' => $xml->moderatorCount, |
|
190 | + 'attendees' => $xml->attendees, |
|
191 | + 'metadata' => $xml->metadata, |
|
192 | + ); |
|
193 | 193 | } |
194 | 194 | if ($xml) { |
195 | 195 | // Either failure or success without meeting info. |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | function bigbluebuttonbn_get_default_config_xml() { |
326 | 326 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
327 | 327 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
328 | - ); |
|
328 | + ); |
|
329 | 329 | return $xml; |
330 | 330 | } |
331 | 331 | |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | foreach ($ids as $id) { |
427 | 427 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
428 | 428 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
429 | - ); |
|
429 | + ); |
|
430 | 430 | if ($xml && $xml->returncode != 'SUCCESS') { |
431 | 431 | return false; |
432 | 432 | } |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | foreach ($ids as $id) { |
446 | 446 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
447 | 447 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
448 | - ); |
|
448 | + ); |
|
449 | 449 | if ($xml && $xml->returncode != 'SUCCESS') { |
450 | 450 | return false; |
451 | 451 | } |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | foreach ($ids as $id) { |
465 | 465 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
466 | 466 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
467 | - ); |
|
467 | + ); |
|
468 | 468 | if ($xml && $xml->returncode != 'SUCCESS') { |
469 | 469 | return false; |
470 | 470 | } |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
482 | 482 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
483 | 483 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
484 | - ); |
|
484 | + ); |
|
485 | 485 | if ($xml) { |
486 | 486 | // If the xml packet returned failure it displays the message to the user. |
487 | 487 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | */ |
502 | 502 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
503 | 503 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
504 | - ); |
|
504 | + ); |
|
505 | 505 | return ($xml && $xml->returncode == 'SUCCESS'); |
506 | 506 | } |
507 | 507 | |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | function bigbluebuttonbn_get_server_version() { |
514 | 514 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
515 | 515 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
516 | - ); |
|
516 | + ); |
|
517 | 517 | if ($xml && $xml->returncode == 'SUCCESS') { |
518 | 518 | return $xml->version; |
519 | 519 | } |
@@ -581,10 +581,10 @@ discard block |
||
581 | 581 | |
582 | 582 | $options = array(); |
583 | 583 | $options['CURLOPT_HTTPHEADER'] = array( |
584 | - 'Content-Type: '.$contenttype, |
|
585 | - 'Content-Length: '.strlen($data), |
|
586 | - 'Content-Language: en-US', |
|
587 | - ); |
|
584 | + 'Content-Type: '.$contenttype, |
|
585 | + 'Content-Length: '.strlen($data), |
|
586 | + 'Content-Language: en-US', |
|
587 | + ); |
|
588 | 588 | |
589 | 589 | return $c->post($url, $data, $options); |
590 | 590 | } |
@@ -727,16 +727,16 @@ discard block |
||
727 | 727 | 'all' => array( |
728 | 728 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
729 | 729 | 'children' => [] |
730 | - ) |
|
731 | - ); |
|
730 | + ) |
|
731 | + ); |
|
732 | 732 | $data['role'] = array( |
733 | 733 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
734 | 734 | 'children' => bigbluebuttonbn_get_roles_select($context) |
735 | - ); |
|
735 | + ); |
|
736 | 736 | $data['user'] = array( |
737 | 737 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
738 | 738 | 'children' => bigbluebuttonbn_get_users_select($context) |
739 | - ); |
|
739 | + ); |
|
740 | 740 | return $data; |
741 | 741 | } |
742 | 742 | |
@@ -781,9 +781,9 @@ discard block |
||
781 | 781 | continue; |
782 | 782 | } |
783 | 783 | $participantlistarray[] = array( |
784 | - 'selectiontype' => 'role', |
|
785 | - 'selectionid' => $moderatordefault, |
|
786 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
784 | + 'selectiontype' => 'role', |
|
785 | + 'selectionid' => $moderatordefault, |
|
786 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
787 | 787 | } |
788 | 788 | return $participantlistarray; |
789 | 789 | } |
@@ -826,11 +826,11 @@ discard block |
||
826 | 826 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
827 | 827 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
828 | 828 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
829 | - ], |
|
829 | + ], |
|
830 | 830 | 'type_selected' => 'all', |
831 | 831 | 'options' => ['all' => '---------------'], |
832 | 832 | 'selected' => 'all', |
833 | - ]; |
|
833 | + ]; |
|
834 | 834 | } |
835 | 835 | |
836 | 836 | /** |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | $eventproperties['other'] = $options['other']; |
1112 | 1112 | } |
1113 | 1113 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
1114 | - array($eventproperties)); |
|
1114 | + array($eventproperties)); |
|
1115 | 1115 | $event->trigger(); |
1116 | 1116 | } |
1117 | 1117 | |
@@ -1155,7 +1155,7 @@ discard block |
||
1155 | 1155 | // Ping again and refresh the cache. |
1156 | 1156 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
1157 | 1157 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1158 | - ); |
|
1158 | + ); |
|
1159 | 1159 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
1160 | 1160 | return $meetinginfo; |
1161 | 1161 | } |
@@ -1525,8 +1525,8 @@ discard block |
||
1525 | 1525 | } |
1526 | 1526 | $id = 'playbacks-'.$recording['recordID']; |
1527 | 1527 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1528 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1529 | - 'title' => $title, $visibility => $visibility)); |
|
1528 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1529 | + 'title' => $title, $visibility => $visibility)); |
|
1530 | 1530 | foreach ($recording['playbacks'] as $playback) { |
1531 | 1531 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
1532 | 1532 | } |
@@ -1551,7 +1551,7 @@ discard block |
||
1551 | 1551 | $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
1552 | 1552 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
1553 | 1553 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1554 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1554 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1555 | 1555 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1556 | 1556 | $href .= '&href='.urlencode(trim($playback['url'])); |
1557 | 1557 | } |
@@ -1563,7 +1563,7 @@ discard block |
||
1563 | 1563 | 'data-target' => $playback['type'], |
1564 | 1564 | 'data-href' => $href, |
1565 | 1565 | 'class' => 'btn btn-sm btn-default' |
1566 | - ); |
|
1566 | + ); |
|
1567 | 1567 | return $OUTPUT->action_link('#', $title, null, $linkattributes) . ' '; |
1568 | 1568 | } |
1569 | 1569 | |
@@ -1677,10 +1677,10 @@ discard block |
||
1677 | 1677 | 'id' => $id, |
1678 | 1678 | 'onclick' => $onclick, |
1679 | 1679 | 'data-action' => $data['action'] |
1680 | - ); |
|
1680 | + ); |
|
1681 | 1681 | if (!isset($recording['imported'])) { |
1682 | 1682 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
1683 | - $recording['recordID']); |
|
1683 | + $recording['recordID']); |
|
1684 | 1684 | } |
1685 | 1685 | if (isset($data['disabled'])) { |
1686 | 1686 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2225,8 +2225,8 @@ discard block |
||
2225 | 2225 | $activitytime = ''; |
2226 | 2226 | if ($time) { |
2227 | 2227 | $activitytime = calendar_day_representation($time).' '. |
2228 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2229 | - calendar_time_representation($time); |
|
2228 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2229 | + calendar_time_representation($time); |
|
2230 | 2230 | } |
2231 | 2231 | return $activitytime; |
2232 | 2232 | } |
@@ -2322,7 +2322,7 @@ discard block |
||
2322 | 2322 | global $BIGBLUEBUTTONBN_CFG; |
2323 | 2323 | if (isset($BIGBLUEBUTTONBN_CFG)) { |
2324 | 2324 | $renderer->render_warning_message('general_warning', |
2325 | - get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
2325 | + get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
2326 | 2326 | } |
2327 | 2327 | } |
2328 | 2328 | |
@@ -2530,7 +2530,7 @@ discard block |
||
2530 | 2530 | $renderer->render_group_element('participant_moderator_default', |
2531 | 2531 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
2532 | 2532 | array_keys($owner), array_merge($owner, $roles)) |
2533 | - ); |
|
2533 | + ); |
|
2534 | 2534 | } |
2535 | 2535 | } |
2536 | 2536 | |
@@ -2630,7 +2630,7 @@ discard block |
||
2630 | 2630 | return $output; |
2631 | 2631 | } |
2632 | 2632 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
2633 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2633 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2634 | 2634 | $output .= ' ' . $message . "\n"; |
2635 | 2635 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
2636 | 2636 | if (!empty($href)) { |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | * Helper function to retrieve imported recordings from the Moodle database. |
293 | 293 | * The references are stored as events in bigbluebuttonbn_logs. |
294 | 294 | * |
295 | - * @param string $courseid |
|
295 | + * @param integer $courseid |
|
296 | 296 | * @param string $bigbluebuttonbnid |
297 | 297 | * @param bool $subset |
298 | 298 | * |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | /** |
321 | 321 | * Helper function to retrive the default config.xml file. |
322 | 322 | * |
323 | - * @return string |
|
323 | + * @return null|SimpleXMLElement |
|
324 | 324 | */ |
325 | 325 | function bigbluebuttonbn_get_default_config_xml() { |
326 | 326 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | * @param object $a |
403 | 403 | * @param object $b |
404 | 404 | * |
405 | - * @return array |
|
405 | + * @return integer |
|
406 | 406 | */ |
407 | 407 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
408 | 408 | if ($a['startTime'] < $b['startTime']) { |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | * @param string $data |
529 | 529 | * @param string $contenttype |
530 | 530 | * |
531 | - * @return object |
|
531 | + * @return null|SimpleXMLElement |
|
532 | 532 | */ |
533 | 533 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
534 | 534 | if (extension_loaded('curl')) { |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | * @param string $data |
570 | 570 | * @param string $contenttype |
571 | 571 | * |
572 | - * @return object |
|
572 | + * @return string |
|
573 | 573 | */ |
574 | 574 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
575 | 575 | $c = new curl(); |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | * @param integer $instance |
935 | 935 | * @param integer $voicebridge |
936 | 936 | * |
937 | - * @return string |
|
937 | + * @return boolean |
|
938 | 938 | */ |
939 | 939 | function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) { |
940 | 940 | global $DB; |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | /** |
1038 | 1038 | * Helper returns an array with all possible bigbluebuttonbn events. |
1039 | 1039 | * |
1040 | - * @return array |
|
1040 | + * @return string[] |
|
1041 | 1041 | */ |
1042 | 1042 | function bigbluebuttonbn_events() { |
1043 | 1043 | return array( |
@@ -1246,7 +1246,7 @@ discard block |
||
1246 | 1246 | * @param string $meetingid |
1247 | 1247 | * @param string $configxml |
1248 | 1248 | * |
1249 | - * @return object |
|
1249 | + * @return null|SimpleXMLElement |
|
1250 | 1250 | */ |
1251 | 1251 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1252 | 1252 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
@@ -1295,7 +1295,7 @@ discard block |
||
1295 | 1295 | * @param array $recording |
1296 | 1296 | * @param array $tools |
1297 | 1297 | * |
1298 | - * @return array |
|
1298 | + * @return null|stdClass |
|
1299 | 1299 | */ |
1300 | 1300 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
1301 | 1301 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -1799,7 +1799,7 @@ discard block |
||
1799 | 1799 | * |
1800 | 1800 | * @param array $bbbsession |
1801 | 1801 | * @param array $recording |
1802 | - * @param object $rowdata |
|
1802 | + * @param stdClass $rowdata |
|
1803 | 1803 | * |
1804 | 1804 | * @return object |
1805 | 1805 | */ |
@@ -1998,7 +1998,7 @@ discard block |
||
1998 | 1998 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
1999 | 1999 | * in the getRecordings request considering only those that belong to deleted activities. |
2000 | 2000 | * |
2001 | - * @param string $courseid |
|
2001 | + * @param integer $courseid |
|
2002 | 2002 | * @param string $bigbluebuttonbnid |
2003 | 2003 | * @param bool $subset |
2004 | 2004 | * |
@@ -2022,7 +2022,7 @@ discard block |
||
2022 | 2022 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
2023 | 2023 | * in the getRecordings request considering only those that belong to imported recordings. |
2024 | 2024 | * |
2025 | - * @param string $courseid |
|
2025 | + * @param integer $courseid |
|
2026 | 2026 | * @param string $bigbluebuttonbnid |
2027 | 2027 | * @param bool $subset |
2028 | 2028 | * |
@@ -2045,7 +2045,7 @@ discard block |
||
2045 | 2045 | /** |
2046 | 2046 | * Helper function to get recordings and imported recordings together. |
2047 | 2047 | * |
2048 | - * @param string $courseid |
|
2048 | + * @param integer $courseid |
|
2049 | 2049 | * @param string $bigbluebuttonbnid |
2050 | 2050 | * @param bool $subset |
2051 | 2051 | * @param bool $includedeleted |
@@ -2063,7 +2063,7 @@ discard block |
||
2063 | 2063 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
2064 | 2064 | * in bigbluebuttonbn_logs. |
2065 | 2065 | * |
2066 | - * @param string $courseid |
|
2066 | + * @param integer $courseid |
|
2067 | 2067 | * @param string $bigbluebuttonbnid |
2068 | 2068 | * @param bool $subset |
2069 | 2069 | * @param bool $includedeleted |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | global $CFG; |
30 | 30 | |
31 | -require_once(dirname(__FILE__).'/lib.php'); |
|
31 | +require_once(dirname(__FILE__) . '/lib.php'); |
|
32 | 32 | |
33 | 33 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
34 | 34 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | if (isset($meta)) { |
101 | 101 | $log->meta = $meta; |
102 | 102 | } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) { |
103 | - $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
103 | + $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
104 | 104 | } |
105 | 105 | $DB->insert_record('bigbluebuttonbn_logs', $log); |
106 | 106 | } |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | $data = null; |
149 | 149 | if (!is_null($pname) && !is_null($purl)) { |
150 | 150 | $method = 'POST'; |
151 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
152 | - $purl."' /></module></modules>"; |
|
151 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
152 | + $purl . "' /></module></modules>"; |
|
153 | 153 | } |
154 | 154 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
155 | 155 | if ($xml) { |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | // Override imported flag with actual ID. |
311 | 311 | $recording['imported'] = $recordimported->id; |
312 | 312 | if (isset($recordimported->protected)) { |
313 | - $recording['protected'] = (string) $recordimported->protected; |
|
313 | + $recording['protected'] = (string)$recordimported->protected; |
|
314 | 314 | } |
315 | 315 | $recordsimportedarray[$recording['recordID']] = $recording; |
316 | 316 | } |
@@ -340,21 +340,21 @@ discard block |
||
340 | 340 | // Add formats. |
341 | 341 | $playbackarray = array(); |
342 | 342 | foreach ($recording->playback->format as $format) { |
343 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
344 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
343 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
344 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
345 | 345 | // Add preview per format when existing. |
346 | 346 | if ($format->preview) { |
347 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
347 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
348 | 348 | } |
349 | 349 | } |
350 | 350 | // Add the metadata to the recordings array. |
351 | 351 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
352 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
353 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
354 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
355 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
352 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
353 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
354 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
355 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
356 | 356 | if (isset($recording->protected)) { |
357 | - $recordingarray['protected'] = (string) $recording->protected; |
|
357 | + $recordingarray['protected'] = (string)$recording->protected; |
|
358 | 358 | } |
359 | 359 | return $recordingarray + $metadataarray; |
360 | 360 | } |
@@ -369,9 +369,9 @@ discard block |
||
369 | 369 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
370 | 370 | $imagesarray = array(); |
371 | 371 | foreach ($preview->images->image as $image) { |
372 | - $imagearray = array('url' => trim((string) $image)); |
|
372 | + $imagearray = array('url' => trim((string)$image)); |
|
373 | 373 | foreach ($image->attributes() as $attkey => $attvalue) { |
374 | - $imagearray[$attkey] = (string) $attvalue; |
|
374 | + $imagearray[$attkey] = (string)$attvalue; |
|
375 | 375 | } |
376 | 376 | array_push($imagesarray, $imagearray); |
377 | 377 | } |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | if (is_object($value)) { |
392 | 392 | $value = ''; |
393 | 393 | } |
394 | - $metadataarray['meta_'.$key] = $value; |
|
394 | + $metadataarray['meta_' . $key] = $value; |
|
395 | 395 | } |
396 | 396 | return $metadataarray; |
397 | 397 | } |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | $ids = explode(',', $recordids); |
464 | 464 | foreach ($ids as $id) { |
465 | 465 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
466 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
466 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
467 | 467 | ); |
468 | 468 | if ($xml && $xml->returncode != 'SUCCESS') { |
469 | 469 | return false; |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | return $xml; |
544 | 544 | } catch (Exception $e) { |
545 | 545 | libxml_use_internal_errors($previous); |
546 | - $error = 'Caught exception: '.$e->getMessage(); |
|
546 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
547 | 547 | debugging($error, DEBUG_DEVELOPER); |
548 | 548 | return null; |
549 | 549 | } |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
555 | 555 | return $response; |
556 | 556 | } catch (Exception $e) { |
557 | - $error = 'Caught exception: '.$e->getMessage(); |
|
557 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
558 | 558 | debugging($error, DEBUG_DEVELOPER); |
559 | 559 | libxml_use_internal_errors($previous); |
560 | 560 | return null; |
@@ -581,8 +581,8 @@ discard block |
||
581 | 581 | |
582 | 582 | $options = array(); |
583 | 583 | $options['CURLOPT_HTTPHEADER'] = array( |
584 | - 'Content-Type: '.$contenttype, |
|
585 | - 'Content-Length: '.strlen($data), |
|
584 | + 'Content-Type: ' . $contenttype, |
|
585 | + 'Content-Length: ' . strlen($data), |
|
586 | 586 | 'Content-Language: en-US', |
587 | 587 | ); |
588 | 588 | |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | * @return void |
600 | 600 | */ |
601 | 601 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
602 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
602 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
603 | 603 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
604 | 604 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
605 | 605 | } |
@@ -619,9 +619,9 @@ discard block |
||
619 | 619 | if ($userroles) { |
620 | 620 | $where = ''; |
621 | 621 | foreach ($userroles as $userrole) { |
622 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
622 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
623 | 623 | } |
624 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
624 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
625 | 625 | } |
626 | 626 | return $userroles; |
627 | 627 | } |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | * @return array $users |
645 | 645 | */ |
646 | 646 | function bigbluebuttonbn_get_users(context $context = null) { |
647 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
647 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
648 | 648 | foreach ($users as $key => $value) { |
649 | 649 | $users[$key] = fullname($value); |
650 | 650 | } |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | * @return array $users |
660 | 660 | */ |
661 | 661 | function bigbluebuttonbn_get_users_select(context $context = null) { |
662 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
662 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
663 | 663 | foreach ($users as $key => $value) { |
664 | 664 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
665 | 665 | } |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | * @return array $roles |
675 | 675 | */ |
676 | 676 | function bigbluebuttonbn_get_roles(context $context = null) { |
677 | - $roles = (array) role_get_names($context); |
|
677 | + $roles = (array)role_get_names($context); |
|
678 | 678 | foreach ($roles as $key => $value) { |
679 | 679 | $roles[$key] = $value->localname; |
680 | 680 | } |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | * @return array $users |
690 | 690 | */ |
691 | 691 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
692 | - $roles = (array) role_get_names($context); |
|
692 | + $roles = (array)role_get_names($context); |
|
693 | 693 | foreach ($roles as $key => $value) { |
694 | 694 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
695 | 695 | } |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | * @return object $role |
705 | 705 | */ |
706 | 706 | function bigbluebuttonbn_get_role($id) { |
707 | - $roles = (array) role_get_names(); |
|
707 | + $roles = (array)role_get_names(); |
|
708 | 708 | if (is_numeric($id) && isset($roles[$id])) { |
709 | 709 | return (object)$roles[$id]; |
710 | 710 | } |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | if (!isguestuser()) { |
860 | 860 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
861 | 861 | } |
862 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
862 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
863 | 863 | } |
864 | 864 | |
865 | 865 | /** |
@@ -1015,7 +1015,7 @@ discard block |
||
1015 | 1015 | function bigbluebuttonbn_generate_nonce() { |
1016 | 1016 | $mt = microtime(); |
1017 | 1017 | $rand = mt_rand(); |
1018 | - return md5($mt.$rand); |
|
1018 | + return md5($mt . $rand); |
|
1019 | 1019 | } |
1020 | 1020 | |
1021 | 1021 | /** |
@@ -1041,21 +1041,21 @@ discard block |
||
1041 | 1041 | */ |
1042 | 1042 | function bigbluebuttonbn_events() { |
1043 | 1043 | return array( |
1044 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1045 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1046 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1047 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1048 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1049 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1050 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1051 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1052 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1053 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1054 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1055 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1056 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1057 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1058 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1044 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1045 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1046 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1047 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1048 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1049 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1050 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1051 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1052 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1053 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1054 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1055 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1056 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1057 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1058 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1059 | 1059 | ); |
1060 | 1060 | } |
1061 | 1061 | |
@@ -1066,21 +1066,21 @@ discard block |
||
1066 | 1066 | */ |
1067 | 1067 | function bigbluebuttonbn_events_action() { |
1068 | 1068 | return array( |
1069 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1070 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1071 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1072 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1073 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1074 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1075 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1076 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1077 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1078 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1079 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1080 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1081 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1082 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1083 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1069 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1070 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1071 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1072 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1073 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1074 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1075 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1076 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1077 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1078 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1079 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1080 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1081 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1082 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1083 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1084 | 1084 | ); |
1085 | 1085 | } |
1086 | 1086 | |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | if (array_key_exists('other', $options)) { |
1112 | 1112 | $eventproperties['other'] = $options['other']; |
1113 | 1113 | } |
1114 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
1114 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
1115 | 1115 | array($eventproperties)); |
1116 | 1116 | $event->trigger(); |
1117 | 1117 | } |
@@ -1151,10 +1151,10 @@ discard block |
||
1151 | 1151 | $now = time(); |
1152 | 1152 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
1153 | 1153 | // Use the value in the cache. |
1154 | - return (array) json_decode($result['meeting_info']); |
|
1154 | + return (array)json_decode($result['meeting_info']); |
|
1155 | 1155 | } |
1156 | 1156 | // Ping again and refresh the cache. |
1157 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1157 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1158 | 1158 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1159 | 1159 | ); |
1160 | 1160 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | * @return object |
1250 | 1250 | */ |
1251 | 1251 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1252 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
1252 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
1253 | 1253 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
1254 | 1254 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
1255 | 1255 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1265,8 +1265,8 @@ discard block |
||
1265 | 1265 | * @return string |
1266 | 1266 | */ |
1267 | 1267 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
1268 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
1269 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1268 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
1269 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1270 | 1270 | return $configxmlparams; |
1271 | 1271 | } |
1272 | 1272 | |
@@ -1280,7 +1280,7 @@ discard block |
||
1280 | 1280 | */ |
1281 | 1281 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1282 | 1282 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
1283 | - $configxmlarray = (array) $configxml; |
|
1283 | + $configxmlarray = (array)$configxml; |
|
1284 | 1284 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1285 | 1285 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1286 | 1286 | return ''; |
@@ -1372,7 +1372,7 @@ discard block |
||
1372 | 1372 | global $USER; |
1373 | 1373 | $starttime = $starttime - ($starttime % 1000); |
1374 | 1374 | // Set formatted date. |
1375 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
1375 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
1376 | 1376 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
1377 | 1377 | } |
1378 | 1378 | |
@@ -1483,7 +1483,7 @@ discard block |
||
1483 | 1483 | * @return string |
1484 | 1484 | */ |
1485 | 1485 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
1486 | - $options = array('id' => 'preview-'.$recording['recordID'], 'class' => 'container'); |
|
1486 | + $options = array('id' => 'preview-' . $recording['recordID'], 'class' => 'container'); |
|
1487 | 1487 | if ($recording['published'] === 'false') { |
1488 | 1488 | $options['hidden'] = 'hidden'; |
1489 | 1489 | } |
@@ -1524,7 +1524,7 @@ discard block |
||
1524 | 1524 | if ($recording['published'] === 'false') { |
1525 | 1525 | $visibility = 'hidden '; |
1526 | 1526 | } |
1527 | - $id = 'playbacks-'.$recording['recordID']; |
|
1527 | + $id = 'playbacks-' . $recording['recordID']; |
|
1528 | 1528 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1529 | 1529 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
1530 | 1530 | 'title' => $title, $visibility => $visibility)); |
@@ -1549,12 +1549,12 @@ discard block |
||
1549 | 1549 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
1550 | 1550 | return ''; |
1551 | 1551 | } |
1552 | - $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
1552 | + $title = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
1553 | 1553 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
1554 | 1554 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1555 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1555 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1556 | 1556 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1557 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
1557 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
1558 | 1558 | } |
1559 | 1559 | $id = 'recording-play-' . $playback['type'] . '-' . $recording['recordID']; |
1560 | 1560 | $linkattributes = array( |
@@ -1688,7 +1688,7 @@ discard block |
||
1688 | 1688 | $linkattributes['class'] = 'disabled'; |
1689 | 1689 | unset($linkattributes['onclick']); |
1690 | 1690 | } |
1691 | - $icon = new pix_icon('i/'.$data['tag'], |
|
1691 | + $icon = new pix_icon('i/' . $data['tag'], |
|
1692 | 1692 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
1693 | 1693 | 'moodle', $iconattributes); |
1694 | 1694 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1805,7 +1805,7 @@ discard block |
||
1805 | 1805 | */ |
1806 | 1806 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
1807 | 1807 | $row = new html_table_row(); |
1808 | - $row->id = 'recording-td-'.$recording['recordID']; |
|
1808 | + $row->id = 'recording-td-' . $recording['recordID']; |
|
1809 | 1809 | $row->attributes['data-imported'] = 'false'; |
1810 | 1810 | $texthead = ''; |
1811 | 1811 | $texttail = ''; |
@@ -1865,9 +1865,9 @@ discard block |
||
1865 | 1865 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
1866 | 1866 | $sender = get_admin(); |
1867 | 1867 | // Prepare message. |
1868 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
1869 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
1870 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
1868 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
1869 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
1870 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
1871 | 1871 | $context = context_course::instance($bigbluebuttonbn->course); |
1872 | 1872 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
1873 | 1873 | } |
@@ -2089,7 +2089,7 @@ discard block |
||
2089 | 2089 | } |
2090 | 2090 | // Prepare select for loading records based on existent bigbluebuttonbns. |
2091 | 2091 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
2092 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
2092 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
2093 | 2093 | // Include only Create events and exclude those with record not true. |
2094 | 2094 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
2095 | 2095 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2221,8 +2221,8 @@ discard block |
||
2221 | 2221 | function bigbluebuttonbn_format_activity_time($time) { |
2222 | 2222 | $activitytime = ''; |
2223 | 2223 | if ($time) { |
2224 | - $activitytime = calendar_day_representation($time).' '. |
|
2225 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2224 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
2225 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
2226 | 2226 | calendar_time_representation($time); |
2227 | 2227 | } |
2228 | 2228 | return $activitytime; |
@@ -2619,7 +2619,7 @@ discard block |
||
2619 | 2619 | * |
2620 | 2620 | * @return string |
2621 | 2621 | */ |
2622 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
2622 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2623 | 2623 | global $OUTPUT; |
2624 | 2624 | $output = "\n"; |
2625 | 2625 | // Evaluates if config_warning is enabled. |
@@ -2658,10 +2658,10 @@ discard block |
||
2658 | 2658 | if ($class == '') { |
2659 | 2659 | $class = 'btn btn-secondary'; |
2660 | 2660 | } |
2661 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2662 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2663 | - $output .= ' title="' . $title . '"'."\n"; |
|
2664 | - $output .= ' >' . $text . '</button>'."\n"; |
|
2665 | - $output .= ' </form>'."\n"; |
|
2661 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
2662 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
2663 | + $output .= ' title="' . $title . '"' . "\n"; |
|
2664 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
2665 | + $output .= ' </form>' . "\n"; |
|
2666 | 2666 | return $output; |
2667 | 2667 | } |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | * @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com) |
25 | 25 | */ |
26 | 26 | |
27 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
28 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
27 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
28 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
29 | 29 | |
30 | 30 | $id = required_param('id', PARAM_INT); |
31 | 31 | $a = optional_param('a', 0, PARAM_INT); |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | if ($moderator || $administrator) { |
90 | 90 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $cm); |
91 | 91 | echo get_string('index_ending', 'bigbluebuttonbn'); |
92 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
92 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
93 | 93 | if ($g != '0') { |
94 | - $meetingid .= '['.$g.']'; |
|
94 | + $meetingid .= '[' . $g . ']'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
98 | - redirect('index.php?id='.$id); |
|
98 | + redirect('index.php?id=' . $id); |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | // Add a the data for the bigbluebuttonbn instance. |
111 | 111 | $groupobj = null; |
112 | 112 | if (groups_get_activity_groupmode($cm) > 0) { |
113 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
113 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
114 | 114 | } |
115 | 115 | $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
116 | 116 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -136,12 +136,12 @@ discard block |
||
136 | 136 | * @return array |
137 | 137 | */ |
138 | 138 | function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
139 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
139 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
140 | 140 | $paramgroup = ''; |
141 | 141 | $groupname = ''; |
142 | 142 | if ($groupobj) { |
143 | - $meetingid .= '['.$groupobj->id.']'; |
|
144 | - $paramgroup = '&group='.$groupobj->id; |
|
143 | + $meetingid .= '[' . $groupobj->id . ']'; |
|
144 | + $paramgroup = '&group=' . $groupobj->id; |
|
145 | 145 | $groupname = $groupobj->name; |
146 | 146 | } |
147 | 147 | $meetinginfo = bigbluebuttonbn_get_meeting_info_array($meetingid); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | return; |
157 | 157 | } |
158 | 158 | // Output Users in the meeting. |
159 | - $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>'; |
|
159 | + $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>'; |
|
160 | 160 | $group = $groupname; |
161 | 161 | $users = ''; |
162 | 162 | $viewerlist = ''; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $attendeecount = 0; |
202 | 202 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
203 | 203 | if ($attendee->role == $role) { |
204 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
204 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | } |
@@ -235,17 +235,17 @@ discard block |
||
235 | 235 | function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
236 | 236 | $actions = ''; |
237 | 237 | if ($moderator) { |
238 | - $actions .= '<form name="form1" method="post" action="">'."\n"; |
|
239 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
240 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
238 | + $actions .= '<form name="form1" method="post" action="">' . "\n"; |
|
239 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
240 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
241 | 241 | if ($groupobj != null) { |
242 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
242 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
243 | 243 | } |
244 | 244 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
245 | 245 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
246 | 246 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
247 | 247 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
248 | - $actions .= '</form>'."\n"; |
|
248 | + $actions .= '</form>' . "\n"; |
|
249 | 249 | } |
250 | 250 | return $actions; |
251 | 251 | } |
@@ -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 | } |
@@ -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('n', 0, PARAM_INT); |
@@ -60,19 +60,19 @@ discard block |
||
60 | 60 | if (is_null($serverversion)) { |
61 | 61 | if ($bbbsession['administrator']) { |
62 | 62 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
63 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
63 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
64 | 64 | exit; |
65 | 65 | } |
66 | 66 | if ($bbbsession['moderator']) { |
67 | 67 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
68 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
68 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
69 | 69 | exit; |
70 | 70 | } |
71 | 71 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
72 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
72 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
73 | 73 | exit; |
74 | 74 | } |
75 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
75 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
76 | 76 | |
77 | 77 | // Mark viewed by user (if required). |
78 | 78 | $completion = new completion_info($course); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | // Print the page header. |
82 | 82 | $PAGE->set_context($context); |
83 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
83 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
84 | 84 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
85 | 85 | $PAGE->set_cacheable(false); |
86 | 86 | $PAGE->set_heading($course->fullname); |
@@ -90,11 +90,11 @@ discard block |
||
90 | 90 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
91 | 91 | echo $OUTPUT->header(); |
92 | 92 | if (isguestuser()) { |
93 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
94 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
93 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
95 | 95 | } else { |
96 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
97 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
96 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
97 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
98 | 98 | } |
99 | 99 | echo $OUTPUT->footer(); |
100 | 100 | exit; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | // Operation URLs. |
104 | 104 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
105 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
105 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
106 | 106 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
107 | 107 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
108 | 108 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | echo $OUTPUT->footer(); |
123 | 123 | |
124 | 124 | // Shows version as a comment. |
125 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
125 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
126 | 126 | |
127 | 127 | // Initialize session variable used across views. |
128 | 128 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
152 | 152 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
153 | 153 | // Database info related to the activity. |
154 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
154 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
155 | 155 | $bbbsession['bigbluebuttonbn']->id; |
156 | 156 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
157 | 157 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
172 | 172 | } |
173 | 173 | if ($bbbsession['bigbluebuttonbn']->record) { |
174 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
174 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
175 | 175 | } |
176 | 176 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
177 | 177 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $bbbsession['originServerName'] = $parsedurl['host']; |
185 | 185 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
186 | 186 | $bbbsession['originServerCommonName'] = ''; |
187 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
187 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
188 | 188 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
189 | 189 | } |
190 | 190 | |
@@ -239,8 +239,8 @@ discard block |
||
239 | 239 | $groupname = groups_get_group_name($bbbsession['group']); |
240 | 240 | } |
241 | 241 | // Assign group default values. |
242 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
243 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
242 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
243 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
244 | 244 | if (count($groups) == 0) { |
245 | 245 | // Only the All participants group exists. |
246 | 246 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | if (has_capability('moodle/site:accessallgroups', $context)) { |
251 | 251 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
252 | 252 | } |
253 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
253 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
254 | 254 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
255 | 255 | echo '<br><br>'; |
256 | 256 | } |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
318 | 318 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
319 | 319 | } |
320 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
320 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
321 | 321 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
322 | 322 | } |
323 | 323 | |
@@ -386,12 +386,12 @@ discard block |
||
386 | 386 | // JavaScript variables for room. |
387 | 387 | $openingtime = ''; |
388 | 388 | if ($bbbsession['openingtime']) { |
389 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
389 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
390 | 390 | userdate($bbbsession['openingtime']); |
391 | 391 | } |
392 | 392 | $closingtime = ''; |
393 | 393 | if ($bbbsession['closingtime']) { |
394 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
394 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
395 | 395 | userdate($bbbsession['closingtime']); |
396 | 396 | } |
397 | 397 | $jsvars += array( |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | $output .= $OUTPUT->box_end(); |
409 | 409 | // Action button box. |
410 | 410 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
411 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
411 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
412 | 412 | $output .= $OUTPUT->box_end(); |
413 | 413 | if ($activity == 'ended') { |
414 | 414 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -457,7 +457,7 @@ discard block |
||
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. |
460 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
460 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
461 | 461 | } |
462 | 462 | // JavaScript variables for recordings with YUI. |
463 | 463 | $jsvars += array( |
@@ -485,8 +485,8 @@ discard block |
||
485 | 485 | array('type' => 'button', |
486 | 486 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
487 | 487 | 'class' => 'btn btn-secondary', |
488 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
489 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
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')); |
@@ -505,10 +505,10 @@ discard block |
||
505 | 505 | if (!is_null($bbbsession['presentation']['url'])) { |
506 | 506 | $attributes = array('title' => $bbbsession['presentation']['name']); |
507 | 507 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
508 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
509 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
508 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
509 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
510 | 510 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
511 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
511 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
512 | 512 | } |
513 | 513 | return ''; |
514 | 514 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | protected function init() { |
42 | 42 | parent::init(); |
43 | - $this->description = "The user with id '##userid' has deleted a recording with id ". |
|
43 | + $this->description = "The user with id '##userid' has deleted a recording with id " . |
|
44 | 44 | "'##other' from the course id '##contextinstanceid'."; |
45 | 45 | } |
46 | 46 |