Webservice disabling enrolments instead of removing them

Webservice disabling enrolments instead of removing them

by Julien Thomas -
Number of replies: 1

Hello,


I am using webservice to unenroll users from Moodle course with the function enrol_manual_unenrol_users.

Instead of being unenrolled, user enrolments are only disabled.


Do you know why ?


Thank you.

Average of ratings: -
In reply to Julien Thomas

Re: Webservice disabling enrolments instead of removing them

by Carlo Comincini -

Hi, same problem here:

I'm working on a script that check unenrollmcnts form an external list of users and unenroll a single user deleting a specific role.

When I pass the specific role that must be unenrolled  the web service simply deletes all the enrollment. Note that if a student has multiple roles It must stay enrolled with the other roles except the one the script has removed.

It seems the method ignores the roleid