@@ -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"; |
@@ -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 |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | */ |
122 | 122 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
123 | 123 | $data = ['meetingID' => $meetingid, |
124 | - 'fullName' => $username, |
|
125 | - 'password' => $pw, |
|
126 | - 'logoutURL' => $logouturl, |
|
124 | + 'fullName' => $username, |
|
125 | + 'password' => $pw, |
|
126 | + 'logoutURL' => $logouturl, |
|
127 | 127 | ]; |
128 | 128 | if (!is_null($configtoken)) { |
129 | 129 | $data['configToken'] = $configtoken; |
@@ -175,23 +175,23 @@ discard block |
||
175 | 175 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
176 | 176 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
177 | 177 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
178 | - ); |
|
178 | + ); |
|
179 | 179 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
180 | 180 | // Meeting info was returned. |
181 | 181 | return array('returncode' => $xml->returncode, |
182 | - 'meetingID' => $xml->meetingID, |
|
183 | - 'moderatorPW' => $xml->moderatorPW, |
|
184 | - 'attendeePW' => $xml->attendeePW, |
|
185 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
186 | - 'running' => $xml->running, |
|
187 | - 'recording' => $xml->recording, |
|
188 | - 'startTime' => $xml->startTime, |
|
189 | - 'endTime' => $xml->endTime, |
|
190 | - 'participantCount' => $xml->participantCount, |
|
191 | - 'moderatorCount' => $xml->moderatorCount, |
|
192 | - 'attendees' => $xml->attendees, |
|
193 | - 'metadata' => $xml->metadata, |
|
194 | - ); |
|
182 | + 'meetingID' => $xml->meetingID, |
|
183 | + 'moderatorPW' => $xml->moderatorPW, |
|
184 | + 'attendeePW' => $xml->attendeePW, |
|
185 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
186 | + 'running' => $xml->running, |
|
187 | + 'recording' => $xml->recording, |
|
188 | + 'startTime' => $xml->startTime, |
|
189 | + 'endTime' => $xml->endTime, |
|
190 | + 'participantCount' => $xml->participantCount, |
|
191 | + 'moderatorCount' => $xml->moderatorCount, |
|
192 | + 'attendees' => $xml->attendees, |
|
193 | + 'metadata' => $xml->metadata, |
|
194 | + ); |
|
195 | 195 | } |
196 | 196 | if ($xml) { |
197 | 197 | // Either failure or success without meeting info. |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | function bigbluebuttonbn_get_default_config_xml() { |
328 | 328 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
329 | 329 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
330 | - ); |
|
330 | + ); |
|
331 | 331 | return $xml; |
332 | 332 | } |
333 | 333 | |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | foreach ($ids as $id) { |
429 | 429 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
430 | 430 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
431 | - ); |
|
431 | + ); |
|
432 | 432 | if ($xml && $xml->returncode != 'SUCCESS') { |
433 | 433 | return false; |
434 | 434 | } |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | foreach ($ids as $id) { |
448 | 448 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
449 | 449 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
450 | - ); |
|
450 | + ); |
|
451 | 451 | if ($xml && $xml->returncode != 'SUCCESS') { |
452 | 452 | return false; |
453 | 453 | } |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | foreach ($ids as $id) { |
467 | 467 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
468 | 468 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
469 | - ); |
|
469 | + ); |
|
470 | 470 | if ($xml && $xml->returncode != 'SUCCESS') { |
471 | 471 | return false; |
472 | 472 | } |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
484 | 484 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
485 | 485 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
486 | - ); |
|
486 | + ); |
|
487 | 487 | if ($xml) { |
488 | 488 | // If the xml packet returned failure it displays the message to the user. |
489 | 489 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | function bigbluebuttonbn_get_server_version() { |
501 | 501 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
502 | 502 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
503 | - ); |
|
503 | + ); |
|
504 | 504 | if ($xml && $xml->returncode == 'SUCCESS') { |
505 | 505 | return $xml->version; |
506 | 506 | } |
@@ -567,10 +567,10 @@ discard block |
||
567 | 567 | } |
568 | 568 | $options = array(); |
569 | 569 | $options['CURLOPT_HTTPHEADER'] = array( |
570 | - 'Content-Type: '.$contenttype, |
|
571 | - 'Content-Length: '.strlen($data), |
|
572 | - 'Content-Language: en-US', |
|
573 | - ); |
|
570 | + 'Content-Type: '.$contenttype, |
|
571 | + 'Content-Length: '.strlen($data), |
|
572 | + 'Content-Language: en-US', |
|
573 | + ); |
|
574 | 574 | |
575 | 575 | return $c->post($url, $data, $options); |
576 | 576 | } |
@@ -717,16 +717,16 @@ discard block |
||
717 | 717 | 'all' => array( |
718 | 718 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
719 | 719 | 'children' => [] |
720 | - ) |
|
721 | - ); |
|
720 | + ) |
|
721 | + ); |
|
722 | 722 | $data['role'] = array( |
723 | 723 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
724 | 724 | 'children' => bigbluebuttonbn_get_roles_select($context) |
725 | - ); |
|
725 | + ); |
|
726 | 726 | $data['user'] = array( |
727 | 727 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
728 | 728 | 'children' => bigbluebuttonbn_get_users_select($context) |
729 | - ); |
|
729 | + ); |
|
730 | 730 | return $data; |
731 | 731 | } |
732 | 732 | |
@@ -771,9 +771,9 @@ discard block |
||
771 | 771 | continue; |
772 | 772 | } |
773 | 773 | $participantlistarray[] = array( |
774 | - 'selectiontype' => 'role', |
|
775 | - 'selectionid' => $moderatordefault, |
|
776 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
774 | + 'selectiontype' => 'role', |
|
775 | + 'selectionid' => $moderatordefault, |
|
776 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
777 | 777 | } |
778 | 778 | return $participantlistarray; |
779 | 779 | } |
@@ -816,11 +816,11 @@ discard block |
||
816 | 816 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
817 | 817 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
818 | 818 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
819 | - ], |
|
819 | + ], |
|
820 | 820 | 'type_selected' => 'all', |
821 | 821 | 'options' => ['all' => '---------------'], |
822 | 822 | 'selected' => 'all', |
823 | - ]; |
|
823 | + ]; |
|
824 | 824 | } |
825 | 825 | |
826 | 826 | /** |
@@ -1102,7 +1102,7 @@ discard block |
||
1102 | 1102 | $eventproperties['other'] = $options['other']; |
1103 | 1103 | } |
1104 | 1104 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
1105 | - array($eventproperties)); |
|
1105 | + array($eventproperties)); |
|
1106 | 1106 | $event->trigger(); |
1107 | 1107 | } |
1108 | 1108 | |
@@ -1146,7 +1146,7 @@ discard block |
||
1146 | 1146 | // Ping again and refresh the cache. |
1147 | 1147 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
1148 | 1148 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1149 | - ); |
|
1149 | + ); |
|
1150 | 1150 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
1151 | 1151 | return $meetinginfo; |
1152 | 1152 | } |
@@ -1558,8 +1558,8 @@ discard block |
||
1558 | 1558 | } |
1559 | 1559 | $id = 'playbacks-'.$recording['recordID']; |
1560 | 1560 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1561 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1562 | - 'title' => $title, $visibility => $visibility)); |
|
1561 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1562 | + 'title' => $title, $visibility => $visibility)); |
|
1563 | 1563 | foreach ($recording['playbacks'] as $playback) { |
1564 | 1564 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
1565 | 1565 | } |
@@ -1583,7 +1583,7 @@ discard block |
||
1583 | 1583 | } |
1584 | 1584 | $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
1585 | 1585 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1586 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1586 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1587 | 1587 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1588 | 1588 | $href .= '&href='.urlencode(trim($playback['url'])); |
1589 | 1589 | } |
@@ -1594,7 +1594,7 @@ discard block |
||
1594 | 1594 | 'data-action' => 'play', |
1595 | 1595 | 'data-target' => $playback['type'], |
1596 | 1596 | 'data-href' => $href, |
1597 | - ); |
|
1597 | + ); |
|
1598 | 1598 | if (!bigbluebuttonbn_validate_resource(trim($playback['url']))) { |
1599 | 1599 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
1600 | 1600 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -1730,10 +1730,10 @@ discard block |
||
1730 | 1730 | 'id' => $id, |
1731 | 1731 | 'onclick' => $onclick, |
1732 | 1732 | 'data-action' => $data['action'] |
1733 | - ); |
|
1733 | + ); |
|
1734 | 1734 | if (!isset($recording['imported'])) { |
1735 | 1735 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
1736 | - $recording['recordID']); |
|
1736 | + $recording['recordID']); |
|
1737 | 1737 | } |
1738 | 1738 | if (isset($data['disabled'])) { |
1739 | 1739 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2274,8 +2274,8 @@ discard block |
||
2274 | 2274 | $activitytime = ''; |
2275 | 2275 | if ($time) { |
2276 | 2276 | $activitytime = calendar_day_representation($time).' '. |
2277 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2278 | - calendar_time_representation($time); |
|
2277 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2278 | + calendar_time_representation($time); |
|
2279 | 2279 | } |
2280 | 2280 | return $activitytime; |
2281 | 2281 | } |
@@ -2371,7 +2371,7 @@ discard block |
||
2371 | 2371 | global $BIGBLUEBUTTONBN_CFG; |
2372 | 2372 | if (isset($BIGBLUEBUTTONBN_CFG)) { |
2373 | 2373 | $renderer->render_warning_message('general_warning', |
2374 | - get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
2374 | + get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
2375 | 2375 | } |
2376 | 2376 | } |
2377 | 2377 | |
@@ -2579,7 +2579,7 @@ discard block |
||
2579 | 2579 | $renderer->render_group_element('participant_moderator_default', |
2580 | 2580 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
2581 | 2581 | array_keys($owner), array_merge($owner, $roles)) |
2582 | - ); |
|
2582 | + ); |
|
2583 | 2583 | } |
2584 | 2584 | } |
2585 | 2585 | |
@@ -2683,7 +2683,7 @@ discard block |
||
2683 | 2683 | return $output; |
2684 | 2684 | } |
2685 | 2685 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
2686 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2686 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2687 | 2687 | $output .= ' ' . $message . "\n"; |
2688 | 2688 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
2689 | 2689 | if (!empty($href)) { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | global $CFG; |
30 | 30 | |
31 | -require_once(dirname(__FILE__).'/lib.php'); |
|
31 | +require_once(dirname(__FILE__) . '/lib.php'); |
|
32 | 32 | |
33 | 33 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
34 | 34 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | if (isset($meta)) { |
103 | 103 | $log->meta = $meta; |
104 | 104 | } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) { |
105 | - $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
105 | + $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
106 | 106 | } |
107 | 107 | $DB->insert_record('bigbluebuttonbn_logs', $log); |
108 | 108 | } |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | $data = null; |
151 | 151 | if (!is_null($pname) && !is_null($purl)) { |
152 | 152 | $method = 'POST'; |
153 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
154 | - $purl."' /></module></modules>"; |
|
153 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
154 | + $purl . "' /></module></modules>"; |
|
155 | 155 | } |
156 | 156 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
157 | 157 | if ($xml) { |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | // Override imported flag with actual ID. |
313 | 313 | $recording['imported'] = $recordimported->id; |
314 | 314 | if (isset($recordimported->protected)) { |
315 | - $recording['protected'] = (string) $recordimported->protected; |
|
315 | + $recording['protected'] = (string)$recordimported->protected; |
|
316 | 316 | } |
317 | 317 | $recordsimportedarray[$recording['recordID']] = $recording; |
318 | 318 | } |
@@ -342,21 +342,21 @@ discard block |
||
342 | 342 | // Add formats. |
343 | 343 | $playbackarray = array(); |
344 | 344 | foreach ($recording->playback->format as $format) { |
345 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
346 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
345 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
346 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
347 | 347 | // Add preview per format when existing. |
348 | 348 | if ($format->preview) { |
349 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
349 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
350 | 350 | } |
351 | 351 | } |
352 | 352 | // Add the metadata to the recordings array. |
353 | 353 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
354 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
355 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
356 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
357 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
354 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
355 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
356 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
357 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
358 | 358 | if (isset($recording->protected)) { |
359 | - $recordingarray['protected'] = (string) $recording->protected; |
|
359 | + $recordingarray['protected'] = (string)$recording->protected; |
|
360 | 360 | } |
361 | 361 | return $recordingarray + $metadataarray; |
362 | 362 | } |
@@ -371,9 +371,9 @@ discard block |
||
371 | 371 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
372 | 372 | $imagesarray = array(); |
373 | 373 | foreach ($preview->images->image as $image) { |
374 | - $imagearray = array('url' => trim((string) $image)); |
|
374 | + $imagearray = array('url' => trim((string)$image)); |
|
375 | 375 | foreach ($image->attributes() as $attkey => $attvalue) { |
376 | - $imagearray[$attkey] = (string) $attvalue; |
|
376 | + $imagearray[$attkey] = (string)$attvalue; |
|
377 | 377 | } |
378 | 378 | array_push($imagesarray, $imagearray); |
379 | 379 | } |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | if (is_object($value)) { |
394 | 394 | $value = ''; |
395 | 395 | } |
396 | - $metadataarray['meta_'.$key] = $value; |
|
396 | + $metadataarray['meta_' . $key] = $value; |
|
397 | 397 | } |
398 | 398 | return $metadataarray; |
399 | 399 | } |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | $ids = explode(',', $recordids); |
466 | 466 | foreach ($ids as $id) { |
467 | 467 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
468 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
468 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
469 | 469 | ); |
470 | 470 | if ($xml && $xml->returncode != 'SUCCESS') { |
471 | 471 | return false; |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | return $xml; |
531 | 531 | } catch (Exception $e) { |
532 | 532 | libxml_use_internal_errors($previous); |
533 | - $error = 'Caught exception: '.$e->getMessage(); |
|
533 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
534 | 534 | debugging($error, DEBUG_DEVELOPER); |
535 | 535 | return null; |
536 | 536 | } |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
542 | 542 | return $response; |
543 | 543 | } catch (Exception $e) { |
544 | - $error = 'Caught exception: '.$e->getMessage(); |
|
544 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
545 | 545 | debugging($error, DEBUG_DEVELOPER); |
546 | 546 | libxml_use_internal_errors($previous); |
547 | 547 | return null; |
@@ -567,8 +567,8 @@ discard block |
||
567 | 567 | } |
568 | 568 | $options = array(); |
569 | 569 | $options['CURLOPT_HTTPHEADER'] = array( |
570 | - 'Content-Type: '.$contenttype, |
|
571 | - 'Content-Length: '.strlen($data), |
|
570 | + 'Content-Type: ' . $contenttype, |
|
571 | + 'Content-Length: ' . strlen($data), |
|
572 | 572 | 'Content-Language: en-US', |
573 | 573 | ); |
574 | 574 | |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | * @return void |
590 | 590 | */ |
591 | 591 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
592 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
592 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
593 | 593 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
594 | 594 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
595 | 595 | } |
@@ -609,9 +609,9 @@ discard block |
||
609 | 609 | if ($userroles) { |
610 | 610 | $where = ''; |
611 | 611 | foreach ($userroles as $userrole) { |
612 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
612 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
613 | 613 | } |
614 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
614 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
615 | 615 | } |
616 | 616 | return $userroles; |
617 | 617 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | * @return array $users |
635 | 635 | */ |
636 | 636 | function bigbluebuttonbn_get_users(context $context = null) { |
637 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
637 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
638 | 638 | foreach ($users as $key => $value) { |
639 | 639 | $users[$key] = fullname($value); |
640 | 640 | } |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | * @return array $users |
650 | 650 | */ |
651 | 651 | function bigbluebuttonbn_get_users_select(context $context = null) { |
652 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
652 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
653 | 653 | foreach ($users as $key => $value) { |
654 | 654 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
655 | 655 | } |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | * @return array $roles |
665 | 665 | */ |
666 | 666 | function bigbluebuttonbn_get_roles(context $context = null) { |
667 | - $roles = (array) role_get_names($context); |
|
667 | + $roles = (array)role_get_names($context); |
|
668 | 668 | foreach ($roles as $key => $value) { |
669 | 669 | $roles[$key] = $value->localname; |
670 | 670 | } |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | * @return array $users |
680 | 680 | */ |
681 | 681 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
682 | - $roles = (array) role_get_names($context); |
|
682 | + $roles = (array)role_get_names($context); |
|
683 | 683 | foreach ($roles as $key => $value) { |
684 | 684 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
685 | 685 | } |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | * @return object $role |
695 | 695 | */ |
696 | 696 | function bigbluebuttonbn_get_role($id) { |
697 | - $roles = (array) role_get_names(); |
|
697 | + $roles = (array)role_get_names(); |
|
698 | 698 | if (is_numeric($id) && isset($roles[$id])) { |
699 | 699 | return (object)$roles[$id]; |
700 | 700 | } |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | if (!isguestuser()) { |
850 | 850 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
851 | 851 | } |
852 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
852 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
853 | 853 | } |
854 | 854 | |
855 | 855 | /** |
@@ -1005,7 +1005,7 @@ discard block |
||
1005 | 1005 | function bigbluebuttonbn_generate_nonce() { |
1006 | 1006 | $mt = microtime(); |
1007 | 1007 | $rand = mt_rand(); |
1008 | - return md5($mt.$rand); |
|
1008 | + return md5($mt . $rand); |
|
1009 | 1009 | } |
1010 | 1010 | |
1011 | 1011 | /** |
@@ -1031,21 +1031,21 @@ discard block |
||
1031 | 1031 | */ |
1032 | 1032 | function bigbluebuttonbn_events() { |
1033 | 1033 | return array( |
1034 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1035 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1036 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1037 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1038 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1039 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1040 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1041 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1042 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1043 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1044 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1045 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1046 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1047 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1048 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1034 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1035 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1036 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1037 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1038 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1039 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1040 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1041 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1042 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1043 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1044 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1045 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1046 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1047 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1048 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1049 | 1049 | ); |
1050 | 1050 | } |
1051 | 1051 | |
@@ -1056,21 +1056,21 @@ discard block |
||
1056 | 1056 | */ |
1057 | 1057 | function bigbluebuttonbn_events_action() { |
1058 | 1058 | return array( |
1059 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1060 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1061 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1062 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1063 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1064 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1065 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1066 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1067 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1068 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1069 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1070 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1071 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1072 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1073 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1059 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1060 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1061 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1062 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1063 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1064 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1065 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1066 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1067 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1068 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1069 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1070 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1071 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1072 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1073 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1074 | 1074 | ); |
1075 | 1075 | } |
1076 | 1076 | |
@@ -1101,7 +1101,7 @@ discard block |
||
1101 | 1101 | if (array_key_exists('other', $options)) { |
1102 | 1102 | $eventproperties['other'] = $options['other']; |
1103 | 1103 | } |
1104 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
1104 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
1105 | 1105 | array($eventproperties)); |
1106 | 1106 | $event->trigger(); |
1107 | 1107 | } |
@@ -1141,10 +1141,10 @@ discard block |
||
1141 | 1141 | $now = time(); |
1142 | 1142 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
1143 | 1143 | // Use the value in the cache. |
1144 | - return (array) json_decode($result['meeting_info']); |
|
1144 | + return (array)json_decode($result['meeting_info']); |
|
1145 | 1145 | } |
1146 | 1146 | // Ping again and refresh the cache. |
1147 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1147 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1148 | 1148 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1149 | 1149 | ); |
1150 | 1150 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | * @return object |
1256 | 1256 | */ |
1257 | 1257 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1258 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
1258 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
1259 | 1259 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
1260 | 1260 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
1261 | 1261 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1271,8 +1271,8 @@ discard block |
||
1271 | 1271 | * @return string |
1272 | 1272 | */ |
1273 | 1273 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
1274 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
1275 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1274 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
1275 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1276 | 1276 | return $configxmlparams; |
1277 | 1277 | } |
1278 | 1278 | |
@@ -1286,7 +1286,7 @@ discard block |
||
1286 | 1286 | */ |
1287 | 1287 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1288 | 1288 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
1289 | - $configxmlarray = (array) $configxml; |
|
1289 | + $configxmlarray = (array)$configxml; |
|
1290 | 1290 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1291 | 1291 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1292 | 1292 | return ''; |
@@ -1378,7 +1378,7 @@ discard block |
||
1378 | 1378 | global $USER; |
1379 | 1379 | $starttime = $starttime - ($starttime % 1000); |
1380 | 1380 | // Set formatted date. |
1381 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
1381 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
1382 | 1382 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
1383 | 1383 | } |
1384 | 1384 | |
@@ -1494,7 +1494,7 @@ discard block |
||
1494 | 1494 | * @return string |
1495 | 1495 | */ |
1496 | 1496 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
1497 | - $options = array('id' => 'preview-'.$recording['recordID']); |
|
1497 | + $options = array('id' => 'preview-' . $recording['recordID']); |
|
1498 | 1498 | if ($recording['published'] === 'false') { |
1499 | 1499 | $options['hidden'] = 'hidden'; |
1500 | 1500 | } |
@@ -1556,7 +1556,7 @@ discard block |
||
1556 | 1556 | if ($recording['published'] === 'false') { |
1557 | 1557 | $visibility = 'hidden '; |
1558 | 1558 | } |
1559 | - $id = 'playbacks-'.$recording['recordID']; |
|
1559 | + $id = 'playbacks-' . $recording['recordID']; |
|
1560 | 1560 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1561 | 1561 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
1562 | 1562 | 'title' => $title, $visibility => $visibility)); |
@@ -1581,11 +1581,11 @@ discard block |
||
1581 | 1581 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
1582 | 1582 | return ''; |
1583 | 1583 | } |
1584 | - $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
1584 | + $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
1585 | 1585 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1586 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1586 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1587 | 1587 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1588 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
1588 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
1589 | 1589 | } |
1590 | 1590 | $linkattributes = array( |
1591 | 1591 | 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
@@ -1740,7 +1740,7 @@ discard block |
||
1740 | 1740 | $linkattributes['class'] = 'disabled'; |
1741 | 1741 | unset($linkattributes['onclick']); |
1742 | 1742 | } |
1743 | - $icon = new pix_icon('i/'.$data['tag'], |
|
1743 | + $icon = new pix_icon('i/' . $data['tag'], |
|
1744 | 1744 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
1745 | 1745 | 'moodle', $iconattributes); |
1746 | 1746 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1857,7 +1857,7 @@ discard block |
||
1857 | 1857 | */ |
1858 | 1858 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
1859 | 1859 | $row = new html_table_row(); |
1860 | - $row->id = 'recording-tr-'.$recording['recordID']; |
|
1860 | + $row->id = 'recording-tr-' . $recording['recordID']; |
|
1861 | 1861 | $row->attributes['data-imported'] = 'false'; |
1862 | 1862 | $texthead = ''; |
1863 | 1863 | $texttail = ''; |
@@ -1917,9 +1917,9 @@ discard block |
||
1917 | 1917 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
1918 | 1918 | $sender = get_admin(); |
1919 | 1919 | // Prepare message. |
1920 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
1921 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
1922 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
1920 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
1921 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
1922 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
1923 | 1923 | $context = context_course::instance($bigbluebuttonbn->course); |
1924 | 1924 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
1925 | 1925 | } |
@@ -2141,7 +2141,7 @@ discard block |
||
2141 | 2141 | } |
2142 | 2142 | // Prepare select for loading records based on existent bigbluebuttonbns. |
2143 | 2143 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
2144 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
2144 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
2145 | 2145 | // Include only Create events and exclude those with record not true. |
2146 | 2146 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
2147 | 2147 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2273,8 +2273,8 @@ discard block |
||
2273 | 2273 | function bigbluebuttonbn_format_activity_time($time) { |
2274 | 2274 | $activitytime = ''; |
2275 | 2275 | if ($time) { |
2276 | - $activitytime = calendar_day_representation($time).' '. |
|
2277 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2276 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
2277 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
2278 | 2278 | calendar_time_representation($time); |
2279 | 2279 | } |
2280 | 2280 | return $activitytime; |
@@ -2675,7 +2675,7 @@ discard block |
||
2675 | 2675 | * |
2676 | 2676 | * @return string |
2677 | 2677 | */ |
2678 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
2678 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2679 | 2679 | global $OUTPUT; |
2680 | 2680 | $output = "\n"; |
2681 | 2681 | // Evaluates if config_warning is enabled. |
@@ -2714,11 +2714,11 @@ discard block |
||
2714 | 2714 | if ($class == '') { |
2715 | 2715 | $class = 'btn btn-secondary'; |
2716 | 2716 | } |
2717 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2718 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2719 | - $output .= ' title="' . $title . '"'."\n"; |
|
2720 | - $output .= ' >' . $text . '</button>'."\n"; |
|
2721 | - $output .= ' </form>'."\n"; |
|
2717 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
2718 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
2719 | + $output .= ' title="' . $title . '"' . "\n"; |
|
2720 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
2721 | + $output .= ' </form>' . "\n"; |
|
2722 | 2722 | return $output; |
2723 | 2723 | } |
2724 | 2724 |
@@ -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 | } |
@@ -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 | } |
@@ -434,12 +434,12 @@ discard block |
||
434 | 434 | $recordings = bigbluebuttonbn_get_recordings( |
435 | 435 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'], |
436 | 436 | $bbbsession['bigbluebuttonbn']->recordings_deleted |
437 | - ); |
|
437 | + ); |
|
438 | 438 | if ($enabledfeatures['importrecordings']) { |
439 | 439 | // Get recording links. |
440 | 440 | $recordingsimported = bigbluebuttonbn_get_recordings_imported_array( |
441 | 441 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'] |
442 | - ); |
|
442 | + ); |
|
443 | 443 | /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent |
444 | 444 | * recordings are not included. */ |
445 | 445 | if ($bbbsession['bigbluebuttonbn']->recordings_imported) { |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | // JavaScript variables for recordings. |
458 | 458 | $jsvars += array( |
459 | 459 | 'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1', |
460 | - ); |
|
460 | + ); |
|
461 | 461 | // If there are meetings with recordings load the data to the table. |
462 | 462 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
463 | 463 | // Render a plain html table. |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | $jsvars += array( |
468 | 468 | 'columns' => bigbluebuttonbn_get_recording_columns($bbbsession), |
469 | 469 | 'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings), |
470 | - ); |
|
470 | + ); |
|
471 | 471 | // Render a YUI table. |
472 | 472 | return html_writer::div('', '', array('id' => 'bigbluebuttonbn_recordings_table')); |
473 | 473 | } |
@@ -487,10 +487,10 @@ discard block |
||
487 | 487 | } |
488 | 488 | $button = html_writer::tag('input', '', |
489 | 489 | array('type' => 'button', |
490 | - 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
491 | - 'class' => 'btn btn-secondary', |
|
492 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
493 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
490 | + 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
491 | + 'class' => 'btn btn-secondary', |
|
492 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
493 | + $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
494 | 494 | $output = html_writer::empty_tag('br'); |
495 | 495 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
496 | 496 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -569,5 +569,5 @@ discard block |
||
569 | 569 | (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'), |
570 | 570 | (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'), |
571 | 571 | (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class') |
572 | - ); |
|
572 | + ); |
|
573 | 573 | } |
@@ -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 |
@@ -40,8 +40,8 @@ |
||
40 | 40 | */ |
41 | 41 | protected function init() { |
42 | 42 | parent::init(); |
43 | - $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id ". |
|
44 | - "'##objectid' for the course id '##contextinstanceid' has been forcibly ". |
|
43 | + $this->description = "A bigbluebutton meeting for the bigbluebuttonbn activity with id " . |
|
44 | + "'##objectid' for the course id '##contextinstanceid' has been forcibly " . |
|
45 | 45 | "ended by the user with id '##userid'."; |
46 | 46 | } |
47 | 47 |