getScores - Methods - Items API

Items API Methods


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.


// Standard usage
var allScores = itemsApp.getScores();

// Callback usage
var myScoringCallback = function (scores) {

// Returns
    myResponseId1: {
        max_score: 3,
        score: 3
    myResponseId2: {
        max_score: 1,
        score: null  // not attempted


  • 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

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.