The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Does anyone know of an API call that can return the number of remaining attempts a student has for a quiz? Basically I'm looking for how to return the "attempts left" number that is on the "Moderate Quiz" screen using the API.
Solved! Go to Solution.
Hi Matt,
It looks like there is an actual attempts_left indicator when you return the submissions for a quiz and even when you return a specific quiz submission. It doesn't look like its in the API docs but it does get returned when I make a submissions call. See https://canvas.instructure.com/doc/api/quiz_submissions.html#method.quizzes/quiz_submissions_api.ind... for more information.
For students that do not have a submission you could run a simple check to see if their user_id matches any submissions and if they don't you could then get the allowed_attempts from the quiz settings, https://usu.instructure.com/doc/api/quizzes.html#method.quizzes/quizzes_api.show, and just display that till they have a submission then fall back on the attempts_left from the submission.
Hope that point you in the right direction.
Tyler
Hi Matt,
It looks like there is an actual attempts_left indicator when you return the submissions for a quiz and even when you return a specific quiz submission. It doesn't look like its in the API docs but it does get returned when I make a submissions call. See https://canvas.instructure.com/doc/api/quiz_submissions.html#method.quizzes/quiz_submissions_api.ind... for more information.
For students that do not have a submission you could run a simple check to see if their user_id matches any submissions and if they don't you could then get the allowed_attempts from the quiz settings, https://usu.instructure.com/doc/api/quizzes.html#method.quizzes/quizzes_api.show, and just display that till they have a submission then fall back on the attempts_left from the submission.
Hope that point you in the right direction.
Tyler
Not sure how I missed that. Thanks!
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in