Export users answer codes not the answer text in json format

Export users answer codes not the answer text in json format

by Maria C. -
Number of replies: 1
Hello everyone,


Is there any way to export users' answer codes from the attempt in json format for those quizes that are only use the multichoice format (radio buttons).

Lets say that we have a quiz with 30 questions. All of them have five answers, just one of them is correct. Random question order. Sometimes random answer order.

https://../mod/quiz/report.php?id=20&mode=responses

Here we got the text of the answer, but it would be nice for subsequent SPSS analysis to have them translate into the codes like

1, 2, 3, 4, 5 etc.

Probably not due a lack of the answer code option in question bank, but I need to ask anyway smile

Moodle 3.6.1+

Thank you!

Average of ratings: -
In reply to Maria C.

Re: Export users answer codes not the answer text in json format

by Maria C. -

Maybe I can use the Feedback field for this (because, we are not using it anyway), but I am not sure where and how make changes in the code in order to obtain these data.