Label image with drag . drop imageclozeassociationV2

Label image with drag & drop (imageclozeassociationV2)

The label image with drag & drop Question is referenced by its Question type in the code, which is imageclozeassociationV2. This Question allows students to select from a list of potential answers and drag them to the correct response box on the image. There is the option of allowing more than one correct response per container.

Examples

{
    "response_id": "60015",
    "type": "imageclozeassociationV2",
    "duplicate_responses": true,
    "img_src": "//assets.learnosity.com/questiontypes/content/World_Map_AU_US_BR_RU.png",
    "instant_feedback": true,
    "possible_responses": ["<span style=\"font-size:20px;padding:5px;\">♂</span> Male", "<span style=\"font-size:20px;padding:5px;\">♀</span> Female"],
    "response_container": {
        "width": "105px"
    },
    "response_containers": [{
        "pointer": "top"
    }, {
        "pointer": "right"
    }, {
        "pointer": "bottom"
    }, {
        "pointer": "right"
    }],
    "response_positions": [{
        "x": 61.91,
        "y": 18.05
    }, {
        "x": 30.22,
        "y": 53.79
    }, {
        "x": 21.61,
        "y": 20.58
    }, {
        "x": 78.75,
        "y": 61.73
    }],
    "validation": {
        "scoring_type": "partialMatch",
        "valid_response": {
            "value": ["<span style=\"font-size:20px;padding:5px;\">♀</span> Female", "<span style=\"font-size:20px;padding:5px;\">♀</span> Female", "<span style=\"font-size:20px;padding:5px;\">♂</span> Male", "<span style=\"font-size:20px;padding:5px;\">♂</span> Male"]
        }
    }
}

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

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

  • 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.show_drag_handle boolean

    Determines whether to show the drag handle.

    Default: false

  • ui_style.transparent_possible_responses boolean

    Determines whether or not responses are transparent.

    Default: false

  • ui_style.possibility_list_width string

    Determines the width of the possibility list in percent or pixels. (percent by default).

    Default: false

  • 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

    Defines the scoring approach used. Possible options:
    'exactMatch': Exact Match - Entire response must match exactly
    'partialMatchV2': Partial Match - A relative part of the score will be given for each correct response area
    'partialMatch': Partial Match per response - Cumulative Score value will be given for each correct response area

    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

    An array containing the valid responses for each response in response_positions in corresponding order.

  • 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

  • response_container response container object

    Use Response Container (global) to make changes to all response boxes at once.

  • response_container.height stringUnits

  • response_container.width stringUnits

  • response_container.pointer string

    Add response pointer next to the response container. Values can be one of 'top', 'right', 'bottom', 'left'

    Default: "none"

  • response_container.vertical_top boolean

    This setting ensures that the position of the response boxes stays at the position set by the author, regardless of changes to the font size or container's size, i.e. it ensures that the position of the responses stays at top: 0, left: 0 of the container.

    Default: false

  • response_container.wordwrap boolean

    Determines if the possible response text should wrap or show an ellipsis when placed in a response container.

    Default: false

  • response_container.background_color string

    An RGBA string defining the background color for all response containers.

    Default: "rgba(255, 255, 255, 1)"

  • response_container.show_border boolean

    Determines whether or not borders are visible in response containers.

    Default: true

  • response_containers array

  • response_containers[ ].x number

    x value indicating the horizontal position of the top left corner of the response field on the image. The value is a percentage of the total width of the image.

    Default: 0

  • response_containers[ ].y number

    y value indicating the vertical position of the top left corner of the response field on the image. The value is a percentage of the total height of the image.

    Default: 0

  • response_containers[ ].height string

    The height of the response container. By default any value you pass will be converted to percents notation, e.g. "100%". Passing any other notation (e.g. 5, or "5px") is supported for backwards compatibility, but it will be converted back to percents notation.

    Default: "44px"

  • response_containers[ ].width string

    The width of the response container. By default any value you pass will be converted to percents notation, e.g. "100%". Passing any other notation (e.g. 5, or "5px") is supported for backwards compatibility, but it will be converted back to percents notation.

    Default: "150px"

  • response_containers[ ].background_color string

    An RGBA string defining the background color for a response container.

  • response_containers[ ].show_border boolean

    Determines whether or not borders are visible on response containers.

    Default: true

  • response_containers[ ].aria_label stringOrderedList

    Accessibility booster

    Default: ""

  • response_containers[ ][ ].x number

    x value indicating the horizontal position of the top left corner of the response field on the image. The value is a percentage of the total width of the image.

    Default: 0

  • response_containers[ ][ ].y number

    y value indicating the vertical position of the top left corner of the response field on the image. The value is a percentage of the total height of the image.

    Default: 0

  • response_containers[ ][ ].height string

    The height of the response container. By default any value you pass will be converted to percents notation, e.g. "100%". Passing any other notation (e.g. 5, or "5px") is supported for backwards compatibility, but it will be converted back to percents notation.

    Default: "44px"

  • response_containers[ ][ ].width string

    The width of the response container. By default any value you pass will be converted to percents notation, e.g. "100%". Passing any other notation (e.g. 5, or "5px") is supported for backwards compatibility, but it will be converted back to percents notation.

    Default: "150px"

  • response_containers[ ][ ].background_color string

    An RGBA string defining the background color for a response container.

  • response_containers[ ][ ].show_border boolean

    Determines whether or not borders are visible on response containers.

    Default: true

  • response_containers[ ][ ].aria_label stringOrderedList

    Accessibility booster

    Default: ""

  • image imageObject

    Image settings are defined here.

  • image.src string

    The URL to the image file.

  • image.alt textarea

    The alternative text of the image.

    Default: ""

  • image.width number

    The width of the image as pixels (e.g. 100).

  • image.height number

    The height of the image as pixels (e.g. 100).

  • image.title string

    The text to be shown on hover.

  • image.prevent_scale boolean

    Prevent image to be scaled along with screen size change

  • image.scale boolean

    Allow image to be scaled along with font size

  • image.preview hidden

    Preview of the chosen image

  • group_possible_responses groupPossibleResponses

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

    Default: false

  • img_src string

    Absolute URI for the background image.

  • duplicate_responses boolean

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

    Default: false

  • shuffle_options boolean

    Use this to shuffle imageclozeassociation possible responses order.

    Default: false

  • max_response_per_zone number

    Maximum number of responses allowed to be dropped per container.

    Default: 1

Response format

The data returned in the response format for this Question is the answers, which the student dragged onto the correct response box(es) on the image.

Response format examples

{
    "value": [
        [
            "Belfast"
        ],
        [
            "Galway"
        ],
        [
            "Athlone"
        ],
        [
            "Dublin"
        ],
        [
            "Cork"
        ]
    ],
    "type": "array",
    "apiVersion": "v2.173.0",
    "revision": 1,
    "feedbackAttemptsCount": 1
}

Response attributes

  • value array

    The answers, which the student dragged onto the correct response box(es) on the image.

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

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