@@ -191,64 +191,64 @@ |
||
| 191 | 191 | */ |
| 192 | 192 | public static function get_options() { |
| 193 | 193 | return array( |
| 194 | - 'version_major' => self::get_moodle_version_major(), |
|
| 195 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 196 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
| 197 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
| 198 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 199 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 200 | - 'userlimit_default' => self::get('userlimit_default'), |
|
| 201 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 202 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 203 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 204 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 205 | - 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
| 206 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 207 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 208 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 209 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 210 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 211 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 212 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 213 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 214 | - 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
| 215 | - 'recording_default' => self::get('recording_default'), |
|
| 216 | - 'oc_recording' => self::get('oc_recording'), |
|
| 217 | - 'recording_editable' => self::get('recording_editable'), |
|
| 218 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 219 | - 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
| 220 | - 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
| 221 | - 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
| 222 | - 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
| 223 | - 'general_warning_message' => self::get('general_warning_message'), |
|
| 224 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 225 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 226 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 227 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 228 | - 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
| 229 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
| 230 | - 'clienttype_default' => self::get('clienttype_default'), |
|
| 231 | - 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
| 232 | - 'muteonstart_default' => self::get('muteonstart_default'), |
|
| 233 | - 'disablecam_editable' => self::get('disablecam_editable'), |
|
| 234 | - 'disablecam_default' => self::get('disablecam_default'), |
|
| 235 | - 'disablemic_editable' => self::get('disablemic_editable'), |
|
| 236 | - 'disablemic_default' => self::get('disablemic_default'), |
|
| 237 | - 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
| 238 | - 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
| 239 | - 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
| 240 | - 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
| 241 | - 'disablenote_editable' => self::get('disablenote_editable'), |
|
| 242 | - 'disablenote_default' => self::get('disablenote_default'), |
|
| 243 | - 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
| 244 | - 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
| 245 | - 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
| 246 | - 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
| 247 | - 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
| 248 | - 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
| 249 | - 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
| 250 | - 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
| 251 | - 'welcome_default' => self::get('welcome_default'), |
|
| 252 | - ); |
|
| 194 | + 'version_major' => self::get_moodle_version_major(), |
|
| 195 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 196 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
| 197 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
| 198 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 199 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 200 | + 'userlimit_default' => self::get('userlimit_default'), |
|
| 201 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 202 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 203 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 204 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 205 | + 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
| 206 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 207 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 208 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 209 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 210 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 211 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 212 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 213 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 214 | + 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
| 215 | + 'recording_default' => self::get('recording_default'), |
|
| 216 | + 'oc_recording' => self::get('oc_recording'), |
|
| 217 | + 'recording_editable' => self::get('recording_editable'), |
|
| 218 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 219 | + 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
| 220 | + 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
| 221 | + 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
| 222 | + 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
| 223 | + 'general_warning_message' => self::get('general_warning_message'), |
|
| 224 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 225 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 226 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 227 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 228 | + 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
| 229 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
| 230 | + 'clienttype_default' => self::get('clienttype_default'), |
|
| 231 | + 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
| 232 | + 'muteonstart_default' => self::get('muteonstart_default'), |
|
| 233 | + 'disablecam_editable' => self::get('disablecam_editable'), |
|
| 234 | + 'disablecam_default' => self::get('disablecam_default'), |
|
| 235 | + 'disablemic_editable' => self::get('disablemic_editable'), |
|
| 236 | + 'disablemic_default' => self::get('disablemic_default'), |
|
| 237 | + 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
| 238 | + 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
| 239 | + 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
| 240 | + 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
| 241 | + 'disablenote_editable' => self::get('disablenote_editable'), |
|
| 242 | + 'disablenote_default' => self::get('disablenote_default'), |
|
| 243 | + 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
| 244 | + 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
| 245 | + 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
| 246 | + 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
| 247 | + 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
| 248 | + 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
| 249 | + 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
| 250 | + 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
| 251 | + 'welcome_default' => self::get('welcome_default'), |
|
| 252 | + ); |
|
| 253 | 253 | } |
| 254 | 254 | } |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | $data['role'] = array( |
| 802 | 802 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 803 | 803 | 'children' => bigbluebuttonbn_get_roles_select($context, true) |
| 804 | - ); |
|
| 804 | + ); |
|
| 805 | 805 | $data['user'] = array( |
| 806 | 806 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 807 | 807 | 'children' => bigbluebuttonbn_get_users_select($context, $bbactivity), |
@@ -1709,7 +1709,7 @@ discard block |
||
| 1709 | 1709 | 'data-action' => 'play', |
| 1710 | 1710 | 'data-target' => $playback['type'], |
| 1711 | 1711 | 'data-href' => $href, |
| 1712 | - ); |
|
| 1712 | + ); |
|
| 1713 | 1713 | if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server() |
| 1714 | 1714 | && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
| 1715 | 1715 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
@@ -2256,7 +2256,7 @@ discard block |
||
| 2256 | 2256 | $opencasturl = new \moodle_url('/blocks/opencast/index.php', array('courseid' => $courseid)); |
| 2257 | 2257 | return html_writer::div(html_writer::tag('button', get_string('view_message_oc_recordings', 'bigbluebuttonbn'), |
| 2258 | 2258 | array('class' => 'btn btn-primary', 'onclick' => "window.location='{$opencasturl}';")), |
| 2259 | - '', array('id' => 'bigbluebuttonbn_recordings_opencast', 'class' => 'py-3')); |
|
| 2259 | + '', array('id' => 'bigbluebuttonbn_recordings_opencast', 'class' => 'py-3')); |
|
| 2260 | 2260 | } |
| 2261 | 2261 | /** |
| 2262 | 2262 | * Helper function to convert an html string to plain text. |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | $payload = null; |
| 151 | 151 | if (!is_null($pname) && !is_null($purl)) { |
| 152 | 152 | $method = 'POST'; |
| 153 | - $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
| 154 | - $purl."' /></module></modules>"; |
|
| 153 | + $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
| 154 | + $purl . "' /></module></modules>"; |
|
| 155 | 155 | } |
| 156 | 156 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $payload); |
| 157 | 157 | if ($xml) { |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | if ($xml) { |
| 197 | 197 | // Either failure or success without meeting info. |
| 198 | - return (array) $xml; |
|
| 198 | + return (array)$xml; |
|
| 199 | 199 | } |
| 200 | 200 | // If the server is unreachable, then prompts the user of the necessary action. |
| 201 | 201 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
| 289 | 289 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
| 290 | 290 | 'getRecordings', |
| 291 | - ['recordID' => implode(',', (array) $breakoutroom)] |
|
| 291 | + ['recordID' => implode(',', (array)$breakoutroom)] |
|
| 292 | 292 | ); |
| 293 | 293 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
| 294 | 294 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | // Override imported flag with actual ID. |
| 345 | 345 | $recording['imported'] = $recordimported->id; |
| 346 | 346 | if (isset($recordimported->protected)) { |
| 347 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 347 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 348 | 348 | } |
| 349 | 349 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 350 | 350 | } |
@@ -374,21 +374,21 @@ discard block |
||
| 374 | 374 | // Add formats. |
| 375 | 375 | $playbackarray = array(); |
| 376 | 376 | foreach ($recording->playback->format as $format) { |
| 377 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 378 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 377 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 378 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 379 | 379 | // Add preview per format when existing. |
| 380 | 380 | if ($format->preview) { |
| 381 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 381 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 382 | 382 | } |
| 383 | 383 | } |
| 384 | 384 | // Add the metadata to the recordings array. |
| 385 | 385 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 386 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 387 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 388 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 389 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 386 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 387 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 388 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 389 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 390 | 390 | if (isset($recording->protected)) { |
| 391 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 391 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 392 | 392 | } |
| 393 | 393 | return $recordingarray + $metadataarray; |
| 394 | 394 | } |
@@ -403,9 +403,9 @@ discard block |
||
| 403 | 403 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 404 | 404 | $imagesarray = array(); |
| 405 | 405 | foreach ($preview->images->image as $image) { |
| 406 | - $imagearray = array('url' => trim((string) $image)); |
|
| 406 | + $imagearray = array('url' => trim((string)$image)); |
|
| 407 | 407 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 408 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 408 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 409 | 409 | } |
| 410 | 410 | array_push($imagesarray, $imagearray); |
| 411 | 411 | } |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | $ids = explode(',', $recordids); |
| 501 | 501 | foreach ($ids as $id) { |
| 502 | 502 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 503 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 503 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 504 | 504 | ); |
| 505 | 505 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 506 | 506 | return false; |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | * @return array $users |
| 672 | 672 | */ |
| 673 | 673 | function bigbluebuttonbn_get_users(context $context = null) { |
| 674 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 674 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 675 | 675 | foreach ($users as $key => $value) { |
| 676 | 676 | $users[$key] = fullname($value); |
| 677 | 677 | } |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) { |
| 691 | 691 | // CONTRIB-7972, check the group of current user and course group mode. |
| 692 | 692 | $groups = null; |
| 693 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 693 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 694 | 694 | $course = get_course($context->instanceid); |
| 695 | 695 | $groupmode = groups_get_course_groupmode($course); |
| 696 | 696 | if ($bbactivity) { |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | $groups = groups_get_all_groups($course->id, $USER->id); |
| 704 | 704 | $users = []; |
| 705 | 705 | foreach ($groups as $g) { |
| 706 | - $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 706 | + $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 707 | 707 | } |
| 708 | 708 | } |
| 709 | 709 | return array_map( |
@@ -725,12 +725,12 @@ discard block |
||
| 725 | 725 | global $CFG; |
| 726 | 726 | |
| 727 | 727 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
| 728 | - $roles = (array) get_viewable_roles($context); |
|
| 728 | + $roles = (array)get_viewable_roles($context); |
|
| 729 | 729 | foreach ($roles as $key => $value) { |
| 730 | 730 | $roles[$key] = $value; |
| 731 | 731 | } |
| 732 | 732 | } else { |
| 733 | - $roles = (array) role_get_names($context); |
|
| 733 | + $roles = (array)role_get_names($context); |
|
| 734 | 734 | foreach ($roles as $key => $value) { |
| 735 | 735 | $roles[$key] = $value->localname; |
| 736 | 736 | } |
@@ -751,12 +751,12 @@ discard block |
||
| 751 | 751 | global $CFG; |
| 752 | 752 | |
| 753 | 753 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
| 754 | - $roles = (array) get_viewable_roles($context); |
|
| 754 | + $roles = (array)get_viewable_roles($context); |
|
| 755 | 755 | foreach ($roles as $key => $value) { |
| 756 | 756 | $roles[$key] = array('id' => $key, 'name' => $value); |
| 757 | 757 | } |
| 758 | 758 | } else { |
| 759 | - $roles = (array) role_get_names($context); |
|
| 759 | + $roles = (array)role_get_names($context); |
|
| 760 | 760 | foreach ($roles as $key => $value) { |
| 761 | 761 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 762 | 762 | } |
@@ -773,9 +773,9 @@ discard block |
||
| 773 | 773 | * @return object $role |
| 774 | 774 | */ |
| 775 | 775 | function bigbluebuttonbn_get_role($id) { |
| 776 | - $roles = (array) role_get_names(); |
|
| 776 | + $roles = (array)role_get_names(); |
|
| 777 | 777 | if (is_numeric($id) && isset($roles[$id])) { |
| 778 | - return (object) $roles[$id]; |
|
| 778 | + return (object)$roles[$id]; |
|
| 779 | 779 | } |
| 780 | 780 | foreach ($roles as $role) { |
| 781 | 781 | if ($role->shortname == $id) { |
@@ -855,7 +855,7 @@ discard block |
||
| 855 | 855 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
| 856 | 856 | $participantlist[] = array( |
| 857 | 857 | 'selectiontype' => 'user', |
| 858 | - 'selectionid' => (string) $ownerid, |
|
| 858 | + 'selectionid' => (string)$ownerid, |
|
| 859 | 859 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
| 860 | 860 | } |
| 861 | 861 | continue; |
@@ -1037,7 +1037,7 @@ discard block |
||
| 1037 | 1037 | $now = time(); |
| 1038 | 1038 | if ($closingtime > 0 && $now < $closingtime) { |
| 1039 | 1039 | $duration = ceil(($closingtime - $now) / 60); |
| 1040 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1040 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1041 | 1041 | $duration = intval($duration) + $compensationtime; |
| 1042 | 1042 | } |
| 1043 | 1043 | return $duration; |
@@ -1239,16 +1239,16 @@ discard block |
||
| 1239 | 1239 | * @return array |
| 1240 | 1240 | */ |
| 1241 | 1241 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
| 1242 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1242 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1243 | 1243 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 1244 | 1244 | $result = $cache->get($meetingid); |
| 1245 | 1245 | $now = time(); |
| 1246 | 1246 | if (!$updatecache && !empty($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1247 | 1247 | // Use the value in the cache. |
| 1248 | - return (array) json_decode($result['meeting_info']); |
|
| 1248 | + return (array)json_decode($result['meeting_info']); |
|
| 1249 | 1249 | } |
| 1250 | 1250 | // Ping again and refresh the cache. |
| 1251 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1251 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1252 | 1252 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1253 | 1253 | ); |
| 1254 | 1254 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1395,7 +1395,7 @@ discard block |
||
| 1395 | 1395 | */ |
| 1396 | 1396 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1397 | 1397 | $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml); |
| 1398 | - $configxmlarray = (array) $configxml; |
|
| 1398 | + $configxmlarray = (array)$configxml; |
|
| 1399 | 1399 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1400 | 1400 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1401 | 1401 | return ''; |
@@ -1448,7 +1448,7 @@ discard block |
||
| 1448 | 1448 | * @return boolean |
| 1449 | 1449 | */ |
| 1450 | 1450 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
| 1451 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1451 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1452 | 1452 | } |
| 1453 | 1453 | |
| 1454 | 1454 | /** |
@@ -1459,7 +1459,7 @@ discard block |
||
| 1459 | 1459 | * @return boolean |
| 1460 | 1460 | */ |
| 1461 | 1461 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
| 1462 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1462 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1463 | 1463 | } |
| 1464 | 1464 | |
| 1465 | 1465 | /** |
@@ -1885,7 +1885,7 @@ discard block |
||
| 1885 | 1885 | } |
| 1886 | 1886 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
| 1887 | 1887 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
| 1888 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1888 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1889 | 1889 | // With icon for $manageaction. |
| 1890 | 1890 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
| 1891 | 1891 | $linkattributes = array( |
@@ -2148,7 +2148,7 @@ discard block |
||
| 2148 | 2148 | // Enqueue it. |
| 2149 | 2149 | \core\task\manager::queue_adhoc_task($task); |
| 2150 | 2150 | } catch (Exception $e) { |
| 2151 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
| 2151 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
| 2152 | 2152 | } |
| 2153 | 2153 | } |
| 2154 | 2154 | |
@@ -2162,7 +2162,7 @@ discard block |
||
| 2162 | 2162 | */ |
| 2163 | 2163 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
| 2164 | 2164 | global $CFG; |
| 2165 | - require_once($CFG->libdir.'/completionlib.php'); |
|
| 2165 | + require_once($CFG->libdir . '/completionlib.php'); |
|
| 2166 | 2166 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
| 2167 | 2167 | $completion = new completion_info($course); |
| 2168 | 2168 | if (!$completion->is_enabled($cm)) { |
@@ -2600,7 +2600,7 @@ discard block |
||
| 2600 | 2600 | */ |
| 2601 | 2601 | function bigbluebuttonbn_format_activity_time($time) { |
| 2602 | 2602 | global $CFG; |
| 2603 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 2603 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 2604 | 2604 | $activitytime = ''; |
| 2605 | 2605 | if ($time) { |
| 2606 | 2606 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2698,7 +2698,7 @@ discard block |
||
| 2698 | 2698 | */ |
| 2699 | 2699 | function bigbluebuttonbn_settings_general(&$renderer) { |
| 2700 | 2700 | // Configuration for BigBlueButton. |
| 2701 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2701 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2702 | 2702 | $renderer->render_group_header('general'); |
| 2703 | 2703 | $renderer->render_group_element( |
| 2704 | 2704 | 'server_url', |
@@ -2720,7 +2720,7 @@ discard block |
||
| 2720 | 2720 | */ |
| 2721 | 2721 | function bigbluebuttonbn_settings_record(&$renderer) { |
| 2722 | 2722 | // Configuration for 'recording' feature. |
| 2723 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2723 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2724 | 2724 | $renderer->render_group_header('recording'); |
| 2725 | 2725 | $renderer->render_group_element( |
| 2726 | 2726 | 'recording_default', |
@@ -2771,7 +2771,7 @@ discard block |
||
| 2771 | 2771 | */ |
| 2772 | 2772 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
| 2773 | 2773 | // Configuration for 'import recordings' feature. |
| 2774 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2774 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2775 | 2775 | $renderer->render_group_header('importrecordings'); |
| 2776 | 2776 | $renderer->render_group_element( |
| 2777 | 2777 | 'importrecordings_enabled', |
@@ -2793,7 +2793,7 @@ discard block |
||
| 2793 | 2793 | */ |
| 2794 | 2794 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
| 2795 | 2795 | // Configuration for 'show recordings' feature. |
| 2796 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2796 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2797 | 2797 | $renderer->render_group_header('recordings'); |
| 2798 | 2798 | $renderer->render_group_element( |
| 2799 | 2799 | 'recordings_html_default', |
@@ -2847,7 +2847,7 @@ discard block |
||
| 2847 | 2847 | */ |
| 2848 | 2848 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
| 2849 | 2849 | // Configuration for wait for moderator feature. |
| 2850 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2850 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2851 | 2851 | $renderer->render_group_header('waitformoderator'); |
| 2852 | 2852 | $renderer->render_group_element( |
| 2853 | 2853 | 'waitformoderator_default', |
@@ -2877,7 +2877,7 @@ discard block |
||
| 2877 | 2877 | */ |
| 2878 | 2878 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
| 2879 | 2879 | // Configuration for "static voice bridge" feature. |
| 2880 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2880 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2881 | 2881 | $renderer->render_group_header('voicebridge'); |
| 2882 | 2882 | $renderer->render_group_element( |
| 2883 | 2883 | 'voicebridge_editable', |
@@ -2895,7 +2895,7 @@ discard block |
||
| 2895 | 2895 | */ |
| 2896 | 2896 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
| 2897 | 2897 | // Configuration for "preupload presentation" feature. |
| 2898 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2898 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2899 | 2899 | // This feature only works if curl is installed. |
| 2900 | 2900 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
| 2901 | 2901 | if (!extension_loaded('curl')) { |
@@ -2923,7 +2923,7 @@ discard block |
||
| 2923 | 2923 | */ |
| 2924 | 2924 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
| 2925 | 2925 | // Configuration for "preupload presentation" feature. |
| 2926 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2926 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2927 | 2927 | if (extension_loaded('curl')) { |
| 2928 | 2928 | // This feature only works if curl is installed. |
| 2929 | 2929 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2940,7 +2940,7 @@ discard block |
||
| 2940 | 2940 | */ |
| 2941 | 2941 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
| 2942 | 2942 | // Configuration for "user limit" feature. |
| 2943 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2943 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2944 | 2944 | $renderer->render_group_header('userlimit'); |
| 2945 | 2945 | $renderer->render_group_element( |
| 2946 | 2946 | 'userlimit_default', |
@@ -2962,7 +2962,7 @@ discard block |
||
| 2962 | 2962 | */ |
| 2963 | 2963 | function bigbluebuttonbn_settings_duration(&$renderer) { |
| 2964 | 2964 | // Configuration for "scheduled duration" feature. |
| 2965 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2965 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2966 | 2966 | $renderer->render_group_header('scheduled'); |
| 2967 | 2967 | $renderer->render_group_element( |
| 2968 | 2968 | 'scheduled_duration_enabled', |
@@ -2988,7 +2988,7 @@ discard block |
||
| 2988 | 2988 | */ |
| 2989 | 2989 | function bigbluebuttonbn_settings_participants(&$renderer) { |
| 2990 | 2990 | // Configuration for defining the default role/user that will be moderator on new activities. |
| 2991 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2991 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2992 | 2992 | $renderer->render_group_header('participant'); |
| 2993 | 2993 | // UI for 'participants' feature. |
| 2994 | 2994 | $roles = bigbluebuttonbn_get_roles(null, false); |
@@ -3013,7 +3013,7 @@ discard block |
||
| 3013 | 3013 | */ |
| 3014 | 3014 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
| 3015 | 3015 | // Configuration for "send notifications" feature. |
| 3016 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 3016 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 3017 | 3017 | $renderer->render_group_header('sendnotifications'); |
| 3018 | 3018 | $renderer->render_group_element( |
| 3019 | 3019 | 'sendnotifications_enabled', |
@@ -3031,14 +3031,14 @@ discard block |
||
| 3031 | 3031 | */ |
| 3032 | 3032 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
| 3033 | 3033 | // Configuration for "clienttype" feature. |
| 3034 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 3034 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 3035 | 3035 | $renderer->render_group_header('clienttype'); |
| 3036 | 3036 | $renderer->render_group_element( |
| 3037 | 3037 | 'clienttype_editable', |
| 3038 | 3038 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
| 3039 | 3039 | ); |
| 3040 | 3040 | // Web Client default. |
| 3041 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 3041 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 3042 | 3042 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 3043 | 3043 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 3044 | 3044 | $renderer->render_group_element( |
@@ -3061,7 +3061,7 @@ discard block |
||
| 3061 | 3061 | */ |
| 3062 | 3062 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
| 3063 | 3063 | // Configuration for BigBlueButton. |
| 3064 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3064 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3065 | 3065 | $renderer->render_group_header('muteonstart'); |
| 3066 | 3066 | $renderer->render_group_element( |
| 3067 | 3067 | 'muteonstart_default', |
@@ -3104,7 +3104,7 @@ discard block |
||
| 3104 | 3104 | */ |
| 3105 | 3105 | function bigbluebuttonbn_settings_disablecam(&$renderer) { |
| 3106 | 3106 | // Configuration for BigBlueButton. |
| 3107 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
| 3107 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
| 3108 | 3108 | $renderer->render_group_element( |
| 3109 | 3109 | 'disablecam_default', |
| 3110 | 3110 | $renderer->render_group_element_checkbox('disablecam_default', 0) |
@@ -3125,7 +3125,7 @@ discard block |
||
| 3125 | 3125 | */ |
| 3126 | 3126 | function bigbluebuttonbn_settings_disablemic(&$renderer) { |
| 3127 | 3127 | // Configuration for BigBlueButton. |
| 3128 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
| 3128 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
| 3129 | 3129 | $renderer->render_group_element( |
| 3130 | 3130 | 'disablemic_default', |
| 3131 | 3131 | $renderer->render_group_element_checkbox('disablemic_default', 0) |
@@ -3146,7 +3146,7 @@ discard block |
||
| 3146 | 3146 | */ |
| 3147 | 3147 | function bigbluebuttonbn_settings_disableprivatechat(&$renderer) { |
| 3148 | 3148 | // Configuration for BigBlueButton. |
| 3149 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
| 3149 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
| 3150 | 3150 | $renderer->render_group_element( |
| 3151 | 3151 | 'disableprivatechat_default', |
| 3152 | 3152 | $renderer->render_group_element_checkbox('disableprivatechat_default', 0) |
@@ -3167,7 +3167,7 @@ discard block |
||
| 3167 | 3167 | */ |
| 3168 | 3168 | function bigbluebuttonbn_settings_disablepublicchat(&$renderer) { |
| 3169 | 3169 | // Configuration for BigBlueButton. |
| 3170 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
| 3170 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
| 3171 | 3171 | $renderer->render_group_element( |
| 3172 | 3172 | 'disablepublicchat_default', |
| 3173 | 3173 | $renderer->render_group_element_checkbox('disablepublicchat_default', 0) |
@@ -3188,7 +3188,7 @@ discard block |
||
| 3188 | 3188 | */ |
| 3189 | 3189 | function bigbluebuttonbn_settings_disablenote(&$renderer) { |
| 3190 | 3190 | // Configuration for BigBlueButton. |
| 3191 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
| 3191 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
| 3192 | 3192 | $renderer->render_group_element( |
| 3193 | 3193 | 'disablenote_default', |
| 3194 | 3194 | $renderer->render_group_element_checkbox('disablenote_default', 0) |
@@ -3209,7 +3209,7 @@ discard block |
||
| 3209 | 3209 | */ |
| 3210 | 3210 | function bigbluebuttonbn_settings_hideuserlist(&$renderer) { |
| 3211 | 3211 | // Configuration for BigBlueButton. |
| 3212 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
| 3212 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
| 3213 | 3213 | $renderer->render_group_element( |
| 3214 | 3214 | 'hideuserlist_default', |
| 3215 | 3215 | $renderer->render_group_element_checkbox('hideuserlist_default', 0) |
@@ -3230,7 +3230,7 @@ discard block |
||
| 3230 | 3230 | */ |
| 3231 | 3231 | function bigbluebuttonbn_settings_lockedlayout(&$renderer) { |
| 3232 | 3232 | // Configuration for BigBlueButton. |
| 3233 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
| 3233 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
| 3234 | 3234 | $renderer->render_group_element( |
| 3235 | 3235 | 'lockedlayout_default', |
| 3236 | 3236 | $renderer->render_group_element_checkbox('lockedlayout_default', 0) |
@@ -3251,7 +3251,7 @@ discard block |
||
| 3251 | 3251 | */ |
| 3252 | 3252 | function bigbluebuttonbn_settings_lockonjoin(&$renderer) { |
| 3253 | 3253 | // Configuration for BigBlueButton. |
| 3254 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
| 3254 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
| 3255 | 3255 | $renderer->render_group_element( |
| 3256 | 3256 | 'lockonjoin_default', |
| 3257 | 3257 | $renderer->render_group_element_checkbox('lockonjoin_default', 0) |
@@ -3272,7 +3272,7 @@ discard block |
||
| 3272 | 3272 | */ |
| 3273 | 3273 | function bigbluebuttonbn_settings_lockonjoinconfigurable(&$renderer) { |
| 3274 | 3274 | // Configuration for BigBlueButton. |
| 3275 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
| 3275 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
| 3276 | 3276 | $renderer->render_group_element( |
| 3277 | 3277 | 'lockonjoinconfigurable_default', |
| 3278 | 3278 | $renderer->render_group_element_checkbox('lockonjoinconfigurable_default', 0) |
@@ -3308,7 +3308,7 @@ discard block |
||
| 3308 | 3308 | */ |
| 3309 | 3309 | function bigbluebuttonbn_settings_extended(&$renderer) { |
| 3310 | 3310 | // Configuration for extended capabilities. |
| 3311 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3311 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3312 | 3312 | return; |
| 3313 | 3313 | } |
| 3314 | 3314 | $renderer->render_group_header('extended_capabilities'); |
@@ -3346,7 +3346,7 @@ discard block |
||
| 3346 | 3346 | global $DB; |
| 3347 | 3347 | do { |
| 3348 | 3348 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
| 3349 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3349 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3350 | 3350 | } while ($meetingid == $encodedseed); |
| 3351 | 3351 | return $encodedseed; |
| 3352 | 3352 | } |
@@ -3559,7 +3559,7 @@ discard block |
||
| 3559 | 3559 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
| 3560 | 3560 | global $DB; |
| 3561 | 3561 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
| 3562 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3562 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3563 | 3563 | return $ownerid; |
| 3564 | 3564 | } |
| 3565 | 3565 | |
@@ -3666,7 +3666,7 @@ discard block |
||
| 3666 | 3666 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 3667 | 3667 | ]; |
| 3668 | 3668 | // Special metadata for recording processing. |
| 3669 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3669 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3670 | 3670 | $metadata["bn-recording-status"] = json_encode( |
| 3671 | 3671 | array( |
| 3672 | 3672 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3674,14 +3674,14 @@ discard block |
||
| 3674 | 3674 | ) |
| 3675 | 3675 | ); |
| 3676 | 3676 | } |
| 3677 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3677 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3678 | 3678 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 3679 | 3679 | } |
| 3680 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3680 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3681 | 3681 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
| 3682 | 3682 | } |
| 3683 | 3683 | // Special metadata for Opencast recordings (passing opencast seriesid of the course as opencast-dc-isPartOf as metadata). |
| 3684 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('oc_recording') |
|
| 3684 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('oc_recording') |
|
| 3685 | 3685 | && bigbluebuttonbn_check_opencast($bbbsession['course']->id)) { |
| 3686 | 3686 | $metadata['opencast-dc-isPartOf'] = bigbluebuttonbn_check_opencast($bbbsession['course']->id); |
| 3687 | 3687 | } |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | $groupname = groups_get_group_name($bbbsession['group']); |
| 55 | 55 | } |
| 56 | 56 | // Assign group default values. |
| 57 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 58 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 57 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 58 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 59 | 59 | if (count($groups) == 0) { |
| 60 | 60 | // Only the All participants group exists. |
| 61 | 61 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if (has_capability('moodle/site:accessallgroups', $context)) { |
| 66 | 66 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
| 67 | 67 | } |
| 68 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 68 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 69 | 69 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
| 70 | 70 | echo '<br><br>'; |
| 71 | 71 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 139 | 139 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 140 | 140 | } |
| 141 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 141 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 142 | 142 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 143 | 143 | } |
| 144 | 144 | |
@@ -207,12 +207,12 @@ discard block |
||
| 207 | 207 | // JavaScript variables for room. |
| 208 | 208 | $openingtime = ''; |
| 209 | 209 | if ($bbbsession['openingtime']) { |
| 210 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 210 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 211 | 211 | userdate($bbbsession['openingtime']); |
| 212 | 212 | } |
| 213 | 213 | $closingtime = ''; |
| 214 | 214 | if ($bbbsession['closingtime']) { |
| 215 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 215 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 216 | 216 | userdate($bbbsession['closingtime']); |
| 217 | 217 | } |
| 218 | 218 | $jsvars += array( |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $output .= $OUTPUT->box_end(); |
| 230 | 230 | // Action button box. |
| 231 | 231 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 232 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 232 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 233 | 233 | $output .= $OUTPUT->box_end(); |
| 234 | 234 | if ($activity == 'ended') { |
| 235 | 235 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -263,11 +263,11 @@ discard block |
||
| 263 | 263 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 264 | 264 | $recordingshtml = ''; |
| 265 | 265 | // If opencast recoding config is set and checks if opencast is available for the current course. |
| 266 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('oc_recording') |
|
| 266 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('oc_recording') |
|
| 267 | 267 | && bigbluebuttonbn_check_opencast($bbbsession['course']->id)) { |
| 268 | 268 | $recordingshtml .= bigbluebuttonbn_output_recording_opencast($bbbsession['course']->id); |
| 269 | 269 | } |
| 270 | - $recordingshtml .= bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 270 | + $recordingshtml .= bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 271 | 271 | // Render a plain html table. |
| 272 | 272 | return $recordingshtml; |
| 273 | 273 | } |
@@ -305,8 +305,8 @@ discard block |
||
| 305 | 305 | array('type' => 'button', |
| 306 | 306 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 307 | 307 | 'class' => 'btn btn-secondary', |
| 308 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 309 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 308 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 309 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 310 | 310 | $output = html_writer::empty_tag('br'); |
| 311 | 311 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 312 | 312 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -325,10 +325,10 @@ discard block |
||
| 325 | 325 | if (!is_null($bbbsession['presentation']['url'])) { |
| 326 | 326 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 327 | 327 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 328 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 329 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 328 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 329 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 330 | 330 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 331 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 331 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 332 | 332 | } |
| 333 | 333 | return ''; |
| 334 | 334 | } |