Skip to content

[Bugfix:TAGrading] Limit Image Annotation - #13121

Merged
bmcutler merged 11 commits into
mainfrom
image_annotation_limit_use_fix
Aug 4, 2026
Merged

[Bugfix:TAGrading] Limit Image Annotation#13121
bmcutler merged 11 commits into
mainfrom
image_annotation_limit_use_fix

Conversation

@NicholasCiuica

@NicholasCiuica NicholasCiuica commented Jul 31, 2026

Copy link
Copy Markdown
Member

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?

  1. As instructor, use the Bulk Upload gradeable in sample and assign a pdf to a student. Using the annotation toolbar, make an annotation on an image file generated within that student's submissions_processed folder.
image
  1. Sign in as that student and confirm that the student can see the annotations. Ensure that View Popup and Download work without issues.
image
  1. As the student, on any gradeable accepting file submissions, submit an image file (png, jpg, etc., just not a pdf).
  2. As instructor, go to the student's image submission and open their image. On main, you would still see the annotation toolbar, but on this PR it should be gone.
image

Also test steps 3 and 4 from a peer grading perspective.

  • add a peer grading component to a gradeable
  • add students to the peer grading matrix
  • sign in as one student to grade another's submission
  • you shouldn't be able to leave any image annotations, even on submissions_processed, because you're a peer grader

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.

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Jul 31, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Jul 31, 2026
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 21.55%. Comparing base (5eb65d1) to head (deee764).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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           
Flag Coverage Δ
autograder 21.16% <ø> (ø)
js 1.78% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.07% <0.00%> (ø)
python_submitty_utils 79.83% <ø> (ø)
submitty_daemon_jobs 55.91% <ø> (ø)
vue 96.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@NicholasCiuica
NicholasCiuica marked this pull request as ready for review July 31, 2026 15:52
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Jul 31, 2026
@roye2
roye2 self-requested a review July 31, 2026 18:28
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Jul 31, 2026

@roye2 roye2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

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.

@github-project-automation github-project-automation Bot moved this from In Review to Work in Progress in Submitty Development Jul 31, 2026

@roye2 roye2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Aug 4, 2026
@bmcutler
bmcutler merged commit 7e78a24 into main Aug 4, 2026
41 of 54 checks passed
@bmcutler
bmcutler deleted the image_annotation_limit_use_fix branch August 4, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Image Annotation not displaying to Student

3 participants