how to remove bunch of users from the course ?

how to remove bunch of users from the course ?

by Miro Iliaš -
Number of replies: 15

Hello,

with Moodle 3.7, is there a way to remove selected users from the course at once ?  I need to get rid of plenty students in the course, any help is appreciated.

Miro

Average of ratings: -
In reply to Miro Iliaš

Re: how to remove bunch of users from the course ?

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Go to your course, click on Participants, check the checkbox for participants that you want to remove, and then at the bottom there is a dropdown to "delete selected users."

But... this doesn't work in my experimental Moodle, which might be a "bug."

Let us know if this works for you.

(Can anyone else verify if this feature works? When I do it in my sandbox Moodle, and pick delete, Moodle says that "no users were selected." Yes I did, I selected some users!
Average of ratings: Useful (1)
In reply to Rick Jerz

Re: how to remove bunch of users from the course ?

by Miro Iliaš -
Dear Rick,
it does not work either on our Moodle 3.7...
In reply to Miro Iliaš

Re: how to remove bunch of users from the course ?

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I created MDL-67329. Go to Tracker and vote for it. Also, add comments, if needed.
In reply to Rick Jerz

Re: how to remove bunch of users from the course ?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi Rick,
This DOES work for me in Moodle 3.7.3+. The trick is to use the delete that corresponds to the correct enrollment method for the user. For instance, on my dev site, all my student accounts use manual enrollment. If I select a bunch of students, go to the bottom of the page and select, Delete selected user enrollments, under Self Enrollment, they DO NOT get deleted, and I get your "no users were selected" message. However, if I select, Delete selected user enrollments, under Manual Enrollments, then they are deleted.
Average of ratings: Useful (3)
In reply to AL Rachels

Re: how to remove bunch of users from the course ?

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Interesting.

No, doesn't work for me in 3.8.  I select one student, and then go through each of my three enrolment methods.  In no case is the student deleted.

When you "delete" a student, I assume that they are only removed from your course, and not from Moodle. (I am reluctant to test this on my production moodle.)

And shouldn't there be a mass "suspend?"
Average of ratings: Useful (2)
In reply to Rick Jerz

Re: how to remove bunch of users from the course ?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

"When you "delete" a student, I assume that they are only removed from your course, and not from Moodle. (I am reluctant to test this on my production moodle.)" - That is correct. They are deleted from the course, but NOT from the site.

Yes, mass "suspend" would be nice to have.

In reply to AL Rachels

Re: how to remove bunch of users from the course ?

by Miro Iliaš -
Hi Al,

it does work, as I found, but there is another problem: if you specify more enrollment method with distinct names, they do not appear in the option list - see below. I have two self enrolment methods, each with own Slovak name, but they are not showing in the option list.

Also minor problem is when users enrol with all possible enrolment methods, you have to pass through all enrolment options for removing (all) users from the course.





Average of ratings: Useful (1)
In reply to Miro Iliaš

Re: how to remove bunch of users from the course ?

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
Have you tried to use the filter option at the left-hand top of the page to filter your enrolment>cohort values and then delete?
In reply to Miro Iliaš

Re: how to remove bunch of users from the course ?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I suspect your other self enrollment methods do not support, or do not have the code, to support mass un-enrollment. That was one of my biggest problems when I took over maintaining a couple of plugins. There were a LOT of things the plugins did NOT do/support, simply because the original programmers never got around to adding the missing parts of the code. For instance, when I took over MooTyper, it had keyboard layouts for only six languages. With so few, there was no need really to have a way of deleting the extras, that you might NEVER use. In the current release from earlier this week, there are 30 different layouts plus 6 more in development. If a site only supports ONE language, there is no need for all the others, but currently there is no easy way to get rid of the extras. This is something that hopefully, I will have fixed in the next release, as I started work on the code two days ago.
In reply to Miro Iliaš

Re: how to remove bunch of users from the course ?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It depends on the enrolment method. Not all plugins support bulk un-enrolment. In fact, I have a suspicion only manual enrolment do.
Average of ratings: Useful (2)
In reply to Howard Miller

Re: how to remove bunch of users from the course ?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Based on the available filters, I think you are right that only, manual enrollment supports bulk un-enrollment.
Average of ratings: Useful (1)
In reply to AL Rachels

Re: how to remove bunch of users from the course ?

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I just updated my comment on Moodle Tracker.  Additional thoughts are appreciated.

"Okay, yes, Moodle is working.  However, I think that the problem is if one creates a self-enrollment method (or maybe other methods) that this method is not seen, or acknowledged when one tries to delete users.  In my case, I tried picking the Delete selected user enrollments from the drop-down "Self-enrollment" item, and this doesn't work. Also, as discussed a little on Moodle.org, there should be an option to "suspend" users.

So I think that we are now understanding Moodle's methods, but there is room for improvement.  I think it would be fine to remove this Tracker item as a "bug."  However, maybe it should be changed to a "feature request."  If you want to close this Tracker item, and want me to repost as a feature request, I can."
Average of ratings: Useful (2)
In reply to Rick Jerz

Re: how to remove bunch of users from the course ?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Suspend a user is there when you go and edit the enrollment of an individual user, but I think it would be nice to have it as a bulk suspend option.
In reply to AL Rachels

Re: how to remove bunch of users from the course ?

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Yes, I do see suspend user, but yes, a bulk option would be nice. Let's see where my Tracker "bug" ends up.