UOW logo
UOW logo

Embedded answers (Cloze) question type (Moodle Quiz)

Note: This article is part of the Moodle Quiz questions collection.

The embedded answer (Cloze) question type is dynamic and flexible, allowing for a variety of student interactions within a single quiz question. These include (but are not limited to):

  1. Dropdown menu: Students select the correct answer from a dropdown menu of options
  2. Short answer: Students type in their responses directly into the blank spaces
  3. Numerical: Students enter a numerical value in the blank (screenshot)
  4. Multiple choice: Students choose the correct answer(s) from a list of options
Quiz - Cloze Question Type Example

When authoring Cloze questions, a special syntax must be used to generate the questions, correct answers, and any feedback to be provided. Learning this syntax can be challenging at first, but there is a Cloze question editor embedded within the Atto editor in Moodle which simplifies the process. The path to access this will be detailed below.

Caution is required when generating this type of question, as student responses must exactly match the responses you have written into the question. Therefore, you need to consider alternative spellings, plurals and phrases to avoid discrepancies where a student’s answer may be correct, despite lacking the precise alignment with predetermined responses that is required.

Note: When designing quiz questions of any type, accessibility must be considered. For example, using appropriate alt text when adding images, or ensuring formatting is correct when representing data visually

 

Why?

The Cloze question type excels through its versatility, enabling a thorough assessment of students’ comprehension though various interactive elements. It promotes active engagement and critical thinking, while being adaptable across various subjects and learning contexts. This makes it a robust choice for assessment, though due to its complex syntax and specific answer criteria, it’s best reserved for the multifaceted questions described. For simpler queries featuring only one format, it’s best to use other, more specific question types, such as Multiple choice.

 

How?

To first create a Moodle Quiz activity, please refer to the Moodle Quiz article.

General information on how to add questions to a quiz and set up question banks can be found in the Introduction to Moodle Quiz question types article.

 
  1. From the Site settings menu, click More, then select Question Bank from the dropdown menu.
    Moodle - Site Settings Menu - More - Question Bank
  2. In the question bank, click the Create a new question… button.
  3. Click the Embedded answers (Cloze) radio button and then click the Add button.
    Moodle - Question Bank - Add Question - Embedded answers (Cloze)
  4. Enter a descriptive name in the Question name text box.
    Note: It is recommended to set up the quiz to not display question names. This option is set on the Quiz setup page. 
  5. Enter the text you would like to appear to students, including sub-questions, in the Question text box.
    Note: See the Question format section below for more detailed instructions.
  6. Click the Decode and verify the question text button. Moodle will check the syntax of your question and output any errors that need to be addressed. 
  7. Once you have rectified any errors, click the Save changes button.
    Note: You can also preview your question by clicking the Save changes and continue editing button, then click the Preview button.

 

When creating a Cloze question in Moodle you can use the question builder available in the text editor. For an in-depth guide on using this editor, please refer to the Moodle Support Documentation – Cloze editor for Atto

To access the editor, click the Cloze editor button in the Atto toolbar:   
Quiz - Atto Editor - Cloze Editor Button

This editor is a good place to start, but to fully utilise the flexibility of the Cloze question type it is helpful to understand the structure of the question. Every Cloze sub-question follows the same simple structure: 

Sub-questions must start with {

{

Define the weight of the sub-question (which can be zero). This is used for the calculation of the overall question grade. 

{1

Enter the question type with a : before and after.

{1 :MULTICHOICE:

This example uses the Multiple choice question type, but there are other types available, as outlined in the question types section below.

Enter all possible responses (both correct and incorrect) separated by a ~

{1 :MULTICHOICE:~Option1~Option2~Option3

Add an = immediately before an answer to in indicate it is correct.

{1 :MULTICHOICE:~Option1~=Option2~Option3

Enter a # to mark the beginning of a feedback message. You can add feedback to all or some of the possible answers. 

{1 :MULTICHOICE:~Option1#Feedback if option 1 selected~=Option2~Option3#Feedback if option 3 selected}

Finally, as shown above, a sub-question must always be closed with }.

Note: For a more detailed description of the syntax for a Cloze sub question, please refer to the Moodle Support Documentation – Embedded Answers (Cloze) question type

 

Example question

What is the capital of Australia? {1:MULTICHOICE:~Sydney#Sydney is the most populated city, but not the capital~=Canberra#Correct~Melbourne#Try again} 

Editing screen 
Quiz - Cloze Editing Screen Example

Question preview 
Quiz - Cloze Question Preview Example

 

There are three types of sub-questions that can be included in a Cloze question:

  • Multiple choice/multi response
  • Short answer
  • numerical


Multiple choice questions
 

There are several types of Multiple choice questions available in Cloze questions. Below is a table indicating the functionality and format of each type. 

Key Word Alignment Answers Shuffled Number Answers Allowed
MULTICHOICE Drop-down list No Single correct answer
MULTICHOICE_H Horizontal list No Single correct answer
MULTICHOICE_V Vertical list No Single correct answer
MULTICHOICE_S Drop-down list Yes Single correct answer
MULTICHOICE_HS Horizontal list Yes Single correct answer
MULTICHOICE_VS Vertical list Yes Single correct answer
MULTIRESPONSE Vertical list No Multiple answers allowed
MULTIRESPONSE_H Horizontal list No Multiple answers allowed
MULTIRESPONSE_S Vertical list Yes Multiple answers allowed
MULTIRESPONSE_HS Horizontal list Yes Multiple answers allowed


Short answer questions 
 

This question type allows a short text input that is graded against one or more model answers.   

SHORTANSWER - Case is not important 

SHORTANSWER_C- Case must match model answers  

  • A Short answer sub-question can have more than one correct answer indicated by an =
     e.g. {1:SHORTANSWER:~=this answer is correct~=this answer is also correct} 
  • Feedback can be provided for all or some of the possible answers; start feedback with a #
  • For information about awarding partial marks for a partially correct sub-question, please refer to the Moodle Support Documentation – Embedded Answers (Cloze) question type

Numerical questions 

From the student’s perspective, this sub-question type looks the same as a short-answer question. A numerical question accepts a numerical text input that is graded against one or more model answers. The benefit of using this question type for numerical input over a Short answer is that it can check the answer with some tolerances. Examples of some possible tolerances include: 

  • if the correct answer is 0.5 the following answers would also be marked correct: .5   0.500   0,5   0,5 
  • if the correct answer is 6.1 and a tolerance of ±0.1 has been defined, acceptable answers are those between 6.0 and 6.2 

The structure of a numerical question is very similar to the other question types: 

    1. Open the question with
    2. Define the weight of the question 
    3. Define the question type ‘:NUMERICAL:’ 
    4. Add one or more correct answers and define tolerances 
      • Define the correct answer with ~=
      • The correct answer should be a numerical value – e.g. ~=2.9
      • Add the tolerance (optional) separate from answer with : - e.g. for correct answer 2.9 with tolerance of ±0.2 type ~=2.9:0.1

Numerical question examples:

{1:NUMERICAL:~=9:1}
This question will mark 9 ±1 as correct
{1:NUMERICAL:~=10.6:0.2}
This question will mark 10.6 ± 0.2 as correct 
{1:NUMERICAL:~=1.2~=5.6}
This question will mark 1.2 or 5.6 as correct
{1:NUMERICAL:~=8:0.5~=18:0.5}
This question will mark 8 ± 0.5 OR 18 ± 0.5 

 

Related information

Contact Learning, Teaching & Curriculum

Request support

Contribute to the Hub

Provide feedback

UOW logo
Aboriginal flagTorres Strait Islander flag
On the lands that we study, we walk, and we live, we acknowledge and respect the traditional custodians and cultural knowledge holders of these lands.
Copyright © 2024 University of Wollongong
CRICOS Provider No: 00102E | Privacy & cookie usage | Copyright & disclaimer