I stumbled across this post as I'm looking to bulk-unenrol all users from some old courses which have been replaced. Thank you for sharing it - but it really seems bizarre that this is the only way to bulk unenrol users. It also means that you're either unenrolling everyone who has used a particular enrolment method, or doing it one by one. There must be a much better way to do this, surely?
Roles and permissions
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.