Update Learner Status

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:

ParameterData TypeDescription
<response>KEY-VALUEThe response returned contains the details of the specified course.
portalUrlTEXTThe URL of the hub/network (portal) in Zoho Learn.
courseIdTEXTThe ID of the course in which the learner's status needs to be updated.
memberIdTEXTThe ID of the member (learner) whose status needs to be updated.
courseStatusTEXT

The new status of the learner. Accepted values:

  • fail
  • complete
  • inprogress
connectionTEXTThe 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:

responseThe KEY-VALUE response variable that holds the result of the status update operation.
zylkerThe TEXT representing the URL of the hub.
1311400459012The TEXT representing ID of the course.
69705739The TEXT representing the ID of the member (learner) whose status is being updated.
completeThe TEXT representing the new status of the learner (fail / complete / inprogress).
learnconnectionThe 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" }

 

Related Topics