Repository navigation
Conversation
Collaborator
Coverage Report for CI Build 40718840001Coverage decreased (-0.09%) to 90.975%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
7 of 9 tasks
david-yz-liu
left a comment
Collaborator
There was a problem hiding this comment.
I did leave an inline comment, but after a bit more investigation I don't think this change (mainly to pdf_viewer.jsx) is targeted at the right level, as it won't resolve the issue for other types of files. The same issue replicates across all file types.
I suspect the root issue is in SubmissionFilePanel. Because of its componentDidUpdate method, there's a delay between the result_id prop changing and the selectedFile state changing. I suspect that it's this delay that results in two separate prop updates to FileViewer (and thus resulting in two separate fetch requests, the first returning the 404).
Naragod
force-pushed
the
TICKET-672_file_404_on_exam_switch
branch
from
October 28, 2026 15:43
c54f886 to
0acf0fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed Changes
This fixes a 404 in the grading view. It shows up each time a grader opens the next or previous submission. David asked to split #8228 in two. This PR holds the 404 fix.
Each submission has its own files. On master, the file panel keeps the old file for a moment after a switch. It asks the new submission for that old file. The new submission lacks that file, so the server sends back a 404. The code lives in
submission_file_panel.jsx.submission_file_panel.jsxnotes which submission its file came from.loadingturns false.fetchDatainresult.jsxdrops a reply for a submission the grader has left.During a switch, the file URL is now
nullfor a moment.pdf_viewer.jsxhandles that step:getDocumentload wins.submissions.cannot_display.submissions.oversize_submission_file.Verification
We checked each fix in Chromium on a local scanned exam.
Screenshots of your changes (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments