Change Module Item Progressions via API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am unable to locate the REST API that allows the progression ordering of the module item sequence to be adjusted when module[require_sequential_progress] is true. So far, I have been only able to find get module item sequence in the API.
Is this possible or did I missing where it is listed in the REST API documentation? thank you!
Note: This message was edited to clarify the question. 🙂
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The order of the progression is determined by the order of the items within the module itself. If you want to change the order of the progression, you need to change the order of the items.
This can be set individually for each module item using the Update a module item endpoint. In particular, you need the module_item[position] parameter, where the first item is position 1. It inserts the module into that position, shifting all module items after it down one position, but leaving the ones before it in the proper order.
This would need repeated for each module item that needs its position changed.
This is not what Canvas does when you drag and drop a module item within the UI. It makes a post to a non-API /courses/:course_id/modules/:module_id/reorder routine. It takes a parameter called order that is a comma delimited string with the module_item_id for every module item in the module. That is, it allows you to set the module item order all at once. Sometimes non-API calls have an API counterpart that isn't documented, but this isn't one of those cases. Trying to turn it into an API call returns a 422 Unprocessable Entry status code.