MDL-79809 environment: Add missing Moodle 4.4 requirements

This commit is contained in:
Huong Nguyen 2024-06-13 15:39:41 +07:00
parent 2978ffc4a5
commit a68fcabc65
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A
3 changed files with 23 additions and 0 deletions

View File

@ -4504,6 +4504,8 @@
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_oracle_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>

View File

@ -73,6 +73,9 @@ $string['alternativefullnameformat_desc'] = 'This defines how names are shown to
$string['always'] = 'Always';
$string['appearance'] = 'Appearance';
$string['aspellpath'] = 'Path to aspell';
$string['asyncbackupdisabled'] = 'Your site is currently configured to use synchronous backups. Asynchronous backups provide a better user experience.
Asynchronous backups will be enabled for all sites from Moodle LMS 4.5 LTS.
Synchronous backups will be removed from Moodle LMS the version after 4.5 LTS';
$string['authentication'] = 'Authentication';
$string['authpreventaccountcreation'] = 'Prevent account creation when authenticating';
$string['authpreventaccountcreation_help'] = 'When a user authenticates, an account on the site is automatically created if it doesn\'t yet exist. If an external database, such as LDAP, is used for authentication, but you wish to restrict access to the site to users with an existing account only, then this option should be enabled. New accounts will need to be created manually or via the upload users feature. Note that this setting doesn\'t apply to MNet authentication.';

View File

@ -2858,3 +2858,21 @@ function check_oracle_usage(environment_results $result): ?environment_results {
return null;
}
/**
* Check if asynchronous backups are enabled.
*
* @param environment_results $result
* @return environment_results|null
*/
function check_async_backup(environment_results $result): ?environment_results {
global $CFG;
if (!during_initial_install() && empty($CFG->enableasyncbackup)) { // Have to use $CFG as config table may not be available.
$result->setInfo('Asynchronous backups disabled');
$result->setFeedbackStr('asyncbackupdisabled');
return $result;
}
return null;
}