-
Notifications
You must be signed in to change notification settings - Fork 23
ViSH Editor API for Web Applications
ViSH Editor allows to create Learning Objects by using and integrating web applications and SCORM packages.
This section explains how these web applications can communicate with ViSH Editor using a common API.
Any web application can communicate with ViSH Editor using the ViSH Editor Iframe API (download file here), an extremely lightweight JavaScript library. Using this API, a communication channel can be stablished between the web app and ViSH Editor through the iframe in which the web app is embeded according to the HTML5 Web Messaging specification.
A web application that uses the Iframe API can:
- Get information from the environment (username, ...).
- Get authentication tokens to provide services with access control policies.
- Send scores and progress measures like a SCORM package or any other standardized Learning Object.
- Enable user tracking in the ViSH Editor environment.
The following table lists all the available methods:
Key | Description |
---|---|
init(options) | Init the API and connect to the ViSH Editor application (see examples for details). |
isConnected | Returns 'true' if the web application is connected with ViSH Editor. |
getUser(callback) | Get user information. |
getAuthToken | Get authentication token to provide services with access control policies. The token allows to verify the identity and permissions of the user (and of course, to know if the user is logged). |
setScore(score,callback) | Send a score in a 0-100 scale. |
setProgress(progress,callback) | Send a progress measure in a 0-100 scale. |
setSuccessStatus(status,callback) | Send a success status like a SCORM package. |
setCompletionStatus(status,callback) | Send a completion status like a SCORM package. |
enableTracker | Enable tracking. |
An example of how to use the API is provided here: https://github.com/ging/vish_editor/blob/master/examples/WAPP_API/webapp.html .