mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-21042_master' of git://github.com/markn86/moodle
This commit is contained in:
commit
dc0f4b4f26
@ -766,7 +766,12 @@ function report_security_check_riskbackup($detailed=false) {
|
||||
$systemrolecount = empty($systemroles) ? 0 : count($systemroles);
|
||||
$overriddenrolecount = empty($overriddenroles) ? 0 : count($overriddenroles);
|
||||
|
||||
$result->status = REPORT_SECURITY_WARNING; // there is always at least one admin
|
||||
if (max($usercount, $systemrolecount, $overriddenrolecount) > 0) {
|
||||
$result->status = REPORT_SECURITY_WARNING;
|
||||
} else {
|
||||
$result->status = REPORT_SECURITY_OK;
|
||||
}
|
||||
|
||||
$a = (object)array('rolecount'=>$systemrolecount,'overridecount'=>$overriddenrolecount,'usercount'=>$usercount);
|
||||
$result->info = get_string('check_riskbackup_warning', 'report_security', $a);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user