I'm using the SOAP Webservice to enrol user to courses, create groups and assign the user to the groups.
All the functions are working correctly by its own, but if i use them together the assignment of the users to groups doesnt work. It fails with the message that the users are not enrolled in the course.
The code looks like this:
$client = new SoapClient($url);
enrol_manual_enrol_users has no return value and it seems that it takes some time (after the soap call is still finished) until the users are correctly enrolled to the course. (some seconds/minutes, depending on the number of users)
Is there a way to get informed when the enrolment is finished?
(... without checking every x seconds if the users are enrolled with core_enrol_get_enrolled_users)