[Bugfix:Submission] Fix Download Button#12919
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12919 +/- ##
=========================================
Coverage 21.45% 21.45%
Complexity 9896 9896
=========================================
Files 268 268
Lines 36967 36967
Branches 495 495
=========================================
Hits 7933 7933
Misses 28543 28543
Partials 491 491
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
NicholasCiuica
left a comment
There was a problem hiding this comment.
I've tested this PR and have reviewed the code and it looks good to me, I approve it. I just added one comment for potentially improving the comments in the changed file.
To test it, I went on main, made a quiz with one multiple-choice question and made a submission, and saw that the "Submitted Files" section was there. When I added a second question and submitted again, I saw the "Download all files" button. Then I switched to the PR branch and saw that the "Submitted Files" section was not there at all for the quiz submission. While on the branch I double-checked and saw that this PR does not affect the behavior of regular file-submission gradeable.
Why is this Change Important & Necessary?
Fixes #10528 Notebook gradeables that only contain text-based responses (such as multiple choice and short answer questions) were displaying a "Download all files" button despite having no user-uploaded files available for download. This also resulted in an empty Submitted Files section being displayed on the submission page.
What is the New Behavior?
If a student submits a quiz/assignment that required no file to be uploaded, they no longer see the option to 'Download all files' or see a 'Submitted Files' bar.
Notebook gradeables with uploaded files and standard homework gradeables continue to behave as before.
Prior to fix:

After fix:
What steps should a reviewer take to reproduce or test the bug or new feature?
On the main branch submit a quiz/notebook assignment with more than one non-file assignment. You will notice that there will be a Download all files, which simply provides an empty zip file.
On the PR branch if you submit a quiz/notebook assignment with more than one non-file assignment. There is no longer the option to Download all files.
Automated Testing & Documentation
N/A
Other information
N/A