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!
Hi, folks. I'm looking for an efficient way to tell via API whether or not a teacher in a given course is still eligible to add people to it. My first thought was that the workflow state returned by /v1/courses would do it but it looks like courses where the term end date has passed still show as available (not completed).
Anyone else figured this out?
Thanks in advance,
Victoria
Solved! Go to Solution.
Hey, Brian. Tx again for your generous help at this. We're still puzzling out a solution. We've found that "end_at" is only populated when the date has been entered into the course itself -- NOT when the term has ended. So for our courses "end_" = NULL both for the ongoing term and for prior terms.
So to summarize we're finding that courses have "workflow_state":"available" yet in response to an enrollment action API we get back the message {"message":"Can't add an enrollment to a concluded course."}. I suspect we need to look at our term dates via /v1/accounts/{account_id}/terms
Victoria,
I'm not sure of a why to do this using an API because permissions to add and remove other teachers, ta's and students are all controlled via course level permissions.How do I set permissions for a course-level role in an account?
Hope this helps.
Brian
Hi, Brian. So, we want to determine this via the API because we're developing at LTI tool that lets instructors create users in our instance of Canvas. The tool seems to silently fail if the course is closed/no longer in a state where users can be added via the People tool.
(Why are we developing this tool? Here at the U of Michigan, users authenticate to Canvas with their UMICH password -- but we have a pre-existing system that lets people *without* UMICH email addresses set a password to get access to certain UMICh resources. In some cases, instructors want to let someone w/o a UMICh address into their Canvas course but can't because they have no underlying Canvas account.)
Vicki,
Now I'm following you. You can check a single course status by calling the Get A Single Course API.
You will receive back a JSON response and can look at "workflow_state":"completed". By doing this you will be able to tell the status of the course.
Brian
Totally following you and you've been very generous to answer, Brian!
But I'm finding that I'm getting a course state of "available" for courses where the associated term has ended (and therefore instructors can no longer write content). I want to get "completed" but my testing didn't show that!
If other folks are using just the status field ="completed" to mean course is still available to instructors to write content, I'd be interested in hearing that.(it's always possible my testing was faulty).
Have you looked at the "end_at":null portion in the response you receive back?
Hey, Brian. Tx again for your generous help at this. We're still puzzling out a solution. We've found that "end_at" is only populated when the date has been entered into the course itself -- NOT when the term has ended. So for our courses "end_" = NULL both for the ongoing term and for prior terms.
So to summarize we're finding that courses have "workflow_state":"available" yet in response to an enrollment action API we get back the message {"message":"Can't add an enrollment to a concluded course."}. I suspect we need to look at our term dates via /v1/accounts/{account_id}/terms
Hmm, this issue is marked as "solved" but I don't see any solution here. We are running into a similar issue where we are trying to programmatically add a user to a course that may or may not be concluded. Trying to figure out all the ways in which a course may be concluded via the API seems to involve a bunch of steps (check the course end date, check if the course is using term end dates, check the term end date) and we still don't know if we've found all of them. If this is actually solved, could someone post a solution? Or if it's not solved, could we mark it as open instead? 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