Error when exporting question with broken templates provided no Customisation

Error when exporting question with broken templates provided no Customisation

por Anupama Sarjoshi -
Número de respuestas: 2

Hi,

When trying to export the CodeRunner question with broken template (missing prototypes) and when no customisation is provided, we see the PHP errors thrown.

The below question when exported, we see the errors. Could you please have a look. Kindly let me know if any other details are required.

Thanks.

Moodle_version: 3.11

CodeRunner version: Latest from MOODLE_3X_STABLE

Not sure if the version matters.




Errors seen:

Warning: foreach() argument must be of type array|object, null given in /var/www/html/moodle/question/type/coderunner/questiontype.php on line 855

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/moodle/question/type/coderunner/questiontype.php:855) in /var/www/html/moodle/lib/filelib.php on line 2542


En respuesta a Anupama Sarjoshi

Re: Error when exporting question with broken templates provided no Customisation

por Richard Lobb -
Thanks for reporting, and with all necessary details too :-). This looks like being a simple fix but I will have to reproduce and test so for now it goes on the TODO list. Hopefully will be fixed on the next push.