API call to answer a quiz question not working
- Mark as New
- Subscribe to RSS Feed
- Report Inappropriate Content
Just about every API call that I need to make a quizzing app is working, except for the one to answer questions. I'm using the following API call: Canvas LMS REST API Documentation
My first question is: which ID should I use for the submission and for the quiz questions that I am submitting? In the QuizSubmission object, there is both an id and a submission_id. In the QuizQuestion object, there is both an id and assessment_question_id. The API documentation does not explicitly specify which of these myriad IDs to use. Which ID should I use for submissions and which ID should I use for quiz questions?
Beyond that, I have tried every permutation of quiz/submission ID possible and am still getting an error back from the API. I get an error_report_id in the response, but I see no documentation anywhere about how to access an error report. I was able to find a related thread on the google forums (Google Groups ), but the route for /error_reports/id that was specified there results in an error saying that I don't have permissions to access the page. Even the highest-level admin for our Canvas instance runs into the same permissions error. Does anyone know of a way to see the error reports?
Depending on which permutation of quiz/submission ID that I send to the API, the error that I get is either "The specified resource does not exist" or "internal_server_error." Neither of which is very helpful for solving my problem. Considering that this is the only API call that I've had to make so far with a nested array (for the question IDs and answers), that might be the issue (or a red herring...). I'm using PHP and cURL for my API calls, and using http_build_query() for my post parameters, which theoretically should be able to handle the nested arrays without a problem. I'm pretty stumped on what the issue might be.
Thoughts? Thank you!