mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-74306 mod_assign: fix undefined property in override cache key.
This commit is contained in:
parent
34ce1463cc
commit
e420fbe303
@ -10094,7 +10094,7 @@ function move_group_override($id, $move, $assignid) {
|
||||
global $DB;
|
||||
|
||||
// Get the override object.
|
||||
if (!$override = $DB->get_record('assign_overrides', ['id' => $id], 'id, sortorder, groupid')) {
|
||||
if (!$override = $DB->get_record('assign_overrides', ['id' => $id, 'assignid' => $assignid], 'id, sortorder, groupid')) {
|
||||
return false;
|
||||
}
|
||||
// Count the number of group overrides.
|
||||
@ -10123,8 +10123,8 @@ function move_group_override($id, $move, $assignid) {
|
||||
|
||||
// Delete cache for the 2 records we updated above.
|
||||
$cache = cache::make('mod_assign', 'overrides');
|
||||
$cache->delete("{$override->assignid}_g_{$override->groupid}");
|
||||
$cache->delete("{$swapoverride->assignid}_g_{$swapoverride->groupid}");
|
||||
$cache->delete("{$assignid}_g_{$override->groupid}");
|
||||
$cache->delete("{$assignid}_g_{$swapoverride->groupid}");
|
||||
}
|
||||
|
||||
reorder_group_overrides($assignid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user