Adobe Learning Manager offers the following endpoints for updating a user’s course enrollment:
In the admin API, within the Set of User API, you’ll find the POST /users/{userId}/userModuleGrade endpoint. You can use this to mark a user as complete for the modules of a course. Here’s a sample payload. Please note that once dates are set, they cannot be changed. If you need to update a learner’s records, specify the exact timestamps for completion, success, etc. For boolean field values, once set to true, they cannot be reverted to false.
“`json
{
“data”: {
“type”: “userModuleGrade”,
“attributes”: {
“completed”: true,
“dateCompleted”: “2023-07-07T22:46:00.000Z”,
“dateStarted”: “2023-07-07T20:04:51.000Z”,
“dateSuccess”: “2023-07-07T22:46:00.000Z”,
“duration”: 59,
“maxScore”: 10980,
“minScore”: 89,
“score”: 0,
“started”: true,
“success”: true
},
“relationships”: {
“course”: {
“data”: {
“type”: “course”,
“id”: “5541107”
}
},
“learner”: {
“data”: {
“type”: “user”,
“id”: “20103748”
}
},
“module”: {
“data”: {
“type”: “courseModule”,
“id”: “course:5541107_12482441_0”
}
}
}
}
}
“`
To reset a module attempt for a learner, use the POST /users/{userId}/moduleResetPost endpoint. The loResourceId field contains the <loId/courseID>_<courseInstanceID>_<moduleId>_<moduleVersionNumber>.
Now the question is how do we get the module ID of the course to which the learner is enrolled to through API in ALM –
There are multiple API endpoints through which you can get the module ID of the courses.
You will get the module ID in the loResources data in the response data of the API calls mentioned below
1. GET /learningObjects/{id}
Request URL sample with course ID and included “instances” parameter: https://learningmanager.adobe.com/primeapi/v2/learningObjects/course%3A6551356?include=instances
2. GET /learningObjects/{loId}/instances/{loInstanceId}
Request URL with courseID and courseInstanceID parameter : https://learningmanager.adobe.com/primeapi/v2/learningObjects/course%3A6551356/instances/course:<courseID_courseInstanceID>
3.GET /users/{id}/enrollments/{enrollmentId}
Request URL with courseID, courseInstanceID and userID parameters
https://learningmanager.adobe.com/primeapi/v2/users/15263446/enrollments/course:<courseID_courseInstanceID_userID>
—————————————————————————————————————————-
#Adobe learning manager admin learner API #mark course completion #mark module completion #success #how to update using API #user module grades #quiz scores API #reset module #course #learning paths