Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪲 fix quiz/puzzles tabs not showed to students #5276

Merged
merged 6 commits into from
Mar 19, 2024
Merged

Conversation

hasan-sh
Copy link
Collaborator

@hasan-sh hasan-sh commented Mar 18, 2024

Problem
Related to #5156

image

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?

  • in your dev_database.json file, remove the quiz/puzzle manually from at least the first level of the sorted_adventures of your class (e.g., CLASS1)
  • then log in as a student and the quiz/puzzle should be readded and shown to you, iff. the quiz/puzzle was not disabled

Copy link
Member

@jpelay jpelay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Hasan! Great work figuring this bug out, I didn't foresee this case when testing. I tested and it indeed works fine, I just have a comment about some duplicated function, but otherwise this is good to go!

app.py Outdated Show resolved Hide resolved
Copy link
Member

@jpelay jpelay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Great work, Hasan. And good detective skills figuring out the bug, that can be the most frustrating part of programming.

Copy link
Contributor

mergify bot commented Mar 19, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit ad52b2b into main Mar 19, 2024
12 checks passed
@mergify mergify bot deleted the fix-quiz-parsons-tabs branch March 19, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants