mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-14817 fixing recent regressions
This commit is contained in:
parent
42c32efdf2
commit
0831484c2a
1 changed files with 6 additions and 1 deletions
|
@ -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));
|
||||
|
||||
if ($ras) {
|
||||
$accessdata['ra'][$context->path] = array_combine(array_keys($ras), array_keys($ras));
|
||||
} else {
|
||||
$accessdata['ra'][$context->path] = array();
|
||||
}
|
||||
|
||||
return $accessdata;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue