-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
3.5.3
-
MOODLE_35_STABLE
Currently when document conversion fails a blank PDF is saved from specific content referenced in the BLANK_PDF_HASH / BLANK_PDF_BASE64 variables:
./mod/assign/feedback/editpdf/classes/document_services.php:56: const BLANK_PDF_HASH = '4c803c92c71f21b423d13de570c8a09e0a31c718';
|
./mod/assign/feedback/editpdf/classes/document_services.php:59: const BLANK_PDF_BASE64 = <<<EOD
|
This specific hash value is used later to compare and determine whether document conversion needs to be re-attempted:
/MOODLE_31_STABLE# sed -n '257,260p' mod/assign/feedback/editpdf/classes/document_services.php
|
if ($submission && ($combinedpdf->get_timemodified() < $submission->timemodified ||
|
$combinedpdf->get_contenthash() == self::BLANK_PDF_HASH)) {
|
return self::generate_combined_pdf_for_attempt($assignment, $userid, $attemptnumber);
|
}
|
Because the blank PDF doesn't give the user any information about the conversion failure, we have some use cases where the organization would like a different "default" PDF document to be saved when conversion fails instead of Moodle's blank one that is hard-coded (i.e. "This document failed to convert" or some other notification message.) This feature request is to implement a new admin setting of 'defaulterrorpdf' that would accept a file upload and save it's content/hash values in BLANK_PDF_% variables for use in the same way that the blank PDF is used now.