Update Learner Status
Table of Contents
Note: Applicable to all services except Zoho Creator.
Overview
The zoho.learn.updateLearnerStatus task updates the completion status of a learner in a specified course in Zoho Learn.
Scope
ZohoLearn.course.UPDATE
Syntax
<response>=zoho.learn.course.updateLearnerStatus(<portalUrl>,<courseId>,<memberId>,<courseStatus>,<connection>);
where:
| Parameter | Data Type | Description |
| <response> | KEY-VALUE | The response returned contains the details of the specified course. |
| portalUrl | TEXT | The URL of the hub/network (portal) in Zoho Learn. |
| courseId | TEXT | The ID of the course in which the learner's status needs to be updated. |
| memberId | TEXT | The ID of the member (learner) whose status needs to be updated. |
| courseStatus | TEXT | The new status of the learner. Accepted values:
|
| connection | TEXT | The connection link name created for this service. A Zoho OAuth connection with the scope ZohoLearn.course.READ must be configured. |
Example
The following script marks a learner as having completed the course:
response=zoho.learn.course.updateLearnerStatus("zylker","1311400459012","69705739","complete","learnconnection");
where:
| response | The KEY-VALUE response variable that holds the result of the status update operation. |
| zylker | The TEXT representing the URL of the hub. |
| 1311400459012 | The TEXT representing ID of the course. |
| 69705739 | The TEXT representing the ID of the member (learner) whose status is being updated. |
| complete | The TEXT representing the new status of the learner (fail / complete / inprogress). |
| learnconnection | The connection link name in TEXT format. |
Response Format
Success Response
The success response will be returned in the following format:
{ "STATUS": "OK", "STATUS_COMPLETED": 66.67 }
Failure Response
The failure response will be returned in the following format:
{ "result": "failure", "reason": "Access Denied", "errorCode": "9001" }