capability report: MDL-17410 did not work if a capability was not set anywhere.
Change it so that the system context is always shown.
This commit is contained in:
@@ -106,7 +106,7 @@ if ($capability) {
|
||||
SELECT DISTINCT con.path, 1
|
||||
FROM {context} con JOIN {role_capabilities} rc ON rc.contextid = con.id
|
||||
WHERE capability = ? $sqlroletest", $params);
|
||||
$requiredcontexts = array();
|
||||
$requiredcontexts = array($systemcontext->id);
|
||||
foreach ($relevantpaths as $path => $notused) {
|
||||
$requiredcontexts = array_merge($requiredcontexts, explode('/', trim($path, '/')));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user