Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

OKTech SOAP get_my_courses issue

$
0
0
by Ondrej Vacek.  

Hi, 

I`m developing a small android client for moodle as school project. I`m using the latest Moodle version 2.4.3+ (Build: 20130405) and the latest wspp (downloaded yesterday).

Recently I succesfully implement OKTech SOAP (aka wspp) and "net.patrickpollet.moodlews" library for Android, but today I found problem in the function get_my_courses(). When I call it exactly like in OKTech example:

LoginReturn lr = moodle.login(username, pass);
int me = moodle.get_my_id(lr.getClient(), lr.getSessionkey());
CourseRecord[] courses = moodle.get_my_courses(lr.getClient(), lr.getSessionkey(), ""+me, null);

I get "no course" error in response, but I`m pretty sure the logged user is enrolled in two courses as student. (The login succeeds, the "me" id is also correct).

Then I tryied to log in as "admin" and then I got an exeption "Error in application - please contact the developer: PHP catchable fatal error - Argument 2 passed to has_capability() must be an instance of context, boolean given, called in /Users/*****/Sites/moodle/wspp/wslib.php on line 323 and defined" during get_my_courses call.

Can anyone tell me, if it`s a bug, or am I doing something wrong? I have traced all code done by Java and it seems that the issue is on server`s side.


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>