mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-14817 fixing recent regressions
This commit is contained in:
parent
42c32efdf2
commit
0831484c2a
@ -1563,7 +1563,12 @@ function remove_temp_roles($context, array $accessdata) {
|
||||
WHERE ra.contextid = :contextid AND ra.userid = :userid";
|
||||
$ras = $DB->get_records_sql($sql, array('contextid'=>$context->id, 'userid'=>$USER->id));
|
||||
|
||||
$accessdata['ra'][$context->path] = array_combine(array_keys($ras), array_keys($ras));
|
||||
if ($ras) {
|
||||
$accessdata['ra'][$context->path] = array_combine(array_keys($ras), array_keys($ras));
|
||||
} else {
|
||||
$accessdata['ra'][$context->path] = array();
|
||||
}
|
||||
|
||||
return $accessdata;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user