Updating Content Item Status
You can update a content item status with the addContentItemViewRequest method.
Permission to run the request: Account Owner, Administrator, Organization Administrator, Publisher.
Parameters
Parameter | Type | Description |
---|---|---|
credentials (required) | credentials | Read the description of the Credentials object. |
contentItemId (required) | string | ID of a content item which status will be updated. |
userId (required) | string | ID of a user for whom a content item status will be updated. |
viewStatus (required) | string | Passed / Failed - for content items with a passing score set. Complete / Incomplete - for content items without a passing score set. Accepted / Declined - for assignments. Complete / Incomplete / Passed / Failed - for SCORM courses. |
scorePerc | amount | Percentage of slides viewed (0-100%). Required for content items with a passing score (quizzes, assignments, etc). Optional for content items without a passing score (.doc files, surveys, etc). |
slidesViewed | amount | Number of slides viewed. Required for content items with a rate of slides viewed. |
viewedPerc | amount | Percentage of a SCORM course view. Required for SCORM courses. |
dateOfView (optional) | dateTime | Date of a content item view. |
reason (optional) | string | Comment on a content item. |
Return Values
After the request has been completed, the system returns an object with the following properties:
Parameter | Type | Description |
---|---|---|
success | bool | 'True' if the content item has been updated. |
Possible Errors
Error | Description |
---|---|
Unknown content item | The specified content item was not found. |
Wrong parameters | The system failed to process the request as some of the required parameters were missing. |
Sample Call
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<AddContentItemViewRequest>
<credentials>
<accountUrl>http://myaccount.ispringlearn.com</accountUrl>
<email>email@email.com</email>
<password>password</password>
</credentials>
<contentItemId>1234</contentItemId>
<userId>1</userId>
<viewStatus>Passed</viewStatus>
<scorePerc>100</scorePerc>
<slidesViewed>10</slidesViewed>
<viewedPerc>100</viewedPerc>
<dateOfView>2018-07-13T18:15:10</dateOfView>
<reason>100</reason>
</AddContentItemViewRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample Response
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<AddContentItemViewResult>
<success>true</success>
</AddContentItemViewResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>