Skip to content

Comments

Issue 204 fix quiz submission bug#209

Merged
AarifLamat merged 8 commits intomainfrom
issue-204-Fix_quiz_submission_bug
Jul 30, 2025
Merged

Issue 204 fix quiz submission bug#209
AarifLamat merged 8 commits intomainfrom
issue-204-Fix_quiz_submission_bug

Conversation

@ErikaKK
Copy link
Contributor

@ErikaKK ErikaKK commented Jul 23, 2025

Change Summary

[Briefly summarise the changes that you made. Just high-level stuff]
Fixed some bugs:

  • after a comp is submitted the user should be redirected to /quiz not /quiz/[id]
    • does the restart un-submit the quiz attempt? No
    • does the restart create another quiz attempt when you click start? No
    • how does the restart affect the quiz-attempts page in dashboard/results/[id]/quiz-attempts/? Won't affect anything bc it's not a restart, the server will not allow a second attempt for the same comp
  • student view sidebar didn't show
  • quiz app view.py didn't filter competition properly.
  • the mobile view navbar shows login instead of dashboard.
  • visitors can access competition.
  • when a comp has already finished, you can still start the quiz
  • Once a student submitted a comp, can still start the comp (will get 400 from server)
  • couldn't get matching user id from student model

Change Form

Fill this up (NA if not available). If a certain criteria is not met, can you please give a reason.

  • The pull request title has an issue number
  • The change works by "Smoke testing" or quick testing
  • The change has tests
  • The change has documentation

Other Information

[Is there anything in particular in the review that I should be aware of?]
Still needs to be done:

  • quiz model status field is very hard to understand. Considering replace it with filtering date is_comp and visible field
  • didn't have attempts in the sidebar for students. It seems we haven't implemented this feature
  • when the question is the last one in a practice quiz, this next button should change to submit
  • answer is auto filled for same question in comp. Will it only store one attempt for each question?
  • TODOs in comp components

Related issue

@ErikaKK ErikaKK requested a review from AarifLamat July 23, 2025 12:38
Copy link
Contributor

@AarifLamat AarifLamat left a comment

Choose a reason for hiding this comment

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

good work!

// refresh the page to get the latest data
window.location.reload();
router.push("/");
window.location.href = "/quiz";
Copy link
Contributor

Choose a reason for hiding this comment

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

can you remove the comment here since it's no longer relevant pls

@AarifLamat AarifLamat merged commit f182ff3 into main Jul 30, 2025
11 checks passed
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.

Fix quiz submission bug

2 participants