-
Bug
-
Resolution: Won't Do
-
Trivial
-
None
-
4.1
-
MOODLE_401_STABLE
Background
When a student submits a file to an assignment and later overrides it, the following should happen (as per MDL-45580):
- Teacher grades it, adding annotations
- The student will have a "View annotated PDF" link available, which shows the annotated PDF
- The student edits the submission, adding another file
- The "View annotated PDF" link should still display the old annotated PDF
- Teacher grades again, they should see the new PDF, and be able to annotate it
- The student's "View annotated PDF" link will now show the newly annotated PDF
While working on MDL-75898 I found a situation that breaks this. In normal day to day use it seems extremely unlikely this could happen, but it does cause problems for behat tests (where the exact same sequence of "user inputs" can occur).
Prerequisites
- Ensure the patch from
MDL-75898is applied - A course with an assignment
- A student in the course
- A macro recorder, I used atbswp
Reproduction steps
- Log in as the student and submit the file "Submission 1.pdf" (attached to this ticket)
- As admin, grade the student in the PDF editor:
- Start the macro recorder
- Click the line tool in the PDF editor
- Draw a line on the PDF
- Stop recording
- Press the "Save changes" button
- As the student, edit the submission, deleting "Submission 1.pdf" and adding, "Submission 2.pdf" (attached to this ticket)
- As admin, grade the student in the PDF editor, it should be the new PDF and there should be no annotations
- Play back the macro, this ensures that the new line is in the exact same place as the original one
- As the student, go to the assignment and press the "View annotated PDF"
- The PDF that displays is the original one instead of the newly annotated one
It seems as though the code believes annotations haven't changed or something like that, so it never copies the new PDF over to the readonlypages file area.
- has a non-specific relationship to
-
MDL-75898 Assignment readonly pages can be requested when they do not exist
-
- Closed
-