Removing users from a cohort

Removing users from a cohort

by Mario Abbondati -
Number of replies: 1

I enrolled students in many courses using a cohort. Now I want to unenroll these students deleting them from the cohort.

How can I do it? They don't appear in the ‘Current users’ field bechause there are more then 100 students. 

Average of ratings: -
In reply to Mario Abbondati

Re: Removing users from a cohort

by Pieter van der Hijden -

The straightforward method would be: search the users in the left container one-by-one and move them to the right container. However, that is a time consuming job.

My suggestion would be:

  1. Create a new and temporary cohort.
  2. Go to Site admin / Users / Accounts / Bulk user actions.
  3. Try to formulate criteria to select the users who should STAY in your original cohort.
  4. Go to the bottom of the page and add the selected users to the new temporary cohort.
  5. Add an enrolment method for this cohort to all the courses where your original cohort was used
  6. AFTER completion of the previous task,you may delete entirely the original cohort
  7. next, you rename the temporary cohort and give it the name of the original cohort

Why these steps? I assume that selecting the staying users takes less time, than removing the "wrong" ones manually. Further, unenrolling and handling user data are complex issues. I want to avoid mistakes by misinterpreting the documentation. So, I add the new cohort first, and remove the old cohort later.

By the way, this suggestion seems to fail if your cohort has been enrolled in many courses. Then, adding the cohort enrol method many times becomes the bottleneck.

The good news is that Moodle 2.6 has an interesting "upload courses" feature, comparable to the well-known update users feature. The "upload course" feature also works with existing courses. It can be used for uploading enrollment methods as well. Unfortunately, uploading the cohort enrolment method is either not well documented or buggy or both. Please, vote for mdl bug tracker https://tracker.moodle.org/browse/MDL-43127 to have this solved asap en make this power tool available for us all.