Skip to main content
Participant
July 18, 2018
Answered

Find Module Completion Status

  • July 18, 2018
  • 1 reply
  • 755 views

Via the API, I can find information about course status for a user, but am struggling to both get and set completion status for a module within a course. When searching enrollments for a user, I see the list

The end goal is to figure out if a user has completed a previous module within a course, so that we can allow access to another module in an external application.

Thank you for any help!

EDIT: I found GET /loResourceGrades/{id} under /users with LEARNER permissions, where I can pass the "learningObjectResourceGrade" and get the status. *** I wish this was available to ADMIN users, as well, since only admins can update the status to complete. Now I will have to log in as a learner to get the status, and then log out the learner and log in as an admin to mark complete. ***

This topic has been closed for replies.
Correct answer PRO_SOL

if i am not wrong the question is "Getting module level information for a course level enrollment - whether the user has completed the module or not within a course".

endpoint "GET /learningObjects/course:12345?include=enrollment" will list enrollment information corresponding to the course "course:12345".
However enrollment i.e. learningObjectInstanceEnrollment model has one of its relationship as "loResourceGrades" which can be checked
in the response of "GET /learningObjects/course:12345?include=enrollment".

So including "loResourceGrades" as well in the above mentioned endpoint will give us the information about module level progress.

Example: "GET /learningObjects/course:12345?include=enrollment.loResourceGrades".
         The response contains "learningObjectResourceGrade" model as well for valid enrollment.
   this model contains various fields viz.
         "duration": 0,   // representing the duration of the module
         "hasPassed": false,  // whether learner has passed the module or not
         "progressPercent": 0,  // what is the progress in percentage for the given module
         "score": 0  // Score learner has achieved for the given module
   
Now, as module level information is already retrieved, allowing access to other module is possible and setting the module level progress
is also possible via "POST users/{id}/userModuleGrade" api.
  

1 reply

PRO_SOLCorrect answer
Participating Frequently
July 19, 2018

if i am not wrong the question is "Getting module level information for a course level enrollment - whether the user has completed the module or not within a course".

endpoint "GET /learningObjects/course:12345?include=enrollment" will list enrollment information corresponding to the course "course:12345".
However enrollment i.e. learningObjectInstanceEnrollment model has one of its relationship as "loResourceGrades" which can be checked
in the response of "GET /learningObjects/course:12345?include=enrollment".

So including "loResourceGrades" as well in the above mentioned endpoint will give us the information about module level progress.

Example: "GET /learningObjects/course:12345?include=enrollment.loResourceGrades".
         The response contains "learningObjectResourceGrade" model as well for valid enrollment.
   this model contains various fields viz.
         "duration": 0,   // representing the duration of the module
         "hasPassed": false,  // whether learner has passed the module or not
         "progressPercent": 0,  // what is the progress in percentage for the given module
         "score": 0  // Score learner has achieved for the given module
   
Now, as module level information is already retrieved, allowing access to other module is possible and setting the module level progress
is also possible via "POST users/{id}/userModuleGrade" api.