🪲 fix quiz/puzzles tabs not showed to students #5276
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Related to #5156
The feature actually works. However, it only works if the teacher has logged in and at least visited the customize-class page. This is because there's a migration step that I added which basically adds the quizzes/puzzles to the list of adventures if they were not hidden before. The problem that this PR solves is related to the scenario in which a student is logged in and interacts with a class while their teacher has not refreshed the customize-class page: Thus the migration was not done yet at this point, hence the students then would not see the quizzes/puzzles.
Why didn't we figure it out earlier not during testing nor reviewing? This is mainly because we tested it while relying on the previewing class feature. This feature, supposidely, would allow a teacher to exactly simulate what students see and how they interact with the related class. But apparently that's not the case, since the preview feature is simply coplying the customization class and "allowing the user to merely see that class".
How to test?
dev_database.json
file, remove the quiz/puzzle manually from at least the first level of thesorted_adventures
of your class (e.g., CLASS1)