When a teacher annotates a PDF assignment submission but clicks Cancel instead of saving changes, the annotated PDF is not deleted. The student can't see the annotated PDF but when the teacher reloads it, the annotations are still there. It seems reasonable to expect that clicking Cancel would delete the unsaved changes. Additionally, even though the changes were canceled, the count of submissions that need grading is decreased as if the submission was graded when in fact the grading was canceled.
Steps to reproduce:
- Create an assignment that allows file submissions.
- As a student, upload a PDF submission.
- As a teacher, access the assignment module grader.
- Note that the assignment page states "Submitted: 1. Needs Grading: 1."
- Open the submission and launch the PDF editor.
- Annotate the PDF.
- Close the PDF editor.
- Click Cancel on the submission grading page.
- Note that the assignment page states "Submitted: 1. Needs Grading: 0" even though you canceled the grading.
- Open the submission and launch the PDF editor again.
- Note that the previous annotations are still there.
Expected: Clicking Cancel would delete the previous annotations and the submission would still be considered to need grading.
Actual: The previous annotations are not deleted and the submission is no longer considered to need grading.