[Bugfix:TAGrading] Limit Image Annotation - #13121
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13121 +/- ##
=========================================
Coverage 21.55% 21.55%
+ Complexity 10160 10159 -1
=========================================
Files 292 292
Lines 39141 39141
Branches 616 616
=========================================
Hits 8435 8435
Misses 30132 30132
Partials 574 574
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
When attempting to review this PR, I found this bug. This page is in submissions_processed, and the image renders. The image annotation bar also renders. However, I am unable to annotate the image. The message you are seeing is what happens when I try to click the edit button. Looking at the code I am not sure why this is happening. It could have something to do with the last if statement in ImageAnnotationEmbedded.twig but I'm not sure.
roye2
left a comment
There was a problem hiding this comment.
Looks good to me. I tested the functionality with: Regular usage of Image annotation (pdf bulk upload & annotation of submissions_processed .jpg) and it worked as intended. Everything else, like submitting an image on a regular gradeble, could be graded as usual and viewed as usual except image annotations were not available to the grader in the TAGrading page, or to the student in when they were viewing their grade.
Why is this Change Important & Necessary?
Closes #13110
What is the New Behavior?
The image annotation feature added in #11921 was intended as a replacement for pdf annotation, so it was made to work only with the submissions_processed folder that is populated during a bulk upload. Students can only see annotations made on files within this folder, but graders can make annotations on any image files in the submissions browser. Also, the peer results page was not updated to be able to present annotations to submitters, so peer graders can make annotations but they are never seen.
This PR disables the image annotation toolbar unless you are a non-peer grader who is viewing an image file in the submissions_processed folder. That way, all annotations made can be properly viewed by the submitter.
This PR also introduces smaller code clean-up changes that I found beneficial while I was experimenting with making annotation available for every image. However, expanding the feature to folders beyond submissions_processed is not trivial, and would require its own PR. See #13122.
What steps should a reviewer take to reproduce or test the bug or new feature?
Also test steps 3 and 4 from a peer grading perspective.
Since image annotation only works with submissions_processed, in order to test peer grading in isolation, you'd use the Bulk Upload Gradeable. However, from my testing it seems that peer grading is not compatible with bulk upload. If you want to test peer grading annotations on your machine, remove the "directory === "submissions_processed"" clauses from the conditionals I added to ImageAnnotationEmbedded.twig.
Automated Testing & Documentation
There are not yet image annotation CI tests, so nothing should have to be updated.