Unenroll users who were registered with the database plugin

Unenroll users who were registered with the database plugin

by erika alarcon -
Number of replies: 3
Picture of Testers

Hi!  I'm using Moodle 2.2, and our student enrollment is through the database plugin.

At the end of the semester we need to reset the courses also remove users who registered with this method.

I was reading the forums and I noticed that the unenrollment is through the Plugin settings, but the problem is that if a student does not return to Moodle, the unenrollment will not be activated.

Is there any way to unsubscribe students that is not through the plugin?

Thanks smile

Average of ratings: -
In reply to erika alarcon

Re: Unenroll users who were registered with the database plugin

by erika alarcon -
Picture of Testers

Hi, I finally found how to unenroll the students with the 'Reset' option.

 

change

 

This only works if the Database plugin is set to 'Keep user enrolled' or 'Disable course enrolment', because with both options the record in the table mdl_role_assignments is not eliminated if the record in the external database is eliminated.

In reply to erika alarcon

Re: Unenroll users who were registered with the database plugin

by mukta nayak -

Hi Erica,

What is the name of the file and its path.

Thanks.

In reply to mukta nayak

Re: Unenroll users who were registered with the database plugin

by erika alarcon -
Picture of Testers

Hi Mukta

The file is  /moodle/lib/moodlelib.php

 

Best regards