Register for InstructureCon25 • Passes include access to all sessions, the expo hall, entertainment and networking events, meals, and extraterrestrial encounters.
Found this content helpful? Log in or sign up to leave a like!
Hi Canvas team,
I’ve run into an issue when trying to apply assignment overrides via the API for Practice Quizzes and Ungraded Surveys.
In the Canvas UI, it’s possible to set different due dates and availability windows for these quiz types, just like any other assignment. However, when using the API (e.g., POST /api/v1/assignments/:assignment_id/overrides
), there doesn’t appear to be an assignment_id
associated with Practice Quizzes or Ungraded Surveys — or at least it’s not accessible in the same way as with Graded Quizzes or Assignments.
Since the assignment override endpoint requires an assignment_id
, this creates a gap between what’s possible in the UI and what’s possible via the API.
Can you clarify:
Do Practice Quizzes and Ungraded Surveys have assignment_id
s behind the scenes?
If so, is there a supported way to retrieve or apply overrides to them via the API?
If not, is there any plan to add support for this in the future?
This limitation is making it difficult to manage quiz availability programmatically for all quiz types.
Thanks in advance for your help!
Canvas uses the Learning Object Dates API for this.
In particular, Update a learning object's date information.
For quizzes, you would want PUT /api/v1/courses/:course_id/quizzes/:quiz_id/date_details.
What I did was open Chrome's Developer Tools network tab and make a request for an override. The page reloads when you submit, so I had to check the box to preserve log. That got me the path that was made and I saw it was an API call. I then went and looked up the API call. That gave me the path and an example of what the request looks like. No assignment ID was used since it uses the Quiz ID.
@James
Thanks for the guidance on using the /quizzes/:quiz_id/date_details
endpoint instead of the assignments one.
However, I’m still getting a not_found
error when trying to update quiz dates, even though I’m using the correct course ID and quiz ID.
I’ve confirmed that:
The course ID and quiz ID are valid.
The API token has the right permissions.
The request format matches the API docs.
Error Response :
Are you sure that you're using a PUT and not something else?
The other thing I would recommend is opening up the browser's developer tools, going to the network tab, selecting Fetch/XHR, select preserving the log and then make the request from within Canvas to see exactly what it's sending. It will show up as date_details, but it will be obvious as it will be the first thing to appear once you hit Save.
Note that I'm using the Assign To button when I do this. If I edit the quiz and assign overrides that way, it makes a non-API call to the quiz.
To interact with Panda Bot in the Instructure Community, you need to sign up or log in:
Sign In