@@ -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 |
@@ -1678,7 +1678,7 @@ |
||
| 1678 | 1678 | 'data-action' => 'play', |
| 1679 | 1679 | 'data-target' => $playback['type'], |
| 1680 | 1680 | 'data-href' => $href, |
| 1681 | - ); |
|
| 1681 | + ); |
|
| 1682 | 1682 | if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
| 1683 | 1683 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
| 1684 | 1684 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -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'); |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
| 284 | 284 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
| 285 | 285 | 'getRecordings', |
| 286 | - ['recordID' => implode(',', (array) $breakoutroom)] |
|
| 286 | + ['recordID' => implode(',', (array)$breakoutroom)] |
|
| 287 | 287 | ); |
| 288 | 288 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
| 289 | 289 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | // Override imported flag with actual ID. |
| 340 | 340 | $recording['imported'] = $recordimported->id; |
| 341 | 341 | if (isset($recordimported->protected)) { |
| 342 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 342 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 343 | 343 | } |
| 344 | 344 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 345 | 345 | } |
@@ -369,21 +369,21 @@ discard block |
||
| 369 | 369 | // Add formats. |
| 370 | 370 | $playbackarray = array(); |
| 371 | 371 | foreach ($recording->playback->format as $format) { |
| 372 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 373 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 372 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 373 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 374 | 374 | // Add preview per format when existing. |
| 375 | 375 | if ($format->preview) { |
| 376 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 376 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 377 | 377 | } |
| 378 | 378 | } |
| 379 | 379 | // Add the metadata to the recordings array. |
| 380 | 380 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 381 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 382 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 383 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 384 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 381 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 382 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 383 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 384 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 385 | 385 | if (isset($recording->protected)) { |
| 386 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 386 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 387 | 387 | } |
| 388 | 388 | return $recordingarray + $metadataarray; |
| 389 | 389 | } |
@@ -398,9 +398,9 @@ discard block |
||
| 398 | 398 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 399 | 399 | $imagesarray = array(); |
| 400 | 400 | foreach ($preview->images->image as $image) { |
| 401 | - $imagearray = array('url' => trim((string) $image)); |
|
| 401 | + $imagearray = array('url' => trim((string)$image)); |
|
| 402 | 402 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 403 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 403 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 404 | 404 | } |
| 405 | 405 | array_push($imagesarray, $imagearray); |
| 406 | 406 | } |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | $ids = explode(',', $recordids); |
| 496 | 496 | foreach ($ids as $id) { |
| 497 | 497 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 498 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 498 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 499 | 499 | ); |
| 500 | 500 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 501 | 501 | return false; |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | * @return array $users |
| 667 | 667 | */ |
| 668 | 668 | function bigbluebuttonbn_get_users(context $context = null) { |
| 669 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 669 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 670 | 670 | foreach ($users as $key => $value) { |
| 671 | 671 | $users[$key] = fullname($value); |
| 672 | 672 | } |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) { |
| 686 | 686 | // CONTRIB-7972, check the group of current user and course group mode. |
| 687 | 687 | $groups = null; |
| 688 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 688 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 689 | 689 | $course = get_course($context->instanceid); |
| 690 | 690 | $groupmode = groups_get_course_groupmode($course); |
| 691 | 691 | if ($bbactivity) { |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | $groups = groups_get_all_groups($course->id, $USER->id); |
| 699 | 699 | $users = []; |
| 700 | 700 | foreach ($groups as $g) { |
| 701 | - $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 701 | + $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 702 | 702 | } |
| 703 | 703 | } |
| 704 | 704 | return array_map( |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | * @return array $roles |
| 717 | 717 | */ |
| 718 | 718 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 719 | - $roles = (array) role_get_names($context); |
|
| 719 | + $roles = (array)role_get_names($context); |
|
| 720 | 720 | foreach ($roles as $key => $value) { |
| 721 | 721 | $roles[$key] = $value->localname; |
| 722 | 722 | } |
@@ -731,7 +731,7 @@ discard block |
||
| 731 | 731 | * @return array $users |
| 732 | 732 | */ |
| 733 | 733 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 734 | - $roles = (array) role_get_names($context); |
|
| 734 | + $roles = (array)role_get_names($context); |
|
| 735 | 735 | foreach ($roles as $key => $value) { |
| 736 | 736 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 737 | 737 | } |
@@ -746,9 +746,9 @@ discard block |
||
| 746 | 746 | * @return object $role |
| 747 | 747 | */ |
| 748 | 748 | function bigbluebuttonbn_get_role($id) { |
| 749 | - $roles = (array) role_get_names(); |
|
| 749 | + $roles = (array)role_get_names(); |
|
| 750 | 750 | if (is_numeric($id) && isset($roles[$id])) { |
| 751 | - return (object) $roles[$id]; |
|
| 751 | + return (object)$roles[$id]; |
|
| 752 | 752 | } |
| 753 | 753 | foreach ($roles as $role) { |
| 754 | 754 | if ($role->shortname == $id) { |
@@ -828,7 +828,7 @@ discard block |
||
| 828 | 828 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
| 829 | 829 | $participantlist[] = array( |
| 830 | 830 | 'selectiontype' => 'user', |
| 831 | - 'selectionid' => (string) $ownerid, |
|
| 831 | + 'selectionid' => (string)$ownerid, |
|
| 832 | 832 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
| 833 | 833 | } |
| 834 | 834 | continue; |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | $now = time(); |
| 1011 | 1011 | if ($closingtime > 0 && $now < $closingtime) { |
| 1012 | 1012 | $duration = ceil(($closingtime - $now) / 60); |
| 1013 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1013 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1014 | 1014 | $duration = intval($duration) + $compensationtime; |
| 1015 | 1015 | } |
| 1016 | 1016 | return $duration; |
@@ -1212,16 +1212,16 @@ discard block |
||
| 1212 | 1212 | * @return array |
| 1213 | 1213 | */ |
| 1214 | 1214 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
| 1215 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1215 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1216 | 1216 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 1217 | 1217 | $result = $cache->get($meetingid); |
| 1218 | 1218 | $now = time(); |
| 1219 | 1219 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1220 | 1220 | // Use the value in the cache. |
| 1221 | - return (array) json_decode($result['meeting_info']); |
|
| 1221 | + return (array)json_decode($result['meeting_info']); |
|
| 1222 | 1222 | } |
| 1223 | 1223 | // Ping again and refresh the cache. |
| 1224 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1224 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1225 | 1225 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1226 | 1226 | ); |
| 1227 | 1227 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1368,7 +1368,7 @@ discard block |
||
| 1368 | 1368 | */ |
| 1369 | 1369 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1370 | 1370 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1371 | - $configxmlarray = (array) $configxml; |
|
| 1371 | + $configxmlarray = (array)$configxml; |
|
| 1372 | 1372 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1373 | 1373 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1374 | 1374 | return ''; |
@@ -1421,7 +1421,7 @@ discard block |
||
| 1421 | 1421 | * @return boolean |
| 1422 | 1422 | */ |
| 1423 | 1423 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
| 1424 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1424 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1425 | 1425 | } |
| 1426 | 1426 | |
| 1427 | 1427 | /** |
@@ -1432,7 +1432,7 @@ discard block |
||
| 1432 | 1432 | * @return boolean |
| 1433 | 1433 | */ |
| 1434 | 1434 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
| 1435 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1435 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1436 | 1436 | } |
| 1437 | 1437 | |
| 1438 | 1438 | /** |
@@ -1857,7 +1857,7 @@ discard block |
||
| 1857 | 1857 | } |
| 1858 | 1858 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
| 1859 | 1859 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
| 1860 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1860 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1861 | 1861 | // With icon for $manageaction. |
| 1862 | 1862 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
| 1863 | 1863 | $linkattributes = array( |
@@ -2116,7 +2116,7 @@ discard block |
||
| 2116 | 2116 | // Enqueue it. |
| 2117 | 2117 | \core\task\manager::queue_adhoc_task($task); |
| 2118 | 2118 | } catch (Exception $e) { |
| 2119 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
| 2119 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
| 2120 | 2120 | } |
| 2121 | 2121 | } |
| 2122 | 2122 | |
@@ -2130,7 +2130,7 @@ discard block |
||
| 2130 | 2130 | */ |
| 2131 | 2131 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
| 2132 | 2132 | global $CFG; |
| 2133 | - require_once($CFG->libdir.'/completionlib.php'); |
|
| 2133 | + require_once($CFG->libdir . '/completionlib.php'); |
|
| 2134 | 2134 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
| 2135 | 2135 | $completion = new completion_info($course); |
| 2136 | 2136 | if (!$completion->is_enabled($cm)) { |
@@ -2559,7 +2559,7 @@ discard block |
||
| 2559 | 2559 | */ |
| 2560 | 2560 | function bigbluebuttonbn_format_activity_time($time) { |
| 2561 | 2561 | global $CFG; |
| 2562 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 2562 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 2563 | 2563 | $activitytime = ''; |
| 2564 | 2564 | if ($time) { |
| 2565 | 2565 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2657,7 +2657,7 @@ discard block |
||
| 2657 | 2657 | */ |
| 2658 | 2658 | function bigbluebuttonbn_settings_general(&$renderer) { |
| 2659 | 2659 | // Configuration for BigBlueButton. |
| 2660 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2660 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2661 | 2661 | $renderer->render_group_header('general'); |
| 2662 | 2662 | $renderer->render_group_element( |
| 2663 | 2663 | 'server_url', |
@@ -2679,7 +2679,7 @@ discard block |
||
| 2679 | 2679 | */ |
| 2680 | 2680 | function bigbluebuttonbn_settings_record(&$renderer) { |
| 2681 | 2681 | // Configuration for 'recording' feature. |
| 2682 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2682 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2683 | 2683 | $renderer->render_group_header('recording'); |
| 2684 | 2684 | $renderer->render_group_element( |
| 2685 | 2685 | 'recording_default', |
@@ -2723,7 +2723,7 @@ discard block |
||
| 2723 | 2723 | */ |
| 2724 | 2724 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
| 2725 | 2725 | // Configuration for 'import recordings' feature. |
| 2726 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2726 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2727 | 2727 | $renderer->render_group_header('importrecordings'); |
| 2728 | 2728 | $renderer->render_group_element( |
| 2729 | 2729 | 'importrecordings_enabled', |
@@ -2745,7 +2745,7 @@ discard block |
||
| 2745 | 2745 | */ |
| 2746 | 2746 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
| 2747 | 2747 | // Configuration for 'show recordings' feature. |
| 2748 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2748 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2749 | 2749 | $renderer->render_group_header('recordings'); |
| 2750 | 2750 | $renderer->render_group_element( |
| 2751 | 2751 | 'recordings_html_default', |
@@ -2799,7 +2799,7 @@ discard block |
||
| 2799 | 2799 | */ |
| 2800 | 2800 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
| 2801 | 2801 | // Configuration for wait for moderator feature. |
| 2802 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2802 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2803 | 2803 | $renderer->render_group_header('waitformoderator'); |
| 2804 | 2804 | $renderer->render_group_element( |
| 2805 | 2805 | 'waitformoderator_default', |
@@ -2829,7 +2829,7 @@ discard block |
||
| 2829 | 2829 | */ |
| 2830 | 2830 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
| 2831 | 2831 | // Configuration for "static voice bridge" feature. |
| 2832 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2832 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2833 | 2833 | $renderer->render_group_header('voicebridge'); |
| 2834 | 2834 | $renderer->render_group_element( |
| 2835 | 2835 | 'voicebridge_editable', |
@@ -2847,7 +2847,7 @@ discard block |
||
| 2847 | 2847 | */ |
| 2848 | 2848 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
| 2849 | 2849 | // Configuration for "preupload presentation" feature. |
| 2850 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2850 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2851 | 2851 | // This feature only works if curl is installed. |
| 2852 | 2852 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
| 2853 | 2853 | if (!extension_loaded('curl')) { |
@@ -2875,7 +2875,7 @@ discard block |
||
| 2875 | 2875 | */ |
| 2876 | 2876 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
| 2877 | 2877 | // Configuration for "preupload presentation" feature. |
| 2878 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2878 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2879 | 2879 | if (extension_loaded('curl')) { |
| 2880 | 2880 | // This feature only works if curl is installed. |
| 2881 | 2881 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2892,7 +2892,7 @@ discard block |
||
| 2892 | 2892 | */ |
| 2893 | 2893 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
| 2894 | 2894 | // Configuration for "user limit" feature. |
| 2895 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2895 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2896 | 2896 | $renderer->render_group_header('userlimit'); |
| 2897 | 2897 | $renderer->render_group_element( |
| 2898 | 2898 | 'userlimit_default', |
@@ -2914,7 +2914,7 @@ discard block |
||
| 2914 | 2914 | */ |
| 2915 | 2915 | function bigbluebuttonbn_settings_duration(&$renderer) { |
| 2916 | 2916 | // Configuration for "scheduled duration" feature. |
| 2917 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2917 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2918 | 2918 | $renderer->render_group_header('scheduled'); |
| 2919 | 2919 | $renderer->render_group_element( |
| 2920 | 2920 | 'scheduled_duration_enabled', |
@@ -2940,7 +2940,7 @@ discard block |
||
| 2940 | 2940 | */ |
| 2941 | 2941 | function bigbluebuttonbn_settings_participants(&$renderer) { |
| 2942 | 2942 | // Configuration for defining the default role/user that will be moderator on new activities. |
| 2943 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2943 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2944 | 2944 | $renderer->render_group_header('participant'); |
| 2945 | 2945 | // UI for 'participants' feature. |
| 2946 | 2946 | $roles = bigbluebuttonbn_get_roles(); |
@@ -2965,7 +2965,7 @@ discard block |
||
| 2965 | 2965 | */ |
| 2966 | 2966 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
| 2967 | 2967 | // Configuration for "send notifications" feature. |
| 2968 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2968 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2969 | 2969 | $renderer->render_group_header('sendnotifications'); |
| 2970 | 2970 | $renderer->render_group_element( |
| 2971 | 2971 | 'sendnotifications_enabled', |
@@ -2983,14 +2983,14 @@ discard block |
||
| 2983 | 2983 | */ |
| 2984 | 2984 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
| 2985 | 2985 | // Configuration for "clienttype" feature. |
| 2986 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2986 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2987 | 2987 | $renderer->render_group_header('clienttype'); |
| 2988 | 2988 | $renderer->render_group_element( |
| 2989 | 2989 | 'clienttype_editable', |
| 2990 | 2990 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
| 2991 | 2991 | ); |
| 2992 | 2992 | // Web Client default. |
| 2993 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2993 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2994 | 2994 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 2995 | 2995 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 2996 | 2996 | $renderer->render_group_element( |
@@ -3013,7 +3013,7 @@ discard block |
||
| 3013 | 3013 | */ |
| 3014 | 3014 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
| 3015 | 3015 | // Configuration for BigBlueButton. |
| 3016 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3016 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3017 | 3017 | $renderer->render_group_header('muteonstart'); |
| 3018 | 3018 | $renderer->render_group_element( |
| 3019 | 3019 | 'muteonstart_default', |
@@ -3056,7 +3056,7 @@ discard block |
||
| 3056 | 3056 | */ |
| 3057 | 3057 | function bigbluebuttonbn_settings_disablecam(&$renderer) { |
| 3058 | 3058 | // Configuration for BigBlueButton. |
| 3059 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
| 3059 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
| 3060 | 3060 | $renderer->render_group_element( |
| 3061 | 3061 | 'disablecam_default', |
| 3062 | 3062 | $renderer->render_group_element_checkbox('disablecam_default', 0) |
@@ -3077,7 +3077,7 @@ discard block |
||
| 3077 | 3077 | */ |
| 3078 | 3078 | function bigbluebuttonbn_settings_disablemic(&$renderer) { |
| 3079 | 3079 | // Configuration for BigBlueButton. |
| 3080 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
| 3080 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
| 3081 | 3081 | $renderer->render_group_element( |
| 3082 | 3082 | 'disablemic_default', |
| 3083 | 3083 | $renderer->render_group_element_checkbox('disablemic_default', 0) |
@@ -3098,7 +3098,7 @@ discard block |
||
| 3098 | 3098 | */ |
| 3099 | 3099 | function bigbluebuttonbn_settings_disableprivatechat(&$renderer) { |
| 3100 | 3100 | // Configuration for BigBlueButton. |
| 3101 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
| 3101 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
| 3102 | 3102 | $renderer->render_group_element( |
| 3103 | 3103 | 'disableprivatechat_default', |
| 3104 | 3104 | $renderer->render_group_element_checkbox('disableprivatechat_default', 0) |
@@ -3119,7 +3119,7 @@ discard block |
||
| 3119 | 3119 | */ |
| 3120 | 3120 | function bigbluebuttonbn_settings_disablepublicchat(&$renderer) { |
| 3121 | 3121 | // Configuration for BigBlueButton. |
| 3122 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
| 3122 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
| 3123 | 3123 | $renderer->render_group_element( |
| 3124 | 3124 | 'disablepublicchat_default', |
| 3125 | 3125 | $renderer->render_group_element_checkbox('disablepublicchat_default', 0) |
@@ -3140,7 +3140,7 @@ discard block |
||
| 3140 | 3140 | */ |
| 3141 | 3141 | function bigbluebuttonbn_settings_disablenote(&$renderer) { |
| 3142 | 3142 | // Configuration for BigBlueButton. |
| 3143 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
| 3143 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
| 3144 | 3144 | $renderer->render_group_element( |
| 3145 | 3145 | 'disablenote_default', |
| 3146 | 3146 | $renderer->render_group_element_checkbox('disablenote_default', 0) |
@@ -3161,7 +3161,7 @@ discard block |
||
| 3161 | 3161 | */ |
| 3162 | 3162 | function bigbluebuttonbn_settings_hideuserlist(&$renderer) { |
| 3163 | 3163 | // Configuration for BigBlueButton. |
| 3164 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
| 3164 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
| 3165 | 3165 | $renderer->render_group_element( |
| 3166 | 3166 | 'hideuserlist_default', |
| 3167 | 3167 | $renderer->render_group_element_checkbox('hideuserlist_default', 0) |
@@ -3182,7 +3182,7 @@ discard block |
||
| 3182 | 3182 | */ |
| 3183 | 3183 | function bigbluebuttonbn_settings_lockedlayout(&$renderer) { |
| 3184 | 3184 | // Configuration for BigBlueButton. |
| 3185 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
| 3185 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
| 3186 | 3186 | $renderer->render_group_element( |
| 3187 | 3187 | 'lockedlayout_default', |
| 3188 | 3188 | $renderer->render_group_element_checkbox('lockedlayout_default', 0) |
@@ -3203,7 +3203,7 @@ discard block |
||
| 3203 | 3203 | */ |
| 3204 | 3204 | function bigbluebuttonbn_settings_lockonjoin(&$renderer) { |
| 3205 | 3205 | // Configuration for BigBlueButton. |
| 3206 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
| 3206 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
| 3207 | 3207 | $renderer->render_group_element( |
| 3208 | 3208 | 'lockonjoin_default', |
| 3209 | 3209 | $renderer->render_group_element_checkbox('lockonjoin_default', 0) |
@@ -3224,7 +3224,7 @@ discard block |
||
| 3224 | 3224 | */ |
| 3225 | 3225 | function bigbluebuttonbn_settings_lockonjoinconfigurable(&$renderer) { |
| 3226 | 3226 | // Configuration for BigBlueButton. |
| 3227 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
| 3227 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
| 3228 | 3228 | $renderer->render_group_element( |
| 3229 | 3229 | 'lockonjoinconfigurable_default', |
| 3230 | 3230 | $renderer->render_group_element_checkbox('lockonjoinconfigurable_default', 0) |
@@ -3245,7 +3245,7 @@ discard block |
||
| 3245 | 3245 | */ |
| 3246 | 3246 | function bigbluebuttonbn_settings_extended(&$renderer) { |
| 3247 | 3247 | // Configuration for 'notify users when recording ready' feature. |
| 3248 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3248 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3249 | 3249 | return; |
| 3250 | 3250 | } |
| 3251 | 3251 | $renderer->render_group_header('extended_capabilities'); |
@@ -3273,7 +3273,7 @@ discard block |
||
| 3273 | 3273 | global $DB; |
| 3274 | 3274 | do { |
| 3275 | 3275 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
| 3276 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3276 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3277 | 3277 | } while ($meetingid == $encodedseed); |
| 3278 | 3278 | return $encodedseed; |
| 3279 | 3279 | } |
@@ -3486,7 +3486,7 @@ discard block |
||
| 3486 | 3486 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
| 3487 | 3487 | global $DB; |
| 3488 | 3488 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
| 3489 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3489 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3490 | 3490 | return $ownerid; |
| 3491 | 3491 | } |
| 3492 | 3492 | |
@@ -3529,8 +3529,8 @@ discard block |
||
| 3529 | 3529 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3530 | 3530 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
| 3531 | 3531 | // Extra data for setting up the Meeting. |
| 3532 | - $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3533 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3532 | + $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3533 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3534 | 3534 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
| 3535 | 3535 | } |
| 3536 | 3536 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -3690,7 +3690,7 @@ discard block |
||
| 3690 | 3690 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 3691 | 3691 | ]; |
| 3692 | 3692 | // Special metadata for recording processing. |
| 3693 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3693 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3694 | 3694 | $metadata["bn-recording-status"] = json_encode( |
| 3695 | 3695 | array( |
| 3696 | 3696 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3698,10 +3698,10 @@ discard block |
||
| 3698 | 3698 | ) |
| 3699 | 3699 | ); |
| 3700 | 3700 | } |
| 3701 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3701 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3702 | 3702 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 3703 | 3703 | } |
| 3704 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3704 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3705 | 3705 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
| 3706 | 3706 | } |
| 3707 | 3707 | return $metadata; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | defined('MOODLE_INTERNAL') || die(); |
| 37 | 37 | |
| 38 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 38 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * Class index |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | // Add a the data for the bigbluebuttonbn instance. |
| 92 | 92 | $groupobj = null; |
| 93 | 93 | if (groups_get_activity_groupmode($cm) > 0) { |
| 94 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 94 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 95 | 95 | } |
| 96 | 96 | $table->data[] = self::bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 97 | 97 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $attendeecount = 0; |
| 182 | 182 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 183 | 183 | if ($attendee->role == $role) { |
| 184 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 184 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | } |
@@ -215,18 +215,18 @@ discard block |
||
| 215 | 215 | public static function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 216 | 216 | $actions = ''; |
| 217 | 217 | if ($moderator) { |
| 218 | - $actions .= '<form name="form1" method="post" action="">'."\n"; |
|
| 219 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
| 220 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
| 221 | - $actions .= ' <INPUT type="hidden" name="action" value="end">'."\n"; |
|
| 218 | + $actions .= '<form name="form1" method="post" action="">' . "\n"; |
|
| 219 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
| 220 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
| 221 | + $actions .= ' <INPUT type="hidden" name="action" value="end">' . "\n"; |
|
| 222 | 222 | if ($groupobj != null) { |
| 223 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
| 223 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
| 224 | 224 | } |
| 225 | 225 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
| 226 | 226 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
| 227 | 227 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
| 228 | 228 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
| 229 | - $actions .= '</form>'."\n"; |
|
| 229 | + $actions .= '</form>' . "\n"; |
|
| 230 | 230 | } |
| 231 | 231 | return $actions; |
| 232 | 232 | } |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | function bigbluebuttonbn_broker_recording_info_current($recording, $params) { |
| 209 | 209 | $callbackresponse['status'] = true; |
| 210 | 210 | $callbackresponse['found'] = true; |
| 211 | - $callbackresponse['published'] = (string) $recording['published']; |
|
| 211 | + $callbackresponse['published'] = (string)$recording['published']; |
|
| 212 | 212 | if (!isset($params['meta']) || empty($params['meta'])) { |
| 213 | 213 | return $callbackresponse; |
| 214 | 214 | } |
@@ -559,8 +559,8 @@ discard block |
||
| 559 | 559 | array('HS256') |
| 560 | 560 | ); |
| 561 | 561 | } catch (Exception $e) { |
| 562 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 563 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 562 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 563 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 564 | 564 | return; |
| 565 | 565 | } |
| 566 | 566 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -590,8 +590,8 @@ discard block |
||
| 590 | 590 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, json_encode($meta)); |
| 591 | 591 | header('HTTP/1.0 202 Accepted'); |
| 592 | 592 | } catch (Exception $e) { |
| 593 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 594 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
| 593 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 594 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
| 595 | 595 | } |
| 596 | 596 | } |
| 597 | 597 | |
@@ -612,13 +612,13 @@ discard block |
||
| 612 | 612 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
| 613 | 613 | if (!isset($importrecordings[$params['id']])) { |
| 614 | 614 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
| 615 | - header('HTTP/1.0 404 Not found. '.$error); |
|
| 615 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
| 616 | 616 | return; |
| 617 | 617 | } |
| 618 | 618 | $callbackresponse = array('status' => true); |
| 619 | 619 | $importrecordings[$params['id']]['imported'] = true; |
| 620 | 620 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
| 621 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
| 621 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
| 622 | 622 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
| 623 | 623 | // Moodle event logger: Create an event for recording imported. |
| 624 | 624 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | $action = strtolower($params['action']); |
| 713 | 713 | $requiredparams = bigbluebuttonbn_broker_required_parameters(); |
| 714 | 714 | if (!array_key_exists($action, $requiredparams)) { |
| 715 | - return 'Action '.$params['action'].' can not be performed.'; |
|
| 715 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
| 716 | 716 | } |
| 717 | 717 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
| 718 | 718 | } |
@@ -858,7 +858,7 @@ discard block |
||
| 858 | 858 | $tabledata = array(); |
| 859 | 859 | $typeprofiles = bigbluebuttonbn_get_instance_type_profiles(); |
| 860 | 860 | $tabledata['activity'] = bigbluebuttonbn_view_get_activity_status($bbbsession); |
| 861 | - $tabledata['ping_interval'] = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
| 861 | + $tabledata['ping_interval'] = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
| 862 | 862 | $tabledata['locale'] = bigbluebuttonbn_get_localcode(); |
| 863 | 863 | $tabledata['profile_features'] = $typeprofiles[0]['features']; |
| 864 | 864 | $tabledata['recordings_html'] = $bbbsession['bigbluebuttonbn']->recordings_html == '1'; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | * recordings from a different activity even from a different course. |
| 104 | 104 | **/ |
| 105 | 105 | |
| 106 | - /* |
|
| 106 | + /* |
|
| 107 | 107 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 108 | 108 | * activities will have the 'import recordings' capability enabled. |
| 109 | 109 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * 'Join session' button enabled |
| 125 | 125 | **/ |
| 126 | 126 | |
| 127 | - /* |
|
| 127 | + /* |
|
| 128 | 128 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 129 | 129 | * activities will have the 'wait for moderator' capability enabled by |
| 130 | 130 | * default. |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
| 277 | 277 | */ |
| 278 | 278 | |
| 279 | - /* When the value is set to 1 (checked) the playback URLs will be validated |
|
| 279 | + /* When the value is set to 1 (checked) the playback URLs will be validated |
|
| 280 | 280 | * before the user access it. |
| 281 | 281 | * $CFG->bigbluebuttonbn['recordings_validate_url'] = 1; |
| 282 | 282 | */ |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | * $CFG->bigbluebuttonbn['disablecam_editable'] = 0; |
| 348 | 348 | */ |
| 349 | 349 | |
| 350 | - /* |
|
| 350 | + /* |
|
| 351 | 351 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 352 | 352 | * activities will have user microphones disabled. |
| 353 | 353 | * default. |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | * $CFG->bigbluebuttonbn['disablemic_editable'] = 0; |
| 361 | 361 | */ |
| 362 | 362 | |
| 363 | - /* |
|
| 363 | + /* |
|
| 364 | 364 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 365 | 365 | * activities will have private chat disabled. |
| 366 | 366 | * default. |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | * $CFG->bigbluebuttonbn['disableprivatechat_editable'] = 0; |
| 374 | 374 | */ |
| 375 | 375 | |
| 376 | - /* |
|
| 376 | + /* |
|
| 377 | 377 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 378 | 378 | * activities will have public chat disabled. |
| 379 | 379 | * default. |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | * $CFG->bigbluebuttonbn['disablepublicchat_editable'] = 0; |
| 387 | 387 | */ |
| 388 | 388 | |
| 389 | - /* |
|
| 389 | + /* |
|
| 390 | 390 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 391 | 391 | * activities will have shared notes disabled. |
| 392 | 392 | * default. |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | * $CFG->bigbluebuttonbn['disablenote_editable'] = 0; |
| 400 | 400 | */ |
| 401 | 401 | |
| 402 | - /* |
|
| 402 | + /* |
|
| 403 | 403 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 404 | 404 | * activities will have the user list hidden. |
| 405 | 405 | * default. |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | * $CFG->bigbluebuttonbn['hideuserlist_editable'] = 0; |
| 413 | 413 | */ |
| 414 | 414 | |
| 415 | - /* |
|
| 415 | + /* |
|
| 416 | 416 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 417 | 417 | * activities will have a locked layout. |
| 418 | 418 | * default. |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | * $CFG->bigbluebuttonbn['lockedlayout_editable'] = 0; |
| 426 | 426 | */ |
| 427 | 427 | |
| 428 | - /* |
|
| 428 | + /* |
|
| 429 | 429 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 430 | 430 | * activities will ignore the locking settings. |
| 431 | 431 | * default. |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | * $CFG->bigbluebuttonbn['lockonjoin_editable'] = 0; |
| 439 | 439 | */ |
| 440 | 440 | |
| 441 | - /* |
|
| 441 | + /* |
|
| 442 | 442 | * When the value is set to 1 (checked) the capability to ignore |
| 443 | 443 | * locking settings is enabled. |
| 444 | 444 | * $CFG->bigbluebuttonbn['lockonjoinconfigurable_default'] = 0; |
@@ -489,27 +489,27 @@ discard block |
||
| 489 | 489 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
| 490 | 490 | */ |
| 491 | 491 | |
| 492 | - /* |
|
| 492 | + /* |
|
| 493 | 493 | * The warning box is always shown to administrators, but it is also possible to define other roles |
| 494 | 494 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
| 495 | 495 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
| 496 | 496 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
| 497 | 497 | */ |
| 498 | 498 | |
| 499 | - /* |
|
| 499 | + /* |
|
| 500 | 500 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
| 501 | 501 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
| 502 | 502 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
| 503 | 503 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
| 504 | 504 | */ |
| 505 | 505 | |
| 506 | - /* |
|
| 506 | + /* |
|
| 507 | 507 | * Additionally, when general_warning_button_href value is different than "", a button |
| 508 | 508 | * can also be shown right after the message. |
| 509 | 509 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
| 510 | 510 | */ |
| 511 | 511 | |
| 512 | - /* |
|
| 512 | + /* |
|
| 513 | 513 | * Finally, the text and class for the button can be modified |
| 514 | 514 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
| 515 | 515 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |