In a quiz with multiple answers, how to get a student answer based in position of the question?

Jump to solution
fabiocunha
Community Explorer

The title of the question may be confuse, but I will try to explain.

Please, check the image below:

 

image_from_canvas.png

 

 


 
Canvas will save the answer in the database and I know how to recover this answer via API.

In this case, the student answer checked the second radio box. This is what I want to know and I'd like to know if is possible to recover that information via API.

Is it possible to recover that info via API? 
Which radio box the studend has checked - first, second, third or the fourth one

 

Labels (1)
0 Likes
1 Solution
fabiocunha
Community Explorer
Author

I guess I find a solution.

I will use the endpoint below
/api/v1//courses/:course_id/quizzes/:quiz_id/reports?quiz_report[report_type]=student_analysis&quiz_report[includes_all_versions]=1

This endpoint give me all student answers for a quiz. I can extract all text answers from it because it generates a CSV for me.

I will just combine the data from the previous endpoint with this another endpoint:
/api/v1/courses/:course_id/quizzes/:quiz_id/questions

This second endpoint gives me all answers in the order they are registerd in the quiz.

I just need to compare the text answer from the first endpoint and check in the second endpoint which index I could find the same text answer.

I didn't code the solution yet, but I guess that it will works for me.

View solution in original post