Hello!
Its nearly 2015 and I face the same error :D.
Hope you can share how was this error resolved.
thnx,
amer
Hello!
Its nearly 2015 and I face the same error :D.
Hope you can share how was this error resolved.
thnx,
amer
Hi Aaron, do you figured out how to do this? .. I have the same need.
Hi all,
As I guess you are aware of, when we list Moodle web services (Site administration -> Plugins -> Web services -> API documentation) we see some deprecated services whose names starts with moodle_*, they are pointing to other web services following the current naming conventions as decided in https://tracker.moodle.org/browse/MDL-29106
We finally pushed to the current sprint the final deprecation of these services https://tracker.moodle.org/browse/MDL-43535 as they were initially deprecated in Moodle 2.2. Hopefully, after a few years, most of you already switched to the non-deprecated ones, just a heads up in case you didn't. This changes will take effect on Moodle 2.9 onwards and this second stage deprecation means that they will return an exception rather that forwarding the execution flow to the replacement funcion.
In case you are interested in following the issue: https://tracker.moodle.org/browse/MDL-43535
Cheers
Hello,
note that this will break custom versions of the Moodle Mobile app since it uses the deprecated services for backwards compatibility.
If you've developed a custom version of Moodle Mobile please read: https://moodle.org/mod/forum/discuss.php?d=276469
Cheers, Juan
According to the Moodle Web Services API (v.2.8.1) documentation core_course_get_courses function takes a list of course identifiers as argument. If the list is empty, it returns the data of all the courses.
However, I see no easy way to obtain the id of the desired course on the client side because ids are assigned by server. The Web interface of the Moodle site provides the ability to search course by it name, but Web Services API has not the similar function.
Therefore, I propose to change the argument of the core_course_get_courses function to the criteria, that is a name-value pairs, in the same way as was done for the core_course_get_categories function.
This change will make the function more versatile and will enable the selection of courses on several criteria.
Hi,
I'm wondering if it is possible to use web services on a site that has SSO authentication. The problem is, I can't get web service tokens as there is no username, password authentication when using moodle with SSO.
Any help is greatly appreciated. Thanks in advance
Best,
Praveen.
Hi,
are you looking for something like this?
Hi,
Yes! I will take a good look and see if I understand it correctly. Thanks.
Best,
Praveen
http://praveenkumar.co.in
Hello,
I'm wondering if anyone can help me to find a learning rescources that will get me up to speed with web services. I've got to create a 'simple' books web service from scratch and deploy it and develop a range of clients to access the data.
using Java code in Eclipse IDE. I have to implement operations like addBook, searchBook and listBooks and the bookInfo class has to have a variety of attributes like Name ob Book, Type and Author ect....
I need to create the web service on Google App Engine. Create options to return data in text, json and xml. Be able to access data using 'simple' http web service calls. Access data using REST interaction and create a AJAX based web front end to retrieve and display data in suitable format.
I use the terms 'simple' loosely here because I am not ofey with any of these methods I have to create.
I don't want an answer I want a useful resource to learn this all myself so I can do this assignment.
Really stressed out, every thing I've seen so far doesn't help me. I'm really bad at all this but need to become good.
Any advice and criticism is expected here. I just need so help if anyone knows any really good methods of learning I could try. I've tried many so far and none have sunk it in.
Regards,
Caroline
Hi everyone!
I'm trying to use get_users function from web services, but I'm having the following problem:
Isigned up a user(using core_user_create_users) and I can verify this user at Moodle User List(including his email)...but when I try to use the key=email and value equal to user email..I have the following answer:
object(stdClass)#2 (2) { ["users"]=> array(0) { } ["warnings"]=> array(0) { } }
object(stdClass)#2 (2) { ["users"]=> array(1) { [0]=> object(stdClass)#3 (6) { ["id"]=> int(5) ["fullname"]=> string(26) "testfirstname testlastname" ["firstaccess"]=> int(1419880151) ["lastaccess"]=> int(1419880151) ["profileimageurlsmall"]=> string(58) "http://192.168.2.126/moodle/pluginfile.php/31/user/icon/f2" ["profileimageurl"]=> string(58) "http://192.168.2.126/moodle/pluginfile.php/31/user/icon/f1" } } ["warnings"]=> array(0) { } }
Why I can't see the email address from user?
I have tried core_user_get_users and get_users_by_fields..and I've the same problem.
I'm testing in Moodle 2.8.
Thanks!
Hi Rimphy, I picked up this old post as I needed some help with core_files_upload. I am using the CURL client and keep on getting error in parameter signature. Can you please help me out with what is the exact parameter which needs to be passed. I am including the script I am using:
Hi Richard!
I have the same problem...when I use key=id, the core_user_get_users(and _by_field too) returns all users or a specific user, but when I use key=something else, doesn't work.
And when I list all user, the email address and username does not appear in response...
How do you resolve this?
Thanks!
Ok...I find the problem. It's a bug:
https://tracker.moodle.org/browse/MDL-42639
Thanks,
Hi all,
Just starting out on our journey with moodle web services with a special interest in getting moodle to play nicely with other systems within the organisation. We are using V2.8.1+
To keep things consisitent we have opted to use the SOAP api and initial development is going well however a couple ideas have come up recently which are:-
There are bound to be more questions in time but these are the pressing ones at the moment.
Thanks
Ok...I was wrong...Ray Morris help me at
https://tracker.moodle.org/browse/MDL-42639
If you have the same problem, verify if the following permissions are enabled to your Web Service Group:
moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:viewuseridentity
Thanks,
Why do I need the permission "View courses without participation" (aka moodle/course:view) to get a list of courses users could possibly enrol themselfs in? This seems pretty basic, so i wonder if I'm missing something? Is there another function that show me a courselist but don't need that permission?
BUMP
Come on someone has to be using this function and can tell me if they have any issues with this??????
Hello, I am facing the same problem for some time now.
In fact I had two Moodle instances where I was testing my Web Services Client and in one of the two core_get_users was working and on the other it didnt work,
The one, that worked, is version Moodle2.7.2+ (Build: 20140911)
Anyway, following your suggestion I gave the permissions you mentioned to my other instance (Moodle2.7.2+ (Build: 20141002)) but I am still getting an empty response.
The only way to make this work is to give Administrator role to my webservice user. But even when the webservice is administrator, when I make a call I dont receive all the information specified in the API Documentation, I get less.
Is this normal? Could you please let me know if you managed to fix it and how?
Many Thanks
Christos
I think I just found why I am getting less information...
When I am using &moodlewsrestformat=json I get
{
"users": [
{
"id": 72,
"username": "admin",
"firstname": "Moodle",
"lastname": "Admin",
"fullname": "Moodle",
"email": "admin@moodle.test",
"department": "",
"firstaccess": ,
"lastaccess": ,
"description": "",
"descriptionformat": 1,
"city": "Nicosia",
"country": "CY",
"profileimageurlsmall": "",
"profileimageurl": ""
}
],
"warnings": []
}
when I have
<?xml version="1.0" encoding="UTF-8" ?><RESPONSE><SINGLE><KEY name="users"><MULTIPLE><SINGLE><KEY name="id"><VALUE>72</VALUE></KEY><KEY name="username"><VALUE>admin</VALUE></KEY><KEY name="firstname"><VALUE>Moodle</VALUE></KEY><KEY name="lastname"><VALUE>Admin</VALUE></KEY><KEY name="fullname"><VALUE>Moodle Admin</VALUE></KEY><KEY name="email"><VALUE>admin@moodle.test</VALUE>
</KEY><KEY name="address"><VALUE null="null"/></KEY><KEY name="phone1"><VALUE null="null"/></KEY><KEY name="phone2"><VALUE null="null"/></KEY><KEY name="icq"><VALUE null="null"/></KEY><KEY name="skype"><VALUE null="null"/></KEY><KEY name="yahoo"><VALUE null="null"/></KEY><KEY name="aim"><VALUE null="null"/></KEY><KEY name="msn"><VALUE null="null"/></KEY><KEY name="department"><VALUE></VALUE></KEY><KEY name="institution"><VALUE null="null"/></KEY><KEY name="idnumber"><VALUE null="null"/></KEY><KEY name="interests"><VALUE null="null"/></KEY><KEY name="firstaccess"><VALUE></VALUE></KEY><KEY name="lastaccess"><VALUE></VALUE></KEY><KEY name="auth"><VALUE null="null"/></KEY><KEY name="confirmed"><VALUE null="null"/></KEY><KEY name="lang"><VALUE null="null"/></KEY><KEY name="calendartype"><VALUE null="null"/></KEY><KEY name="theme"><VALUE null="null"/></KEY><KEY name="timezone"><VALUE null="null"/></KEY><KEY name="mailformat"><VALUE null="null"/></KEY><KEY name="description"><VALUE></VALUE></KEY><KEY name="descriptionformat"><VALUE>1</VALUE></KEY><KEY name="city"><VALUE>Nicosia</VALUE></KEY><KEY name="url"><VALUE null="null"/></KEY><KEY name="country"><VALUE>CY</VALUE></KEY><KEY name="profileimageurlsmall"><VALUE></VALUE></KEY><KEY name="profileimageurl"><VALUE></VALUE></KEY><KEY name="customfields"><MULTIPLE></MULTIPLE></KEY><KEY name="preferences"><MULTIPLE></MULTIPLE></KEY></SINGLE></MULTIPLE></KEY><KEY name="warnings"><MULTIPLE></MULTIPLE></KEY></SINGLE></RESPONSE>
So i guess empty values are not returned when using JSON.