@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) { |
43 | 43 | parent::init($crud, $edulevel); |
44 | - $this->description = "The user with id '##userid' has unpublished a recording with id ". |
|
44 | + $this->description = "The user with id '##userid' has unpublished a recording with id " . |
|
45 | 45 | "'##other' in the course id '##courseid'."; |
46 | 46 | } |
47 | 47 |
@@ -41,8 +41,8 @@ |
||
41 | 41 | */ |
42 | 42 | protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) { |
43 | 43 | parent::init($crud, $edulevel); |
44 | - $this->description = "The user with id '##userid' triggered action ##other in a ". |
|
45 | - "bigbluebutton meeting for the bigbluebuttonbn activity with id ". |
|
44 | + $this->description = "The user with id '##userid' triggered action ##other in a " . |
|
45 | + "bigbluebutton meeting for the bigbluebuttonbn activity with id " . |
|
46 | 46 | "'##objectid' for the course id '##courseid'."; |
47 | 47 | } |
48 | 48 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) { |
43 | 43 | parent::init($crud, $edulevel); |
44 | - $this->description = "The user with id '##userid' has unprotected a recording with id ". |
|
44 | + $this->description = "The user with id '##userid' has unprotected a recording with id " . |
|
45 | 45 | "'##other' in the course id '##courseid'."; |
46 | 46 | } |
47 | 47 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) { |
43 | 43 | parent::init($crud, $edulevel); |
44 | - $this->description = "The user with id '##userid' has imported a recording with id ". |
|
44 | + $this->description = "The user with id '##userid' has imported a recording with id " . |
|
45 | 45 | "'##other' in the course id '##courseid'."; |
46 | 46 | } |
47 | 47 |
@@ -41,8 +41,8 @@ |
||
41 | 41 | */ |
42 | 42 | protected function init($crud = 'r', $edulevel = self::LEVEL_PARTICIPATING) { |
43 | 43 | parent::init($crud, $edulevel); |
44 | - $this->description = "The user with id '##userid' has joined a bigbluebutton meeting for ". |
|
45 | - "the bigbluebuttonbn activity with id '##objectid' for the course id ". |
|
44 | + $this->description = "The user with id '##userid' has joined a bigbluebutton meeting for " . |
|
45 | + "the bigbluebuttonbn activity with id '##objectid' for the course id " . |
|
46 | 46 | "'##courseid'."; |
47 | 47 | } |
48 | 48 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) { |
43 | 43 | parent::init($crud, $edulevel); |
44 | - $this->description = "The user with id '##userid' has protected a recording with id ". |
|
44 | + $this->description = "The user with id '##userid' has protected a recording with id " . |
|
45 | 45 | "'##other' in the course id '##courseid'."; |
46 | 46 | } |
47 | 47 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | protected function init($crud = 'r', $edulevel = self::LEVEL_OTHER) { |
43 | 43 | parent::init($crud, $edulevel); |
44 | - $this->description = "The user with id '##userid' has viewed a recording with id ". |
|
44 | + $this->description = "The user with id '##userid' has viewed a recording with id " . |
|
45 | 45 | "'##other' from the course id '##courseid'."; |
46 | 46 | } |
47 | 47 |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, |
96 | 96 | $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) { |
97 | 97 | $data = ['meetingID' => $meetingid, |
98 | - 'fullName' => $username, |
|
99 | - 'password' => $pw, |
|
100 | - 'logoutURL' => $logouturl, |
|
98 | + 'fullName' => $username, |
|
99 | + 'password' => $pw, |
|
100 | + 'logoutURL' => $logouturl, |
|
101 | 101 | ]; |
102 | 102 | // Choose between Adobe Flash or HTML5 Client. |
103 | 103 | if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
@@ -153,23 +153,23 @@ discard block |
||
153 | 153 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
154 | 154 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
155 | 155 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
156 | - ); |
|
156 | + ); |
|
157 | 157 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
158 | 158 | // Meeting info was returned. |
159 | 159 | return array('returncode' => $xml->returncode, |
160 | - 'meetingID' => $xml->meetingID, |
|
161 | - 'moderatorPW' => $xml->moderatorPW, |
|
162 | - 'attendeePW' => $xml->attendeePW, |
|
163 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
164 | - 'running' => $xml->running, |
|
165 | - 'recording' => $xml->recording, |
|
166 | - 'startTime' => $xml->startTime, |
|
167 | - 'endTime' => $xml->endTime, |
|
168 | - 'participantCount' => $xml->participantCount, |
|
169 | - 'moderatorCount' => $xml->moderatorCount, |
|
170 | - 'attendees' => $xml->attendees, |
|
171 | - 'metadata' => $xml->metadata, |
|
172 | - ); |
|
160 | + 'meetingID' => $xml->meetingID, |
|
161 | + 'moderatorPW' => $xml->moderatorPW, |
|
162 | + 'attendeePW' => $xml->attendeePW, |
|
163 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
164 | + 'running' => $xml->running, |
|
165 | + 'recording' => $xml->recording, |
|
166 | + 'startTime' => $xml->startTime, |
|
167 | + 'endTime' => $xml->endTime, |
|
168 | + 'participantCount' => $xml->participantCount, |
|
169 | + 'moderatorCount' => $xml->moderatorCount, |
|
170 | + 'attendees' => $xml->attendees, |
|
171 | + 'metadata' => $xml->metadata, |
|
172 | + ); |
|
173 | 173 | } |
174 | 174 | if ($xml) { |
175 | 175 | // Either failure or success without meeting info. |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | function bigbluebuttonbn_get_default_config_xml() { |
306 | 306 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
307 | 307 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
308 | - ); |
|
308 | + ); |
|
309 | 309 | return $xml; |
310 | 310 | } |
311 | 311 | |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | foreach ($ids as $id) { |
407 | 407 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
408 | 408 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
409 | - ); |
|
409 | + ); |
|
410 | 410 | if ($xml && $xml->returncode != 'SUCCESS') { |
411 | 411 | return false; |
412 | 412 | } |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | foreach ($ids as $id) { |
426 | 426 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
427 | 427 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
428 | - ); |
|
428 | + ); |
|
429 | 429 | if ($xml && $xml->returncode != 'SUCCESS') { |
430 | 430 | return false; |
431 | 431 | } |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | foreach ($ids as $id) { |
445 | 445 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
446 | 446 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
447 | - ); |
|
447 | + ); |
|
448 | 448 | if ($xml && $xml->returncode != 'SUCCESS') { |
449 | 449 | return false; |
450 | 450 | } |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
462 | 462 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
463 | 463 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
464 | - ); |
|
464 | + ); |
|
465 | 465 | if ($xml) { |
466 | 466 | // If the xml packet returned failure it displays the message to the user. |
467 | 467 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | function bigbluebuttonbn_get_server_version() { |
479 | 479 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
480 | 480 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
481 | - ); |
|
481 | + ); |
|
482 | 482 | if ($xml && $xml->returncode == 'SUCCESS') { |
483 | 483 | return $xml->version; |
484 | 484 | } |
@@ -545,10 +545,10 @@ discard block |
||
545 | 545 | } |
546 | 546 | $options = array(); |
547 | 547 | $options['CURLOPT_HTTPHEADER'] = array( |
548 | - 'Content-Type: '.$contenttype, |
|
549 | - 'Content-Length: '.strlen($data), |
|
550 | - 'Content-Language: en-US', |
|
551 | - ); |
|
548 | + 'Content-Type: '.$contenttype, |
|
549 | + 'Content-Length: '.strlen($data), |
|
550 | + 'Content-Language: en-US', |
|
551 | + ); |
|
552 | 552 | |
553 | 553 | return $c->post($url, $data, $options); |
554 | 554 | } |
@@ -695,16 +695,16 @@ discard block |
||
695 | 695 | 'all' => array( |
696 | 696 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
697 | 697 | 'children' => [] |
698 | - ) |
|
699 | - ); |
|
698 | + ) |
|
699 | + ); |
|
700 | 700 | $data['role'] = array( |
701 | 701 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
702 | 702 | 'children' => bigbluebuttonbn_get_roles_select($context) |
703 | - ); |
|
703 | + ); |
|
704 | 704 | $data['user'] = array( |
705 | 705 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
706 | 706 | 'children' => bigbluebuttonbn_get_users_select($context) |
707 | - ); |
|
707 | + ); |
|
708 | 708 | return $data; |
709 | 709 | } |
710 | 710 | |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | 'selectiontype' => 'all', |
748 | 748 | 'selectionid' => 'all', |
749 | 749 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER |
750 | - ); |
|
750 | + ); |
|
751 | 751 | $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); |
752 | 752 | foreach ($defaultrules as $defaultrule) { |
753 | 753 | if ($defaultrule == '0') { |
@@ -760,9 +760,9 @@ discard block |
||
760 | 760 | continue; |
761 | 761 | } |
762 | 762 | $participantlist[] = array( |
763 | - 'selectiontype' => 'role', |
|
764 | - 'selectionid' => $defaultrule, |
|
765 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
763 | + 'selectiontype' => 'role', |
|
764 | + 'selectionid' => $defaultrule, |
|
765 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
766 | 766 | } |
767 | 767 | return $participantlist; |
768 | 768 | } |
@@ -801,11 +801,11 @@ discard block |
||
801 | 801 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
802 | 802 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
803 | 803 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
804 | - ], |
|
804 | + ], |
|
805 | 805 | 'type_selected' => 'all', |
806 | 806 | 'options' => ['all' => '---------------'], |
807 | 807 | 'selected' => 'all', |
808 | - ]; |
|
808 | + ]; |
|
809 | 809 | } |
810 | 810 | |
811 | 811 | /** |
@@ -1080,7 +1080,7 @@ discard block |
||
1080 | 1080 | // Ping again and refresh the cache. |
1081 | 1081 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
1082 | 1082 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1083 | - ); |
|
1083 | + ); |
|
1084 | 1084 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
1085 | 1085 | return $meetinginfo; |
1086 | 1086 | } |
@@ -1492,8 +1492,8 @@ discard block |
||
1492 | 1492 | } |
1493 | 1493 | $id = 'playbacks-'.$recording['recordID']; |
1494 | 1494 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1495 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1496 | - 'title' => $title, $visibility => $visibility)); |
|
1495 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1496 | + 'title' => $title, $visibility => $visibility)); |
|
1497 | 1497 | foreach ($recording['playbacks'] as $playback) { |
1498 | 1498 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
1499 | 1499 | } |
@@ -1517,7 +1517,7 @@ discard block |
||
1517 | 1517 | } |
1518 | 1518 | $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
1519 | 1519 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1520 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1520 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1521 | 1521 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1522 | 1522 | $href .= '&href='.urlencode(trim($playback['url'])); |
1523 | 1523 | } |
@@ -1528,7 +1528,7 @@ discard block |
||
1528 | 1528 | 'data-action' => 'play', |
1529 | 1529 | 'data-target' => $playback['type'], |
1530 | 1530 | 'data-href' => $href, |
1531 | - ); |
|
1531 | + ); |
|
1532 | 1532 | if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
1533 | 1533 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
1534 | 1534 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -1678,10 +1678,10 @@ discard block |
||
1678 | 1678 | 'id' => $id, |
1679 | 1679 | 'onclick' => $onclick, |
1680 | 1680 | 'data-action' => $data['action'] |
1681 | - ); |
|
1681 | + ); |
|
1682 | 1682 | if (!isset($recording['imported'])) { |
1683 | 1683 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
1684 | - $recording['recordID']); |
|
1684 | + $recording['recordID']); |
|
1685 | 1685 | } |
1686 | 1686 | if (isset($data['disabled'])) { |
1687 | 1687 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2167,17 +2167,17 @@ discard block |
||
2167 | 2167 | function bigbluebuttonbn_get_instance_type_profiles() { |
2168 | 2168 | $instanceprofiles = array( |
2169 | 2169 | BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL, |
2170 | - 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
2171 | - 'features' => array('all')), |
|
2170 | + 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
2171 | + 'features' => array('all')), |
|
2172 | 2172 | BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY, |
2173 | - 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
2174 | - 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
2175 | - 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
2176 | - 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
2177 | - 'clienttype')), |
|
2173 | + 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
2174 | + 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
2175 | + 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
2176 | + 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
2177 | + 'clienttype')), |
|
2178 | 2178 | BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY, |
2179 | - 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
2180 | - 'features' => array('showrecordings', 'importrecordings')) |
|
2179 | + 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
2180 | + 'features' => array('showrecordings', 'importrecordings')) |
|
2181 | 2181 | ); |
2182 | 2182 | return $instanceprofiles; |
2183 | 2183 | } |
@@ -2244,8 +2244,8 @@ discard block |
||
2244 | 2244 | $activitytime = ''; |
2245 | 2245 | if ($time) { |
2246 | 2246 | $activitytime = calendar_day_representation($time).' '. |
2247 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2248 | - calendar_time_representation($time); |
|
2247 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2248 | + calendar_time_representation($time); |
|
2249 | 2249 | } |
2250 | 2250 | return $activitytime; |
2251 | 2251 | } |
@@ -2545,7 +2545,7 @@ discard block |
||
2545 | 2545 | $renderer->render_group_element('participant_moderator_default', |
2546 | 2546 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
2547 | 2547 | array_keys($owner), array_merge($owner, $roles)) |
2548 | - ); |
|
2548 | + ); |
|
2549 | 2549 | } |
2550 | 2550 | } |
2551 | 2551 | |
@@ -2581,7 +2581,7 @@ discard block |
||
2581 | 2581 | // Web Client default. |
2582 | 2582 | $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
2583 | 2583 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
2584 | - BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
2584 | + BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
2585 | 2585 | $renderer->render_group_element('clienttype_default', |
2586 | 2586 | $renderer->render_group_element_configselect('clienttype_default', |
2587 | 2587 | $default, $choices)); |
@@ -2674,7 +2674,7 @@ discard block |
||
2674 | 2674 | return $output; |
2675 | 2675 | } |
2676 | 2676 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
2677 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2677 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2678 | 2678 | $output .= ' ' . $message . "\n"; |
2679 | 2679 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
2680 | 2680 | if (!empty($href)) { |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | * Helper function to retrieve imported recordings from the Moodle database. |
297 | 297 | * The references are stored as events in bigbluebuttonbn_logs. |
298 | 298 | * |
299 | - * @param string $courseid |
|
299 | + * @param integer $courseid |
|
300 | 300 | * @param string $bigbluebuttonbnid |
301 | 301 | * @param bool $subset |
302 | 302 | * |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | /** |
325 | 325 | * Helper function to retrive the default config.xml file. |
326 | 326 | * |
327 | - * @return string |
|
327 | + * @return null|SimpleXMLElement |
|
328 | 328 | */ |
329 | 329 | function bigbluebuttonbn_get_default_config_xml() { |
330 | 330 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | * @param object $a |
407 | 407 | * @param object $b |
408 | 408 | * |
409 | - * @return array |
|
409 | + * @return integer |
|
410 | 410 | */ |
411 | 411 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
412 | 412 | global $CFG; |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | * @param string $data |
521 | 521 | * @param string $contenttype |
522 | 522 | * |
523 | - * @return object |
|
523 | + * @return null|SimpleXMLElement |
|
524 | 524 | */ |
525 | 525 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
526 | 526 | if (extension_loaded('curl')) { |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | * @param string $data |
562 | 562 | * @param string $contenttype |
563 | 563 | * |
564 | - * @return object |
|
564 | + * @return string |
|
565 | 565 | */ |
566 | 566 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
567 | 567 | $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; |
@@ -1257,7 +1257,7 @@ discard block |
||
1257 | 1257 | * @param string $meetingid |
1258 | 1258 | * @param string $configxml |
1259 | 1259 | * |
1260 | - * @return object |
|
1260 | + * @return null|SimpleXMLElement |
|
1261 | 1261 | */ |
1262 | 1262 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1263 | 1263 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
@@ -1306,7 +1306,7 @@ discard block |
||
1306 | 1306 | * @param array $recording |
1307 | 1307 | * @param array $tools |
1308 | 1308 | * |
1309 | - * @return array |
|
1309 | + * @return null|stdClass |
|
1310 | 1310 | */ |
1311 | 1311 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
1312 | 1312 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -1933,7 +1933,7 @@ discard block |
||
1933 | 1933 | * |
1934 | 1934 | * @param array $bbbsession |
1935 | 1935 | * @param array $recording |
1936 | - * @param object $rowdata |
|
1936 | + * @param stdClass $rowdata |
|
1937 | 1937 | * |
1938 | 1938 | * @return object |
1939 | 1939 | */ |
@@ -2051,7 +2051,7 @@ discard block |
||
2051 | 2051 | * |
2052 | 2052 | * @param array $bbbsession |
2053 | 2053 | * @param array $recordings |
2054 | - * @param array $tools |
|
2054 | + * @param string[] $tools |
|
2055 | 2055 | * |
2056 | 2056 | * @return array |
2057 | 2057 | */ |
@@ -2129,7 +2129,7 @@ discard block |
||
2129 | 2129 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
2130 | 2130 | * in the getRecordings request considering only those that belong to deleted activities. |
2131 | 2131 | * |
2132 | - * @param string $courseid |
|
2132 | + * @param integer $courseid |
|
2133 | 2133 | * @param string $bigbluebuttonbnid |
2134 | 2134 | * @param bool $subset |
2135 | 2135 | * |
@@ -2153,7 +2153,7 @@ discard block |
||
2153 | 2153 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
2154 | 2154 | * in the getRecordings request considering only those that belong to imported recordings. |
2155 | 2155 | * |
2156 | - * @param string $courseid |
|
2156 | + * @param integer $courseid |
|
2157 | 2157 | * @param string $bigbluebuttonbnid |
2158 | 2158 | * @param bool $subset |
2159 | 2159 | * |
@@ -2176,7 +2176,7 @@ discard block |
||
2176 | 2176 | /** |
2177 | 2177 | * Helper function to get recordings and imported recordings together. |
2178 | 2178 | * |
2179 | - * @param string $courseid |
|
2179 | + * @param integer $courseid |
|
2180 | 2180 | * @param string $bigbluebuttonbnid |
2181 | 2181 | * @param bool $subset |
2182 | 2182 | * @param bool $includedeleted |
@@ -2194,7 +2194,7 @@ discard block |
||
2194 | 2194 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
2195 | 2195 | * in bigbluebuttonbn_logs. |
2196 | 2196 | * |
2197 | - * @param string $courseid |
|
2197 | + * @param integer $courseid |
|
2198 | 2198 | * @param string $bigbluebuttonbnid |
2199 | 2199 | * @param bool $subset |
2200 | 2200 | * @param bool $includedeleted |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | global $CFG; |
32 | 32 | |
33 | -require_once(__DIR__.'/lib.php'); |
|
33 | +require_once(__DIR__ . '/lib.php'); |
|
34 | 34 | |
35 | 35 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
36 | 36 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | 'logoutURL' => $logouturl, |
109 | 109 | ]; |
110 | 110 | // Choose between Adobe Flash or HTML5 Client. |
111 | - if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
|
111 | + if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) { |
|
112 | 112 | $data['joinViaHtml5'] = 'true'; |
113 | 113 | } |
114 | 114 | if (!is_null($configtoken)) { |
@@ -136,8 +136,8 @@ discard block |
||
136 | 136 | $data = null; |
137 | 137 | if (!is_null($pname) && !is_null($purl)) { |
138 | 138 | $method = 'POST'; |
139 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
140 | - $purl."' /></module></modules>"; |
|
139 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
140 | + $purl . "' /></module></modules>"; |
|
141 | 141 | } |
142 | 142 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
143 | 143 | if ($xml) { |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | if (isset($recordingxml->breakoutRooms->breakoutRoom)) { |
260 | 260 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
261 | 261 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getRecordings', |
262 | - ['recordID' => implode(',', (array) $breakoutroom)]); |
|
262 | + ['recordID' => implode(',', (array)$breakoutroom)]); |
|
263 | 263 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
264 | 264 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
265 | 265 | // If there were meetings already created. |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | // Override imported flag with actual ID. |
315 | 315 | $recording['imported'] = $recordimported->id; |
316 | 316 | if (isset($recordimported->protected)) { |
317 | - $recording['protected'] = (string) $recordimported->protected; |
|
317 | + $recording['protected'] = (string)$recordimported->protected; |
|
318 | 318 | } |
319 | 319 | $recordsimportedarray[$recording['recordID']] = $recording; |
320 | 320 | } |
@@ -344,21 +344,21 @@ discard block |
||
344 | 344 | // Add formats. |
345 | 345 | $playbackarray = array(); |
346 | 346 | foreach ($recording->playback->format as $format) { |
347 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
348 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
347 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
348 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
349 | 349 | // Add preview per format when existing. |
350 | 350 | if ($format->preview) { |
351 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
351 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | // Add the metadata to the recordings array. |
355 | 355 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
356 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
357 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
358 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
359 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
356 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
357 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
358 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
359 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
360 | 360 | if (isset($recording->protected)) { |
361 | - $recordingarray['protected'] = (string) $recording->protected; |
|
361 | + $recordingarray['protected'] = (string)$recording->protected; |
|
362 | 362 | } |
363 | 363 | return $recordingarray + $metadataarray; |
364 | 364 | } |
@@ -373,9 +373,9 @@ discard block |
||
373 | 373 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
374 | 374 | $imagesarray = array(); |
375 | 375 | foreach ($preview->images->image as $image) { |
376 | - $imagearray = array('url' => trim((string) $image)); |
|
376 | + $imagearray = array('url' => trim((string)$image)); |
|
377 | 377 | foreach ($image->attributes() as $attkey => $attvalue) { |
378 | - $imagearray[$attkey] = (string) $attvalue; |
|
378 | + $imagearray[$attkey] = (string)$attvalue; |
|
379 | 379 | } |
380 | 380 | array_push($imagesarray, $imagearray); |
381 | 381 | } |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | if (is_object($value)) { |
396 | 396 | $value = ''; |
397 | 397 | } |
398 | - $metadataarray['meta_'.$key] = $value; |
|
398 | + $metadataarray['meta_' . $key] = $value; |
|
399 | 399 | } |
400 | 400 | return $metadataarray; |
401 | 401 | } |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | $ids = explode(',', $recordids); |
471 | 471 | foreach ($ids as $id) { |
472 | 472 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
473 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
473 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
474 | 474 | ); |
475 | 475 | if ($xml && $xml->returncode != 'SUCCESS') { |
476 | 476 | return false; |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | return $xml; |
536 | 536 | } catch (Exception $e) { |
537 | 537 | libxml_use_internal_errors($previous); |
538 | - $error = 'Caught exception: '.$e->getMessage(); |
|
538 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
539 | 539 | debugging($error, DEBUG_DEVELOPER); |
540 | 540 | return null; |
541 | 541 | } |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
547 | 547 | return $response; |
548 | 548 | } catch (Exception $e) { |
549 | - $error = 'Caught exception: '.$e->getMessage(); |
|
549 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
550 | 550 | debugging($error, DEBUG_DEVELOPER); |
551 | 551 | libxml_use_internal_errors($previous); |
552 | 552 | return null; |
@@ -572,8 +572,8 @@ discard block |
||
572 | 572 | } |
573 | 573 | $options = array(); |
574 | 574 | $options['CURLOPT_HTTPHEADER'] = array( |
575 | - 'Content-Type: '.$contenttype, |
|
576 | - 'Content-Length: '.strlen($data), |
|
575 | + 'Content-Type: ' . $contenttype, |
|
576 | + 'Content-Length: ' . strlen($data), |
|
577 | 577 | 'Content-Language: en-US', |
578 | 578 | ); |
579 | 579 | |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | * @return void |
595 | 595 | */ |
596 | 596 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
597 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
597 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
598 | 598 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
599 | 599 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
600 | 600 | } |
@@ -614,9 +614,9 @@ discard block |
||
614 | 614 | if ($userroles) { |
615 | 615 | $where = ''; |
616 | 616 | foreach ($userroles as $userrole) { |
617 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
617 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
618 | 618 | } |
619 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
619 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
620 | 620 | } |
621 | 621 | return $userroles; |
622 | 622 | } |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | * @return array $users |
640 | 640 | */ |
641 | 641 | function bigbluebuttonbn_get_users(context $context = null) { |
642 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
642 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
643 | 643 | foreach ($users as $key => $value) { |
644 | 644 | $users[$key] = fullname($value); |
645 | 645 | } |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | * @return array $users |
655 | 655 | */ |
656 | 656 | function bigbluebuttonbn_get_users_select(context $context = null) { |
657 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
657 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
658 | 658 | foreach ($users as $key => $value) { |
659 | 659 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
660 | 660 | } |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | * @return array $roles |
670 | 670 | */ |
671 | 671 | function bigbluebuttonbn_get_roles(context $context = null) { |
672 | - $roles = (array) role_get_names($context); |
|
672 | + $roles = (array)role_get_names($context); |
|
673 | 673 | foreach ($roles as $key => $value) { |
674 | 674 | $roles[$key] = $value->localname; |
675 | 675 | } |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | * @return array $users |
685 | 685 | */ |
686 | 686 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
687 | - $roles = (array) role_get_names($context); |
|
687 | + $roles = (array)role_get_names($context); |
|
688 | 688 | foreach ($roles as $key => $value) { |
689 | 689 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
690 | 690 | } |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | * @return object $role |
700 | 700 | */ |
701 | 701 | function bigbluebuttonbn_get_role($id) { |
702 | - $roles = (array) role_get_names(); |
|
702 | + $roles = (array)role_get_names(); |
|
703 | 703 | if (is_numeric($id) && isset($roles[$id])) { |
704 | 704 | return (object)$roles[$id]; |
705 | 705 | } |
@@ -856,7 +856,7 @@ discard block |
||
856 | 856 | if (!isguestuser()) { |
857 | 857 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
858 | 858 | } |
859 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
859 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
860 | 860 | } |
861 | 861 | |
862 | 862 | /** |
@@ -1056,7 +1056,7 @@ discard block |
||
1056 | 1056 | function bigbluebuttonbn_generate_nonce() { |
1057 | 1057 | $mt = microtime(); |
1058 | 1058 | $rand = mt_rand(); |
1059 | - return md5($mt.$rand); |
|
1059 | + return md5($mt . $rand); |
|
1060 | 1060 | } |
1061 | 1061 | |
1062 | 1062 | /** |
@@ -1146,10 +1146,10 @@ discard block |
||
1146 | 1146 | $now = time(); |
1147 | 1147 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
1148 | 1148 | // Use the value in the cache. |
1149 | - return (array) json_decode($result['meeting_info']); |
|
1149 | + return (array)json_decode($result['meeting_info']); |
|
1150 | 1150 | } |
1151 | 1151 | // Ping again and refresh the cache. |
1152 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1152 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1153 | 1153 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1154 | 1154 | ); |
1155 | 1155 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1260,7 +1260,7 @@ discard block |
||
1260 | 1260 | * @return object |
1261 | 1261 | */ |
1262 | 1262 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1263 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
1263 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
1264 | 1264 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
1265 | 1265 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
1266 | 1266 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1276,8 +1276,8 @@ discard block |
||
1276 | 1276 | * @return string |
1277 | 1277 | */ |
1278 | 1278 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
1279 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
1280 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1279 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
1280 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1281 | 1281 | return $configxmlparams; |
1282 | 1282 | } |
1283 | 1283 | |
@@ -1291,7 +1291,7 @@ discard block |
||
1291 | 1291 | */ |
1292 | 1292 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1293 | 1293 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
1294 | - $configxmlarray = (array) $configxml; |
|
1294 | + $configxmlarray = (array)$configxml; |
|
1295 | 1295 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1296 | 1296 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1297 | 1297 | return ''; |
@@ -1385,7 +1385,7 @@ discard block |
||
1385 | 1385 | global $USER; |
1386 | 1386 | $starttime = $starttime - ($starttime % 1000); |
1387 | 1387 | // Set formatted date. |
1388 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
1388 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
1389 | 1389 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
1390 | 1390 | } |
1391 | 1391 | |
@@ -1501,7 +1501,7 @@ discard block |
||
1501 | 1501 | * @return string |
1502 | 1502 | */ |
1503 | 1503 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
1504 | - $options = array('id' => 'preview-'.$recording['recordID']); |
|
1504 | + $options = array('id' => 'preview-' . $recording['recordID']); |
|
1505 | 1505 | if ($recording['published'] === 'false') { |
1506 | 1506 | $options['hidden'] = 'hidden'; |
1507 | 1507 | } |
@@ -1563,7 +1563,7 @@ discard block |
||
1563 | 1563 | if ($recording['published'] === 'false') { |
1564 | 1564 | $visibility = 'hidden '; |
1565 | 1565 | } |
1566 | - $id = 'playbacks-'.$recording['recordID']; |
|
1566 | + $id = 'playbacks-' . $recording['recordID']; |
|
1567 | 1567 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1568 | 1568 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
1569 | 1569 | 'title' => $title, $visibility => $visibility)); |
@@ -1588,11 +1588,11 @@ discard block |
||
1588 | 1588 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
1589 | 1589 | return ''; |
1590 | 1590 | } |
1591 | - $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
1591 | + $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
1592 | 1592 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1593 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1593 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1594 | 1594 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1595 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
1595 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
1596 | 1596 | } |
1597 | 1597 | $linkattributes = array( |
1598 | 1598 | 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
@@ -1776,7 +1776,7 @@ discard block |
||
1776 | 1776 | $linkattributes['class'] = 'disabled'; |
1777 | 1777 | unset($linkattributes['onclick']); |
1778 | 1778 | } |
1779 | - $icon = new pix_icon('i/'.$data['tag'], |
|
1779 | + $icon = new pix_icon('i/' . $data['tag'], |
|
1780 | 1780 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
1781 | 1781 | 'moodle', $iconattributes); |
1782 | 1782 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1939,7 +1939,7 @@ discard block |
||
1939 | 1939 | */ |
1940 | 1940 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
1941 | 1941 | $row = new html_table_row(); |
1942 | - $row->id = 'recording-tr-'.$recording['recordID']; |
|
1942 | + $row->id = 'recording-tr-' . $recording['recordID']; |
|
1943 | 1943 | $row->attributes['data-imported'] = 'false'; |
1944 | 1944 | $texthead = ''; |
1945 | 1945 | $texttail = ''; |
@@ -1952,7 +1952,7 @@ discard block |
||
1952 | 1952 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
1953 | 1953 | $row->cells = array(); |
1954 | 1954 | $row->cells[] = $texthead . $rowdata->recording . $texttail; |
1955 | - $row->cells[] = $texthead . $rowdata->meeting . $texttail;; |
|
1955 | + $row->cells[] = $texthead . $rowdata->meeting . $texttail; ; |
|
1956 | 1956 | $row->cells[] = $texthead . $rowdata->activity . $texttail; |
1957 | 1957 | $row->cells[] = $texthead . $rowdata->description . $texttail; |
1958 | 1958 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
@@ -2000,9 +2000,9 @@ discard block |
||
2000 | 2000 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
2001 | 2001 | $sender = get_admin(); |
2002 | 2002 | // Prepare message. |
2003 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
2004 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
2005 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
2003 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
2004 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
2005 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
2006 | 2006 | $context = context_course::instance($bigbluebuttonbn->course); |
2007 | 2007 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext); |
2008 | 2008 | } |
@@ -2224,7 +2224,7 @@ discard block |
||
2224 | 2224 | } |
2225 | 2225 | // Prepare select for loading records based on existent bigbluebuttonbns. |
2226 | 2226 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
2227 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
2227 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
2228 | 2228 | // Include only Create events and exclude those with record not true. |
2229 | 2229 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
2230 | 2230 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2398,8 +2398,8 @@ discard block |
||
2398 | 2398 | function bigbluebuttonbn_format_activity_time($time) { |
2399 | 2399 | $activitytime = ''; |
2400 | 2400 | if ($time) { |
2401 | - $activitytime = calendar_day_representation($time).' '. |
|
2402 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2401 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
2402 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
2403 | 2403 | calendar_time_representation($time); |
2404 | 2404 | } |
2405 | 2405 | return $activitytime; |
@@ -2858,7 +2858,7 @@ discard block |
||
2858 | 2858 | * |
2859 | 2859 | * @return string |
2860 | 2860 | */ |
2861 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
2861 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2862 | 2862 | global $OUTPUT; |
2863 | 2863 | $output = "\n"; |
2864 | 2864 | // Evaluates if config_warning is enabled. |
@@ -2897,11 +2897,11 @@ discard block |
||
2897 | 2897 | if ($class == '') { |
2898 | 2898 | $class = 'btn btn-secondary'; |
2899 | 2899 | } |
2900 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2901 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2902 | - $output .= ' title="' . $title . '"'."\n"; |
|
2903 | - $output .= ' >' . $text . '</button>'."\n"; |
|
2904 | - $output .= ' </form>'."\n"; |
|
2900 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
2901 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
2902 | + $output .= ' title="' . $title . '"' . "\n"; |
|
2903 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
2904 | + $output .= ' </form>' . "\n"; |
|
2905 | 2905 | return $output; |
2906 | 2906 | } |
2907 | 2907 | |
@@ -3066,7 +3066,7 @@ discard block |
||
3066 | 3066 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
3067 | 3067 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
3068 | 3068 | // Database info related to the activity. |
3069 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
3069 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
3070 | 3070 | $bbbsession['bigbluebuttonbn']->id; |
3071 | 3071 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
3072 | 3072 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -3098,10 +3098,10 @@ discard block |
||
3098 | 3098 | if ($bbbsession['bigbluebuttonbn']->record) { |
3099 | 3099 | // Check if is enable record all from start. |
3100 | 3100 | if ($bbbsession['recordallfromstart']) { |
3101 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning', |
|
3101 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning', |
|
3102 | 3102 | 'bigbluebuttonbn'); |
3103 | 3103 | } else { |
3104 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
3104 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
3105 | 3105 | } |
3106 | 3106 | } |
3107 | 3107 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -3116,7 +3116,7 @@ discard block |
||
3116 | 3116 | $bbbsession['originServerName'] = $parsedurl['host']; |
3117 | 3117 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
3118 | 3118 | $bbbsession['originServerCommonName'] = ''; |
3119 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
3119 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
3120 | 3120 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
3121 | 3121 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
3122 | 3122 | $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH; |
@@ -3178,7 +3178,7 @@ discard block |
||
3178 | 3178 | ); |
3179 | 3179 | |
3180 | 3180 | // Check status and set extra values. |
3181 | - $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
3181 | + $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
3182 | 3182 | if ($activitystatus == 'ended') { |
3183 | 3183 | $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array( |
3184 | 3184 | $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation); |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | |
27 | 27 | defined('MOODLE_INTERNAL') || die(); |
28 | 28 | |
29 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
30 | -require_once($CFG->dirroot.'/course/moodleform_mod.php'); |
|
29 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
30 | +require_once($CFG->dirroot . '/course/moodleform_mod.php'); |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Moodle class for mod_form. |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $serverversion = bigbluebuttonbn_get_server_version(); |
49 | 49 | if (is_null($serverversion)) { |
50 | 50 | print_error('general_error_unable_connect', 'bigbluebuttonbn', |
51 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
51 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
52 | 52 | return; |
53 | 53 | } |
54 | 54 | // Context. |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | // If none is allowed, fail and return. |
79 | 79 | if (empty($jsvars['instanceTypeProfiles'])) { |
80 | 80 | print_error('general_error_not_allowed_to_create_instances)', 'bigbluebuttonbn', |
81 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
81 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
82 | 82 | return; |
83 | 83 | } |
84 | 84 | $this->bigbluebuttonbn_mform_add_block_profiles($mform, $jsvars['instanceTypeProfiles']); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | ); |
127 | 127 | $defaultvalues['presentation'] = $draftitemid; |
128 | 128 | } catch (Exception $e) { |
129 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
129 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
130 | 130 | return; |
131 | 131 | } |
132 | 132 | } |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | return; |
460 | 460 | } |
461 | 461 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
462 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
462 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
463 | 463 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
464 | 464 | } |
465 | 465 | if (!empty($rule)) { |
@@ -219,8 +219,8 @@ discard block |
||
219 | 219 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
220 | 220 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
221 | 221 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
222 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
223 | - ); |
|
222 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
223 | + ); |
|
224 | 224 | } else { |
225 | 225 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
226 | 226 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
291 | 291 | $recordingsettings = false; |
292 | 292 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
293 | - 'description_key' => null]; |
|
293 | + 'description_key' => null]; |
|
294 | 294 | if ($cfg['recordings_html_editable']) { |
295 | 295 | $field['type'] = 'checkbox'; |
296 | 296 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
300 | 300 | $field['description_key'], $cfg['recordings_html_default']); |
301 | 301 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
302 | - 'description_key' => null]; |
|
302 | + 'description_key' => null]; |
|
303 | 303 | if ($cfg['recordings_deleted_editable']) { |
304 | 304 | $field['type'] = 'checkbox'; |
305 | 305 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
309 | 309 | $field['description_key'], $cfg['recordings_deleted_default']); |
310 | 310 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
311 | - 'description_key' => null]; |
|
311 | + 'description_key' => null]; |
|
312 | 312 | if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) { |
313 | 313 | $field['type'] = 'checkbox'; |
314 | 314 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
318 | 318 | $field['description_key'], $cfg['recordings_imported_default']); |
319 | 319 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
320 | - 'description_key' => null]; |
|
320 | + 'description_key' => null]; |
|
321 | 321 | if ($cfg['recordings_preview_editable']) { |
322 | 322 | $field['type'] = 'checkbox'; |
323 | 323 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
395 | 395 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
396 | 396 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
397 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
397 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
398 | 398 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
399 | 399 | $participantselection['selected'], array(), |
400 | 400 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | 'type' => 'button', 'class' => 'btn btn-secondary', |
403 | 403 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
404 | 404 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
405 | - )); |
|
405 | + )); |
|
406 | 406 | $htmladdparticipant = html_writer::tag('div', |
407 | 407 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
408 | 408 | $mform->addElement('html', "\n\n"); |
@@ -444,9 +444,9 @@ discard block |
||
444 | 444 | $field['type'] = 'select'; |
445 | 445 | $field['data_type'] = PARAM_TEXT; |
446 | 446 | $field['description_key'] = 'mod_form_field_block_clienttype'; |
447 | - $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
448 | - BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
449 | - $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
|
447 | + $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
448 | + BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
449 | + $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
|
450 | 450 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
451 | 451 | $field['description_key'], $cfg['clienttype_default'], $choices); |
452 | 452 | return; |