General developer forum

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

 
Picture of Marcus Green
Re: Bulk Unenroll methods are slow and don't give options needed. SQL query?
Core developersParticularly helpful MoodlersPlugin developersTesters
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

 
Average of ratings: -