getResponses - Methods - Items API

Items API Methods

getResponses()

Returns an object containing all response objects for each Question that has been attempted by the learner in the current assessment.

You would want to use this method so that you can obtain all the responses and save them to your own application database, for example.

Examples

var responses = itemsApp.getResponses();
console.log(responses);

// Returns
{
    1fcc9839e559d98af05bcf9a3d863960: {
        apiVersion: "v2.197.0",
        revision: 1,
        type: "array",
        value: [0,1,2,3,4]
    }
}

Arguments

None.

Return value

Type object

An object where each key is the Question reference and the values are the JSON response objects for each Question. See above example.

Related articles

  • The getQuestions() method, the method used to get the JSON object data for all Questions in the assessment.
  • The getItems() method, the method used to get the JSON object data for all Items in the assessment.
Was this article helpful?

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