Affects Version/s: 3.9.3
Fix Version/s: None
Component/s: Web Services
As it was the case for some others web-service functions, it seems that core_enrol_submit_user_enrolment_form needs to be slightly altered in order to be callable from an external web-service.
I've got it working on my local moodle config by altering the function 'submit_user_enrolment_form' in enrol/externallib.php.
At line 1141, I appended ", $USER" before the semicolon.
At line 1148, I added those lines: "
There might be a way to also set "qf__enrol_user_enrolment_form" parameter to one, but I didn't explore this yet.
Hope this helps people / gets implemented.