mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-45321 quiz upgrade: make it more tolerant to old bad data.
This commit is contained in:
parent
83ddacfff7
commit
9b38aca0ce
1 changed files with 8 additions and 0 deletions
|
@ -588,6 +588,14 @@ function xmldb_quiz_upgrade($oldversion) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if ($questionid === '') {
|
||||
// This can happen as the result of old restore bugs.
|
||||
// There can be a missing number in the list of ids.
|
||||
// All we can do about this is ignore it, which is what
|
||||
// the quiz system used to do. See MDL-45321.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (array_key_exists($questionid, $questionidtoslotrowid)) {
|
||||
// Normal case. quiz_slots entry is present.
|
||||
// Just need to add slot and page.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue