Editing a Module's Status
AVAILABLE WITH BUSINESS SUBSCRIPTION
Request: POST /statistics/module
Note:
- With this method, you can edit the status only of a material that is included in a course. You won't be able to edit the status of a training included in a course using this method.
Permissions to Run the Request
The Account Owner, Account Administrators, Department Administrators, or custom roles.
Department Administrators and users with a custom role can edit the statuses of the modules assigned to the users belonging to the departments they manage and their sub-departments.
Request Headers and Parameters
Header | Description |
---|---|
Authorization (required) | Access token. You can obtain a token by making a request. |
Parameter | Description |
enrollmentIds (required) | The IDs of one or more enrollments whose statuses you would like to update. |
courseId (required) | The ID of the course to which one or more modules whose statuses you would like to update belong. |
moduleStatuses (required) | An array with the data regarding the module's status. |
contentItemId (required) | The ID of the module whose status you would like to update. |
date (required) | The module completion date. |
reason (optional) | The reason why you want to change the module's status. |
status (required) | The status you would like to assign to the module.
|
awardedScore (required) | The number of scores earned for the module completion. |
Response Parameters
Parameter | Description |
---|---|
taskId | The ID of the request sent to update the module status. |
Possible Response Codes
Code | Text | Description |
---|---|---|
200 | Successful operation | The module status has been successfully updated. |
400 | Bad Request | A request error. |
401 | Unauthorized | An authorization error. |
403 | Permission Denied | The user is not allowed to handle the requested action (not enough permission). |
Sample Request
POST /statistics/module
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE
Content-Type:application/json
{
"enrollmentIds": [
"e1f2c50e-c1ae-11ea-8592-a6eabe1809b2"
],
"courseId": "8e74ef32-09f4-11ea-8d15-ba7e6fa4e089",
"moduleStatuses": [
{
"contentItemId": "b38a8cf6-218b-11ea-9b28-4274327ed6b8",
"date": "2020-03-12",
"reason": "",
"status": "completed",
"awardedScore": 100
}
]
}
XML
Sample Response
https/1.1 200 Successful operation
<?xml version="1.0" encoding="UTF-8"?>
<taskId>99949</taskId>
XML