General developer forum

Webservice disabling enrolments instead of removing them

 
Picture of Julien Thomas
Webservice disabling enrolments instead of removing them
 

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: -
Picture of Carlo Comincini
Re: Webservice disabling enrolments instead of removing them
 

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



 
Average of ratings: -