Background
Prior to Long Term Support v2023.2.LTS, all Question types evaluated scores in a synchronous manner. This in turn meant all scoring and validation related public methods were synchronous too.
For example, for QuestionsApp, scores were gotten using getScores() as follows:
const scores = questionsApp.getScores();
//...then do something with the scores
Introduction of asynchronously scoring Question types
Asynchronously scoring Question types were introduced with Long Term Support v2023.2.LTS with the release of the Math Question type (clozeformulaV2
). To accommodate asynchronous scoring, a callback was added to all related public methods.
To continue using these public methods in a way that supports the new asynchronously scoring Question types, the results of these public methods should now be received via these callbacks instead.
questionsApp.getScores(scores => {
//...then do something with the scores
});
The following public methods were updated:
Questions API:
- Question isValid()
- Question getScore()
- Question mapValidationMetadata()
- Question validate()
- QuestionsApp getGroupScore()
- QuestionsApp getScores()
Items API:
Assess API:
Backwards compatibility
For backwards compatibility, the results will continue to also be available in the return values of these methods. These return values will be incorrect, however, in cases where asynchronously scoring question types are present in the related activity.
List of asynchronously scoring Question types
- Math (
clozeformulaV2
) - Label image with math (
imageclozeformulaV2
) - Multi-step math (
multistepmath
)
Note that from v2023.3.LTS onwards, newly created Math Question Generator questions are based on the Math (clozeformulaV2
) Question type.