@@ -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 |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | */ |
121 | 121 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
122 | 122 | $data = ['meetingID' => $meetingid, |
123 | - 'fullName' => $username, |
|
124 | - 'password' => $pw, |
|
125 | - 'logoutURL' => $logouturl, |
|
123 | + 'fullName' => $username, |
|
124 | + 'password' => $pw, |
|
125 | + 'logoutURL' => $logouturl, |
|
126 | 126 | ]; |
127 | 127 | if (!is_null($configtoken)) { |
128 | 128 | $data['configToken'] = $configtoken; |
@@ -174,23 +174,23 @@ discard block |
||
174 | 174 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
175 | 175 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
176 | 176 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
177 | - ); |
|
177 | + ); |
|
178 | 178 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
179 | 179 | // Meeting info was returned. |
180 | 180 | return array('returncode' => $xml->returncode, |
181 | - 'meetingID' => $xml->meetingID, |
|
182 | - 'moderatorPW' => $xml->moderatorPW, |
|
183 | - 'attendeePW' => $xml->attendeePW, |
|
184 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
185 | - 'running' => $xml->running, |
|
186 | - 'recording' => $xml->recording, |
|
187 | - 'startTime' => $xml->startTime, |
|
188 | - 'endTime' => $xml->endTime, |
|
189 | - 'participantCount' => $xml->participantCount, |
|
190 | - 'moderatorCount' => $xml->moderatorCount, |
|
191 | - 'attendees' => $xml->attendees, |
|
192 | - 'metadata' => $xml->metadata, |
|
193 | - ); |
|
181 | + 'meetingID' => $xml->meetingID, |
|
182 | + 'moderatorPW' => $xml->moderatorPW, |
|
183 | + 'attendeePW' => $xml->attendeePW, |
|
184 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
185 | + 'running' => $xml->running, |
|
186 | + 'recording' => $xml->recording, |
|
187 | + 'startTime' => $xml->startTime, |
|
188 | + 'endTime' => $xml->endTime, |
|
189 | + 'participantCount' => $xml->participantCount, |
|
190 | + 'moderatorCount' => $xml->moderatorCount, |
|
191 | + 'attendees' => $xml->attendees, |
|
192 | + 'metadata' => $xml->metadata, |
|
193 | + ); |
|
194 | 194 | } |
195 | 195 | if ($xml) { |
196 | 196 | // Either failure or success without meeting info. |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | function bigbluebuttonbn_get_default_config_xml() { |
327 | 327 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
328 | 328 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
329 | - ); |
|
329 | + ); |
|
330 | 330 | return $xml; |
331 | 331 | } |
332 | 332 | |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | foreach ($ids as $id) { |
428 | 428 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
429 | 429 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
430 | - ); |
|
430 | + ); |
|
431 | 431 | if ($xml && $xml->returncode != 'SUCCESS') { |
432 | 432 | return false; |
433 | 433 | } |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | foreach ($ids as $id) { |
447 | 447 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
448 | 448 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
449 | - ); |
|
449 | + ); |
|
450 | 450 | if ($xml && $xml->returncode != 'SUCCESS') { |
451 | 451 | return false; |
452 | 452 | } |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | foreach ($ids as $id) { |
466 | 466 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
467 | 467 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
468 | - ); |
|
468 | + ); |
|
469 | 469 | if ($xml && $xml->returncode != 'SUCCESS') { |
470 | 470 | return false; |
471 | 471 | } |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
483 | 483 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
484 | 484 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
485 | - ); |
|
485 | + ); |
|
486 | 486 | if ($xml) { |
487 | 487 | // If the xml packet returned failure it displays the message to the user. |
488 | 488 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | function bigbluebuttonbn_get_server_version() { |
500 | 500 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
501 | 501 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
502 | - ); |
|
502 | + ); |
|
503 | 503 | if ($xml && $xml->returncode == 'SUCCESS') { |
504 | 504 | return $xml->version; |
505 | 505 | } |
@@ -566,10 +566,10 @@ discard block |
||
566 | 566 | } |
567 | 567 | $options = array(); |
568 | 568 | $options['CURLOPT_HTTPHEADER'] = array( |
569 | - 'Content-Type: '.$contenttype, |
|
570 | - 'Content-Length: '.strlen($data), |
|
571 | - 'Content-Language: en-US', |
|
572 | - ); |
|
569 | + 'Content-Type: '.$contenttype, |
|
570 | + 'Content-Length: '.strlen($data), |
|
571 | + 'Content-Language: en-US', |
|
572 | + ); |
|
573 | 573 | |
574 | 574 | return $c->post($url, $data, $options); |
575 | 575 | } |
@@ -716,16 +716,16 @@ discard block |
||
716 | 716 | 'all' => array( |
717 | 717 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
718 | 718 | 'children' => [] |
719 | - ) |
|
720 | - ); |
|
719 | + ) |
|
720 | + ); |
|
721 | 721 | $data['role'] = array( |
722 | 722 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
723 | 723 | 'children' => bigbluebuttonbn_get_roles_select($context) |
724 | - ); |
|
724 | + ); |
|
725 | 725 | $data['user'] = array( |
726 | 726 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
727 | 727 | 'children' => bigbluebuttonbn_get_users_select($context) |
728 | - ); |
|
728 | + ); |
|
729 | 729 | return $data; |
730 | 730 | } |
731 | 731 | |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | 'selectiontype' => 'all', |
767 | 767 | 'selectionid' => 'all', |
768 | 768 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER |
769 | - ); |
|
769 | + ); |
|
770 | 770 | $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); |
771 | 771 | foreach ($defaultrules as $defaultrule) { |
772 | 772 | if ($defaultrule == '0') { |
@@ -779,9 +779,9 @@ discard block |
||
779 | 779 | continue; |
780 | 780 | } |
781 | 781 | $participantlist[] = array( |
782 | - 'selectiontype' => 'role', |
|
783 | - 'selectionid' => $defaultrule, |
|
784 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
782 | + 'selectiontype' => 'role', |
|
783 | + 'selectionid' => $defaultrule, |
|
784 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
785 | 785 | } |
786 | 786 | return $participantlist; |
787 | 787 | } |
@@ -820,11 +820,11 @@ discard block |
||
820 | 820 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
821 | 821 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
822 | 822 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
823 | - ], |
|
823 | + ], |
|
824 | 824 | 'type_selected' => 'all', |
825 | 825 | 'options' => ['all' => '---------------'], |
826 | 826 | 'selected' => 'all', |
827 | - ]; |
|
827 | + ]; |
|
828 | 828 | } |
829 | 829 | |
830 | 830 | /** |
@@ -1101,7 +1101,7 @@ discard block |
||
1101 | 1101 | $eventproperties['other'] = $options['other']; |
1102 | 1102 | } |
1103 | 1103 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
1104 | - array($eventproperties)); |
|
1104 | + array($eventproperties)); |
|
1105 | 1105 | $event->trigger(); |
1106 | 1106 | } |
1107 | 1107 | |
@@ -1145,7 +1145,7 @@ discard block |
||
1145 | 1145 | // Ping again and refresh the cache. |
1146 | 1146 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
1147 | 1147 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1148 | - ); |
|
1148 | + ); |
|
1149 | 1149 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
1150 | 1150 | return $meetinginfo; |
1151 | 1151 | } |
@@ -1557,8 +1557,8 @@ discard block |
||
1557 | 1557 | } |
1558 | 1558 | $id = 'playbacks-'.$recording['recordID']; |
1559 | 1559 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1560 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1561 | - 'title' => $title, $visibility => $visibility)); |
|
1560 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1561 | + 'title' => $title, $visibility => $visibility)); |
|
1562 | 1562 | foreach ($recording['playbacks'] as $playback) { |
1563 | 1563 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
1564 | 1564 | } |
@@ -1582,7 +1582,7 @@ discard block |
||
1582 | 1582 | } |
1583 | 1583 | $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
1584 | 1584 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1585 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1585 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1586 | 1586 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1587 | 1587 | $href .= '&href='.urlencode(trim($playback['url'])); |
1588 | 1588 | } |
@@ -1593,7 +1593,7 @@ discard block |
||
1593 | 1593 | 'data-action' => 'play', |
1594 | 1594 | 'data-target' => $playback['type'], |
1595 | 1595 | 'data-href' => $href, |
1596 | - ); |
|
1596 | + ); |
|
1597 | 1597 | if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
1598 | 1598 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
1599 | 1599 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -1743,10 +1743,10 @@ discard block |
||
1743 | 1743 | 'id' => $id, |
1744 | 1744 | 'onclick' => $onclick, |
1745 | 1745 | 'data-action' => $data['action'] |
1746 | - ); |
|
1746 | + ); |
|
1747 | 1747 | if (!isset($recording['imported'])) { |
1748 | 1748 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
1749 | - $recording['recordID']); |
|
1749 | + $recording['recordID']); |
|
1750 | 1750 | } |
1751 | 1751 | if (isset($data['disabled'])) { |
1752 | 1752 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2287,8 +2287,8 @@ discard block |
||
2287 | 2287 | $activitytime = ''; |
2288 | 2288 | if ($time) { |
2289 | 2289 | $activitytime = calendar_day_representation($time).' '. |
2290 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2291 | - calendar_time_representation($time); |
|
2290 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2291 | + calendar_time_representation($time); |
|
2292 | 2292 | } |
2293 | 2293 | return $activitytime; |
2294 | 2294 | } |
@@ -2384,7 +2384,7 @@ discard block |
||
2384 | 2384 | global $BIGBLUEBUTTONBN_CFG; |
2385 | 2385 | if (isset($BIGBLUEBUTTONBN_CFG)) { |
2386 | 2386 | $renderer->render_warning_message('general_warning', |
2387 | - get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
2387 | + get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
2388 | 2388 | } |
2389 | 2389 | } |
2390 | 2390 | |
@@ -2592,7 +2592,7 @@ discard block |
||
2592 | 2592 | $renderer->render_group_element('participant_moderator_default', |
2593 | 2593 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
2594 | 2594 | array_keys($owner), array_merge($owner, $roles)) |
2595 | - ); |
|
2595 | + ); |
|
2596 | 2596 | } |
2597 | 2597 | } |
2598 | 2598 | |
@@ -2696,7 +2696,7 @@ discard block |
||
2696 | 2696 | return $output; |
2697 | 2697 | } |
2698 | 2698 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
2699 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2699 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2700 | 2700 | $output .= ' ' . $message . "\n"; |
2701 | 2701 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
2702 | 2702 | 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; |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | $data = null; |
119 | 119 | if (!is_null($pname) && !is_null($purl)) { |
120 | 120 | $method = 'POST'; |
121 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
122 | - $purl."' /></module></modules>"; |
|
121 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
122 | + $purl . "' /></module></modules>"; |
|
123 | 123 | } |
124 | 124 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
125 | 125 | if ($xml) { |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | // Override imported flag with actual ID. |
281 | 281 | $recording['imported'] = $recordimported->id; |
282 | 282 | if (isset($recordimported->protected)) { |
283 | - $recording['protected'] = (string) $recordimported->protected; |
|
283 | + $recording['protected'] = (string)$recordimported->protected; |
|
284 | 284 | } |
285 | 285 | $recordsimportedarray[$recording['recordID']] = $recording; |
286 | 286 | } |
@@ -310,21 +310,21 @@ discard block |
||
310 | 310 | // Add formats. |
311 | 311 | $playbackarray = array(); |
312 | 312 | foreach ($recording->playback->format as $format) { |
313 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
314 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
313 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
314 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
315 | 315 | // Add preview per format when existing. |
316 | 316 | if ($format->preview) { |
317 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
317 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
318 | 318 | } |
319 | 319 | } |
320 | 320 | // Add the metadata to the recordings array. |
321 | 321 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
322 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
323 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
324 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
325 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
322 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
323 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
324 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
325 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
326 | 326 | if (isset($recording->protected)) { |
327 | - $recordingarray['protected'] = (string) $recording->protected; |
|
327 | + $recordingarray['protected'] = (string)$recording->protected; |
|
328 | 328 | } |
329 | 329 | return $recordingarray + $metadataarray; |
330 | 330 | } |
@@ -339,9 +339,9 @@ discard block |
||
339 | 339 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
340 | 340 | $imagesarray = array(); |
341 | 341 | foreach ($preview->images->image as $image) { |
342 | - $imagearray = array('url' => trim((string) $image)); |
|
342 | + $imagearray = array('url' => trim((string)$image)); |
|
343 | 343 | foreach ($image->attributes() as $attkey => $attvalue) { |
344 | - $imagearray[$attkey] = (string) $attvalue; |
|
344 | + $imagearray[$attkey] = (string)$attvalue; |
|
345 | 345 | } |
346 | 346 | array_push($imagesarray, $imagearray); |
347 | 347 | } |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | if (is_object($value)) { |
362 | 362 | $value = ''; |
363 | 363 | } |
364 | - $metadataarray['meta_'.$key] = $value; |
|
364 | + $metadataarray['meta_' . $key] = $value; |
|
365 | 365 | } |
366 | 366 | return $metadataarray; |
367 | 367 | } |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | $ids = explode(',', $recordids); |
434 | 434 | foreach ($ids as $id) { |
435 | 435 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
436 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
436 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
437 | 437 | ); |
438 | 438 | if ($xml && $xml->returncode != 'SUCCESS') { |
439 | 439 | return false; |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | return $xml; |
499 | 499 | } catch (Exception $e) { |
500 | 500 | libxml_use_internal_errors($previous); |
501 | - $error = 'Caught exception: '.$e->getMessage(); |
|
501 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
502 | 502 | debugging($error, DEBUG_DEVELOPER); |
503 | 503 | return null; |
504 | 504 | } |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
510 | 510 | return $response; |
511 | 511 | } catch (Exception $e) { |
512 | - $error = 'Caught exception: '.$e->getMessage(); |
|
512 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
513 | 513 | debugging($error, DEBUG_DEVELOPER); |
514 | 514 | libxml_use_internal_errors($previous); |
515 | 515 | return null; |
@@ -535,8 +535,8 @@ discard block |
||
535 | 535 | } |
536 | 536 | $options = array(); |
537 | 537 | $options['CURLOPT_HTTPHEADER'] = array( |
538 | - 'Content-Type: '.$contenttype, |
|
539 | - 'Content-Length: '.strlen($data), |
|
538 | + 'Content-Type: ' . $contenttype, |
|
539 | + 'Content-Length: ' . strlen($data), |
|
540 | 540 | 'Content-Language: en-US', |
541 | 541 | ); |
542 | 542 | |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | * @return void |
558 | 558 | */ |
559 | 559 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
560 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
560 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
561 | 561 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
562 | 562 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
563 | 563 | } |
@@ -577,9 +577,9 @@ discard block |
||
577 | 577 | if ($userroles) { |
578 | 578 | $where = ''; |
579 | 579 | foreach ($userroles as $userrole) { |
580 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
580 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
581 | 581 | } |
582 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
582 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
583 | 583 | } |
584 | 584 | return $userroles; |
585 | 585 | } |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | * @return array $users |
603 | 603 | */ |
604 | 604 | function bigbluebuttonbn_get_users(context $context = null) { |
605 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
605 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
606 | 606 | foreach ($users as $key => $value) { |
607 | 607 | $users[$key] = fullname($value); |
608 | 608 | } |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | * @return array $users |
618 | 618 | */ |
619 | 619 | function bigbluebuttonbn_get_users_select(context $context = null) { |
620 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
620 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
621 | 621 | foreach ($users as $key => $value) { |
622 | 622 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
623 | 623 | } |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | * @return array $roles |
633 | 633 | */ |
634 | 634 | function bigbluebuttonbn_get_roles(context $context = null) { |
635 | - $roles = (array) role_get_names($context); |
|
635 | + $roles = (array)role_get_names($context); |
|
636 | 636 | foreach ($roles as $key => $value) { |
637 | 637 | $roles[$key] = $value->localname; |
638 | 638 | } |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | * @return array $users |
648 | 648 | */ |
649 | 649 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
650 | - $roles = (array) role_get_names($context); |
|
650 | + $roles = (array)role_get_names($context); |
|
651 | 651 | foreach ($roles as $key => $value) { |
652 | 652 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
653 | 653 | } |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | * @return object $role |
663 | 663 | */ |
664 | 664 | function bigbluebuttonbn_get_role($id) { |
665 | - $roles = (array) role_get_names(); |
|
665 | + $roles = (array)role_get_names(); |
|
666 | 666 | if (is_numeric($id) && isset($roles[$id])) { |
667 | 667 | return (object)$roles[$id]; |
668 | 668 | } |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | if (!isguestuser()) { |
820 | 820 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
821 | 821 | } |
822 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
822 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
823 | 823 | } |
824 | 824 | |
825 | 825 | /** |
@@ -975,7 +975,7 @@ discard block |
||
975 | 975 | function bigbluebuttonbn_generate_nonce() { |
976 | 976 | $mt = microtime(); |
977 | 977 | $rand = mt_rand(); |
978 | - return md5($mt.$rand); |
|
978 | + return md5($mt . $rand); |
|
979 | 979 | } |
980 | 980 | |
981 | 981 | /** |
@@ -1001,21 +1001,21 @@ discard block |
||
1001 | 1001 | */ |
1002 | 1002 | function bigbluebuttonbn_events() { |
1003 | 1003 | return array( |
1004 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1005 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1006 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1007 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1008 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1009 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1010 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1011 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1012 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1013 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1014 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1015 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1016 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1017 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1018 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1004 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1005 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1006 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1007 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1008 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1009 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1010 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1011 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1012 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1013 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1014 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1015 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1016 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1017 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1018 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1019 | 1019 | ); |
1020 | 1020 | } |
1021 | 1021 | |
@@ -1026,21 +1026,21 @@ discard block |
||
1026 | 1026 | */ |
1027 | 1027 | function bigbluebuttonbn_events_action() { |
1028 | 1028 | return array( |
1029 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1030 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1031 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1032 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1033 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1034 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1035 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1036 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1037 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1038 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1039 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1040 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1041 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1042 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1043 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1029 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1030 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1031 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1032 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1033 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1034 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1035 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1036 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1037 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1038 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1039 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1040 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1041 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1042 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1043 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1044 | 1044 | ); |
1045 | 1045 | } |
1046 | 1046 | |
@@ -1071,7 +1071,7 @@ discard block |
||
1071 | 1071 | if (array_key_exists('other', $options)) { |
1072 | 1072 | $eventproperties['other'] = $options['other']; |
1073 | 1073 | } |
1074 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
1074 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
1075 | 1075 | array($eventproperties)); |
1076 | 1076 | $event->trigger(); |
1077 | 1077 | } |
@@ -1111,10 +1111,10 @@ discard block |
||
1111 | 1111 | $now = time(); |
1112 | 1112 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
1113 | 1113 | // Use the value in the cache. |
1114 | - return (array) json_decode($result['meeting_info']); |
|
1114 | + return (array)json_decode($result['meeting_info']); |
|
1115 | 1115 | } |
1116 | 1116 | // Ping again and refresh the cache. |
1117 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1117 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1118 | 1118 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1119 | 1119 | ); |
1120 | 1120 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1225,7 +1225,7 @@ discard block |
||
1225 | 1225 | * @return object |
1226 | 1226 | */ |
1227 | 1227 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1228 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
1228 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
1229 | 1229 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
1230 | 1230 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
1231 | 1231 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1241,8 +1241,8 @@ discard block |
||
1241 | 1241 | * @return string |
1242 | 1242 | */ |
1243 | 1243 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
1244 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
1245 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1244 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
1245 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1246 | 1246 | return $configxmlparams; |
1247 | 1247 | } |
1248 | 1248 | |
@@ -1256,7 +1256,7 @@ discard block |
||
1256 | 1256 | */ |
1257 | 1257 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1258 | 1258 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
1259 | - $configxmlarray = (array) $configxml; |
|
1259 | + $configxmlarray = (array)$configxml; |
|
1260 | 1260 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1261 | 1261 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1262 | 1262 | return ''; |
@@ -1348,7 +1348,7 @@ discard block |
||
1348 | 1348 | global $USER; |
1349 | 1349 | $starttime = $starttime - ($starttime % 1000); |
1350 | 1350 | // Set formatted date. |
1351 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
1351 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
1352 | 1352 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
1353 | 1353 | } |
1354 | 1354 | |
@@ -1464,7 +1464,7 @@ discard block |
||
1464 | 1464 | * @return string |
1465 | 1465 | */ |
1466 | 1466 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
1467 | - $options = array('id' => 'preview-'.$recording['recordID']); |
|
1467 | + $options = array('id' => 'preview-' . $recording['recordID']); |
|
1468 | 1468 | if ($recording['published'] === 'false') { |
1469 | 1469 | $options['hidden'] = 'hidden'; |
1470 | 1470 | } |
@@ -1526,7 +1526,7 @@ discard block |
||
1526 | 1526 | if ($recording['published'] === 'false') { |
1527 | 1527 | $visibility = 'hidden '; |
1528 | 1528 | } |
1529 | - $id = 'playbacks-'.$recording['recordID']; |
|
1529 | + $id = 'playbacks-' . $recording['recordID']; |
|
1530 | 1530 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1531 | 1531 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
1532 | 1532 | 'title' => $title, $visibility => $visibility)); |
@@ -1551,11 +1551,11 @@ discard block |
||
1551 | 1551 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
1552 | 1552 | return ''; |
1553 | 1553 | } |
1554 | - $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
1554 | + $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
1555 | 1555 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1556 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1556 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1557 | 1557 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1558 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
1558 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
1559 | 1559 | } |
1560 | 1560 | $linkattributes = array( |
1561 | 1561 | 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
@@ -1724,7 +1724,7 @@ discard block |
||
1724 | 1724 | $linkattributes['class'] = 'disabled'; |
1725 | 1725 | unset($linkattributes['onclick']); |
1726 | 1726 | } |
1727 | - $icon = new pix_icon('i/'.$data['tag'], |
|
1727 | + $icon = new pix_icon('i/' . $data['tag'], |
|
1728 | 1728 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
1729 | 1729 | 'moodle', $iconattributes); |
1730 | 1730 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1841,7 +1841,7 @@ discard block |
||
1841 | 1841 | */ |
1842 | 1842 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
1843 | 1843 | $row = new html_table_row(); |
1844 | - $row->id = 'recording-tr-'.$recording['recordID']; |
|
1844 | + $row->id = 'recording-tr-' . $recording['recordID']; |
|
1845 | 1845 | $row->attributes['data-imported'] = 'false'; |
1846 | 1846 | $texthead = ''; |
1847 | 1847 | $texttail = ''; |
@@ -1901,9 +1901,9 @@ discard block |
||
1901 | 1901 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
1902 | 1902 | $sender = get_admin(); |
1903 | 1903 | // Prepare message. |
1904 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
1905 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
1906 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
1904 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
1905 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
1906 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
1907 | 1907 | $context = context_course::instance($bigbluebuttonbn->course); |
1908 | 1908 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
1909 | 1909 | } |
@@ -2125,7 +2125,7 @@ discard block |
||
2125 | 2125 | } |
2126 | 2126 | // Prepare select for loading records based on existent bigbluebuttonbns. |
2127 | 2127 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
2128 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
2128 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
2129 | 2129 | // Include only Create events and exclude those with record not true. |
2130 | 2130 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
2131 | 2131 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2257,8 +2257,8 @@ discard block |
||
2257 | 2257 | function bigbluebuttonbn_format_activity_time($time) { |
2258 | 2258 | $activitytime = ''; |
2259 | 2259 | if ($time) { |
2260 | - $activitytime = calendar_day_representation($time).' '. |
|
2261 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2260 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
2261 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
2262 | 2262 | calendar_time_representation($time); |
2263 | 2263 | } |
2264 | 2264 | return $activitytime; |
@@ -2659,7 +2659,7 @@ discard block |
||
2659 | 2659 | * |
2660 | 2660 | * @return string |
2661 | 2661 | */ |
2662 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
2662 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2663 | 2663 | global $OUTPUT; |
2664 | 2664 | $output = "\n"; |
2665 | 2665 | // Evaluates if config_warning is enabled. |
@@ -2698,11 +2698,11 @@ discard block |
||
2698 | 2698 | if ($class == '') { |
2699 | 2699 | $class = 'btn btn-secondary'; |
2700 | 2700 | } |
2701 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2702 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2703 | - $output .= ' title="' . $title . '"'."\n"; |
|
2704 | - $output .= ' >' . $text . '</button>'."\n"; |
|
2705 | - $output .= ' </form>'."\n"; |
|
2701 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
2702 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
2703 | + $output .= ' title="' . $title . '"' . "\n"; |
|
2704 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
2705 | + $output .= ' </form>' . "\n"; |
|
2706 | 2706 | return $output; |
2707 | 2707 | } |
2708 | 2708 |
@@ -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 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | protected function init() { |
42 | 42 | parent::init(); |
43 | - $this->description = "The user with id '##userid' has edited a recording with id ". |
|
43 | + $this->description = "The user with id '##userid' has edited a recording with id " . |
|
44 | 44 | "'##other' in the course id '##contextinstanceid'."; |
45 | 45 | } |
46 | 46 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | protected function init() { |
42 | 42 | parent::init(); |
43 | - $this->description = "The user with id '##userid' has published a recording with id ". |
|
43 | + $this->description = "The user with id '##userid' has published a recording with id " . |
|
44 | 44 | "'##other' in the course id '##contextinstanceid'."; |
45 | 45 | } |
46 | 46 |