Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
The title of the question may be confuse, but I will try to explain.
Please, check the image below:
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
Solved! Go to Solution.
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.
Can you provide some context to this request? Is it that you are wanting to get specific reporting data - like "how many students chose answer 2 on question 3?"?
If this is the case, you could leverage innate Canvas reporting to query that kind of data. I've not had a use case like this, but I believe portions of the mastery gradebook and outcomes could accomplish this goal.
If you specifically need the API to get this data, I'm unsure if it would work - at least what I am seeing from Instructure's documentation.
It looks like the Quiz Submission Questions API will, at most, show the question ID and the provided answer.
It looks like the Quiz Submission Events API gives a bit more data like timestamping for specific triggered events, but I am still not seeing any kind of answer order.
If you are able to find a call that provides this kind of data, I would be interested in knowing it - but I feel like there might be some dynamic-ness to the answer order, depending on if the randomize answers setting is enabled. Although, that may just be a reordering during the student render, as the answers would still be in a specific order in the backend.
Please let me know if you find out anything else on this!
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.
To participate in the Instructure Community, you need to sign up or log in:
Sign In
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.