Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2364

Re: Wasted over a day and still can't get enrol_manual_enrol_users to work!!!!

$
0
0

by A W.  

Hi Eloy,

Thanks for the post. To test your theory I tried using the working code but just changed the label 'enrolements' to 'NOTenrolments' i.e.

$enrols[] = $enrolobj;
$params  = array('NOTenrolments' => $enrols);

and that alone stopped it working (same error as before) so clearly the label has to exact. 

I think the take away IMHO is that maybe the error message could be improved, as in if you see:

[faultString] => Invalid parameter value detected | DEBUG INFO: enrolments => Invalid parameter value detected: Missing required key in single structure: roleid | ERRORCODE: invalidparameter
I'm not sure its obvious that the issue is actually that you need a top level array label rather than an issue with the roleid.

Anyway thanks for the input folks, hopefully this post will help some people in the future smile 

Cheers,

Alex 


Viewing all articles
Browse latest Browse all 2364

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>