Web services

invoke an external web services when an event occurs

 
 
Picture of sophie sun
invoke an external web services when an event occurs
 

Hi experts

I am new to web services. My institution is collaborating with other institution offering their courses on our moodle. They require us to send the user details using their RESFul web services API when the user is enrolled in the courses they offer.

I kinda know the workflow as follows but I don't if I should build a enrol plugin or add to the core code.

1.event:user enrol into courses

2.event handler:invoke the web service to POST the user info to their database.

I am not sure where I should define the event handler

Any help or hint would be much appreciated. If you are based in Melbourne. I am more than happy to shout you coffee or something. 

Thanks in advance

Sophie

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: invoke an external web services when an event occurs
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Probably best to put code like this into a local plugin. Subscribe to the event, and when received, call the web service.

http://docs.moodle.org/dev/Local_plugins

http://docs.moodle.org/dev/Events_API

 
Average of ratings: -
Picture of sophie sun
回复: Re: invoke an external web services when an event occurs
 

Thanks heaps for replying,Tim.  I read through the links you posted and they do make sense. Yay, local plugin!!

Thanks again.

 
Average of ratings: -
kushal mehta
Re: invoke an external web services when an event occurs
 

use default we service features.

 
Average of ratings: -