Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-68806 backup: Fix faulty question attempt step restore test
Previously, the test was passing by fluke because all question attempt steps had the same timecreated date. However, the $originaliterator only contained the first step of the question, not all 3 attempts that were being backed up and restored. This means we were comparing the timecreated of the first backed-up step with the timecreated on the third restored step. As of MDL-68806, the first step's timecreated is question_attempt_step::TIMECREATED_ON_FIRST_RENDER, which shows up this error. This change gets the question_usage_by_activity object back from the attempt object which contains all the attempt steps, rather than using the one created in the test, which doesn't.
- Loading branch information