API Documentation

Re: API Documentation

by Graham Stott -
Number of replies: 0
Ok, thanks David. That sounds pretty comprehensive. Just to check my understanding of a couple of the APIs, if we wanted to create a new user in Moodle and enrol them on a course in response to them buying a course on an eCommerce platform, I presume we'd call the core_user_create_users function and then using the returned user_id we'd then call enrol_manual_enrol_users with the relevant course_id and role_id (which would be stored against the related course product in the eCommerce platform)?

Thanks.