setPractice - Methods - Rubric Editor API

Rubric Editor API Methods

setPractice()

Sets the values to use for the Test panel such as the stimulus, sources, and responses.

You would want to use this method to manually set the question content that authors will test their rubric against. For example, when opening the Rubric Editor in your application, you can pass in the current question's stimulus and any passage content as sources so they are immediately available in the Test tab.

Note Only the properties included in the input object are updated. Properties not included are left unchanged.

Examples

await editor.setPractice({
    stimulus: '<p>Write a short response about the water cycle.</p>',
    sources: [
        {
            title: 'Reference material',
            content: '<p>The water cycle describes the continuous movement of water...</p>'
        }
    ],
    responses: [
        { content: '<p>Water evaporates from the surface...</p>' },
        { content: '<p>Precipitation returns water to the ground...</p>' }
    ]
});

Arguments

  • practice object

    The Test panel content to set.

    The following properties are supported.

    • stimulus string

      The HTML content of the question stimulus to display in the Test panel. This is typically the question prompt the learner would see.

    • sources array[object]

      A list of sources to display in the Test panel, such as content and materials associated with the question.

      See Feedback Aide Sources for more information.

      The following properties are supported.

      • title string

        The title of the source.

      • content string

        The HTML content of the source.

    • responses array[object]

      A list of sample responses to populate the response fields in the Test panel.

      The following properties are supported.

      • content string

        The HTML content of the response.

      • autoScores array[object]

        Manually selects the Feedback Aide score indicators for this response.

      • manualComparison array[object]

        Selects the expected user scores for this response.

      • creditsUsed number

        The number of credits consumed by the test run for this response.

Return value

Type Promise

Resolves when the Test panel state has been updated.

Was this article helpful?

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