mirror of
https://github.com/moodle/moodle.git
synced 2025-03-23 09:00:30 +01:00
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.