Number line association

Number line association

Examples

{
    "instant_feedback": true,
    "labels": {
        "frequency": 20,
        "show_max": true,
        "show_min": true
    },
    "line": {
        "left_arrow": true,
        "max": 3,
        "min": 0,
        "right_arrow": true
    },
    "points": ["1.22", "2.2", "5"],
    "response_id": "60027",
    "snap_to_ticks": true,
    "stimulus": "Position the tokens at the closest points. If the number isn't on the line, do not place it.",
    "ticks": {
        "distance": ".2",
        "show": true
    },
    "type": "numberline",
    "ui_style": {
        "width": "370px"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "value": [{
                "point": "1.22",
                "position": "1.3"
            }, {
                "point": "2.2",
                "position": "2.2"
            }]
        },
        "threshold": 0.2
    }
}

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 for storing the distractor rationales that map to responses in the same order for use/rendering by the host environment.

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

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

    The height of the drawn area with trailing px unit eg. "250px". If undefined or empty, the board's height will scaled automatically based on the contents

    Default: "auto"

  • ui_style.width stringUnits

    The width of the drawn area with trailing px unit eg. "550px".

    Default: "550px"

  • ui_style.number_line_margin stringUnits

    The distance from the number line's extremes to the sides with trailing px unit e.g. "5px"

    Default: "5px"

  • ui_style.points_distance_x stringUnits

    The distance in X axis between two points with trailing px unit eg. "10px"

    Default: "10px"

  • ui_style.points_distance_y stringUnits

    The distance in Y axis between two points with trailing px unit eg. "20px"

    Default: "20px"

  • ui_style.line_position number

    At which percentage of the height should the Number Line appear

    Default: 35

  • ui_style.title_position number

    At which percentage of the height should the Line's Title appear

    Default: 50

  • ui_style.points_box_position number

    At which percentage of the height should the Points box container start

    Default: 60

  • 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 - Each correct response element will be scored individually, and the overall question score will be divided between responses.
    'partialMatch': Partial Match per Response - Each correct response element will be awarded an individual score.

    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 objects defining the correct position for a given point, e.g. {point: '3', position: '3'}

  • validation.valid_response.value[ ].point string

    The point that should be validated.

  • validation.valid_response.value[ ].position string

    The position on the number line the point should represent.

  • validation.valid_response.value[ ][ ].point string

    The point that should be validated.

  • validation.valid_response.value[ ][ ].position string

    The position on the number line the point should represent.

  • 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[ ].value[ ].point string

    The point that should be validated.

  • validation.alt_responses[ ].value[ ].position string

    The position on the number line the point should represent.

  • validation.alt_responses[ ].value[ ][ ].point string

    The point that should be validated.

  • validation.alt_responses[ ].value[ ][ ].position string

    The position on the number line the point should represent.

  • validation.alt_responses[ ][ ].score number

    Score if the alternative response is correct.

    Default: 1

  • validation.alt_responses[ ][ ].value array

  • validation.alt_responses[ ][ ].value[ ].point string

    The point that should be validated.

  • validation.alt_responses[ ][ ].value[ ].position string

    The position on the number line the point should represent.

  • validation.alt_responses[ ][ ].value[ ][ ].point string

    The point that should be validated.

  • validation.alt_responses[ ][ ].value[ ][ ].position string

    The position on the number line the point should represent.

  • validation.threshold number

    Threshold for the distance a point can be from the valid and still be marked as correct.

    Default: 0

  • line object

    Defines the minimum and maximum values on the number line.

  • line.min number

    The minimum value on the number line

    Default: -10

  • line.max number

    The maximum value on the number line

    Default: 10

  • line.left_arrow boolean

    Whether to draw an arrow on the left hand side of the line

    Default: false

  • line.right_arrow boolean

    Whether to draw an arrow on the right hand side of the line

    Default: false

  • line.title string

    Line's title to display underneath it

  • ticks object

    Defines the Number line ticks

  • ticks.distance string/number

    The distance between ticks on the number line

    Default: 1

  • ticks.fractions string

    If the distance is set to a fraction this will determine in which format the fractions will be rendered on the Number Line. Select to display only:

    • Not normalized and mixed fractions.
    • Normalized and mixed fractions.
    • Improper fractions.

    Default: "not-normalized-fractions"

  • ticks.base string

    Value on the line, where rendering of ticks should start

    Default: "min-value-based"

  • ticks.show boolean

    Whether to draw ticks on the line or not

    Default: false

  • labels object

    Defines the labels to draw on the number line

  • labels.frequency number

    Frequency with which to draw labels

  • labels.points string

    Specific point at which labels need to be drawn. Separate values by commas, eg: -2.5, 2.5

  • labels.show_min boolean

    Whether to draw a label on the min value of the number line

    Default: false

  • labels.show_max boolean

    Whether to draw a label on the max value of the number line

    Default: false

  • snap_to_ticks boolean

    Whether dragged points should snap to the ticks specified by ticks.distance and labels.points

    Default: false

  • snap_vertically boolean

    Whether dragged points should snap to the line when dropped above it

    Default: true

  • points array

    Array containing the points the user has to position on the number line. Possible formats are: text, number, fraction and mixed fraction. The field doesn't support LaTeX because of rendering complexity.

Was this article helpful?

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