@fabiocunha
There is an documented switch that has the undocumented side effect of giving you the quiz responses.
Get the submissions (not quiz submissions) for the corresponding assignment and be sure to add the query parameter: include[]=submission_history.
Let's say that I have a quiz at /courses/896851/quizzes/3986251. If I GET /api/v1/courses/896851/quizzes/3986251, I see that the assignment_id is 13300109.
Then I GET /api/v1/courses/896851/assignments/13300109/submissions?include[]=submission_history.
It returns an array of users, and each user that has taken the quiz has a submission_history.submission_data array. That array contains an object for each question.
Here is an example (just the submission_data portion) from a quiz I gave.
{
"submission_data":[
{
"correct":true,
"points":1,
"question_id":73065717,
"answer_id":5521,
"text":"5521",
"more_comments":""
},
{
"correct":"defined",
"points":0,
"question_id":73065719,
"text":"<p>An ancient Egyptian casket.</p>",
"more_comments":""
}
]
}
The response to the essay question (question 2) was "An ancient Egyptian casket."
To make sense out of the first question, you need to get the information about the question from somewhere else.
I can do that with GET /api/v1/courses/896851/quizzes/3986251/questions
The first question had question_id=73065717 and was "What is the teacher's favorite color?". From the answers object, you can tell what response 5521 is. Do NOT look at the text property here, they didn't type 5521.
For the second question, id=73065719, the question_type was "essay_question" and the text was "Explain sarcasm." The text in this case is what the student typed.
See the appendix of question answer formats at the bottom of the Quiz Submission Questions API documentation for additional information.