The OS is Ubuntu 20.04 LTS and is running PHP 8.0. I have taken our Moodle server, which was running Moodle 4.1.3 and updated it to 4.1.4+ and then when all seemed well, upgraded it to 4.2.1.
After a seeming successful upgrade to Moodle 4.2.1, I started perusing the different Admin console screens and noted in the Ad hoc tasks that the convert_submission component had over 2000 failed tasks with the earliest dating back to June 24, 2023.
Looking at the task logs, it seemed they all had the same error:
Adhoc task failed: assignfeedback_editpdf\task\convert_submission,Error generating image with ghostscript, debugging info: <pre>Command:
'/usr/bin/gs' -q -sDEVICE=png16m -dSAFER -dBATCH -dNOPAUSE -r'100' -dFirstPage='1' -dLastPage='1' -dDOINTERPOLATE -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sOutputFile='/tmp/requestdir/Wkkt/64b6c5c5ea33c/64b6c5d262bbe/image_page0.png' '/tmp/requestdir/Wkkt/64b6c5c5ea33c/64b6c5d262bbe/error.pdf'
I installed the package ghostscript and configured the path to ghostscript in the Moodle System Paths configuration page (/usr/bin/gs) and also the path to the PHP CLI.I then manually re-ran some of the failed tasks and after confirming that they completed successfully, proceeded rerun all the failed tasks. As of now, all the failed tasks now ran successfully and cleared out except for two. Those are failing with the same error and I am unable to find anything in the forums to give me an idea what needs to be fixed. Here is the log from the failed task:
Execute adhoc task: assignfeedback_editpdf\task\convert_submission Adhoc task id: 29422 Adhoc task custom data: {"submissionid":"18913","submissionattempt":"0"} ... started 16:57:57. Current memory use 22.3 MB. Debugging increased temporarily due to faildelay of 86400 Converting submission for user id 1274 ... used 6 dbqueries ... used 0.0047640800476074 seconds Adhoc task failed: assignfeedback_editpdf\task\convert_submission,You don't have permission to access this page. Backtrace: * line 336 of /mod/assign/feedback/editpdf/classes/document_services.php: call to assignfeedback_editpdf\document_services::get_combined_document_for_attempt() * line 84 of /mod/assign/feedback/editpdf/classes/task/convert_submission.php: call to assignfeedback_editpdf\document_services::get_combined_pdf_for_attempt() * line 508 of /lib/classes/cron.php: call to assignfeedback_editpdf\task\convert_submission->execute() * line 348 of /lib/classes/cron.php: call to core\cron::run_inner_adhoc_task() * line 368 of /lib/classes/cron.php: call to core\cron::run_adhoc_task() * line 154 of /admin/cli/adhoc_task.php: call to core\cron::run_failed_adhoc_tasks()
Any insights would be helpful.
Thank you,
Steve