Items API Methods
getScores()
Returns an object containing scores for all auto-scorable Questions in the assessment.
You would want to use this method so that you can quickly show the overall assessment scores to the learner in your application, for example.
Examples
// Standard usage
var allScores = itemsApp.getScores();
console.log(allScores);
// Callback usage
var myScoringCallback = function (scores) {
console.log(scores);
};
itemsApp.getScores(myScoringCallback);
// Returns
{
myResponseId1: {
max_score: 3,
score: 3
},
myResponseId2: {
max_score: 1,
score: null // not attempted
}
}
Arguments
-
callback function
To process asynchronous Question types in the assessment, this callback function should be provided.
-
scores object
See return value section.
-
Return value
Type object
An object where each key is the Question response ID and the values are the JSON scoring objects for each response. See above example.Related articles
- The
getItemScores()
method, the method used to get the scores for all auto-scorable Items in the assessment. - Understanding Submission and Scoring
- Asynchronous Scoring - Best Practices
- Per Question, Dichotomous, And Dependent (EBSR) Item Scoring With Examples