Quantcast
Viewing all articles
Browse latest Browse all 2361

How to get course assignments using course id (webservices)

by Miguel Rivas.  

Hello,

I'm trying to get all assignments for a course.  I have the course ID and I'm trying to use mod_assign_get_assigments.  This is the call I'm using:

https://{moodle instance}/webservice/rest/server.php?wstoken={token}&wsfunction=mod_assign_get_assignments&moodlewsrestformat=json&courseids[0]=48667

The error says: "User is not enrolled or does not have requested capability".  The first part of this error makes sense because I'm using a service account that will never be enrolled in any course. The second part I do not know how to resolve.

Here are my questions?

1. What capability or capabilities will be required to make this call work?

2. Is there another function to get the list of assignments for a course using a service account?

Using Moodle 3.9.18 (Build 20221114)


Viewing all articles
Browse latest Browse all 2361

Trending Articles