-
Bug
-
Resolution: Fixed
-
Minor
-
4.1
-
MOODLE_401_STABLE
-
MOODLE_311_STABLE, MOODLE_400_STABLE
-
MDL-75448-master -
After MDL-71468 has been integrated we're having some assignfeedback_editpdf\task\convert_submission adhoc task constantly failing with message Document conversion completed with status 0.
After having a closer look it's been found that when using polling converter (that creates a conversion on start_document_conversion() and requires poll_conversion_status() to be called to retrieve the converted document) Annotate PDF fails to convert images that get rotated before conversion.
It rotates the image, creates a new file (rotated image), then sends new file to converter. When it runs again, intead of polling exising converted file it rotates the image again, creates new file and sends new file to the converter. See https://github.com/moodle/moodle/blob/896e126a667c5cb805c06d5cd6e5f6263f94bd27/mod/assign/feedback/editpdf/classes/document_services.php#L200-L203
With Unoconv it works as expected as the actual conversion is happening in start_document_conversion() and the method returns the converted file (polling is not used).
As I can see exisinting file should be re-used here https://github.com/moodle/moodle/blob/896e126a667c5cb805c06d5cd6e5f6263f94bd27/mod/assign/feedback/editpdf/classes/document_services.php#L916-L924
Otherwise, it creates new mdl_files and mdl_file_conversion records every time assignfeedback_editpdf\task\convert_submission tries to get the combined document.