Bulk remove users from groups

Bulk remove users from groups

by Karsten Roemke -
Number of replies: 1

Hello,

I'm searching for the topic and found the post https://moodle.org/mod/forum/discuss.php?d=236629

I'm really surprised that this should not work. So I looked at the source code of
admin/tool/uploaduser/index.php
and yes - not implemented but I need it.

So I modified this file slightly and added one language string in lang/en/cohort.php

In my version you add a double - to the idnumber of the group in e.g. cohort1 field is set to
--SchuelerGTA  and the user will be removed if he is a member of the group SchuelerGTA. 

If anybody is interested send me a notice. I do it for 3.1.6 (Build: 20170508).
Obviously, you do it on your on risk, but there should be no sideeffects. If user is removed from the cohort he is removed from all courses where he is enrolled via this cohort.

Greetings

 Karsten

Average of ratings: -
In reply to Karsten Roemke

Re: Bulk remove users from groups

by Jerry S -

Hi Karsten,

I would like to get hands on this solution as our college has the same issues, we need to bulk ungroup students. Please let me know if you are keen to share your code with me.

Regards,

Jerry