Skip to content

Redesign/improvement/submit inline questions in sequence #1467

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

Conversation

barna-isaac
Copy link
Contributor

see #1466

This avoids a race condition where the API could not save multiple
answers that were submitted at the same time for anonymous users. This
is because, for anonymous users, when saving an answer, the API creates
a lock using the user's ID, see:

https://github.com/isaacphysics/isaac-api/blob/
    51296605cef5b532f6f6b90d9a9575001172d4a6/src/main/java/uk/ac/cam/cl/
    dtg/isaac/quiz/PgQuestionAttempts.java#L92.
Previously, the synchronous operations after firing the requests would
finish before the requests were actually sent. This meant it was okay to
enable error reporting after triggering the request. Now that we wait
for the requests to finish, it's important to enable error reporting
before firing the requests.

It doesn't really matter whether we reset the feedback field before or
after the requests were sent, as the box only appears after the last
request finishes, but it's still safer to do before sending the requests.
Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 40.65%. Comparing base (f9c08fa) to head (e184ebf).
Report is 8 commits behind head on redesign-2024.

Files with missing lines Patch % Lines
src/app/components/content/IsaacInlineRegion.tsx 25.00% 3 Missing ⚠️
src/app/services/questions.ts 25.00% 3 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           redesign-2024    #1467      +/-   ##
=================================================
- Coverage          40.65%   40.65%   -0.01%     
=================================================
  Files                494      494              
  Lines              22032    22034       +2     
  Branches            7302     7302              
=================================================
  Hits                8957     8957              
- Misses             12450    13040     +590     
+ Partials             625       37     -588     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@barna-isaac barna-isaac merged commit d4c462c into redesign-2024 May 21, 2025
8 checks passed
@barna-isaac barna-isaac deleted the redesign/improvement/submit-inline-questions-in-sequence branch May 21, 2025 13:22
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