@@ -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( |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | * @param object $a |
| 392 | 392 | * @param object $b |
| 393 | 393 | * |
| 394 | - * @return array |
|
| 394 | + * @return integer |
|
| 395 | 395 | */ |
| 396 | 396 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
| 397 | 397 | if ($a['startTime'] < $b['startTime']) { |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | * @param string $data |
| 518 | 518 | * @param string $contenttype |
| 519 | 519 | * |
| 520 | - * @return object |
|
| 520 | + * @return null|SimpleXMLElement |
|
| 521 | 521 | */ |
| 522 | 522 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 523 | 523 | if (extension_loaded('curl')) { |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | * @param string $data |
| 559 | 559 | * @param string $contenttype |
| 560 | 560 | * |
| 561 | - * @return object |
|
| 561 | + * @return string |
|
| 562 | 562 | */ |
| 563 | 563 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 564 | 564 | $c = new curl(); |
@@ -922,7 +922,7 @@ discard block |
||
| 922 | 922 | * |
| 923 | 923 | * @param integer $voicebridge |
| 924 | 924 | * |
| 925 | - * @return string |
|
| 925 | + * @return boolean |
|
| 926 | 926 | */ |
| 927 | 927 | function bigbluebuttonbn_voicebridge_unique($voicebridge) { |
| 928 | 928 | global $DB; |
@@ -1021,7 +1021,7 @@ discard block |
||
| 1021 | 1021 | /** |
| 1022 | 1022 | * Helper returns an array with all possible bigbluebuttonbn events. |
| 1023 | 1023 | * |
| 1024 | - * @return array |
|
| 1024 | + * @return string[] |
|
| 1025 | 1025 | */ |
| 1026 | 1026 | function bigbluebuttonbn_events() { |
| 1027 | 1027 | return array( |
@@ -1230,7 +1230,7 @@ discard block |
||
| 1230 | 1230 | * @param string $meetingid |
| 1231 | 1231 | * @param string $configxml |
| 1232 | 1232 | * |
| 1233 | - * @return object |
|
| 1233 | + * @return null|SimpleXMLElement |
|
| 1234 | 1234 | */ |
| 1235 | 1235 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1236 | 1236 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
@@ -1279,7 +1279,7 @@ discard block |
||
| 1279 | 1279 | * @param array $recording |
| 1280 | 1280 | * @param array $tools |
| 1281 | 1281 | * |
| 1282 | - * @return array |
|
| 1282 | + * @return null|stdClass |
|
| 1283 | 1283 | */ |
| 1284 | 1284 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
| 1285 | 1285 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -1781,7 +1781,7 @@ discard block |
||
| 1781 | 1781 | * |
| 1782 | 1782 | * @param array $bbbsession |
| 1783 | 1783 | * @param array $recording |
| 1784 | - * @param object $rowdata |
|
| 1784 | + * @param stdClass $rowdata |
|
| 1785 | 1785 | * |
| 1786 | 1786 | * @return object |
| 1787 | 1787 | */ |
@@ -1969,7 +1969,7 @@ discard block |
||
| 1969 | 1969 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 1970 | 1970 | * in the getRecordings request considering only those that belong to deleted activities. |
| 1971 | 1971 | * |
| 1972 | - * @param string $courseid |
|
| 1972 | + * @param integer $courseid |
|
| 1973 | 1973 | * @param string $bigbluebuttonbnid |
| 1974 | 1974 | * @param bool $subset |
| 1975 | 1975 | * |
@@ -1993,7 +1993,7 @@ discard block |
||
| 1993 | 1993 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 1994 | 1994 | * in the getRecordings request considering only those that belong to imported recordings. |
| 1995 | 1995 | * |
| 1996 | - * @param string $courseid |
|
| 1996 | + * @param integer $courseid |
|
| 1997 | 1997 | * @param string $bigbluebuttonbnid |
| 1998 | 1998 | * @param bool $subset |
| 1999 | 1999 | * |
@@ -2016,7 +2016,7 @@ discard block |
||
| 2016 | 2016 | /** |
| 2017 | 2017 | * Helper function to get recordings and imported recordings together. |
| 2018 | 2018 | * |
| 2019 | - * @param string $courseid |
|
| 2019 | + * @param integer $courseid |
|
| 2020 | 2020 | * @param string $bigbluebuttonbnid |
| 2021 | 2021 | * @param bool $subset |
| 2022 | 2022 | * @param bool $includedeleted |
@@ -2034,7 +2034,7 @@ discard block |
||
| 2034 | 2034 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
| 2035 | 2035 | * in bigbluebuttonbn_logs. |
| 2036 | 2036 | * |
| 2037 | - * @param string $courseid |
|
| 2037 | + * @param integer $courseid |
|
| 2038 | 2038 | * @param string $bigbluebuttonbnid |
| 2039 | 2039 | * @param bool $subset |
| 2040 | 2040 | * @param bool $includedeleted |
@@ -119,9 +119,9 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
| 121 | 121 | $data = ['meetingID' => $meetingid, |
| 122 | - 'fullName' => $username, |
|
| 123 | - 'password' => $pw, |
|
| 124 | - 'logoutURL' => $logouturl, |
|
| 122 | + 'fullName' => $username, |
|
| 123 | + 'password' => $pw, |
|
| 124 | + 'logoutURL' => $logouturl, |
|
| 125 | 125 | ]; |
| 126 | 126 | if (!is_null($configtoken)) { |
| 127 | 127 | $data['configToken'] = $configtoken; |
@@ -173,23 +173,23 @@ discard block |
||
| 173 | 173 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 174 | 174 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 175 | 175 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 176 | - ); |
|
| 176 | + ); |
|
| 177 | 177 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 178 | 178 | // Meeting info was returned. |
| 179 | 179 | return array('returncode' => $xml->returncode, |
| 180 | - 'meetingID' => $xml->meetingID, |
|
| 181 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 182 | - 'attendeePW' => $xml->attendeePW, |
|
| 183 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 184 | - 'running' => $xml->running, |
|
| 185 | - 'recording' => $xml->recording, |
|
| 186 | - 'startTime' => $xml->startTime, |
|
| 187 | - 'endTime' => $xml->endTime, |
|
| 188 | - 'participantCount' => $xml->participantCount, |
|
| 189 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 190 | - 'attendees' => $xml->attendees, |
|
| 191 | - 'metadata' => $xml->metadata, |
|
| 192 | - ); |
|
| 180 | + 'meetingID' => $xml->meetingID, |
|
| 181 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 182 | + 'attendeePW' => $xml->attendeePW, |
|
| 183 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 184 | + 'running' => $xml->running, |
|
| 185 | + 'recording' => $xml->recording, |
|
| 186 | + 'startTime' => $xml->startTime, |
|
| 187 | + 'endTime' => $xml->endTime, |
|
| 188 | + 'participantCount' => $xml->participantCount, |
|
| 189 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 190 | + 'attendees' => $xml->attendees, |
|
| 191 | + 'metadata' => $xml->metadata, |
|
| 192 | + ); |
|
| 193 | 193 | } |
| 194 | 194 | if ($xml) { |
| 195 | 195 | // Either failure or success without meeting info. |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | function bigbluebuttonbn_get_default_config_xml() { |
| 326 | 326 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 327 | 327 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
| 328 | - ); |
|
| 328 | + ); |
|
| 329 | 329 | return $xml; |
| 330 | 330 | } |
| 331 | 331 | |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | foreach ($ids as $id) { |
| 427 | 427 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 428 | 428 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
| 429 | - ); |
|
| 429 | + ); |
|
| 430 | 430 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 431 | 431 | return false; |
| 432 | 432 | } |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | foreach ($ids as $id) { |
| 446 | 446 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 447 | 447 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 448 | - ); |
|
| 448 | + ); |
|
| 449 | 449 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 450 | 450 | return false; |
| 451 | 451 | } |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | foreach ($ids as $id) { |
| 465 | 465 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 466 | 466 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 467 | - ); |
|
| 467 | + ); |
|
| 468 | 468 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 469 | 469 | return false; |
| 470 | 470 | } |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 482 | 482 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 483 | 483 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 484 | - ); |
|
| 484 | + ); |
|
| 485 | 485 | if ($xml) { |
| 486 | 486 | // If the xml packet returned failure it displays the message to the user. |
| 487 | 487 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | */ |
| 502 | 502 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 503 | 503 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 504 | - ); |
|
| 504 | + ); |
|
| 505 | 505 | return ($xml && $xml->returncode == 'SUCCESS'); |
| 506 | 506 | } |
| 507 | 507 | |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | function bigbluebuttonbn_get_server_version() { |
| 514 | 514 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 515 | 515 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
| 516 | - ); |
|
| 516 | + ); |
|
| 517 | 517 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 518 | 518 | return $xml->version; |
| 519 | 519 | } |
@@ -581,10 +581,10 @@ discard block |
||
| 581 | 581 | |
| 582 | 582 | $options = array(); |
| 583 | 583 | $options['CURLOPT_HTTPHEADER'] = array( |
| 584 | - 'Content-Type: '.$contenttype, |
|
| 585 | - 'Content-Length: '.strlen($data), |
|
| 586 | - 'Content-Language: en-US', |
|
| 587 | - ); |
|
| 584 | + 'Content-Type: '.$contenttype, |
|
| 585 | + 'Content-Length: '.strlen($data), |
|
| 586 | + 'Content-Language: en-US', |
|
| 587 | + ); |
|
| 588 | 588 | |
| 589 | 589 | return $c->post($url, $data, $options); |
| 590 | 590 | } |
@@ -727,16 +727,16 @@ discard block |
||
| 727 | 727 | 'all' => array( |
| 728 | 728 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 729 | 729 | 'children' => [] |
| 730 | - ) |
|
| 731 | - ); |
|
| 730 | + ) |
|
| 731 | + ); |
|
| 732 | 732 | $data['role'] = array( |
| 733 | 733 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 734 | 734 | 'children' => bigbluebuttonbn_get_roles_select($context) |
| 735 | - ); |
|
| 735 | + ); |
|
| 736 | 736 | $data['user'] = array( |
| 737 | 737 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 738 | 738 | 'children' => bigbluebuttonbn_get_users_select($context) |
| 739 | - ); |
|
| 739 | + ); |
|
| 740 | 740 | return $data; |
| 741 | 741 | } |
| 742 | 742 | |
@@ -781,9 +781,9 @@ discard block |
||
| 781 | 781 | continue; |
| 782 | 782 | } |
| 783 | 783 | $participantlistarray[] = array( |
| 784 | - 'selectiontype' => 'role', |
|
| 785 | - 'selectionid' => $moderatordefault, |
|
| 786 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 784 | + 'selectiontype' => 'role', |
|
| 785 | + 'selectionid' => $moderatordefault, |
|
| 786 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 787 | 787 | } |
| 788 | 788 | return $participantlistarray; |
| 789 | 789 | } |
@@ -826,11 +826,11 @@ discard block |
||
| 826 | 826 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 827 | 827 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 828 | 828 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 829 | - ], |
|
| 829 | + ], |
|
| 830 | 830 | 'type_selected' => 'all', |
| 831 | 831 | 'options' => ['all' => '---------------'], |
| 832 | 832 | 'selected' => 'all', |
| 833 | - ]; |
|
| 833 | + ]; |
|
| 834 | 834 | } |
| 835 | 835 | |
| 836 | 836 | /** |
@@ -1107,7 +1107,7 @@ discard block |
||
| 1107 | 1107 | $eventproperties['other'] = $options['other']; |
| 1108 | 1108 | } |
| 1109 | 1109 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
| 1110 | - array($eventproperties)); |
|
| 1110 | + array($eventproperties)); |
|
| 1111 | 1111 | $event->trigger(); |
| 1112 | 1112 | } |
| 1113 | 1113 | |
@@ -1151,7 +1151,7 @@ discard block |
||
| 1151 | 1151 | // Ping again and refresh the cache. |
| 1152 | 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))); |
| 1156 | 1156 | return $meetinginfo; |
| 1157 | 1157 | } |
@@ -1521,8 +1521,8 @@ discard block |
||
| 1521 | 1521 | } |
| 1522 | 1522 | $id = 'playbacks-'.$recording['recordID']; |
| 1523 | 1523 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1524 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1525 | - 'title' => $title, $visibility => $visibility)); |
|
| 1524 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1525 | + 'title' => $title, $visibility => $visibility)); |
|
| 1526 | 1526 | foreach ($recording['playbacks'] as $playback) { |
| 1527 | 1527 | if ($playback['type'] == 'statistics' && (isset($recording['imported']) || (!$bbbsession['administrator'] && !$bbbsession['moderator']))) { |
| 1528 | 1528 | continue; |
@@ -1547,7 +1547,7 @@ discard block |
||
| 1547 | 1547 | $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
| 1548 | 1548 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
| 1549 | 1549 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1550 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1550 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1551 | 1551 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1552 | 1552 | $href .= '&href='.urlencode(trim($playback['url'])); |
| 1553 | 1553 | } |
@@ -1559,7 +1559,7 @@ discard block |
||
| 1559 | 1559 | 'data-target' => $playback['type'], |
| 1560 | 1560 | 'data-href' => $href, |
| 1561 | 1561 | 'class' => 'btn btn-sm btn-default' |
| 1562 | - ); |
|
| 1562 | + ); |
|
| 1563 | 1563 | return $OUTPUT->action_link('#', $title, null, $linkattributes); |
| 1564 | 1564 | } |
| 1565 | 1565 | |
@@ -1673,10 +1673,10 @@ discard block |
||
| 1673 | 1673 | 'id' => $id, |
| 1674 | 1674 | 'onclick' => $onclick, |
| 1675 | 1675 | 'data-action' => $data['action'] |
| 1676 | - ); |
|
| 1676 | + ); |
|
| 1677 | 1677 | if (!isset($recording['imported'])) { |
| 1678 | 1678 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
| 1679 | - $recording['recordID']); |
|
| 1679 | + $recording['recordID']); |
|
| 1680 | 1680 | } |
| 1681 | 1681 | if (isset($data['disabled'])) { |
| 1682 | 1682 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2214,8 +2214,8 @@ discard block |
||
| 2214 | 2214 | $activitytime = ''; |
| 2215 | 2215 | if ($time) { |
| 2216 | 2216 | $activitytime = calendar_day_representation($time).' '. |
| 2217 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2218 | - calendar_time_representation($time); |
|
| 2217 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2218 | + calendar_time_representation($time); |
|
| 2219 | 2219 | } |
| 2220 | 2220 | return $activitytime; |
| 2221 | 2221 | } |
@@ -2500,7 +2500,7 @@ discard block |
||
| 2500 | 2500 | $renderer->render_group_element('participant_moderator_default', |
| 2501 | 2501 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
| 2502 | 2502 | array_keys($owner), array_merge($owner, $roles)) |
| 2503 | - ); |
|
| 2503 | + ); |
|
| 2504 | 2504 | } |
| 2505 | 2505 | } |
| 2506 | 2506 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | global $CFG; |
| 30 | 30 | |
| 31 | -require_once(dirname(__FILE__).'/lib.php'); |
|
| 31 | +require_once(dirname(__FILE__) . '/lib.php'); |
|
| 32 | 32 | |
| 33 | 33 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
| 34 | 34 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | if (isset($meta)) { |
| 101 | 101 | $log->meta = $meta; |
| 102 | 102 | } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) { |
| 103 | - $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 103 | + $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 104 | 104 | } |
| 105 | 105 | $DB->insert_record('bigbluebuttonbn_logs', $log); |
| 106 | 106 | } |
@@ -148,8 +148,8 @@ discard block |
||
| 148 | 148 | $data = null; |
| 149 | 149 | if (!is_null($pname) && !is_null($purl)) { |
| 150 | 150 | $method = 'POST'; |
| 151 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
| 152 | - $purl."' /></module></modules>"; |
|
| 151 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
| 152 | + $purl . "' /></module></modules>"; |
|
| 153 | 153 | } |
| 154 | 154 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
| 155 | 155 | if ($xml) { |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | // Override imported flag with actual ID. |
| 311 | 311 | $recording['imported'] = $recordimported->id; |
| 312 | 312 | if (isset($recordimported->protected)) { |
| 313 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 313 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 314 | 314 | } |
| 315 | 315 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 316 | 316 | } |
@@ -340,21 +340,21 @@ discard block |
||
| 340 | 340 | // Add formats. |
| 341 | 341 | $playbackarray = array(); |
| 342 | 342 | foreach ($recording->playback->format as $format) { |
| 343 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 344 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 343 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 344 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 345 | 345 | // Add preview per format when existing. |
| 346 | 346 | if ($format->preview) { |
| 347 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 347 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 348 | 348 | } |
| 349 | 349 | } |
| 350 | 350 | // Add the metadata to the recordings array. |
| 351 | 351 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 352 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 353 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 354 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 355 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 352 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 353 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 354 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 355 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 356 | 356 | if (isset($recording->protected)) { |
| 357 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 357 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 358 | 358 | } |
| 359 | 359 | return $recordingarray + $metadataarray; |
| 360 | 360 | } |
@@ -369,9 +369,9 @@ discard block |
||
| 369 | 369 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 370 | 370 | $imagesarray = array(); |
| 371 | 371 | foreach ($preview->images->image as $image) { |
| 372 | - $imagearray = array('url' => trim((string) $image)); |
|
| 372 | + $imagearray = array('url' => trim((string)$image)); |
|
| 373 | 373 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 374 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 374 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 375 | 375 | } |
| 376 | 376 | array_push($imagesarray, $imagearray); |
| 377 | 377 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | if (is_object($value)) { |
| 392 | 392 | $value = ''; |
| 393 | 393 | } |
| 394 | - $metadataarray['meta_'.$key] = $value; |
|
| 394 | + $metadataarray['meta_' . $key] = $value; |
|
| 395 | 395 | } |
| 396 | 396 | return $metadataarray; |
| 397 | 397 | } |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | $ids = explode(',', $recordids); |
| 464 | 464 | foreach ($ids as $id) { |
| 465 | 465 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 466 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 466 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 467 | 467 | ); |
| 468 | 468 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 469 | 469 | return false; |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | return $xml; |
| 544 | 544 | } catch (Exception $e) { |
| 545 | 545 | libxml_use_internal_errors($previous); |
| 546 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 546 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 547 | 547 | debugging($error, DEBUG_DEVELOPER); |
| 548 | 548 | return null; |
| 549 | 549 | } |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
| 555 | 555 | return $response; |
| 556 | 556 | } catch (Exception $e) { |
| 557 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 557 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 558 | 558 | debugging($error, DEBUG_DEVELOPER); |
| 559 | 559 | libxml_use_internal_errors($previous); |
| 560 | 560 | return null; |
@@ -581,8 +581,8 @@ discard block |
||
| 581 | 581 | |
| 582 | 582 | $options = array(); |
| 583 | 583 | $options['CURLOPT_HTTPHEADER'] = array( |
| 584 | - 'Content-Type: '.$contenttype, |
|
| 585 | - 'Content-Length: '.strlen($data), |
|
| 584 | + 'Content-Type: ' . $contenttype, |
|
| 585 | + 'Content-Length: ' . strlen($data), |
|
| 586 | 586 | 'Content-Language: en-US', |
| 587 | 587 | ); |
| 588 | 588 | |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | * @return void |
| 600 | 600 | */ |
| 601 | 601 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
| 602 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 602 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 603 | 603 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
| 604 | 604 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
| 605 | 605 | } |
@@ -619,9 +619,9 @@ discard block |
||
| 619 | 619 | if ($userroles) { |
| 620 | 620 | $where = ''; |
| 621 | 621 | foreach ($userroles as $userrole) { |
| 622 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
| 622 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
| 623 | 623 | } |
| 624 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
| 624 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
| 625 | 625 | } |
| 626 | 626 | return $userroles; |
| 627 | 627 | } |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | * @return array $users |
| 645 | 645 | */ |
| 646 | 646 | function bigbluebuttonbn_get_users(context $context = null) { |
| 647 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 647 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 648 | 648 | foreach ($users as $key => $value) { |
| 649 | 649 | $users[$key] = fullname($value); |
| 650 | 650 | } |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | * @return array $users |
| 660 | 660 | */ |
| 661 | 661 | function bigbluebuttonbn_get_users_select(context $context = null) { |
| 662 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 662 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 663 | 663 | foreach ($users as $key => $value) { |
| 664 | 664 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
| 665 | 665 | } |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | * @return array $roles |
| 675 | 675 | */ |
| 676 | 676 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 677 | - $roles = (array) role_get_names($context); |
|
| 677 | + $roles = (array)role_get_names($context); |
|
| 678 | 678 | foreach ($roles as $key => $value) { |
| 679 | 679 | $roles[$key] = $value->localname; |
| 680 | 680 | } |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | * @return array $users |
| 690 | 690 | */ |
| 691 | 691 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 692 | - $roles = (array) role_get_names($context); |
|
| 692 | + $roles = (array)role_get_names($context); |
|
| 693 | 693 | foreach ($roles as $key => $value) { |
| 694 | 694 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 695 | 695 | } |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | * @return object $role |
| 705 | 705 | */ |
| 706 | 706 | function bigbluebuttonbn_get_role($id) { |
| 707 | - $roles = (array) role_get_names(); |
|
| 707 | + $roles = (array)role_get_names(); |
|
| 708 | 708 | if (is_numeric($id)) { |
| 709 | 709 | return (object)$roles[$id]; |
| 710 | 710 | } |
@@ -859,7 +859,7 @@ discard block |
||
| 859 | 859 | if (empty($userroles)) { |
| 860 | 860 | $userroles = get_user_roles($context, $userid, true); |
| 861 | 861 | } |
| 862 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
| 862 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
| 863 | 863 | } |
| 864 | 864 | |
| 865 | 865 | /** |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | function bigbluebuttonbn_generate_nonce() { |
| 1011 | 1011 | $mt = microtime(); |
| 1012 | 1012 | $rand = mt_rand(); |
| 1013 | - return md5($mt.$rand); |
|
| 1013 | + return md5($mt . $rand); |
|
| 1014 | 1014 | } |
| 1015 | 1015 | |
| 1016 | 1016 | /** |
@@ -1036,21 +1036,21 @@ discard block |
||
| 1036 | 1036 | */ |
| 1037 | 1037 | function bigbluebuttonbn_events() { |
| 1038 | 1038 | return array( |
| 1039 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1040 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1041 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1042 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1043 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1044 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1045 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1046 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1047 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1048 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1049 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1050 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1051 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1052 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1053 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1039 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1040 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1041 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1042 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1043 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1044 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1045 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1046 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1047 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1048 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1049 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1050 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1051 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1052 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1053 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1054 | 1054 | ); |
| 1055 | 1055 | } |
| 1056 | 1056 | |
@@ -1061,21 +1061,21 @@ discard block |
||
| 1061 | 1061 | */ |
| 1062 | 1062 | function bigbluebuttonbn_events_action() { |
| 1063 | 1063 | return array( |
| 1064 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1065 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1066 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1067 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1068 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1069 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1070 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1071 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1072 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1073 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1074 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1075 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1076 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1077 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1078 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1064 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1065 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1066 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1067 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1068 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1069 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1070 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1071 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1072 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1073 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1074 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1075 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1076 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1077 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1078 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1079 | 1079 | ); |
| 1080 | 1080 | } |
| 1081 | 1081 | |
@@ -1106,7 +1106,7 @@ discard block |
||
| 1106 | 1106 | if (array_key_exists('other', $options)) { |
| 1107 | 1107 | $eventproperties['other'] = $options['other']; |
| 1108 | 1108 | } |
| 1109 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
| 1109 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
| 1110 | 1110 | array($eventproperties)); |
| 1111 | 1111 | $event->trigger(); |
| 1112 | 1112 | } |
@@ -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))); |
@@ -1244,7 +1244,7 @@ discard block |
||
| 1244 | 1244 | * @return object |
| 1245 | 1245 | */ |
| 1246 | 1246 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1247 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
| 1247 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
| 1248 | 1248 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1249 | 1249 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
| 1250 | 1250 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1260,8 +1260,8 @@ discard block |
||
| 1260 | 1260 | * @return string |
| 1261 | 1261 | */ |
| 1262 | 1262 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1263 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1264 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1263 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1264 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1265 | 1265 | return $configxmlparams; |
| 1266 | 1266 | } |
| 1267 | 1267 | |
@@ -1275,7 +1275,7 @@ discard block |
||
| 1275 | 1275 | */ |
| 1276 | 1276 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1277 | 1277 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1278 | - $configxmlarray = (array) $configxml; |
|
| 1278 | + $configxmlarray = (array)$configxml; |
|
| 1279 | 1279 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1280 | 1280 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1281 | 1281 | return ''; |
@@ -1367,7 +1367,7 @@ discard block |
||
| 1367 | 1367 | global $USER; |
| 1368 | 1368 | $starttime = $starttime - ($starttime % 1000); |
| 1369 | 1369 | // Set formatted date. |
| 1370 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1370 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1371 | 1371 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1372 | 1372 | } |
| 1373 | 1373 | |
@@ -1483,7 +1483,7 @@ discard block |
||
| 1483 | 1483 | $visibility = 'hidden '; |
| 1484 | 1484 | } |
| 1485 | 1485 | $recordingpreview = html_writer::start_tag('div', |
| 1486 | - array('id' => 'preview-'.$recording['recordID'], $visibility => $visibility)); |
|
| 1486 | + array('id' => 'preview-' . $recording['recordID'], $visibility => $visibility)); |
|
| 1487 | 1487 | foreach ($recording['playbacks'] as $playback) { |
| 1488 | 1488 | if (isset($playback['preview'])) { |
| 1489 | 1489 | foreach ($playback['preview'] as $image) { |
@@ -1519,7 +1519,7 @@ discard block |
||
| 1519 | 1519 | if ($recording['published'] === 'false') { |
| 1520 | 1520 | $visibility = 'hidden '; |
| 1521 | 1521 | } |
| 1522 | - $id = 'playbacks-'.$recording['recordID']; |
|
| 1522 | + $id = 'playbacks-' . $recording['recordID']; |
|
| 1523 | 1523 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1524 | 1524 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
| 1525 | 1525 | 'title' => $title, $visibility => $visibility)); |
@@ -1527,7 +1527,7 @@ discard block |
||
| 1527 | 1527 | if ($playback['type'] == 'statistics' && (isset($recording['imported']) || (!$bbbsession['administrator'] && !$bbbsession['moderator']))) { |
| 1528 | 1528 | continue; |
| 1529 | 1529 | } |
| 1530 | - $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback).' '; |
|
| 1530 | + $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback) . ' '; |
|
| 1531 | 1531 | } |
| 1532 | 1532 | $recordingtypes .= html_writer::end_tag('div'); |
| 1533 | 1533 | return $recordingtypes; |
@@ -1544,12 +1544,12 @@ discard block |
||
| 1544 | 1544 | */ |
| 1545 | 1545 | function bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback) { |
| 1546 | 1546 | global $CFG, $OUTPUT; |
| 1547 | - $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
| 1547 | + $title = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
| 1548 | 1548 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
| 1549 | 1549 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1550 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1550 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1551 | 1551 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1552 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1552 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1553 | 1553 | } |
| 1554 | 1554 | $id = 'recording-play-' . $playback['type'] . '-' . $recording['recordID']; |
| 1555 | 1555 | $linkattributes = array( |
@@ -1683,7 +1683,7 @@ discard block |
||
| 1683 | 1683 | $linkattributes['class'] = 'disabled'; |
| 1684 | 1684 | unset($linkattributes['onclick']); |
| 1685 | 1685 | } |
| 1686 | - $icon = new pix_icon('i/'.$data['tag'], |
|
| 1686 | + $icon = new pix_icon('i/' . $data['tag'], |
|
| 1687 | 1687 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
| 1688 | 1688 | 'moodle', $iconattributes); |
| 1689 | 1689 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1800,7 +1800,7 @@ discard block |
||
| 1800 | 1800 | */ |
| 1801 | 1801 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
| 1802 | 1802 | $row = new html_table_row(); |
| 1803 | - $row->id = 'recording-td-'.$recording['recordID']; |
|
| 1803 | + $row->id = 'recording-td-' . $recording['recordID']; |
|
| 1804 | 1804 | $row->attributes['data-imported'] = 'false'; |
| 1805 | 1805 | $texthead = ''; |
| 1806 | 1806 | $texttail = ''; |
@@ -1859,9 +1859,9 @@ discard block |
||
| 1859 | 1859 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
| 1860 | 1860 | $sender = get_admin(); |
| 1861 | 1861 | // Prepare message. |
| 1862 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
| 1863 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 1864 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
| 1862 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
| 1863 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
| 1864 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
| 1865 | 1865 | $context = context_course::instance($bigbluebuttonbn->course); |
| 1866 | 1866 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
| 1867 | 1867 | } |
@@ -2081,7 +2081,7 @@ discard block |
||
| 2081 | 2081 | } |
| 2082 | 2082 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 2083 | 2083 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 2084 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 2084 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 2085 | 2085 | // Include only Create events and exclude those with record not true. |
| 2086 | 2086 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 2087 | 2087 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2213,8 +2213,8 @@ discard block |
||
| 2213 | 2213 | function bigbluebuttonbn_format_activity_time($time) { |
| 2214 | 2214 | $activitytime = ''; |
| 2215 | 2215 | if ($time) { |
| 2216 | - $activitytime = calendar_day_representation($time).' '. |
|
| 2217 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2216 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
| 2217 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 2218 | 2218 | calendar_time_representation($time); |
| 2219 | 2219 | } |
| 2220 | 2220 | return $activitytime; |
@@ -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. |
@@ -298,27 +298,27 @@ discard block |
||
| 298 | 298 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
| 299 | 299 | */ |
| 300 | 300 | |
| 301 | - /* |
|
| 301 | + /* |
|
| 302 | 302 | * The warning box is always shown to administrators, but it is also possible to define other roles |
| 303 | 303 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
| 304 | 304 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
| 305 | 305 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
| 306 | 306 | */ |
| 307 | 307 | |
| 308 | - /* |
|
| 308 | + /* |
|
| 309 | 309 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
| 310 | 310 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
| 311 | 311 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
| 312 | 312 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
| 313 | 313 | */ |
| 314 | 314 | |
| 315 | - /* |
|
| 315 | + /* |
|
| 316 | 316 | * Additionally, when general_warning_button_href value is different than "", a button |
| 317 | 317 | * can also be shown right after the message. |
| 318 | 318 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
| 319 | 319 | */ |
| 320 | 320 | |
| 321 | - /* |
|
| 321 | + /* |
|
| 322 | 322 | * Finally, the text and class for the button can be modified |
| 323 | 323 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
| 324 | 324 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |