mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-55955 mod_quiz: ensure duplicated override events are removed
This commit is contained in:
parent
5100c486bd
commit
cc4fba8636
@ -1194,8 +1194,11 @@ function quiz_update_events($quiz, $override = null) {
|
||||
'instance'=>$quiz->id);
|
||||
if (!empty($override)) {
|
||||
// Only load events for this override.
|
||||
$conds['groupid'] = isset($override->groupid)? $override->groupid : 0;
|
||||
$conds['userid'] = isset($override->userid)? $override->userid : 0;
|
||||
if (isset($override->userid)) {
|
||||
$conds['userid'] = $override->userid;
|
||||
} else {
|
||||
$conds['groupid'] = $override->groupid;
|
||||
}
|
||||
}
|
||||
$oldevents = $DB->get_records('event', $conds);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user