Last updated
Last updated
Initializes the session, must be called before performing other methods.
This returns a Promise
containing an array with the resulting statementId if successful, or undefined
if a sessionState
is provided.
Completes the AU. Required for satisfaction if LaunchData.moveOn
is equal to Completed
, CompletedAndPassed
or CompletedOrPassed
.
This returns a Promise
containing an array with the resulting statementId if successful.
Passes the AU. Required for satisfaction if LaunchData.moveOn
is equal to Passed
, CompletedAndPassed
or CompletedOrPassed
.
Note: If using score and/or objective parameters, types for these are in @xapi/xapi
and must be installed as a dev dependency npm i --save-dev @xapi/xapi
.
This returns a Promise
containing an array with the resulting statementId if successful.
Fails the AU. Required to mark the AU as Failed if LaunchData.moveOn
is equal to Passed
, CompletedAndPassed
or CompletedOrPassed
.
Note: If using the score parameter, types for this are in @xapi/xapi
and must be installed as a dev dependency npm i --save-dev @xapi/xapi
.
This returns a Promise
containing an array with the resulting statementId if successful.
Terminates the session, must be the last method called before closing the window.
This returns a Promise
containing an array with the resulting statementId if successful.
Parameter
Type
Required
Description
options
false
The additional options object.
Parameter
Type
Required
Description
score
false
The score achieved by the learner.
objectiveOrOptions
false
The objective achieved by the learner or the additional options object.
Parameter
Type
Required
Description
score
false
The score achieved by the learner.
options
false
The additional options object.
The core "cmi5 defined" statement methods for communicating module status.
Parameter
Type
Required
Description
sessionState
Object
false
An auth token and initialized date from a previous initialisation. Useful for persisting sessions across browser refreshes.