Math Formula Cloze

Description

In the Math Formula Cloze question, the student enters a math response into one or more response boxes, set by the author. These response boxes can be placed on more than one line, as part of an equation or inline with text.

Figure 1 - Math Formula Cloze question example.



Create a Question

Enter the question stem in the Compose Question area. If you want to insert some math in the stimulus, you can use the Math Editor. Note that the student will not be able to interact with math entered this way. To access the Math Editor, click inside the Compose Question text area and select Math Editor from the Rich Text Editor toolbar (see Figure 2).

Figure 2 - Rich Text Editor panel with Math Editor button.

A new window with a keypad will pop up and you will be able to add a LaTeX or MathML expression.

The Formula template area is used in Cloze Math questions to add text with response boxes. For each math equation you can either use the Insert Response button in the Rich Text Editor panel (see Figure 3), manually enter {{response}} or use the keyboard shortcut "__" (double underscore).

Figure 3 - Rich Text Editor panel with Insert Response button.


Figure 4 shows how the Template Markup area looks like for the cloze question with two response containers.

Figure 4 - Formula template area.

Under the Edit individual response containers heading in the Layout section, each response container in the Formula template area is labelled Container 1, Container 2, etc. You can use the Template area in the section to add multiple response boxes within one container, e.g. two response boxes in the form of a fraction. See below breakdown of attributes available:

  • Template - You can enter complex math equations and response boxes here. The Template is a LaTeX only area. Math expressions can be added using the LaTeX Keypad, like in the Formula template section above. You can also add multiple response boxes here - see example in Figure 5.

    Figure 5 - Entering math and response boxes within a container.

  • Width and Height - You can enter container width and height in pixels, i.e. 60px and 30px, in order to change standard dimensions.

Follow these steps in order to configure validation:

  1. Insert a value in the Point(s) box to define a score for the question. The default value is 1.

  2. Underneath the Point(s) area, you will see a Response submenu. There will be as many submenus as you have response containers in the Formula template area. Each sumbenu will be named Response 1, Response 2 , etc. depending on the number of containers. Here you set validation separately for each container.

  3. Within each submenu select the scoring method and enter the correct response in the Value field. In this example, we want the student response for both containers to be exactly the same as in the validation area. In this case, we are going to select equivLiteral as a scoring method. You can then enter the correct responses for both containers as shown in Figure 6. Remember that everything that has been entered into the Template area must be entered into the Value area.

    Figure 6 - Validation settings for a Cloze Math Question with two response containers.

  4. Each scoring method has additional options that allows authors to set more precise validation conditions. A breakdown of all options associated with certain scoring methods can also be found in our Formula tutorials. When you select a scoring method, all extra options will be displayed below the Value field.

  5. Some more complex math questions will need a second scoring method applied. You can combine several scoring methods to set more strict validation rules. For instance, you may want the system to accept a response that is not only symbolically equivalent but also is presented in factorised form. In such case you would need to add another method called isFactorised. Below the first scoring method you will see the +Add button. Click on it in order to add a new scoring method. Another module will appear below. Validation should be set up as described above.

More Options

Additional formatting options can be found under More Options:

Scoring

Unscored/Practice usage - Removes all scoring from the question.

Penalty point(s) - The value entered here will be deducted from the student for an incorrect answer.

Minimum score if attempted - Set attempt marks for the question.

Check answer button - Show or hide the Check answer button from the student.

Check answer attempts - The value entered here refers to how many times the student can use the Check answer button, before it is disabled.


Layout

Transparent background - If this is enabled, the background of the response area will match the colour of the rest of the background area.

Response minimum width (px) - Enter, in pixels, the minimum width of the response area.

Template font scale - Scales the font relative to the question's font size. The default value is 150%.

Response container (global) and Edit invidiual response containers - Configure the Width and the Height, in pixels, for either all response containers, or for specified response containers.


Keypad

Type - Select from a Floating keypad, a Block keypad, a Block on focus keypad, or no keypad.

Show keypad hints - Enable or disable hints on the keypad, such as keyboard shortcuts and symbol group titles that are shown on the top left corner of the keypad when hovering over a symbol group key.

Number pad - Customise the number pad in this section.

Symbols - Select what symbol groups will be shown to the student, or create custom symbol groups.


Text blocks

Use this option when you want to define a list of custom units (such as g, kg, cm, oz, etc.) that will not be rendered as LaTeX when the student types them into the response area.

Example 1 - Math Formula Cloze question with 1 response box in the Template Area and the Question in Latex Area.

Source
{
    "instant_feedback": true,
    "is_math": true,
    "response_containers": [
        {
            "template": "\\frac{1}{5}\\times{{response}}=1"
        }
    ],
    "stimulus": "<strong>Complete the following equation<\/strong>",
    "template": "<p>{{response}}<\/p>\n",
    "text_blocks": [],
    "type": "clozeformula",
    "ui_style": {
        "type": "block-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                [
                    {
                        "method": "equivSymbolic",
                        "value": "\\frac{1}{5}\\times5=1",
                        "options": {
                            "allowDecimal": false,
                            "inverseResult": false
                        }
                    }
                ]
            ]
        }
    }
}


Example 2 - Math Formula Cloze - Same Question as above but the Question is in the Template area and nothing is entered into the Latex Area.

Source
{
    "instant_feedback": true,
    "is_math": true,
    "response_container": {
        "template": ""
    },
    "response_containers": [],
    "stimulus": "<strong>Complete the following equation.<\/strong>",
    "template": "<p>\\(\\frac{1}{5}\\times\\){{response}}\\(=1\\)<\/p>\n",
    "text_blocks": [],
    "type": "clozeformula",
    "ui_style": {
        "type": "block-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                [
                    {
                        "method": "equivLiteral",
                        "value": "5",
                        "options": {
                            "allowDecimal": false,
                            "inverseResult": false,
                            "decimalPlaces": 10,
                            "ignoreOrder": false
                        }
                    }
                ]
            ]
        }
    }
}


Example 3 - Math Formula Cloze with text added around the response box in the Template area.

Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "<p>A pizza is cut into 12 equal parts:<\/p>\n",
    "template": "Jim ate&nbsp;\\(\\frac{3}{12}\\)of the pizza. &nbsp;Patrick ate {{response}} if Neil has eaten\\(\\frac{1}{3}\\).",
    "text_blocks": [],
    "type": "clozeformula",
    "ui_style": {
        "type": "block-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                [
                    {
                        "method": "equivLiteral",
                        "value": "\\frac{5}{12}",
                        "options": {
                            "allowDecimal": false,
                            "inverseResult": false,
                            "ignoreOrder": false
                        }
                    }
                ]
            ]
        }
    }
}


Example 4 - Math Formula Cloze - Multi part math problem.

Source
{
    "instant_feedback": true,
    "is_math": true,
    "response_containers": [
        {
            "template": "\\frac{{response}}{100}"
        }
    ],
    "stimulus": "<p><strong>Use a ratio box to find the equivalent ratio out of \\(100\\).<br \/>\nThen write the ratio as a percent.<\/strong><\/p>\n",
    "symbols": [
        "basic",
        "qwerty",
        "algebra"
    ],
    "template": "<p style=\"text-align: center;\">The ratio&nbsp;\\(\\frac{1}{2}\\)is equivalent to the ratio&nbsp;{{response}},<\/p>\n\n<p style=\"text-align: center;\">so the ratio\\(\\frac{1}{2}\\)&nbsp;is equivalent to&nbsp;{{response}}%.<\/p>\n",
    "text_blocks": [],
    "type": "clozeformula",
    "ui_style": {
        "response_font_scale": "normal",
        "type": "block-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                [
                    {
                        "method": "equivSymbolic",
                        "value": "\\frac{50}{100}",
                        "options": {
                            "allowDecimal": false,
                            "inverseResult": false
                        }
                    }
                ],
                [
                    {
                        "method": "equivSymbolic",
                        "value": "50",
                        "options": {
                            "allowDecimal": false,
                            "inverseResult": false
                        }
                    }
                ]
            ]
        }
    }
}