Bulk Unenroll methods are slow and don't give options needed. SQL query?

Re: Bulk Unenroll methods are slow and don't give options needed. SQL query?

by Marcus Green -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You might find a way to use the Moosh utility that allows programmatic unenrolment

http://moosh-online.com/commands/

course-unenrol

Unerol user(s) from a course id provided. First argument is a course ID then list of users.

Example 1: Unenrol users with id 7, 9, 12 and 16 from course with id 2.

moosh course-unenrol 2 7 9 12 16