canvasapi icon indicating copy to clipboard operation
canvasapi copied to clipboard

Get current enrollment term

Open ljoks opened this issue 3 years ago • 1 comments

see https://community.canvaslms.com/t5/Developers-Group/Get-the-current-term-id/td-p/438050 for reference

should be able to modify the current endpoint get_enrollment_terms to accept a current flag or something similar

ljoks avatar May 14 '21 18:05 ljoks

For us, we're an account with 8 subaccounts, each with their own active term, so the solution in that community post won't work. As far as I can tell in the docs, you can't even request terms for a subaccount - they all need to be requested through the account context and then filtered out in your logic somehow.

The closest fix would be to use the workflow_state[]=active querystring in the request, but even that is only marginally helpful because many institutions may not deactivate past terms for any number of reasons. Those results will all come back in and would then need to be sorted, etc.

Not saying it's impossible, it's just a bigger problem that it appears at first glance using the REST API endpoints.

I have never touched the GraphQL endpoint, but from playing with the graphiql explorer, it might be possible? It might be a good candidate endpoint for adding GraphQL support to an endpoint.

bennettscience avatar Aug 31 '21 17:08 bennettscience