Items API Methods
getItemScores()
Obtains an object containing scores for all Items in the Activity, using rules determined by the Item scoring types that can be:
per-question
dichotomous
dependent
You would want to use this method so that you can display your own custom scoreboard in your application, for example.
Examples
var myItemScores = itemsApp.getItemScores();
console.log(myItemScores);
// Returns
{
"myItemReference1": {
"type": "per-question",
"score": 1,
"max_score": 1,
"question_scores": [{
"max_score": 1,
"score": 1
}]
},
"myItemReference2": {
"type": "per-question",
"score": null,
"max_score": 5,
"question_scores": [{
"max_score": 5,
"score": null
}]
},
...
}
Arguments
None.
Return value
Type object
An object where each key is the Item reference and the values are an object containing the scoring data for each Item. See code example.Related articles
- Understanding Submission and Scoring
- Asynchronous Scoring - Best Practices
- Per Question, Dichotomous, And Dependent (EBSR) Item Scoring With Examples
- The
getScores()
method, the method used to get the scores for all auto-scorable Questions in the assessment.