Web Services Examples in PHP, they don't work?

Web Services Examples in PHP, they don't work?

by Carlos Gottberg -
Number of replies: 5

I have tested the examples in github (the ones pointend by the documentation)  and couldn't get them working. If someone has an example of the use of web services through php i would be eternally grateful.

 

https://github.com/moodlehq/sample-ws-clients

Average of ratings: -
In reply to Carlos Gottberg

Re: Web Services Examples in PHP, they don't work?

by Jérôme Mouneyrac -
Hi Carlos,
I use the REST-PHP demo client almost every day for peer-review. I confirm it works. I'm pretty sure the other demo clients work too. If you indicate an error message someone may be able to help you.

Cheers,
Jerome
In reply to Jérôme Mouneyrac

Re: Web Services Examples in PHP, they don't work?

by Carlos Gottberg -

Ok, i'll post the info, maybe i'm doing something terribly wrong smile.

In reply to Carlos Gottberg

Re: Web Services Examples in PHP, they don't work?

by Kaspar Thomann -

Hi, I found the postiong from Jocelyn Ireson-Paine http://moodle.org/mod/forum/discuss.php?d=193295#p842702 most valuable, many thanks. I need to mention that the services I found on my moodle 2.0 are all named moodle_... whereas in the example above they all begin with core_... (most of them). But I'm till humpering, though. I wonder wether there would be list or descr of the API parameter to all thos external services e.g. moodle_user_create_users or moodle_user_get_users_by_id. Many thanks in andvance and also for your big efforts on moodle.

In reply to Kaspar Thomann

Re: Web Services Examples in PHP, they don't work?

by todd vainisi -

I have this moodle_ vs core_ variation too.  Any further information about this out there?

In reply to todd vainisi

Re: Web Services Examples in PHP, they don't work?

by Bill Antonia -

The core_ webservices are mostly exactly the same as the moodle_ webservices, there are slight variations with at least one, which one(s) I cannot remember at the moment.

Eventually the moodle_ webservices will be dropped, in name only, and the core_ webservices will continue.

The change happened between Moodle 2.0 and Moodle 2.1. If you are using Moodle 2.0 then the core_ webservices will not be present and you will need to upgrade.

Any new software which uses the Moodle webservices should use the core_ versions in preference.