[API] Update "Enroll a user" API endpoint to support enrolling in concluded/closed courses for users with permission
Currently if a course is concluded, users can no longer be added to the course. We often receive requests for new instructors to be added to a past course to help them prepare for teaching a course that isn't actively running. Our current workaround has been to temporarily extend the course end date, add the user, make sure their enrollment is accepted, and revert the end date back. This is not ideal to need to adjust course dates to make it so a user can be added. I saw a suggestion to use SIS Imports to handle this, but this requires generating a properly formatted import file, and the user performing the process to have root admin access with SIS data import permission. However, we don't want to give this level of access to SIS Imports to all users that we provide permission to enroll users after a course end date. We also don't want them to need root admin access when they should only have permission in select sub-accounts. We are also aware some schools may not want users that have permission to add users to add them after a course end date.
Update the "Enroll a User" API endpoint to allow a user to enroll a user in a concluded/closed course. To help make it clear with the API call that they are allowing enrollment in a concluded/closed course, include a query parameter for something like force enroll if course is concluded that defaults to false. The API endpoint would still require the user to have the permission to enroll users in the course. Ideally a new permission would also be added for adding users after course is concluded. This would allow institutions to use permissions to still provide some users access to add users before/during a course, but not necessarily allow them to add users after a course is concluded.
admin