-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.8.5, 3.9.2
-
None
-
MOODLE_38_STABLE, MOODLE_39_STABLE
If a very large PDF is uploaded (or created by a document converter), assign edit PDF will convert all the pages, one at a time, before any pages can be displayed. This is happens either when a teacher tries to grade the entry, or cron will attempt it for them.
For us, unoconv made a 40k page PDF out of a jpeg, when then kept the assign PDF cron task busy for a bit over 7 days. But the time it finished, there was a huge backlog of documents waiting to be converted, and resulted in a whole... thing. We saw this with a number of PDFs.
We applied a patch that if the page count is over 1000 pages, it only converts the first page. Conveniently, if the converted page count doesn't equal the PDF page count, the UI already displays a message saying that the PDF could not be displayed due to corruption or some other problem. We just updated that message a bit to include 'over 1000 pages'.
While I'm not saying our particular solution was best (minimal core code change was a criteria), I do think something needs to be done to this part of code, to prevent very larges PDFs from monopolizing resources. Internally we felt that it was impractical to think somebody was going to be using that markup interface for such a document anyways.
- will help resolve
-
MDL-57201 Defer production/loading of editpdf images
-
- Closed
-