"cmi5 allowed" Statement methods
The optional "cmi5 allowed" statement methods for communicating module status.
progress
Sends the learner's progress for the AU.
Example
Parameters
Parameter | Type | Required | Description |
percent | number | true | The learners progress of the AU as a percentage. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionTrueFalse
Sends the learner's boolean based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answer | boolean | true | The answer supplied by the learner. |
correctAnswer | boolean | false | The correct answer decided by the learning designer. |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionChoice
Sends the learner's choice based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answerIds | string[] | true | The Id(s) of the answer(s) supplied by the learner. |
correctAnswerIds | string[] | false | The correct Id(s) of the answer(s) decided by the learning designer. |
choices | false | The identifiers and descriptions of the possible answers. | |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionFillIn
Sends the learner's short text based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answers | string[] | true | The answer(s) to the question. |
correctAnswers | string[] | false | The correct possible answer(s) to the question. |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionLongFillIn
Sends the learner's long text based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answers | string[] | true | The answer(s) to the question. |
correctAnswers | string[] | false | The correct possible answer(s) to the question. |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionLikert
Sends the learner's Likert based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answerId | string | true | The Id of the answer supplied by the learner. |
correctAnswerId | string | false | The correct Id of the answer decided by the learning designer. |
scale | false | The identifiers and descriptions of the Likert scale. | |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionMatching
Sends the learner's matching based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answers | {[key: string]: string} | true | The source-target key-value pairings of the answers supplied by the learner. |
correctAnswers | {[key: string]: string} | false | The correct source-target key-value pairings of the answers decided by the learning designer. |
source | false | The identifiers and descriptions of the sources. | |
target | false | The identifiers and descriptions of the targets. | |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionPerformance
Sends the learner's performance based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answers | true | The source-target key-value pairings of the answers supplied by the learner. | |
correctAnswers | false | The correct source-target key-value pairings of the answers decided by the learning designer. | |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionSequencing
Sends the learner's sequence based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answerIds | string[] | true | The Id sequence of the answers supplied by the learner. |
correctAnswerIds | string[] | false | The correct Id sequence of the answers decided by the learning designer. |
choices | false | The identifiers and descriptions of the options. | |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionNumeric
Sends the learner's numeric based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answer | number | true | The answer supplied by the learner. |
correctAnswerIds | false | The correct answer decided by the learning designer. | |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
interactionOther
Sends the learner's "other" based answer to an interaction.
Example
Parameters
Parameter | Type | Required | Description |
testId | string | true | The identifier of the test. |
questionId | string | true | The identifier of the question. |
answer | string | true | The answer to the question. |
correctAnswer | string | false | The correct possible answer to the question. |
name | false | The name of the interaction. | |
description | false | The description of the interaction. | |
success | boolean | false | Whether the learner interaction result was a success or not. |
duration | false | The period it took the learner to perform the interaction. | |
objective | false | The objective achieved by the learner. |
Returns
This returns a Promise
containing an array with the resulting statementId if successful.
Last updated