-
Bug
-
Resolution: Fixed
-
Critical
-
3.4.6, 3.5.5, 3.5.6, 3.9.3, 3.10, 3.11, 4.1.6, 4.2.3, 4.3
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_39_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
-
m41-mdl64431
-
m43-mdl64431
-
mdl64431
-
-
5
When grading an assignment submitted as a PDF, some layers of the PDF may be missing.
SETUP (Create a course where you are both instructor and student):
- Navigate to a course.
- Navigate to the Participants list.
- Enrol yourself as both a teacher or admin (so that you can edit the course) and as a student (so that you can submit assignments). Save.
- Go back to the course page and turn editing on.
- Add an activity or resource: Assignment
- Set the following, then Save & Display:
- General/Assignment name: (arbitrary)
- Submission types/Submission types: File submissions
- Submission settings/Attempts reopened: Manually
- Submission settings/Maximum attempts: Unlimited
STEPS TO REPRODUCE (submit attached file, and grade it):
- In the file-submission assignment you created...
- Click "Add submission"
- Drag and drop the attached file "sample.pdf"
- Click "Save Changes" to return to the assignment main page.
- Click "View all submissions"
- You should see your own submission, with status "Submitted for grading", or "Draft (not submitted)". Click "Grade" beside your submission.
- In the default layout, wait until you see an image of the pdf submitted where you can add annotations.
EXPECTED:
This view should match the submitted pdf, as seen when you download the pdf by clicking the 'sample.pdf' filename link in the grade panel on the right.
ACTUAL RESULT:
The grading view does not show the parts of the pdf. Namely, the coloured annotations are missing. When downloaded and viewed in the browser or a system viewer, all layers of the pdf are visible (indicating that the pdf is stored correctly by Moodle).
The most alarming part of this is that there is no error message, and the file may appear to be complete, even though significant content is missing.
INVESTIGATION
The annotations in the attached file were added using "PDF Expert", though other tools have been reported by our users to give similar results. I have seen the error with both pdf version 1.4 and version 1.7 documents. This is possibly related to https://tracker.moodle.org/browse/MDL-44426, however the issue here is not with Ghostscript. (I have seen the error on systems running Ghostscript version 9.06 and 9.10, and am currently testing with 9.18.) When viewed with Ghostscript from the command line, the pdf is displayed correctly. Furthermore, when "flattened" using Ghostscript
$ gs -sDEVICE=pdfwrite -o flattened.pdf sample.pdf
|
, the file can be resubmitted to the assignment, and then all parts appear.
The issue may be with the FDPI library. When I upload the attached file to https://www.setasign.com/products/fpdi-pdf-parser/details/, the parser displays only the black layer, not the annotations. Per the FPDI Manual at https://manuals.setasign.com/fpdi-manual/v2/limitations/, "Dynamic content like link annotations, form fields or any other page annotations cannot be attached to a form XObject because they are related to the coordinates of the origin page. So FPDI is not able to import this kind of content."
Since we are already using Ghostscript, would it be possible to flatten the file before it is processed with FPDI?
- duplicates
-
MDL-67270 FPDI Removes Editable PDF Text
- Closed
- has a non-specific relationship to
-
MDL-44426 Edit PDF: Missing content on an annotated PDF
- Closed
-
MDL-76243 Improve assignment annotation using pdf.js
- Open
-
MDL-45264 Assignment: Annotate PDF - Download all annotated PDFs (as Zip)
- Waiting for peer review
-
MDL-70038 Implement Poppler pdftoppm compatibility for faster assignment submission PDF to PNG conversion
- Closed
- has been marked as being related by
-
MDL-74094 PDFs filled in in browser do not render filled in content in annotate PDF
- Open
-
MDL-71431 PDF conversion hangs for PDFs with lots of vector graphics
- Reopened
- is duplicated by
-
MDL-61854 Comments made inside a PDF do not show up inline in the converter for grading. They only display if downloaded.
- Closed
-
MDL-66289 Notes and Comments in PDF are not displayed in the Grading Editor
- Closed
-
MDL-67892 Annotate PDFs doesn't show some signatures
- Closed
-
MDL-68811 Assignment : blank or wrong display in PDF annotator for documents annotated outside Moodle
- Closed
-
MDL-70685 Some images are missing from PDF grading view
- Closed
- will help resolve
-
MDL-66289 Notes and Comments in PDF are not displayed in the Grading Editor
- Closed