Tim Hunt c248dee33c MDL-77625 question restore: fix restore of existing questions
Continuing from the last commit, the code to restore question
bank entries, versions and questions, was not taking note of
whether the first stage had indentified questions that did not
need to be restored. This is tricky, but the mapping can only be
worked out for questions, but in the backup file, the questions are
inside the question_bank_entries, and versions, so we encounter
those first.

Now, the code just saves the QBE and QV when it encounters them,
and then does all the processing when it gets to the question,
correctly taking note of whether each question should be restored or not.
In cases where a particular question does not need to be restored,
we still set up the corresponding mappings.
2024-09-17 16:16:26 +01:00
..