@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | * Helper function to retrieve imported recordings from the Moodle database. |
| 318 | 318 | * The references are stored as events in bigbluebuttonbn_logs. |
| 319 | 319 | * |
| 320 | - * @param string $courseid |
|
| 320 | + * @param integer $courseid |
|
| 321 | 321 | * @param string $bigbluebuttonbnid |
| 322 | 322 | * @param bool $subset |
| 323 | 323 | * |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | /** |
| 346 | 346 | * Helper function to retrive the default config.xml file. |
| 347 | 347 | * |
| 348 | - * @return string |
|
| 348 | + * @return null|SimpleXMLElement |
|
| 349 | 349 | */ |
| 350 | 350 | function bigbluebuttonbn_get_default_config_xml() { |
| 351 | 351 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | * @param object $a |
| 428 | 428 | * @param object $b |
| 429 | 429 | * |
| 430 | - * @return array |
|
| 430 | + * @return integer |
|
| 431 | 431 | */ |
| 432 | 432 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
| 433 | 433 | global $CFG; |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | * @param string $data |
| 542 | 542 | * @param string $contenttype |
| 543 | 543 | * |
| 544 | - * @return object |
|
| 544 | + * @return null|SimpleXMLElement |
|
| 545 | 545 | */ |
| 546 | 546 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 547 | 547 | if (extension_loaded('curl')) { |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | * @param string $data |
| 583 | 583 | * @param string $contenttype |
| 584 | 584 | * |
| 585 | - * @return object |
|
| 585 | + * @return string |
|
| 586 | 586 | */ |
| 587 | 587 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 588 | 588 | global $CFG; |
@@ -974,7 +974,7 @@ discard block |
||
| 974 | 974 | * @param integer $instance |
| 975 | 975 | * @param integer $voicebridge |
| 976 | 976 | * |
| 977 | - * @return string |
|
| 977 | + * @return boolean |
|
| 978 | 978 | */ |
| 979 | 979 | function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) { |
| 980 | 980 | global $DB; |
@@ -1322,7 +1322,7 @@ discard block |
||
| 1322 | 1322 | * @param string $meetingid |
| 1323 | 1323 | * @param string $configxml |
| 1324 | 1324 | * |
| 1325 | - * @return object |
|
| 1325 | + * @return null|SimpleXMLElement |
|
| 1326 | 1326 | */ |
| 1327 | 1327 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1328 | 1328 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
@@ -1376,7 +1376,7 @@ discard block |
||
| 1376 | 1376 | * @param array $recording |
| 1377 | 1377 | * @param array $tools |
| 1378 | 1378 | * |
| 1379 | - * @return array |
|
| 1379 | + * @return null|stdClass |
|
| 1380 | 1380 | */ |
| 1381 | 1381 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
| 1382 | 1382 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -2018,7 +2018,7 @@ discard block |
||
| 2018 | 2018 | * |
| 2019 | 2019 | * @param array $bbbsession |
| 2020 | 2020 | * @param array $recording |
| 2021 | - * @param object $rowdata |
|
| 2021 | + * @param stdClass $rowdata |
|
| 2022 | 2022 | * |
| 2023 | 2023 | * @return object |
| 2024 | 2024 | */ |
@@ -2215,7 +2215,7 @@ discard block |
||
| 2215 | 2215 | * |
| 2216 | 2216 | * @param array $bbbsession |
| 2217 | 2217 | * @param array $recordings |
| 2218 | - * @param array $tools |
|
| 2218 | + * @param string[] $tools |
|
| 2219 | 2219 | * |
| 2220 | 2220 | * @return array |
| 2221 | 2221 | */ |
@@ -2296,7 +2296,7 @@ discard block |
||
| 2296 | 2296 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2297 | 2297 | * in the getRecordings request considering only those that belong to deleted activities. |
| 2298 | 2298 | * |
| 2299 | - * @param string $courseid |
|
| 2299 | + * @param integer $courseid |
|
| 2300 | 2300 | * @param string $bigbluebuttonbnid |
| 2301 | 2301 | * @param bool $subset |
| 2302 | 2302 | * |
@@ -2320,7 +2320,7 @@ discard block |
||
| 2320 | 2320 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2321 | 2321 | * in the getRecordings request considering only those that belong to imported recordings. |
| 2322 | 2322 | * |
| 2323 | - * @param string $courseid |
|
| 2323 | + * @param integer $courseid |
|
| 2324 | 2324 | * @param string $bigbluebuttonbnid |
| 2325 | 2325 | * @param bool $subset |
| 2326 | 2326 | * |
@@ -2343,7 +2343,7 @@ discard block |
||
| 2343 | 2343 | /** |
| 2344 | 2344 | * Helper function to get recordings and imported recordings together. |
| 2345 | 2345 | * |
| 2346 | - * @param string $courseid |
|
| 2346 | + * @param integer $courseid |
|
| 2347 | 2347 | * @param string $bigbluebuttonbnid |
| 2348 | 2348 | * @param bool $subset |
| 2349 | 2349 | * @param bool $includedeleted |
@@ -2361,7 +2361,7 @@ discard block |
||
| 2361 | 2361 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
| 2362 | 2362 | * in bigbluebuttonbn_logs. |
| 2363 | 2363 | * |
| 2364 | - * @param string $courseid |
|
| 2364 | + * @param integer $courseid |
|
| 2365 | 2365 | * @param string $bigbluebuttonbnid |
| 2366 | 2366 | * @param bool $subset |
| 2367 | 2367 | * @param bool $includedeleted |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | } |
| 191 | 191 | if ($xml) { |
| 192 | 192 | // Either failure or success without meeting info. |
| 193 | - return (array) $xml; |
|
| 193 | + return (array)$xml; |
|
| 194 | 194 | } |
| 195 | 195 | // If the server is unreachable, then prompts the user of the necessary action. |
| 196 | 196 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
| 280 | 280 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
| 281 | 281 | 'getRecordings', |
| 282 | - ['recordID' => implode(',', (array) $breakoutroom)] |
|
| 282 | + ['recordID' => implode(',', (array)$breakoutroom)] |
|
| 283 | 283 | ); |
| 284 | 284 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
| 285 | 285 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | // Override imported flag with actual ID. |
| 336 | 336 | $recording['imported'] = $recordimported->id; |
| 337 | 337 | if (isset($recordimported->protected)) { |
| 338 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 338 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 339 | 339 | } |
| 340 | 340 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 341 | 341 | } |
@@ -365,21 +365,21 @@ discard block |
||
| 365 | 365 | // Add formats. |
| 366 | 366 | $playbackarray = array(); |
| 367 | 367 | foreach ($recording->playback->format as $format) { |
| 368 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 369 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 368 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 369 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 370 | 370 | // Add preview per format when existing. |
| 371 | 371 | if ($format->preview) { |
| 372 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 372 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 373 | 373 | } |
| 374 | 374 | } |
| 375 | 375 | // Add the metadata to the recordings array. |
| 376 | 376 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 377 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 378 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 379 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 380 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 377 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 378 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 379 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 380 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 381 | 381 | if (isset($recording->protected)) { |
| 382 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 382 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 383 | 383 | } |
| 384 | 384 | return $recordingarray + $metadataarray; |
| 385 | 385 | } |
@@ -394,9 +394,9 @@ discard block |
||
| 394 | 394 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 395 | 395 | $imagesarray = array(); |
| 396 | 396 | foreach ($preview->images->image as $image) { |
| 397 | - $imagearray = array('url' => trim((string) $image)); |
|
| 397 | + $imagearray = array('url' => trim((string)$image)); |
|
| 398 | 398 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 399 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 399 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 400 | 400 | } |
| 401 | 401 | array_push($imagesarray, $imagearray); |
| 402 | 402 | } |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | $ids = explode(',', $recordids); |
| 492 | 492 | foreach ($ids as $id) { |
| 493 | 493 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 494 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 494 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 495 | 495 | ); |
| 496 | 496 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 497 | 497 | return false; |
@@ -662,7 +662,7 @@ discard block |
||
| 662 | 662 | * @return array $users |
| 663 | 663 | */ |
| 664 | 664 | function bigbluebuttonbn_get_users(context $context = null) { |
| 665 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 665 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 666 | 666 | foreach ($users as $key => $value) { |
| 667 | 667 | $users[$key] = fullname($value); |
| 668 | 668 | } |
@@ -681,7 +681,7 @@ discard block |
||
| 681 | 681 | function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) { |
| 682 | 682 | // CONTRIB-7972, check the group of current user and course group mode. |
| 683 | 683 | $groups = null; |
| 684 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 684 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 685 | 685 | $course = get_course($context->instanceid); |
| 686 | 686 | $groupmode = groups_get_course_groupmode($course); |
| 687 | 687 | if ($bbactivity) { |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | $groups = groups_get_all_groups($course->id, $USER->id); |
| 695 | 695 | $users = []; |
| 696 | 696 | foreach ($groups as $g) { |
| 697 | - $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 697 | + $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 698 | 698 | } |
| 699 | 699 | } |
| 700 | 700 | return array_map( |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | * @return array $roles |
| 713 | 713 | */ |
| 714 | 714 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 715 | - $roles = (array) role_get_names($context); |
|
| 715 | + $roles = (array)role_get_names($context); |
|
| 716 | 716 | foreach ($roles as $key => $value) { |
| 717 | 717 | $roles[$key] = $value->localname; |
| 718 | 718 | } |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | * @return array $users |
| 728 | 728 | */ |
| 729 | 729 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 730 | - $roles = (array) role_get_names($context); |
|
| 730 | + $roles = (array)role_get_names($context); |
|
| 731 | 731 | foreach ($roles as $key => $value) { |
| 732 | 732 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 733 | 733 | } |
@@ -742,9 +742,9 @@ discard block |
||
| 742 | 742 | * @return object $role |
| 743 | 743 | */ |
| 744 | 744 | function bigbluebuttonbn_get_role($id) { |
| 745 | - $roles = (array) role_get_names(); |
|
| 745 | + $roles = (array)role_get_names(); |
|
| 746 | 746 | if (is_numeric($id) && isset($roles[$id])) { |
| 747 | - return (object) $roles[$id]; |
|
| 747 | + return (object)$roles[$id]; |
|
| 748 | 748 | } |
| 749 | 749 | foreach ($roles as $role) { |
| 750 | 750 | if ($role->shortname == $id) { |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
| 825 | 825 | $participantlist[] = array( |
| 826 | 826 | 'selectiontype' => 'user', |
| 827 | - 'selectionid' => (string) $ownerid, |
|
| 827 | + 'selectionid' => (string)$ownerid, |
|
| 828 | 828 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
| 829 | 829 | } |
| 830 | 830 | continue; |
@@ -1006,7 +1006,7 @@ discard block |
||
| 1006 | 1006 | $now = time(); |
| 1007 | 1007 | if ($closingtime > 0 && $now < $closingtime) { |
| 1008 | 1008 | $duration = ceil(($closingtime - $now) / 60); |
| 1009 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1009 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1010 | 1010 | $duration = intval($duration) + $compensationtime; |
| 1011 | 1011 | } |
| 1012 | 1012 | return $duration; |
@@ -1208,16 +1208,16 @@ discard block |
||
| 1208 | 1208 | * @return array |
| 1209 | 1209 | */ |
| 1210 | 1210 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
| 1211 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1211 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1212 | 1212 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 1213 | 1213 | $result = $cache->get($meetingid); |
| 1214 | 1214 | $now = time(); |
| 1215 | 1215 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1216 | 1216 | // Use the value in the cache. |
| 1217 | - return (array) json_decode($result['meeting_info']); |
|
| 1217 | + return (array)json_decode($result['meeting_info']); |
|
| 1218 | 1218 | } |
| 1219 | 1219 | // Ping again and refresh the cache. |
| 1220 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1220 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1221 | 1221 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1222 | 1222 | ); |
| 1223 | 1223 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1364,7 +1364,7 @@ discard block |
||
| 1364 | 1364 | */ |
| 1365 | 1365 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1366 | 1366 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1367 | - $configxmlarray = (array) $configxml; |
|
| 1367 | + $configxmlarray = (array)$configxml; |
|
| 1368 | 1368 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1369 | 1369 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1370 | 1370 | return ''; |
@@ -1419,7 +1419,7 @@ discard block |
||
| 1419 | 1419 | * @return boolean |
| 1420 | 1420 | */ |
| 1421 | 1421 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
| 1422 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1422 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1423 | 1423 | } |
| 1424 | 1424 | |
| 1425 | 1425 | /** |
@@ -1430,7 +1430,7 @@ discard block |
||
| 1430 | 1430 | * @return boolean |
| 1431 | 1431 | */ |
| 1432 | 1432 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
| 1433 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1433 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1434 | 1434 | } |
| 1435 | 1435 | |
| 1436 | 1436 | /** |
@@ -1854,7 +1854,7 @@ discard block |
||
| 1854 | 1854 | } |
| 1855 | 1855 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
| 1856 | 1856 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);'; |
| 1857 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1857 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1858 | 1858 | // With icon for $manageaction. |
| 1859 | 1859 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
| 1860 | 1860 | $linkattributes = array( |
@@ -2138,7 +2138,7 @@ discard block |
||
| 2138 | 2138 | // Enqueue it. |
| 2139 | 2139 | \core\task\manager::queue_adhoc_task($task); |
| 2140 | 2140 | } catch (Exception $e) { |
| 2141 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
| 2141 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
| 2142 | 2142 | } |
| 2143 | 2143 | } |
| 2144 | 2144 | |
@@ -2152,7 +2152,7 @@ discard block |
||
| 2152 | 2152 | */ |
| 2153 | 2153 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
| 2154 | 2154 | global $CFG; |
| 2155 | - require_once($CFG->libdir.'/completionlib.php'); |
|
| 2155 | + require_once($CFG->libdir . '/completionlib.php'); |
|
| 2156 | 2156 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
| 2157 | 2157 | $completion = new completion_info($course); |
| 2158 | 2158 | if (!$completion->is_enabled($cm)) { |
@@ -2581,7 +2581,7 @@ discard block |
||
| 2581 | 2581 | */ |
| 2582 | 2582 | function bigbluebuttonbn_format_activity_time($time) { |
| 2583 | 2583 | global $CFG; |
| 2584 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 2584 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 2585 | 2585 | $activitytime = ''; |
| 2586 | 2586 | if ($time) { |
| 2587 | 2587 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2679,7 +2679,7 @@ discard block |
||
| 2679 | 2679 | */ |
| 2680 | 2680 | function bigbluebuttonbn_settings_general(&$renderer) { |
| 2681 | 2681 | // Configuration for BigBlueButton. |
| 2682 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2682 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2683 | 2683 | $renderer->render_group_header('general'); |
| 2684 | 2684 | $renderer->render_group_element( |
| 2685 | 2685 | 'server_url', |
@@ -2701,7 +2701,7 @@ discard block |
||
| 2701 | 2701 | */ |
| 2702 | 2702 | function bigbluebuttonbn_settings_record(&$renderer) { |
| 2703 | 2703 | // Configuration for 'recording' feature. |
| 2704 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2704 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2705 | 2705 | $renderer->render_group_header('recording'); |
| 2706 | 2706 | $renderer->render_group_element( |
| 2707 | 2707 | 'recording_default', |
@@ -2745,7 +2745,7 @@ discard block |
||
| 2745 | 2745 | */ |
| 2746 | 2746 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
| 2747 | 2747 | // Configuration for 'import recordings' feature. |
| 2748 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2748 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2749 | 2749 | $renderer->render_group_header('importrecordings'); |
| 2750 | 2750 | $renderer->render_group_element( |
| 2751 | 2751 | 'importrecordings_enabled', |
@@ -2767,7 +2767,7 @@ discard block |
||
| 2767 | 2767 | */ |
| 2768 | 2768 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
| 2769 | 2769 | // Configuration for 'show recordings' feature. |
| 2770 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2770 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2771 | 2771 | $renderer->render_group_header('recordings'); |
| 2772 | 2772 | $renderer->render_group_element( |
| 2773 | 2773 | 'recordings_html_default', |
@@ -2817,7 +2817,7 @@ discard block |
||
| 2817 | 2817 | */ |
| 2818 | 2818 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
| 2819 | 2819 | // Configuration for wait for moderator feature. |
| 2820 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2820 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2821 | 2821 | $renderer->render_group_header('waitformoderator'); |
| 2822 | 2822 | $renderer->render_group_element( |
| 2823 | 2823 | 'waitformoderator_default', |
@@ -2847,7 +2847,7 @@ discard block |
||
| 2847 | 2847 | */ |
| 2848 | 2848 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
| 2849 | 2849 | // Configuration for "static voice bridge" feature. |
| 2850 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2850 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2851 | 2851 | $renderer->render_group_header('voicebridge'); |
| 2852 | 2852 | $renderer->render_group_element( |
| 2853 | 2853 | 'voicebridge_editable', |
@@ -2865,7 +2865,7 @@ discard block |
||
| 2865 | 2865 | */ |
| 2866 | 2866 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
| 2867 | 2867 | // Configuration for "preupload presentation" feature. |
| 2868 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2868 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2869 | 2869 | // This feature only works if curl is installed. |
| 2870 | 2870 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
| 2871 | 2871 | if (!extension_loaded('curl')) { |
@@ -2893,7 +2893,7 @@ discard block |
||
| 2893 | 2893 | */ |
| 2894 | 2894 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
| 2895 | 2895 | // Configuration for "preupload presentation" feature. |
| 2896 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2896 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2897 | 2897 | if (extension_loaded('curl')) { |
| 2898 | 2898 | // This feature only works if curl is installed. |
| 2899 | 2899 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2910,7 +2910,7 @@ discard block |
||
| 2910 | 2910 | */ |
| 2911 | 2911 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
| 2912 | 2912 | // Configuration for "user limit" feature. |
| 2913 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2913 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2914 | 2914 | $renderer->render_group_header('userlimit'); |
| 2915 | 2915 | $renderer->render_group_element( |
| 2916 | 2916 | 'userlimit_default', |
@@ -2932,7 +2932,7 @@ discard block |
||
| 2932 | 2932 | */ |
| 2933 | 2933 | function bigbluebuttonbn_settings_duration(&$renderer) { |
| 2934 | 2934 | // Configuration for "scheduled duration" feature. |
| 2935 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2935 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2936 | 2936 | $renderer->render_group_header('scheduled'); |
| 2937 | 2937 | $renderer->render_group_element( |
| 2938 | 2938 | 'scheduled_duration_enabled', |
@@ -2958,7 +2958,7 @@ discard block |
||
| 2958 | 2958 | */ |
| 2959 | 2959 | function bigbluebuttonbn_settings_participants(&$renderer) { |
| 2960 | 2960 | // Configuration for defining the default role/user that will be moderator on new activities. |
| 2961 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2961 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2962 | 2962 | $renderer->render_group_header('participant'); |
| 2963 | 2963 | // UI for 'participants' feature. |
| 2964 | 2964 | $roles = bigbluebuttonbn_get_roles(); |
@@ -2983,7 +2983,7 @@ discard block |
||
| 2983 | 2983 | */ |
| 2984 | 2984 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
| 2985 | 2985 | // Configuration for "send notifications" feature. |
| 2986 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2986 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2987 | 2987 | $renderer->render_group_header('sendnotifications'); |
| 2988 | 2988 | $renderer->render_group_element( |
| 2989 | 2989 | 'sendnotifications_enabled', |
@@ -3001,14 +3001,14 @@ discard block |
||
| 3001 | 3001 | */ |
| 3002 | 3002 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
| 3003 | 3003 | // Configuration for "clienttype" feature. |
| 3004 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 3004 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 3005 | 3005 | $renderer->render_group_header('clienttype'); |
| 3006 | 3006 | $renderer->render_group_element( |
| 3007 | 3007 | 'clienttype_editable', |
| 3008 | 3008 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
| 3009 | 3009 | ); |
| 3010 | 3010 | // Web Client default. |
| 3011 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 3011 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 3012 | 3012 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 3013 | 3013 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 3014 | 3014 | $renderer->render_group_element( |
@@ -3031,7 +3031,7 @@ discard block |
||
| 3031 | 3031 | */ |
| 3032 | 3032 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
| 3033 | 3033 | // Configuration for BigBlueButton. |
| 3034 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3034 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3035 | 3035 | $renderer->render_group_header('muteonstart'); |
| 3036 | 3036 | $renderer->render_group_element( |
| 3037 | 3037 | 'muteonstart_default', |
@@ -3053,7 +3053,7 @@ discard block |
||
| 3053 | 3053 | */ |
| 3054 | 3054 | function bigbluebuttonbn_settings_extended(&$renderer) { |
| 3055 | 3055 | // Configuration for 'notify users when recording ready' feature. |
| 3056 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3056 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3057 | 3057 | return; |
| 3058 | 3058 | } |
| 3059 | 3059 | $renderer->render_group_header('extended_capabilities'); |
@@ -3081,7 +3081,7 @@ discard block |
||
| 3081 | 3081 | global $DB; |
| 3082 | 3082 | do { |
| 3083 | 3083 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
| 3084 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3084 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3085 | 3085 | } while ($meetingid == $encodedseed); |
| 3086 | 3086 | return $encodedseed; |
| 3087 | 3087 | } |
@@ -3294,7 +3294,7 @@ discard block |
||
| 3294 | 3294 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
| 3295 | 3295 | global $DB; |
| 3296 | 3296 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
| 3297 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3297 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3298 | 3298 | return $ownerid; |
| 3299 | 3299 | } |
| 3300 | 3300 | |
@@ -3337,8 +3337,8 @@ discard block |
||
| 3337 | 3337 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3338 | 3338 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
| 3339 | 3339 | // Extra data for setting up the Meeting. |
| 3340 | - $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3341 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3340 | + $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3341 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3342 | 3342 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
| 3343 | 3343 | } |
| 3344 | 3344 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -3488,7 +3488,7 @@ discard block |
||
| 3488 | 3488 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 3489 | 3489 | ]; |
| 3490 | 3490 | // Special metadata for recording processing. |
| 3491 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3491 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3492 | 3492 | $metadata["bn-recording-status"] = json_encode( |
| 3493 | 3493 | array( |
| 3494 | 3494 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3496,10 +3496,10 @@ discard block |
||
| 3496 | 3496 | ) |
| 3497 | 3497 | ); |
| 3498 | 3498 | } |
| 3499 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3499 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3500 | 3500 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 3501 | 3501 | } |
| 3502 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3502 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3503 | 3503 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
| 3504 | 3504 | } |
| 3505 | 3505 | return $metadata; |