@@ -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 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 137 | 137 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 138 | 138 | } |
| 139 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 139 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 140 | 140 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 141 | 141 | } |
| 142 | 142 | |
@@ -205,12 +205,12 @@ discard block |
||
| 205 | 205 | // JavaScript variables for room. |
| 206 | 206 | $openingtime = ''; |
| 207 | 207 | if ($bbbsession['openingtime']) { |
| 208 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 208 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 209 | 209 | userdate($bbbsession['openingtime']); |
| 210 | 210 | } |
| 211 | 211 | $closingtime = ''; |
| 212 | 212 | if ($bbbsession['closingtime']) { |
| 213 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 213 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 214 | 214 | userdate($bbbsession['closingtime']); |
| 215 | 215 | } |
| 216 | 216 | $jsvars += array( |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | $output .= '<br><span id="control_panel"></span>'; |
| 227 | 227 | $output .= $OUTPUT->box_end(); |
| 228 | 228 | // Guest name input box. |
| 229 | - if(isguestuser($USER)){ |
|
| 229 | + if (isguestuser($USER)) { |
|
| 230 | 230 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_guestnameinput_box'); |
| 231 | 231 | $output .= '<br><span>Name eingeben:</span>'; |
| 232 | 232 | //added script |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | } |
| 237 | 237 | // Action button box. |
| 238 | 238 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 239 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 239 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 240 | 240 | $output .= $OUTPUT->box_end(); |
| 241 | 241 | if ($activity == 'ended') { |
| 242 | 242 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | // If there are meetings with recordings load the data to the table. |
| 270 | 270 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 271 | 271 | // Render a plain html table. |
| 272 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 272 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 273 | 273 | } |
| 274 | 274 | // JavaScript variables for recordings with YUI. |
| 275 | 275 | $jsvars += array( |
@@ -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 | } |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH |
| 113 | 113 | ) { |
| 114 | 114 | //check if guest and entered a custom username |
| 115 | - $username2=$username; |
|
| 116 | - if(!empty($_GET['usernamecustom'])&&isguestuser($USER)){ |
|
| 117 | - $username2=$_GET['usernamecustom']; |
|
| 115 | + $username2 = $username; |
|
| 116 | + if (!empty($_GET['usernamecustom']) && isguestuser($USER)) { |
|
| 117 | + $username2 = $_GET['usernamecustom']; |
|
| 118 | 118 | } |
| 119 | 119 | $data = ['meetingID' => $meetingid, |
| 120 | 120 | 'fullName' => $username2, |
@@ -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( |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | * @return array $roles |
| 722 | 722 | */ |
| 723 | 723 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 724 | - $roles = (array) role_get_names($context); |
|
| 724 | + $roles = (array)role_get_names($context); |
|
| 725 | 725 | foreach ($roles as $key => $value) { |
| 726 | 726 | $roles[$key] = $value->localname; |
| 727 | 727 | } |
@@ -736,7 +736,7 @@ discard block |
||
| 736 | 736 | * @return array $users |
| 737 | 737 | */ |
| 738 | 738 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 739 | - $roles = (array) role_get_names($context); |
|
| 739 | + $roles = (array)role_get_names($context); |
|
| 740 | 740 | foreach ($roles as $key => $value) { |
| 741 | 741 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 742 | 742 | } |
@@ -751,9 +751,9 @@ discard block |
||
| 751 | 751 | * @return object $role |
| 752 | 752 | */ |
| 753 | 753 | function bigbluebuttonbn_get_role($id) { |
| 754 | - $roles = (array) role_get_names(); |
|
| 754 | + $roles = (array)role_get_names(); |
|
| 755 | 755 | if (is_numeric($id) && isset($roles[$id])) { |
| 756 | - return (object) $roles[$id]; |
|
| 756 | + return (object)$roles[$id]; |
|
| 757 | 757 | } |
| 758 | 758 | foreach ($roles as $role) { |
| 759 | 759 | if ($role->shortname == $id) { |
@@ -833,7 +833,7 @@ discard block |
||
| 833 | 833 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
| 834 | 834 | $participantlist[] = array( |
| 835 | 835 | 'selectiontype' => 'user', |
| 836 | - 'selectionid' => (string) $ownerid, |
|
| 836 | + 'selectionid' => (string)$ownerid, |
|
| 837 | 837 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
| 838 | 838 | } |
| 839 | 839 | continue; |
@@ -1015,7 +1015,7 @@ discard block |
||
| 1015 | 1015 | $now = time(); |
| 1016 | 1016 | if ($closingtime > 0 && $now < $closingtime) { |
| 1017 | 1017 | $duration = ceil(($closingtime - $now) / 60); |
| 1018 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1018 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1019 | 1019 | $duration = intval($duration) + $compensationtime; |
| 1020 | 1020 | } |
| 1021 | 1021 | return $duration; |
@@ -1217,16 +1217,16 @@ discard block |
||
| 1217 | 1217 | * @return array |
| 1218 | 1218 | */ |
| 1219 | 1219 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
| 1220 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1220 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1221 | 1221 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 1222 | 1222 | $result = $cache->get($meetingid); |
| 1223 | 1223 | $now = time(); |
| 1224 | 1224 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1225 | 1225 | // Use the value in the cache. |
| 1226 | - return (array) json_decode($result['meeting_info']); |
|
| 1226 | + return (array)json_decode($result['meeting_info']); |
|
| 1227 | 1227 | } |
| 1228 | 1228 | // Ping again and refresh the cache. |
| 1229 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1229 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1230 | 1230 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1231 | 1231 | ); |
| 1232 | 1232 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1373,7 +1373,7 @@ discard block |
||
| 1373 | 1373 | */ |
| 1374 | 1374 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1375 | 1375 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1376 | - $configxmlarray = (array) $configxml; |
|
| 1376 | + $configxmlarray = (array)$configxml; |
|
| 1377 | 1377 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1378 | 1378 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1379 | 1379 | return ''; |
@@ -1426,7 +1426,7 @@ discard block |
||
| 1426 | 1426 | * @return boolean |
| 1427 | 1427 | */ |
| 1428 | 1428 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
| 1429 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1429 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1430 | 1430 | } |
| 1431 | 1431 | |
| 1432 | 1432 | /** |
@@ -1437,7 +1437,7 @@ discard block |
||
| 1437 | 1437 | * @return boolean |
| 1438 | 1438 | */ |
| 1439 | 1439 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
| 1440 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1440 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1441 | 1441 | } |
| 1442 | 1442 | |
| 1443 | 1443 | /** |
@@ -1862,7 +1862,7 @@ discard block |
||
| 1862 | 1862 | } |
| 1863 | 1863 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
| 1864 | 1864 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
| 1865 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1865 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1866 | 1866 | // With icon for $manageaction. |
| 1867 | 1867 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
| 1868 | 1868 | $linkattributes = array( |
@@ -2121,7 +2121,7 @@ discard block |
||
| 2121 | 2121 | // Enqueue it. |
| 2122 | 2122 | \core\task\manager::queue_adhoc_task($task); |
| 2123 | 2123 | } catch (Exception $e) { |
| 2124 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
| 2124 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
| 2125 | 2125 | } |
| 2126 | 2126 | } |
| 2127 | 2127 | |
@@ -2135,7 +2135,7 @@ discard block |
||
| 2135 | 2135 | */ |
| 2136 | 2136 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
| 2137 | 2137 | global $CFG; |
| 2138 | - require_once($CFG->libdir.'/completionlib.php'); |
|
| 2138 | + require_once($CFG->libdir . '/completionlib.php'); |
|
| 2139 | 2139 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
| 2140 | 2140 | $completion = new completion_info($course); |
| 2141 | 2141 | if (!$completion->is_enabled($cm)) { |
@@ -2564,7 +2564,7 @@ discard block |
||
| 2564 | 2564 | */ |
| 2565 | 2565 | function bigbluebuttonbn_format_activity_time($time) { |
| 2566 | 2566 | global $CFG; |
| 2567 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 2567 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 2568 | 2568 | $activitytime = ''; |
| 2569 | 2569 | if ($time) { |
| 2570 | 2570 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2662,7 +2662,7 @@ discard block |
||
| 2662 | 2662 | */ |
| 2663 | 2663 | function bigbluebuttonbn_settings_general(&$renderer) { |
| 2664 | 2664 | // Configuration for BigBlueButton. |
| 2665 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2665 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2666 | 2666 | $renderer->render_group_header('general'); |
| 2667 | 2667 | $renderer->render_group_element( |
| 2668 | 2668 | 'server_url', |
@@ -2684,7 +2684,7 @@ discard block |
||
| 2684 | 2684 | */ |
| 2685 | 2685 | function bigbluebuttonbn_settings_record(&$renderer) { |
| 2686 | 2686 | // Configuration for 'recording' feature. |
| 2687 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2687 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2688 | 2688 | $renderer->render_group_header('recording'); |
| 2689 | 2689 | $renderer->render_group_element( |
| 2690 | 2690 | 'recording_default', |
@@ -2728,7 +2728,7 @@ discard block |
||
| 2728 | 2728 | */ |
| 2729 | 2729 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
| 2730 | 2730 | // Configuration for 'import recordings' feature. |
| 2731 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2731 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2732 | 2732 | $renderer->render_group_header('importrecordings'); |
| 2733 | 2733 | $renderer->render_group_element( |
| 2734 | 2734 | 'importrecordings_enabled', |
@@ -2750,7 +2750,7 @@ discard block |
||
| 2750 | 2750 | */ |
| 2751 | 2751 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
| 2752 | 2752 | // Configuration for 'show recordings' feature. |
| 2753 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2753 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2754 | 2754 | $renderer->render_group_header('recordings'); |
| 2755 | 2755 | $renderer->render_group_element( |
| 2756 | 2756 | 'recordings_html_default', |
@@ -2804,7 +2804,7 @@ discard block |
||
| 2804 | 2804 | */ |
| 2805 | 2805 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
| 2806 | 2806 | // Configuration for wait for moderator feature. |
| 2807 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2807 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2808 | 2808 | $renderer->render_group_header('waitformoderator'); |
| 2809 | 2809 | $renderer->render_group_element( |
| 2810 | 2810 | 'waitformoderator_default', |
@@ -2834,7 +2834,7 @@ discard block |
||
| 2834 | 2834 | */ |
| 2835 | 2835 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
| 2836 | 2836 | // Configuration for "static voice bridge" feature. |
| 2837 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2837 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2838 | 2838 | $renderer->render_group_header('voicebridge'); |
| 2839 | 2839 | $renderer->render_group_element( |
| 2840 | 2840 | 'voicebridge_editable', |
@@ -2852,7 +2852,7 @@ discard block |
||
| 2852 | 2852 | */ |
| 2853 | 2853 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
| 2854 | 2854 | // Configuration for "preupload presentation" feature. |
| 2855 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2855 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2856 | 2856 | // This feature only works if curl is installed. |
| 2857 | 2857 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
| 2858 | 2858 | if (!extension_loaded('curl')) { |
@@ -2880,7 +2880,7 @@ discard block |
||
| 2880 | 2880 | */ |
| 2881 | 2881 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
| 2882 | 2882 | // Configuration for "preupload presentation" feature. |
| 2883 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2883 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2884 | 2884 | if (extension_loaded('curl')) { |
| 2885 | 2885 | // This feature only works if curl is installed. |
| 2886 | 2886 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2897,7 +2897,7 @@ discard block |
||
| 2897 | 2897 | */ |
| 2898 | 2898 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
| 2899 | 2899 | // Configuration for "user limit" feature. |
| 2900 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2900 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2901 | 2901 | $renderer->render_group_header('userlimit'); |
| 2902 | 2902 | $renderer->render_group_element( |
| 2903 | 2903 | 'userlimit_default', |
@@ -2919,7 +2919,7 @@ discard block |
||
| 2919 | 2919 | */ |
| 2920 | 2920 | function bigbluebuttonbn_settings_duration(&$renderer) { |
| 2921 | 2921 | // Configuration for "scheduled duration" feature. |
| 2922 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2922 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2923 | 2923 | $renderer->render_group_header('scheduled'); |
| 2924 | 2924 | $renderer->render_group_element( |
| 2925 | 2925 | 'scheduled_duration_enabled', |
@@ -2945,7 +2945,7 @@ discard block |
||
| 2945 | 2945 | */ |
| 2946 | 2946 | function bigbluebuttonbn_settings_participants(&$renderer) { |
| 2947 | 2947 | // Configuration for defining the default role/user that will be moderator on new activities. |
| 2948 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2948 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2949 | 2949 | $renderer->render_group_header('participant'); |
| 2950 | 2950 | // UI for 'participants' feature. |
| 2951 | 2951 | $roles = bigbluebuttonbn_get_roles(); |
@@ -2970,7 +2970,7 @@ discard block |
||
| 2970 | 2970 | */ |
| 2971 | 2971 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
| 2972 | 2972 | // Configuration for "send notifications" feature. |
| 2973 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2973 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2974 | 2974 | $renderer->render_group_header('sendnotifications'); |
| 2975 | 2975 | $renderer->render_group_element( |
| 2976 | 2976 | 'sendnotifications_enabled', |
@@ -2988,14 +2988,14 @@ discard block |
||
| 2988 | 2988 | */ |
| 2989 | 2989 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
| 2990 | 2990 | // Configuration for "clienttype" feature. |
| 2991 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2991 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2992 | 2992 | $renderer->render_group_header('clienttype'); |
| 2993 | 2993 | $renderer->render_group_element( |
| 2994 | 2994 | 'clienttype_editable', |
| 2995 | 2995 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
| 2996 | 2996 | ); |
| 2997 | 2997 | // Web Client default. |
| 2998 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2998 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2999 | 2999 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 3000 | 3000 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 3001 | 3001 | $renderer->render_group_element( |
@@ -3018,7 +3018,7 @@ discard block |
||
| 3018 | 3018 | */ |
| 3019 | 3019 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
| 3020 | 3020 | // Configuration for BigBlueButton. |
| 3021 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3021 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3022 | 3022 | $renderer->render_group_header('muteonstart'); |
| 3023 | 3023 | $renderer->render_group_element( |
| 3024 | 3024 | 'muteonstart_default', |
@@ -3040,7 +3040,7 @@ discard block |
||
| 3040 | 3040 | */ |
| 3041 | 3041 | function bigbluebuttonbn_settings_extended(&$renderer) { |
| 3042 | 3042 | // Configuration for 'notify users when recording ready' feature. |
| 3043 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3043 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3044 | 3044 | return; |
| 3045 | 3045 | } |
| 3046 | 3046 | $renderer->render_group_header('extended_capabilities'); |
@@ -3068,7 +3068,7 @@ discard block |
||
| 3068 | 3068 | global $DB; |
| 3069 | 3069 | do { |
| 3070 | 3070 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
| 3071 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3071 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3072 | 3072 | } while ($meetingid == $encodedseed); |
| 3073 | 3073 | return $encodedseed; |
| 3074 | 3074 | } |
@@ -3281,7 +3281,7 @@ discard block |
||
| 3281 | 3281 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
| 3282 | 3282 | global $DB; |
| 3283 | 3283 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
| 3284 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3284 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3285 | 3285 | return $ownerid; |
| 3286 | 3286 | } |
| 3287 | 3287 | |
@@ -3324,8 +3324,8 @@ discard block |
||
| 3324 | 3324 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3325 | 3325 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
| 3326 | 3326 | // Extra data for setting up the Meeting. |
| 3327 | - $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3328 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3327 | + $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3328 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3329 | 3329 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
| 3330 | 3330 | } |
| 3331 | 3331 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -3475,7 +3475,7 @@ discard block |
||
| 3475 | 3475 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 3476 | 3476 | ]; |
| 3477 | 3477 | // Special metadata for recording processing. |
| 3478 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3478 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3479 | 3479 | $metadata["bn-recording-status"] = json_encode( |
| 3480 | 3480 | array( |
| 3481 | 3481 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3483,10 +3483,10 @@ discard block |
||
| 3483 | 3483 | ) |
| 3484 | 3484 | ); |
| 3485 | 3485 | } |
| 3486 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3486 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3487 | 3487 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 3488 | 3488 | } |
| 3489 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3489 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3490 | 3490 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
| 3491 | 3491 | } |
| 3492 | 3492 | return $metadata; |