Essay with rich text longtextV2

Essay with rich text (longtextV2)

The essay with rich text Question is referenced by its Question type in the code, which is longtextV2. This Question allows students to submit an essay response to a Question, of up to 10,000 words.

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: "longtextV2"

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

    The minimum height of the text entry area. Input as units. Example: "100px"

  • ui_style.max_height stringUnits

    The max height of the text input including units. Example: "100px"

  • validation object

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

  • validation.max_score number

    The highest score a marker can award to this question response.

  • validation.min_score_if_attempted number

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

    Default: 0

  • validation.unscored boolean

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

    Default: false

  • description string

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

  • formatting_options array

    An array containing strings of text formatting options to make available. Available options:

    • bold
    • italic
    • underline
    • unorderedList
    • orderedList
    • removeFormat
    • codeInline
    • codeEditor
    • alignLeft
    • alignCenter
    • alignRight
    • alignJustify
    • superscript
    • subscript
    • indentIncrease
    • indentDecrease
    • textDirectionLtr
    • textDirectionRtl
    • insertHorizontalRule
    • table
    • charactermap
    • image
    • undo
    • redo

    Default: ["bold","italic","underline","|","unorderedList","orderedList"]

  • max_length number

    Maximum number of words that can be entered in the field. Maximum: 100,000 chars ~ 10,000 words

    Default: 10000

  • character_map array

    The character map will display the default set of special characters.
    If an Array, the character map button will show and display only the array of characters.
    IMPORTANTThe HTML document will require a charset of utf-8: <meta charset="utf-8">

    Default: false

  • spellcheck boolean

    Control the input/textarea attributes spellcheck, autocapitalize, autocomplete and autocorrect. See "Spell check MDN". "Autocapitalize MDN". "Autocomplete MDN" " Autocorrect ". Note these are browser features and may not always be available.

    Default: true

  • disable_auto_link boolean

    Sets whether urls, entered by the user should automatically become clickable-links.

    Default: false

  • submit_over_limit boolean

    Determines if the user is able to save/submit when the word limit has been exceeded.

    Default: false

  • placeholder string

    Placeholder text that can be added into the response entry area, which disappears when user starts typing.

  • show_word_limit string

    Determines how the word limit UI will display. Options are the following strings:
    "always": Word limit is always shown and updated as the user types
    "on-limit": Word limit is only displayed when the word limit is exceeded
    "off": No word limit it shown.

    Default: "always"

  • text_blocks array

    List of custom text blocks. Maximum length 9 characters.

    Default: []

  • show_word_count boolean

    Displays the word count underneath the entry dialog.

    Default: true

  • showHints boolean

    Disables hints, including keyboard shortcuts and group titles, shown on the keypad's top left corner when hovering over a symbol group key.

    Default: true

  • horizontal_layout boolean

    Enables a horizontal layout with ten columns and two rows.

    Default: false

Response format

The data returned in the response format for this Question is the essay text, the response that the student entered (with text formatting), and a word count that gives an idea of how much text was written (often, a minimum or maximum number of words is required).

Response format examples

{
    "value": "<p>Shall I compare thee to a summer's day?
    Thou art more lovely and more temperate:
    Rough winds do shake the darling buds of May,
    And summer's lease hath all too short a date;
    Sometime too hot the eye of heaven shines,
    And often is his gold complexion dimm'd;
    And every fair from fair sometime declines,
    By chance or nature's changing course untrimm'd;
    But thy eternal summer shall not fade,
    Nor lose possession of that fair thou ow'st;
    Nor shall death brag thou wander'st in his shade,
    When in eternal lines to time thou grow'st:
    So long as men can breathe or eyes can see,
    So long lives this, and this gives life to thee.</p>",
"wordCount": 122,
"type": "string",
"apiVersion": "v2.173.0",
"revision": 1
}

Response attributes

  • value string

    The essay text, the response that the student entered, with information for text formatting.

  • wordcount numeric

    A value indicating how much text was written in the student response.

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

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