AnsweredAssumed Answered

How to get the enrolment or course id from latest submission object

Question asked by kit perez on May 30, 2019
Latest reply on Jun 4, 2019 by kit perez

Hello Everyone,


I would like to know if there is a way to get the associated course and/or enrolment from the most recent graded submission:

GET /api/v1/users/:id/graded_submissions


I already have the list of enrolment and course of the user. however, the return object of the most recent graded submission API does not contain the course or enrolment. Hence, I can't map it back to which course or enrolment the submission is associated with.


I can see that there is a preview URL in the json object has course id. For example data:


I am not sure if the preview URL will always have a course in it and If I should base my check of the course on it.


I'd be glad to have more ideas from you guys.


Thanks heap!


Kind regards,