-
Notifications
You must be signed in to change notification settings - Fork 358
Quiz exercises: Prevent misleading post-quiz UI states after working time expiration
#12038
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
base: develop
Are you sure you want to change the base?
Conversation
|
@jerrycai0006 Test coverage has been automatically updated in the PR description. |
WalkthroughUpdates adjust quiz participation UI timing and overlay logic, add detection of any provided answers, and introduce a UI-level submitted state getter that alters button/display behavior and success alert logic when time expires or submission exists. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@jerrycai0006 Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details. |
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
|
@jerrycai0006 Test coverage has been automatically updated in the PR description. |
|
@jerrycai0006 Test coverage has been automatically updated in the PR description. |
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
hanna20022005
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to split up this PR testing with the rest of the testing session participants, my part worked fine ^^
Case D - test user 1 on ts 3
https://github.com/user-attachments/assets/e20c909a-661c-4032-81c5-b6d8f2e98ed8
oTaczkowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the steps on TS3, the behaviour matches the expectations.
lana-ati
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested during working session on TS3. Worked as expected.
kristi-balla
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on t3 with @oTaczkowski @lana-ati and @hanna20022005. This PR took incredibly long to test, the steps were too many and covered too many different edge cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kevinfischer4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on TS3, all cases have the expected behaviour. Code LGTM 👍🏼




Summary
This PR improves the quiz UI after working time expiration to avoid misleading states when results are not yet available, while keeping the overall UI behavior consistent with the previous implementation.
Checklist
General
Client
Motivation and Context
After the working time of a quiz expires, participations without a manual submit keep
submission.submitted = falseuntil the due date, where the server finalizes the submission during result calculation.Since the quiz UI heavily relies on this flag, affected students can see misleading post-quiz states such as
“The quiz has ended. Please wait. If the results do not load automatically within 60s, please refresh the page.”
, even though results are intentionally not available until the due date.
By contrast, students who submit manually immediately see a clear indication of when results will become available.
This discrepancy is confusing from a student’s perspective, as in both cases answers may already be saved, but the UI presents different states depending on the submit path.
Related issue: #12001
Description
This PR applies a UI-only fix to improve the post-quiz state handling without changing server semantics.
The client no longer treats
submission.submittedas the sole indicator for post-quiz UI states. Instead, it distinguishes between untouched participations, answered but not manually submitted quizzes, and finalized submissions.In particular, the UI:
The overall UI behavior is kept as close as possible to the previous implementation, while preventing misleading or dead post-quiz states.
Steps for Testing
Prerequisites
Setup
Test Scenarios
A. Manual submit
Expected result:
“Results available: ”.
B. Timeout auto-submit with answers
Expected result:
“Results available: ”.
C. Close tab after answering (no manual submit)
C1. Short duration (10–20s, autosave may not complete)
Expected result:
“The quiz has ended and you did not participate. There are no results to display.”
“Time left: Quiz has ended!”.
C2. Longer duration (40s, autosave completed)
“Saved never” to “Saved just now”.
Expected result:
“Results available: ” (e.g. Jan 30, 2026 21:55).
D. No interaction
Expected result:
“The quiz has ended and you did not participate. There are no results to display.”
“Time left: Quiz has ended!”.
E. Synchronized quiz mode
E1. Manual submit
Expected result:
E2. Timeout auto-submit with answers
Expected result:
E3. Close tab after answering (no manual submit)
E3.1 Short duration (10–20s, autosave may not complete)
Expected result:
E3.2 Longer duration (40s, autosave completed)
“Saved never” to “Saved just now”.
Expected result:
E4. No interaction
Expected result:
Testserver States
You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.
Review Progress
Code Review
Manual Tests
Test Coverage
Client
Last updated: 2026-01-27 01:59:21 UTC
Screenshots
Screenshot for A, B, C2

Screenshot for C1, D, E3.1, E4

Screenshot for E1

Summary by CodeRabbit
New Features
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.