[Bugfix:Submission] File conflict check ignores extensions#12607
Conversation
|
Hi @JManion32, I've added the unit test directly in this PR (testSecondVersionPreviousOverlapNoExtension in SubmissionControllerTester.php) and updated the PR description. Please let me know if any further changes are needed. Thank you! |
|
Hi @JManion32, just checking in — I've added the unit test as you requested. Could you or a maintainer approve the workflow run so CI can verify the changes? Let me know if anything else is needed. Thanks! |
hyeenaa
left a comment
There was a problem hiding this comment.
As the original issue outlines, it does not account for files without an extension, and has strange behavior as described in 10047, ie. completely removing the old version without an extension.
Tested with PDFs and was able to verify that it does NOT ignore the old file without an extension. The new files can be merged, replaced, or regraded as functionality in the PR describes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12607 +/- ##
============================================
+ Coverage 21.29% 21.30% +0.01%
- Complexity 10071 10094 +23
============================================
Files 278 278
Lines 37697 37780 +83
Branches 516 516
============================================
+ Hits 8028 8050 +22
- Misses 29166 29227 +61
Partials 503 503
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Hi, just checking in — I've addressed the review feedback, and this PR is still active on my end. Happy to make any additional changes if needed. Let me know! |
I will let my team know to get you a last reviewer. |
Why is this Change Important & Necessary?
Fixes #10047
When bulk uploading files for students who have a previous submission,
the file conflict check used exact filename matching. This meant a
previously submitted file named
answers(no extension) was notrecognized as conflicting with a newly uploaded
answers.pdf, so nomerge option was offered for that student.
What is the New Behavior?
Files from previous submissions are now matched against new files by
base name (without extension), so
answersandanswers.pdfarecorrectly treated as the same file and the merge/rename/overwrite
options are offered as expected.
What steps should a reviewer take to reproduce or test the bug or new feature?
answers)answers.pdf)the conflict and offers merge options
Automated Testing & Documentation
Added unit test testSecondVersionPreviousOverlapNoExtension in SubmissionControllerTester.php to verify that previous files without extensions are correctly detected as conflicting with new files that have extensions.
Other information
Not a breaking change. No migrations needed. No security concerns.