I'm working on a REST client to do some student analytics. I can get a list of all of the courses via core_course_get_courses, and I can get a list of all of the users in each course via core_enrol_get_enrolled_users. However, the next step, getting all of the assignments in a course, seems to be done via mod_assign_get_assignments, but this function appears to be extremely limited and intended for students and teachers only.
For example, here's the results I get with various combinations of parameters:
Yields error message "User is not enrolled or does not have requested capability". This is technically correct; the admin user the token is assigned to isn't enrolled.
Yields the same error message. This one is confusing, because the documentation suggests that specifying capabilities might override the user, but in any case the admin user has all capabilities and so should be able to get assignments this way.
I'm guessing mod_assign_get_assignments just isn't the right tool for the job, but does another tool exist? It must be available through a web service (as this is to be fully automated) and it has to have all assignments, not just those belonging to the user with the API key specified.