Classification classification

Classification (classification)

The classification Question is referenced by its Question type in the code, which is classification. This Question allows students to categorize a list of possible responses, in the form of words or images, into a table.

Examples

{
    "response_id": "60020",
    "type": "classification",
    "ui_style": {
        "column_count": 3,
        "row_count": 3,
        "column_titles": ["Prime", "Odd (Not Prime)", "Even (Not Prime)"],
        "row_header": "Range",
        "row_titles": ["> 1<br>< 10", ">= 10 <br>< 20", ">= 20<br>< 30"],
        "row_titles_width": "60px",
        "row_min_height": "100px"
    },
    "possible_responses": ["2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29"],
    "validation": {
        "scoring_type": "partialMatch",
        "valid_response": {
            "value": [
                [0, 1, 3, 5],
                [7],
                [2, 4, 6],
                [9, 11, 15, 17],
                [13],
                [8, 10, 12, 14, 16],
                [21, 27],
                [19, 23, 25],
                [18, 20, 22, 24, 26]
            ]
        },
        "penalty": 0.5
    },
    "instant_feedback": true
}

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.

  • metadata.distractor_rationale_response_level array

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

  • 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: "classification"

  • 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"

  • ui_style.validation_stem_numeration string

    Numeration character to be displayed to the left of the validation label.

    Default: "number"

  • ui_style.possibility_list_position string

    Defines where the possibility list sits relative to the input zone.

    Default: "bottom"

  • ui_style.column_count number

    Defines the number of columns the classification table will have

    Default: 1

  • ui_style.row_count number

    Defines the number of rows the classification table will have

    Default: 1

  • ui_style.column_titles array

    Column titles for the classification table, if there are more titles then columns the excess titles will be ignored

  • ui_style.row_header string

    Row header for the classification table, if there is no row title this attribute will be ignored.

  • ui_style.row_titles array

    Row titles for the classification table, if there are more titles then rows the excess titles will be ignored

  • ui_style.row_min_height stringUnits

    Minimum height for the input table rows.

    Default: "60px"

  • ui_style.row_titles_width stringUnits

    The width of the column containing the row titles in the classification table

    Default: "60px"

  • ui_style.show_drag_handle boolean

    Determines whether to show the drag handle.

    Default: true

  • feedback_attempts number

    If instant_feedback is true, this field determines how many times the user can click on the 'Check Answer' button. 0 means unlimited.

    Default: 0

  • instant_feedback boolean

    Flag to determine whether to display a 'Check Answer' button to provide instant feedback to the user.

    Default: false

  • validation object

    In this section, configure the correct answer(s) for the question.

  • validation.allow_negative_scores boolean

    Negative scores will be normalised to zero by default. Allowing negative scores, on the other hand, means that the score can drop below zero when penalties are applied.

    Default: false

  • validation.penalty number

    Value indicating the marks deducted for an incorrect response.

    Default: 0

  • validation.min_score_if_attempted number

    Positive value indicating the minimum score if a student attempted the question.

    Default: 0

  • validation.scoring_type string

    The way in which marks are distributed for the question. Possible options:
    'exactMatch': Exact Match - All parts of the question must be answered correctly to receive a mark.
    'partialMatchV2': Partial Match per Cell - Max Score - Each correct cell will be scored individually, and the overall question score will be divided between cells.
    'partialMatch': Partial Match per Cell - Each correct cell will be awarded an individual score.
    'partialMatchElement': Partial Match per Element - Each correct response element will be awarded an individual score.
    'partialMatchElementV2': Partial Match per Element V2 - Each correct response element will be scored individually, and the overall question score will be divided between responses.

    Default: "exactMatch"

  • validation.unscored boolean

    When enabled, this option will remove all scoring from the question. This is useful for creating practice questions.

    Default: false

  • validation.valid_response object

    An object containing the valid response score and value.

  • validation.valid_response.score number

    Score awarded for the correct response(s).

    Default: 1

  • validation.valid_response.value array

    A 3 dimensional array that consists of: An array of different valid responses (in most cases there will only be one valid response), each valid response is an array that contains an entry for each cell. each cell is an array of response index's. The response index is based on the index value in the possible_responses attribute.

  • validation.automarkable boolean

    Defines whether the question will be marked automatically, or must be marked manually.

    Default: true

  • validation.alt_responses array

    Add an alternate response if there is more than one correct overall solution to a question.

  • validation.alt_responses[ ].score number

    Score if the alternative response is correct.

    Default: 1

  • validation.alt_responses[ ].value array

  • validation.alt_responses[ ][ ].score number

    Score if the alternative response is correct.

    Default: 1

  • validation.alt_responses[ ][ ].value array

  • group_possible_responses groupPossibleResponses

    Categorise possible responses into different groups, with each group having its own heading.

    Default: false

  • description string

    Deprecated See stimulus_review.
    Description of the question and its context to be displayed. It supports HTML entities.

  • shuffle_options boolean

    Use this to shuffle classification possible responses order.

    Default: false

  • duplicate_responses boolean

    When true the items from the possible_responses will be reusable infinite times.

    Default: false

  • max_response_per_cell number

    The number of possible responses each cell can have, the cell can have unlimited responses if this field is empty or 0

    Default: 0

Response format

The data returned in the response format for this Question is an array of arrays, each containing indexes, which are the responses that the student dragged into the drop zones in the table.

Response format examples

{
    "value": [
        [
            0,
            2
        ],
        [
            3,
            1
        ]
    ],
    "type": "array",
    "apiVersion": "v2.173.0",
    "revision": 1,
    "feedbackAttemptsCount": 3
}

Response attributes

  • value array

    The responses that were dragged into the drop zones in the table.

  • 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 "array".

  • apiVersion string

    The version of the Questions API that returned this reponse.

  • revision numeric

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

  • feedbackAttemptsCount numeric

    Keeps track of the number of feedback attempts.

Was this article helpful?

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