I need to export student quiz responses (e.g. to csv or json) using the download feature available in "Quiz settings:Responses".
If a student's answer includes text containing new-line characters (ASCII 13), then these get converted into 6 space characters. Thus it is not possible to reconstruct the student's correctly laid out multiple-line text answer. If the student's response was a python-code answer, where white space formatting and indentation is vital to parsing the python code, then this is now impossible to do correctly. I believe this problem did not happen with Moodle version 3.
For example if the student's answer is
"def f(arg):
print(arg)"
when I download it to csv or json, it gets converted into
"def f(arg): print(arg)"
I have seen this bug affect CodeRunner question types, but apparently it also affects other question types (e.g. essay) too. The problem affects the "download" facility of the responses page, but also seems to affect the display of the responses too (on the responses page).
- has been marked as being related by
-
MDL-78343 Report download (e.g. quiz responses) truncates response text after less-than sign
-
- Open
-
- is a regression caused by
-
MDL-72058 Remove HTML tags when exporting to Dataformats that don't support it
-
- Closed
-
- is duplicated by
-
MDL-81099 Quiz responses exported > missing text when using less than / HTML delimiter ("<xxx")
-
- Closed
-