Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
I've been trying to use the submissions API to retrieve all submissions of a quiz. e.g.,
GET /api/v1/courses/7102/quizzes/1943/submissions
The result seem to contain only the latest attempt by each student.
In the example above, there are two attempts but only the attempt 2 is in the response.
But if I download the submissions as a CSV file (using the 'Student Analysis' feature), the file contains all the attempts.
The API description says past attempts should be returned as well. Not sure what I'm doing wrong here 🤔
The documentation may be a little confusing. It allows you to obtain all attempts, that is, you can use this endpoint to get all attempts, but it only returns one at a time.
To fetch anything other than the most recent attempt, you need to add an attempt parameter to the query string.
When I use this endpoint, I make the call and then, if the attempt property you highlighted is greater than 1, I repeat the call for each attempt less than that number.
GET ,,,/submissions returns the last attempt
GET .../submissions?attempt=3 returns attempt 3
To participate in the Instructure Community, you need to sign up or log in:
Sign In