corporateacademy-scorm

Methods

(static) changeCourseOpenBehavior(scormId, openMode, token)

Change the open mode of a scorm course (new window or iFrame)

Parameters:
Name Type Description
scormId string

Required by the action: The userId that is uploading the content

openMode string

Required by the action: NEW_WINDOW or FRAMESET string

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/change-course-open-behavior
Returns:

null

(static) checkUploadStatus(scormId, token) → {ScormImport}

Verify the status of the scorm upload from remote engine.

Parameters:
Name Type Description
scormId string

Required by the action: The tenant in which the object is created

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/check-upload-status/:scormId
Returns:

The import status of the scorm object

Type
ScormImport

(static) createScormRegistration(scormId, itemId, token) → {ScormRegistration}

Create a new registration for one user to one course

Parameters:
Name Type Description
scormId string

Required by the action: The id of the scorm object

itemId string

Required by the action: The id of the item linked to the scorm object

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/create-scorm-registration/:scormId
Returns:

The new created scorm registration object

Type
ScormRegistration

(static) getScormLaunchUrl(scormRegistrationId, checkForSingleton, token) → {ScormRegistration}

Get the url to launch one course

Parameters:
Name Type Description
scormRegistrationId string

Required by the action: The id of the scorm object

checkForSingleton boolean | string

OpRequired by the action: If "true"" the system check if the user has another singleton object in use

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/get-scorm-launch-url/:scormRegistrationId/:checkForSingleton
Returns:

The new created scorm registration object

Type
ScormRegistration

(static) getScormPreviewUrl(scormId, token) → {string}

Get the url to preview one course

Parameters:
Name Type Description
scormId string

Required by the action: The id of the course

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/get-scorm-preview-url/:scormId
Returns:

The url to preview the course

Type
string

(static) uploadCourse(zipOrManifestUrl, form, manifestCourseRootUrl, objectType, referenceId, referenceType, courseName, subTitle, description, externalLinks, tutorId, token) → {ScormObject}

Upload a scorm course from a Zip file or a Manifest to the external Scorm Engine.

Parameters:
Name Type Description
zipOrManifestUrl string

Optional for the action: The Url of the zipped (or manifest) file

form Form

Optional for the action: Form data with file data

manifestCourseRootUrl string

Optional for the action: The Url of the root of a remote accessible course if zipOrManifestUrl is a manifest

objectType string

Required by the action: The type of the object (e.g.: SCORM or TINCAN)

referenceId string

Optional for the action: The object Id to which this object is related

referenceType string

Optional for the action: The object type to which this object is related

courseName string

Required by the action: The display name of the course

subTitle string

Optional by the action: The subtitle of the item

description string

Optional by the action: The description of the item

externalLinks Array.<string>

Optional by the action: The list of the external Link

tutorId string

Optional for the action: The tutorId that is the Id of the user that is the tutor/teacher of the course

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/upload-course
Returns:

The new created scorm object

Type
ScormObject