Getting Progress for User in Course via Graphql

amaan_rana
Community Explorer

Currently via the REST API i am using a combination of 3 endpoints to get a users progress across all enrolments

1. api/v1/users/user:ID/enrollments?enrollment_type=student

 This gives me all enrolled course grades and a few other handy things

Then I use

2. api/v1/courses/course:id/students/submissions?student_ids[]=user:id&workflow_state=unsubmitted


This lets us know if all assignments for the course have been attempted

Then

3. 

api/v1/courses/course:id/users/user:id/progress

This gives me the module progress (requirements count/completed)

I tried combining this into one graphql call however I cant see where I can get the same data I am I getting from number 3.

I am trying to reduce the amount of API calls which theortically the graphql should allow me to. I am keen to hear how others a getting progress per user. I do it per user as they can be actively enrolled in up to 20 courses concurrently

 

Labels (2)
Users who also had this question