mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-10834 - Restore of quiz module may create calendar events without a date/time. Fix thanks to Derek Woolhead. Merged from MOODLE_17_STABLE.
This commit is contained in:
parent
8f5b6a9308
commit
c72a4079b1
1 changed files with 5 additions and 3 deletions
|
@ -336,12 +336,14 @@ function quiz_refresh_events($courseid = 0) {
|
|||
$event2->id = $event2old->id;
|
||||
update_event($event2);
|
||||
}
|
||||
} else if (!empty($event2->id)) {
|
||||
delete_event($event2->id);
|
||||
} else if (!empty($event2old->id)) {
|
||||
delete_event($event2old->id);
|
||||
}
|
||||
|
||||
if (empty($event->id)) {
|
||||
add_event($event);
|
||||
if (!empty($event->timestart)) {
|
||||
add_event($event);
|
||||
}
|
||||
} else {
|
||||
update_event($event);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue