Adding new lesson using WebService

Re: Adding new lesson using WebService

by Patrick Pollet -
Number of replies: 0
Hello,


> I am confused about how many Web services are there for Moodle?

>1. One that is built into Moodle.


Yes but only with Moodle 2.0 and is still under developpement. Currently my understanding is that Soap clients ( such as C# or java) are not yet operational.See http://moodle.org/mod/forum/discuss.php?d=142479

It is a very promising approach, supporting XML-RPC, REST and AMF ; it is easier to extend that the two others one (see below) but the required parameters to perform an operation are more complex to set up. This may explain why Soap clients are more difficult to write.


>2. Another from OKTech.

This was the original Soap based Web Service for Moodle 1.7 to 1.9, discussed at the beginning of this discussion http://moodle.org/mod/forum/discuss.php?d=67947

>3. Another from http://cipcnet.insa-lyon.fr/Members/ppollet/public/moodlews/ (this is the one that I am using)


I 'forked' the original Ok Tech Web Services in January 2007 and announced it in May 2007. As you can see in the discussion above I took over the answers to most questions since mid 2007.
See http://cipcnet.insa-lyon.fr/Members/ppollet/public/moodlews/release-notes/

I kept the name OK Tech WS and to avoid confusion I added somme 'pp' (my initials); thus I renamed the directory wspp instead of ws and the main entry point http://yourmoodle/wspp/wsdl_pp.php

Currently I am at revision 1.6.5 available both at cipcnet and in Moodle CVS http://cvs.moodle.org/contrib/patches/ws/wspp/. On cipcnet you will find documentations and samples codes in php, java and python. Currently I support about 110 operations described here http://prope.insa-lyon.fr/~ppollet/moodlews/java/javadoc/


In the meantime OK Tech company, now named Remote Learner http://www.remote-learner.ca/ improved internally its version (for its customers), added my wsdl2php utility to create PHP proxy classes... and recently documented it in chapter 14 of the PACKT book "Moodle 1.9 extension development".
This documented version has far less operations than mine, but is supported by a Moodle Partner company. Something that I cannot do wink


To be accurate, there is another fork of the original OK Tech WS for the LightWork marking tool

http://lightwork.massey.ac.nz/wiki/fat



>While trying so, I couldn't find any function related to add/edit/delete lesson in the Web service. Am I missing something?


Currently the revision 1.6.5 dose not support lessons. This could be added (see how to extend Web Service on cipcnet) but will be quite complex due to the vast number of lesson options.

I am now busy porting "my" OKTech version to Moodle 2.0 to provide current users with the same operations as the current 1.9 versions, thus allowing them to keep their current clients. This may take few months due to the vast change in Moodle internal API.

Cheers.