Rating rating

Rating (rating)

The rating Question is referenced by its Question type in the code, which is rating. This Question allows students to select a rating by clicking on a bar of buttons showing a range of ratings, for example 25%, 50%, 75%, and 100%. The rating Question is useful for obtaining student feedback, or as a rubric for use by the teacher when providing feedback to the student. This is a non-auto-scored Question.

Examples

{
    "response_id": "60007",
    "type": "rating",
    "options" : [
        {
            "value": 10,
            "label": "1",
            "tint": "#ff121c",
            "description": "Unsatisfactory"
        }, {
            "value": 20,
            "label": "2",
            "tint": "#ff9104",
            "description": "Satisfactory"
        }, {
            "value": 30,
            "label": "3",
            "tint": "#fdff30",
            "description": "Good"
        }, {
            "value": 40,
            "label": "4",
            "tint": "#cffa2e",
            "description": "Excellent"
        }
    ],
    "initial_value" : 30
}

Attributes

  • is_math boolean

    Set to true to have LaTeX or MathML contents to be rendered with mathjax.

    Default: false

  • metadata object

    Object containing additional information about the question.

  • metadata.distractor_rationale string

    Used to display individual response feedback/rationale to the student.

  • metadata.rubric_reference string

    A unique identifier for the rubric to be used with the question - defaults to course rubric if assigned in activity

  • metadata.sample_answer string

    A sample answer to be displayed on the Learnosity Reports API. HTML is supported.

  • metadata.acknowledgements string

    References for any text passages, documents, images etc. used in the question.

  • stimulus string

    The question stimulus. This can include text, tables, images, resources and LaTeX entered via the Math Editor.

  • stimulus_review string

    HTML/Text content displayed only in review state rendered above the response area. Supports embedded Feature <span> tags. Will override stimulus in review state.

  • instructor_stimulus string

    HTML/Text content displayed when showInstructorStimulus is set to true on the activity. Supports embedded Feature <span> tags.

  • type string

    Type of question being asked, e.g. 'association'

    Default: "rating"

  • ui_style object

    Object used to control different aspects of the UI

  • ui_style.fontsize string

    Controls the size of base font for this question. Options are among 'small', 'normal', 'large', 'xlarge' and 'xxlarge'.

    Default: "normal"

  • options array

    The response options available for selection.

  • options[ ].value string

    Indicates the worth of the rating and is stored as the response when selected.

  • options[ ].label string

    The content that is displayed in the rating option button. This can be a percentage, number or a text label. It also supports unicode for emojis.

  • options[ ].label_tooltip string

    A message displayed above the rating option button when a user hovers over the button.

  • options[ ].tint string

    Sets the color for the response option tooltip, the text for that response option in the information tooltip, and the response when displayed in review state.

  • options[ ].description string

    Text that describes the rating criteria. It will be shown within the information tooltip, if enabled.

  • options[ ][ ].value string

    Indicates the worth of the rating and is stored as the response when selected.

  • options[ ][ ].label string

    The content that is displayed in the rating option button. This can be a percentage, number or a text label. It also supports unicode for emojis.

  • options[ ][ ].label_tooltip string

    A message displayed above the rating option button when a user hovers over the button.

  • options[ ][ ].tint string

    Sets the color for the response option tooltip, the text for that response option in the information tooltip, and the response when displayed in review state.

  • options[ ][ ].description string

    Text that describes the rating criteria. It will be shown within the information tooltip, if enabled.

  • initial_value string

    The value of the option that will be marked as selected on first rendering. Can be used to pre populate the score with an automatically assigned score

  • hide_info_icon boolean

    When enabled, this option hides the information button next to the rating options that have been set.

    Default: false

Response format

The data returned in the response format for this Question is the rating selected by the student.

Response format examples

{
    "value": "2",
    "type": "numeric",
    "apiVersion": "v2.173.0",
    "revision": 1
}

Response attributes

  • value string

    The rating selected by the student.

  • type string

    Informs the scoring engine about what kind of data to expect in the values entered by the student. For this Question type, you must always supply a string for this attribute with the value "numeric".

  • apiVersion string

    The version of the Questions API that returned this response.

  • revision numeric

    Keeps track of the number of Question attempt submissions, i.e. how many times the student answered the Question and submitted it.

Was this article helpful?

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