get_courses_with_today_sessions returns invalidresponse

get_courses_with_today_sessions returns invalidresponse

by Knut Olav Roland -
Number of replies: 0

Hi, I've been experimenting with the web service API in order to try an automated attendance registration for my students. 

Both mod_attendance_get_session and mod_attendance_add_attendance works, but i'm having issues with mod_attendance_get_courses_with_today_sessions - it only returns the following when there is a session for that day:

{
    "exception": "invalid_response_exception",
    "errorcode": "invalidresponse",
    "message": "Invalid response value detected"
}

And if there is no session scheduled it returns nothing.

I don't have access to the backend, so is there a way for me to fix this on my end? Or am I just doing something wrong? 

This is what the request looks like
https://{redacted}/webservice/rest/server.php&wsfunction=mod_attendance_get_courses_with_today_sessions&userid={redacted}&moodlewsrestformat=json&wstoken={redacted}

Any help on this would be very appreciated! smile

Average of ratings: -