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.