@@ -796,7 +796,7 @@ discard block  | 
                                                    ||
| 796 | 796 | $data['role'] = array(  | 
                                                        
| 797 | 797 |          'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), | 
                                                        
| 798 | 798 | 'children' => bigbluebuttonbn_get_roles_select($context, true)  | 
                                                        
| 799 | - );  | 
                                                        |
| 799 | + );  | 
                                                        |
| 800 | 800 | $data['user'] = array(  | 
                                                        
| 801 | 801 |          'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), | 
                                                        
| 802 | 802 | 'children' => bigbluebuttonbn_get_users_select($context, $bbactivity),  | 
                                                        
@@ -1704,7 +1704,7 @@ discard block  | 
                                                    ||
| 1704 | 1704 | 'data-action' => 'play',  | 
                                                        
| 1705 | 1705 | 'data-target' => $playback['type'],  | 
                                                        
| 1706 | 1706 | 'data-href' => $href,  | 
                                                        
| 1707 | - );  | 
                                                        |
| 1707 | + );  | 
                                                        |
| 1708 | 1708 |      if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { | 
                                                        
| 1709 | 1709 | $linkattributes['class'] = 'btn btn-sm btn-warning';  | 
                                                        
| 1710 | 1710 |          $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(  | 
                                                        
@@ -720,12 +720,12 @@ discard block  | 
                                                    ||
| 720 | 720 | global $CFG;  | 
                                                        
| 721 | 721 | |
| 722 | 722 |      if ($onlyviewableroles == true && $CFG->branch >= 35) { | 
                                                        
| 723 | - $roles = (array) get_viewable_roles($context);  | 
                                                        |
| 723 | + $roles = (array)get_viewable_roles($context);  | 
                                                        |
| 724 | 724 |          foreach ($roles as $key => $value) { | 
                                                        
| 725 | 725 | $roles[$key] = $value;  | 
                                                        
| 726 | 726 | }  | 
                                                        
| 727 | 727 |      } else { | 
                                                        
| 728 | - $roles = (array) role_get_names($context);  | 
                                                        |
| 728 | + $roles = (array)role_get_names($context);  | 
                                                        |
| 729 | 729 |          foreach ($roles as $key => $value) { | 
                                                        
| 730 | 730 | $roles[$key] = $value->localname;  | 
                                                        
| 731 | 731 | }  | 
                                                        
@@ -746,12 +746,12 @@ discard block  | 
                                                    ||
| 746 | 746 | global $CFG;  | 
                                                        
| 747 | 747 | |
| 748 | 748 |      if ($onlyviewableroles == true && $CFG->branch >= 35) { | 
                                                        
| 749 | - $roles = (array) get_viewable_roles($context);  | 
                                                        |
| 749 | + $roles = (array)get_viewable_roles($context);  | 
                                                        |
| 750 | 750 |          foreach ($roles as $key => $value) { | 
                                                        
| 751 | 751 |              $roles[$key] = array('id' => $key, 'name' => $value); | 
                                                        
| 752 | 752 | }  | 
                                                        
| 753 | 753 |      } else { | 
                                                        
| 754 | - $roles = (array) role_get_names($context);  | 
                                                        |
| 754 | + $roles = (array)role_get_names($context);  | 
                                                        |
| 755 | 755 |          foreach ($roles as $key => $value) { | 
                                                        
| 756 | 756 |              $roles[$key] = array('id' => $value->id, 'name' => $value->localname); | 
                                                        
| 757 | 757 | }  | 
                                                        
@@ -768,9 +768,9 @@ discard block  | 
                                                    ||
| 768 | 768 | * @return object $role  | 
                                                        
| 769 | 769 | */  | 
                                                        
| 770 | 770 |  function bigbluebuttonbn_get_role($id) { | 
                                                        
| 771 | - $roles = (array) role_get_names();  | 
                                                        |
| 771 | + $roles = (array)role_get_names();  | 
                                                        |
| 772 | 772 |      if (is_numeric($id) && isset($roles[$id])) { | 
                                                        
| 773 | - return (object) $roles[$id];  | 
                                                        |
| 773 | + return (object)$roles[$id];  | 
                                                        |
| 774 | 774 | }  | 
                                                        
| 775 | 775 |      foreach ($roles as $role) { | 
                                                        
| 776 | 776 |          if ($role->shortname == $id) { | 
                                                        
@@ -850,7 +850,7 @@ discard block  | 
                                                    ||
| 850 | 850 |              if (!empty($ownerid) && is_enrolled($context, $ownerid)) { | 
                                                        
| 851 | 851 | $participantlist[] = array(  | 
                                                        
| 852 | 852 | 'selectiontype' => 'user',  | 
                                                        
| 853 | - 'selectionid' => (string) $ownerid,  | 
                                                        |
| 853 | + 'selectionid' => (string)$ownerid,  | 
                                                        |
| 854 | 854 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);  | 
                                                        
| 855 | 855 | }  | 
                                                        
| 856 | 856 | continue;  | 
                                                        
@@ -1032,7 +1032,7 @@ discard block  | 
                                                    ||
| 1032 | 1032 | $now = time();  | 
                                                        
| 1033 | 1033 |      if ($closingtime > 0 && $now < $closingtime) { | 
                                                        
| 1034 | 1034 | $duration = ceil(($closingtime - $now) / 60);  | 
                                                        
| 1035 | -        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); | 
                                                        |
| 1035 | +        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); | 
                                                        |
| 1036 | 1036 | $duration = intval($duration) + $compensationtime;  | 
                                                        
| 1037 | 1037 | }  | 
                                                        
| 1038 | 1038 | return $duration;  | 
                                                        
@@ -1234,16 +1234,16 @@ discard block  | 
                                                    ||
| 1234 | 1234 | * @return array  | 
                                                        
| 1235 | 1235 | */  | 
                                                        
| 1236 | 1236 |  function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { | 
                                                        
| 1237 | -    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); | 
                                                        |
| 1237 | +    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); | 
                                                        |
| 1238 | 1238 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');  | 
                                                        
| 1239 | 1239 | $result = $cache->get($meetingid);  | 
                                                        
| 1240 | 1240 | $now = time();  | 
                                                        
| 1241 | 1241 |      if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { | 
                                                        
| 1242 | 1242 | // Use the value in the cache.  | 
                                                        
| 1243 | - return (array) json_decode($result['meeting_info']);  | 
                                                        |
| 1243 | + return (array)json_decode($result['meeting_info']);  | 
                                                        |
| 1244 | 1244 | }  | 
                                                        
| 1245 | 1245 | // Ping again and refresh the cache.  | 
                                                        
| 1246 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(  | 
                                                        |
| 1246 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(  | 
                                                        |
| 1247 | 1247 |          \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) | 
                                                        
| 1248 | 1248 | );  | 
                                                        
| 1249 | 1249 |      $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); | 
                                                        
@@ -1390,7 +1390,7 @@ discard block  | 
                                                    ||
| 1390 | 1390 | */  | 
                                                        
| 1391 | 1391 |  function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { | 
                                                        
| 1392 | 1392 | $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml);  | 
                                                        
| 1393 | - $configxmlarray = (array) $configxml;  | 
                                                        |
| 1393 | + $configxmlarray = (array)$configxml;  | 
                                                        |
| 1394 | 1394 |      if ($configxmlarray['returncode'] != 'SUCCESS') { | 
                                                        
| 1395 | 1395 |          debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); | 
                                                        
| 1396 | 1396 | return '';  | 
                                                        
@@ -1443,7 +1443,7 @@ discard block  | 
                                                    ||
| 1443 | 1443 | * @return boolean  | 
                                                        
| 1444 | 1444 | */  | 
                                                        
| 1445 | 1445 |  function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { | 
                                                        
| 1446 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));  | 
                                                        |
| 1446 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));  | 
                                                        |
| 1447 | 1447 | }  | 
                                                        
| 1448 | 1448 | |
| 1449 | 1449 | /**  | 
                                                        
@@ -1454,7 +1454,7 @@ discard block  | 
                                                    ||
| 1454 | 1454 | * @return boolean  | 
                                                        
| 1455 | 1455 | */  | 
                                                        
| 1456 | 1456 |  function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { | 
                                                        
| 1457 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');  | 
                                                        |
| 1457 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');  | 
                                                        |
| 1458 | 1458 | }  | 
                                                        
| 1459 | 1459 | |
| 1460 | 1460 | /**  | 
                                                        
@@ -1879,7 +1879,7 @@ discard block  | 
                                                    ||
| 1879 | 1879 | }  | 
                                                        
| 1880 | 1880 | $id = 'recording-' . $target . '-' . $recording['recordID'];  | 
                                                        
| 1881 | 1881 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;';  | 
                                                        
| 1882 | -    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { | 
                                                        |
| 1882 | +    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { | 
                                                        |
| 1883 | 1883 | // With icon for $manageaction.  | 
                                                        
| 1884 | 1884 |          $iconattributes = array('id' => $id, 'class' => 'iconsmall'); | 
                                                        
| 1885 | 1885 | $linkattributes = array(  | 
                                                        
@@ -2138,7 +2138,7 @@ discard block  | 
                                                    ||
| 2138 | 2138 | // Enqueue it.  | 
                                                        
| 2139 | 2139 | \core\task\manager::queue_adhoc_task($task);  | 
                                                        
| 2140 | 2140 |      } catch (Exception $e) { | 
                                                        
| 2141 | -        mtrace("Error while enqueuing completion_update_state task. " . (string) $e); | 
                                                        |
| 2141 | +        mtrace("Error while enqueuing completion_update_state task. " . (string)$e); | 
                                                        |
| 2142 | 2142 | }  | 
                                                        
| 2143 | 2143 | }  | 
                                                        
| 2144 | 2144 | |
@@ -2152,7 +2152,7 @@ discard block  | 
                                                    ||
| 2152 | 2152 | */  | 
                                                        
| 2153 | 2153 |  function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { | 
                                                        
| 2154 | 2154 | global $CFG;  | 
                                                        
| 2155 | - require_once($CFG->libdir.'/completionlib.php');  | 
                                                        |
| 2155 | + require_once($CFG->libdir . '/completionlib.php');  | 
                                                        |
| 2156 | 2156 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn');  | 
                                                        
| 2157 | 2157 | $completion = new completion_info($course);  | 
                                                        
| 2158 | 2158 |      if (!$completion->is_enabled($cm)) { | 
                                                        
@@ -2581,7 +2581,7 @@ discard block  | 
                                                    ||
| 2581 | 2581 | */  | 
                                                        
| 2582 | 2582 |  function bigbluebuttonbn_format_activity_time($time) { | 
                                                        
| 2583 | 2583 | global $CFG;  | 
                                                        
| 2584 | - require_once($CFG->dirroot.'/calendar/lib.php');  | 
                                                        |
| 2584 | + require_once($CFG->dirroot . '/calendar/lib.php');  | 
                                                        |
| 2585 | 2585 | $activitytime = '';  | 
                                                        
| 2586 | 2586 |      if ($time) { | 
                                                        
| 2587 | 2587 | $activitytime = calendar_day_representation($time) . ' ' .  | 
                                                        
@@ -2679,7 +2679,7 @@ discard block  | 
                                                    ||
| 2679 | 2679 | */  | 
                                                        
| 2680 | 2680 |  function bigbluebuttonbn_settings_general(&$renderer) { | 
                                                        
| 2681 | 2681 | // Configuration for BigBlueButton.  | 
                                                        
| 2682 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { | 
                                                        |
| 2682 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { | 
                                                        |
| 2683 | 2683 |          $renderer->render_group_header('general'); | 
                                                        
| 2684 | 2684 | $renderer->render_group_element(  | 
                                                        
| 2685 | 2685 | 'server_url',  | 
                                                        
@@ -2701,7 +2701,7 @@ discard block  | 
                                                    ||
| 2701 | 2701 | */  | 
                                                        
| 2702 | 2702 |  function bigbluebuttonbn_settings_record(&$renderer) { | 
                                                        
| 2703 | 2703 | // Configuration for 'recording' feature.  | 
                                                        
| 2704 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { | 
                                                        |
| 2704 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { | 
                                                        |
| 2705 | 2705 |          $renderer->render_group_header('recording'); | 
                                                        
| 2706 | 2706 | $renderer->render_group_element(  | 
                                                        
| 2707 | 2707 | 'recording_default',  | 
                                                        
@@ -2745,7 +2745,7 @@ discard block  | 
                                                    ||
| 2745 | 2745 | */  | 
                                                        
| 2746 | 2746 |  function bigbluebuttonbn_settings_importrecordings(&$renderer) { | 
                                                        
| 2747 | 2747 | // Configuration for 'import recordings' feature.  | 
                                                        
| 2748 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { | 
                                                        |
| 2748 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { | 
                                                        |
| 2749 | 2749 |          $renderer->render_group_header('importrecordings'); | 
                                                        
| 2750 | 2750 | $renderer->render_group_element(  | 
                                                        
| 2751 | 2751 | 'importrecordings_enabled',  | 
                                                        
@@ -2767,7 +2767,7 @@ discard block  | 
                                                    ||
| 2767 | 2767 | */  | 
                                                        
| 2768 | 2768 |  function bigbluebuttonbn_settings_showrecordings(&$renderer) { | 
                                                        
| 2769 | 2769 | // Configuration for 'show recordings' feature.  | 
                                                        
| 2770 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { | 
                                                        |
| 2770 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { | 
                                                        |
| 2771 | 2771 |          $renderer->render_group_header('recordings'); | 
                                                        
| 2772 | 2772 | $renderer->render_group_element(  | 
                                                        
| 2773 | 2773 | 'recordings_html_default',  | 
                                                        
@@ -2821,7 +2821,7 @@ discard block  | 
                                                    ||
| 2821 | 2821 | */  | 
                                                        
| 2822 | 2822 |  function bigbluebuttonbn_settings_waitmoderator(&$renderer) { | 
                                                        
| 2823 | 2823 | // Configuration for wait for moderator feature.  | 
                                                        
| 2824 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { | 
                                                        |
| 2824 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { | 
                                                        |
| 2825 | 2825 |          $renderer->render_group_header('waitformoderator'); | 
                                                        
| 2826 | 2826 | $renderer->render_group_element(  | 
                                                        
| 2827 | 2827 | 'waitformoderator_default',  | 
                                                        
@@ -2851,7 +2851,7 @@ discard block  | 
                                                    ||
| 2851 | 2851 | */  | 
                                                        
| 2852 | 2852 |  function bigbluebuttonbn_settings_voicebridge(&$renderer) { | 
                                                        
| 2853 | 2853 | // Configuration for "static voice bridge" feature.  | 
                                                        
| 2854 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { | 
                                                        |
| 2854 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { | 
                                                        |
| 2855 | 2855 |          $renderer->render_group_header('voicebridge'); | 
                                                        
| 2856 | 2856 | $renderer->render_group_element(  | 
                                                        
| 2857 | 2857 | 'voicebridge_editable',  | 
                                                        
@@ -2869,7 +2869,7 @@ discard block  | 
                                                    ||
| 2869 | 2869 | */  | 
                                                        
| 2870 | 2870 |  function bigbluebuttonbn_settings_preupload(&$renderer) { | 
                                                        
| 2871 | 2871 | // Configuration for "preupload presentation" feature.  | 
                                                        
| 2872 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { | 
                                                        |
| 2872 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { | 
                                                        |
| 2873 | 2873 | // This feature only works if curl is installed.  | 
                                                        
| 2874 | 2874 |          $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); | 
                                                        
| 2875 | 2875 |          if (!extension_loaded('curl')) { | 
                                                        
@@ -2897,7 +2897,7 @@ discard block  | 
                                                    ||
| 2897 | 2897 | */  | 
                                                        
| 2898 | 2898 |  function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { | 
                                                        
| 2899 | 2899 | // Configuration for "preupload presentation" feature.  | 
                                                        
| 2900 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { | 
                                                        |
| 2900 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { | 
                                                        |
| 2901 | 2901 |          if (extension_loaded('curl')) { | 
                                                        
| 2902 | 2902 | // This feature only works if curl is installed.  | 
                                                        
| 2903 | 2903 |              $renderer->render_filemanager_default_file_presentation("presentation_default"); | 
                                                        
@@ -2914,7 +2914,7 @@ discard block  | 
                                                    ||
| 2914 | 2914 | */  | 
                                                        
| 2915 | 2915 |  function bigbluebuttonbn_settings_userlimit(&$renderer) { | 
                                                        
| 2916 | 2916 | // Configuration for "user limit" feature.  | 
                                                        
| 2917 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { | 
                                                        |
| 2917 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { | 
                                                        |
| 2918 | 2918 |          $renderer->render_group_header('userlimit'); | 
                                                        
| 2919 | 2919 | $renderer->render_group_element(  | 
                                                        
| 2920 | 2920 | 'userlimit_default',  | 
                                                        
@@ -2936,7 +2936,7 @@ discard block  | 
                                                    ||
| 2936 | 2936 | */  | 
                                                        
| 2937 | 2937 |  function bigbluebuttonbn_settings_duration(&$renderer) { | 
                                                        
| 2938 | 2938 | // Configuration for "scheduled duration" feature.  | 
                                                        
| 2939 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { | 
                                                        |
| 2939 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { | 
                                                        |
| 2940 | 2940 |          $renderer->render_group_header('scheduled'); | 
                                                        
| 2941 | 2941 | $renderer->render_group_element(  | 
                                                        
| 2942 | 2942 | 'scheduled_duration_enabled',  | 
                                                        
@@ -2962,7 +2962,7 @@ discard block  | 
                                                    ||
| 2962 | 2962 | */  | 
                                                        
| 2963 | 2963 |  function bigbluebuttonbn_settings_participants(&$renderer) { | 
                                                        
| 2964 | 2964 | // Configuration for defining the default role/user that will be moderator on new activities.  | 
                                                        
| 2965 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { | 
                                                        |
| 2965 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { | 
                                                        |
| 2966 | 2966 |          $renderer->render_group_header('participant'); | 
                                                        
| 2967 | 2967 | // UI for 'participants' feature.  | 
                                                        
| 2968 | 2968 | $roles = bigbluebuttonbn_get_roles(null, false);  | 
                                                        
@@ -2987,7 +2987,7 @@ discard block  | 
                                                    ||
| 2987 | 2987 | */  | 
                                                        
| 2988 | 2988 |  function bigbluebuttonbn_settings_notifications(&$renderer) { | 
                                                        
| 2989 | 2989 | // Configuration for "send notifications" feature.  | 
                                                        
| 2990 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { | 
                                                        |
| 2990 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { | 
                                                        |
| 2991 | 2991 |          $renderer->render_group_header('sendnotifications'); | 
                                                        
| 2992 | 2992 | $renderer->render_group_element(  | 
                                                        
| 2993 | 2993 | 'sendnotifications_enabled',  | 
                                                        
@@ -3005,14 +3005,14 @@ discard block  | 
                                                    ||
| 3005 | 3005 | */  | 
                                                        
| 3006 | 3006 |  function bigbluebuttonbn_settings_clienttype(&$renderer) { | 
                                                        
| 3007 | 3007 | // Configuration for "clienttype" feature.  | 
                                                        
| 3008 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { | 
                                                        |
| 3008 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { | 
                                                        |
| 3009 | 3009 |          $renderer->render_group_header('clienttype'); | 
                                                        
| 3010 | 3010 | $renderer->render_group_element(  | 
                                                        
| 3011 | 3011 | 'clienttype_editable',  | 
                                                        
| 3012 | 3012 |              $renderer->render_group_element_checkbox('clienttype_editable', 0) | 
                                                        
| 3013 | 3013 | );  | 
                                                        
| 3014 | 3014 | // Web Client default.  | 
                                                        
| 3015 | -        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); | 
                                                        |
| 3015 | +        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); | 
                                                        |
| 3016 | 3016 |          $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), | 
                                                        
| 3017 | 3017 |              BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); | 
                                                        
| 3018 | 3018 | $renderer->render_group_element(  | 
                                                        
@@ -3035,7 +3035,7 @@ discard block  | 
                                                    ||
| 3035 | 3035 | */  | 
                                                        
| 3036 | 3036 |  function bigbluebuttonbn_settings_muteonstart(&$renderer) { | 
                                                        
| 3037 | 3037 | // Configuration for BigBlueButton.  | 
                                                        
| 3038 | -    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { | 
                                                        |
| 3038 | +    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { | 
                                                        |
| 3039 | 3039 |          $renderer->render_group_header('muteonstart'); | 
                                                        
| 3040 | 3040 | $renderer->render_group_element(  | 
                                                        
| 3041 | 3041 | 'muteonstart_default',  | 
                                                        
@@ -3057,7 +3057,7 @@ discard block  | 
                                                    ||
| 3057 | 3057 | */  | 
                                                        
| 3058 | 3058 |  function bigbluebuttonbn_settings_extended(&$renderer) { | 
                                                        
| 3059 | 3059 | // Configuration for 'notify users when recording ready' feature.  | 
                                                        
| 3060 | -    if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { | 
                                                        |
| 3060 | +    if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { | 
                                                        |
| 3061 | 3061 | return;  | 
                                                        
| 3062 | 3062 | }  | 
                                                        
| 3063 | 3063 |      $renderer->render_group_header('extended_capabilities'); | 
                                                        
@@ -3085,7 +3085,7 @@ discard block  | 
                                                    ||
| 3085 | 3085 | global $DB;  | 
                                                        
| 3086 | 3086 |      do { | 
                                                        
| 3087 | 3087 | $encodedseed = sha1(bigbluebuttonbn_random_password(12));  | 
                                                        
| 3088 | -        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); | 
                                                        |
| 3088 | +        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); | 
                                                        |
| 3089 | 3089 | } while ($meetingid == $encodedseed);  | 
                                                        
| 3090 | 3090 | return $encodedseed;  | 
                                                        
| 3091 | 3091 | }  | 
                                                        
@@ -3298,7 +3298,7 @@ discard block  | 
                                                    ||
| 3298 | 3298 |  function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { | 
                                                        
| 3299 | 3299 | global $DB;  | 
                                                        
| 3300 | 3300 |      $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); | 
                                                        
| 3301 | -    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); | 
                                                        |
| 3301 | +    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); | 
                                                        |
| 3302 | 3302 | return $ownerid;  | 
                                                        
| 3303 | 3303 | }  | 
                                                        
| 3304 | 3304 | |
@@ -3341,8 +3341,8 @@ discard block  | 
                                                    ||
| 3341 | 3341 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;  | 
                                                        
| 3342 | 3342 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;  | 
                                                        
| 3343 | 3343 | // Extra data for setting up the Meeting.  | 
                                                        
| 3344 | -    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); | 
                                                        |
| 3345 | -    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { | 
                                                        |
| 3344 | +    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); | 
                                                        |
| 3345 | +    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { | 
                                                        |
| 3346 | 3346 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);  | 
                                                        
| 3347 | 3347 | }  | 
                                                        
| 3348 | 3348 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;  | 
                                                        
@@ -3492,7 +3492,7 @@ discard block  | 
                                                    ||
| 3492 | 3492 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.  | 
                                                        
| 3493 | 3493 | ];  | 
                                                        
| 3494 | 3494 | // Special metadata for recording processing.  | 
                                                        
| 3495 | -    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { | 
                                                        |
| 3495 | +    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { | 
                                                        |
| 3496 | 3496 | $metadata["bn-recording-status"] = json_encode(  | 
                                                        
| 3497 | 3497 | array(  | 
                                                        
| 3498 | 3498 |                  'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), | 
                                                        
@@ -3500,10 +3500,10 @@ discard block  | 
                                                    ||
| 3500 | 3500 | )  | 
                                                        
| 3501 | 3501 | );  | 
                                                        
| 3502 | 3502 | }  | 
                                                        
| 3503 | -    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { | 
                                                        |
| 3503 | +    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { | 
                                                        |
| 3504 | 3504 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];  | 
                                                        
| 3505 | 3505 | }  | 
                                                        
| 3506 | -    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { | 
                                                        |
| 3506 | +    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { | 
                                                        |
| 3507 | 3507 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL'];  | 
                                                        
| 3508 | 3508 | }  | 
                                                        
| 3509 | 3509 | return $metadata;  |