Hi Ondej,
Are you sure you are using the latest version from github ? This has been fixed a month ago and is due to changes in Moodle API specific to 2.4 ... Remember that OK Tech was created with 1.9 and still 'more of less' work but is gradually becoming obsolete withe the high speed of Moodle releases...
see latest commit https://github.com/patrickpollet/moodlews/commit/8dde54660c8573b3999177502a4bbb5161331c9c
I suspect this since currently the line 323 given in your error message does not contains your offending code in wspp/wslib.php
Nevertheless this happen when the operation fetching the user's course try to add a rough estimate of the user's primary role in that course. I think I should remove that since it does not work well with latest Moodle system of role/capabilities. I should investigate further ...
In the meantime, you can remove this extraneous call to ws_get_primaryrole_incourse in wspp/server.class.php near the end of function get_my_courses
if ($res) {
//rev 1.6 return primary role for each course
foreach ($res as $id => $value)
$res[$id]->myrole = ws_get_primaryrole_incourse($res[$id], $uid);
//return $res;
return filter_courses($client, $res);
} else
return $this->non_fatal_error(get_string('ws_nothingfound', 'local_wspp'));
to read
if ($res) {
//rev 1.6 return primary role for each course
// foreach ($res as $id => $value) COMMENT OUT THIS LINE
// $res[$id]->myrole = ws_get_primaryrole_incourse($res[$id], $uid); AND THIS ONE
//return $res;
return filter_courses($client, $res);
} else
return $this->non_fatal_error(get_string('ws_nothingfound', 'local_wspp'));
Cheers