Accessing Moodle via API, etc?

Accessing Moodle via API, etc?

by Elliot Rapp -
Number of replies: 4
I need to be able to call into Moodle to create users, add users to courses, etc from another site (on same server). What is the easiest way to make this happen (unfortunately we can't wait for 2.0)? I apologize if I missed it but right now I don't see a clear description of any web service, api, etc to provide such access.

I'm sure many other people have done this with Moodle.

Thanks.


Average of ratings: -
In reply to Elliot Rapp

Re: Accessing Moodle via API, etc?

by Patrick Pollet -
You may try to use OK Tech Web Service that runs under 1.9.x

Available here http://cipcnet.insa-lyon.fr/Members/ppollet/public/moodlews

Discussion here : http://moodle.org/mod/forum/discuss.php?d=67947

Cheers
In reply to Patrick Pollet

Re: Accessing Moodle via API, etc?

by Elliot Rapp -
Patrick,

Thanks for your reply! Much appreciated.

Is there really no published API for Moodle or at least a description of various methods for common operations (i.e. add user, add course, assign user to course, etc)?


In reply to Elliot Rapp

Re: Accessing Moodle via API, etc?

by Patrick Pollet -
Depending of the language you are planning to use with your client, you should use the appropriate wsdl2xxxx utility to generate support classes and sample codes. Then with a decent IDE like eclipse you will be helped quite nicely for function names and required parameters


As per php is concerned, WSPP is provided with a wsdl2php utility that will generate among other things a sample script for each allowed operations (see the INSTALL file or the site http://cipcnet.insa-lyon.fr/Members/ppollet/public/moodlews/wsdl2php/)

Cheers.