Quiz - create an embedded answers (Cloze) question



1. Plan  |   2. Build  |  3. Test   | 4. Administer   |  5. Review  ||  Support

quiz iconThis entry relates to the Quiz activity.

Embedded answers (Cloze) question is very powerful and flexible question type, but probably the most complex to setup.

It is powerful because:

  • There can be many sub-questions within one cloze question, each weighted as you require.
  • Sub-questions can be rendered/displayed in a range of formats – text/number entry, drop-down lists, radio button or checkbox lists.
  • Different sub-question formats can be used within one question.
  • The question can be laid out as required with the sub-questions embedded where required.
To create the embedded sub-question, you place some code at the required place in the text of your question. The code is enclosed in {} and has a specific syntax. The elements of the code define the weight of the sub-question, the format, the answer possibilities, the correct answer & feedback for answer options.

Example (Cloze code is shown in red)

Analyse the graph and complete the following
1.    Which line is not linear {1:MULTICHOICE:Line A~Line B~%100%Line C}
2.    Which line would have a negative intercept on the y axis {1:MULTICHOICE_V: Line A~%100%Line B~Line C}
3.    Use the values on the graph for Line A to calculate the slope  {1:NUMERICAL:=3} and Intercept {1:NUMERICAL:=4}
4.    What is plotted on the y-axis {1:SHORTANSWER:%100%Concentration (mg/l)~%50%Concentration#units are required for full marks}

In the cloze code,
  • answer options are separated with ~
  • correct answer is indicated by = or %100%. Part marks are defined with %x% where x is the % of marks assigned
  • indicates the feedback for the preceding option
The example code will look like this:


Moodle docs has more details of sub-question types and detailed syntax (code) explanations  

One of the strengths is that multiple questions are asked together e.g interpreting a number of elements of a graph/photograph/test report etc, thus creating a scenario in a single multipart question. A bank of such multipart questions can then be developed for random scenario delivery or formative practice as all components are contained in one question. If each interpretation element was a separate question, random scenarios can’t be delivered as you cannot control which questions are delivered together.

Steps


  1. In the quiz (Quiz > Quiz administration > Edit quiz) or question bank (Administration > Question bank), click Create a new question

  2. Select Embedded and click Add



  3. Give the question a Category and Question name (required field)



  4. Enter question text (this will include Cloze text – see note above) (required field)
    Tip:  You could try the Moodle Cloze editor (external resource) which can generate cloze from your text. Once generated, you can copy and paste it into the Question text area in this question.



  5. Fill in General feedback (students will see this once they have answered the question)



  6. Give a penalty and hint for each incorrect try



  7. Click Save changes


Syntax of a cloze question

{1: MULTICHOICE: Text for option 1 # Feedback for option 1 ~ %100% Text for option 2 # Feedback for option 2 ~ %50%Text for option 3 # Feedback for option3}

Required components
{ }
Cloze sub-questions begin and end with braces
1:
the number represents the weight of this sub-question part in the overall question
MULTICHOICE
the sub-question type - it controls how the sub-question is displayed
~
separator between answer options
#
indicates the feedback that would be provided to the answer option preceding it
%100
indicates the % marks for the following option (correct answers are sometimes also indicated with =)
The above syntax would be rendered as a dropdown menu with 3 options. Option 2 would give full marks for that sub-question and option 3 would score half marks.


More examples


We work at {1:SHORTANSWER:=Flinders} University
We work at {1:SHORTANSWER:%100%Flinders} University

The above 2 examples are essentially the same
  • = indicates correct answer
  • %100% indicates the option will get 100% of the marks for that question part
We work at {1:SHORTANSWER:%100%Flinders~ %50%Flinder} University
  • In this example 50% would be given for the answer “Flinder”
We work at {1:SHORTANSWER:%100%Flinders~ %50%Flinder#Almost right, but there should be an s on the end} University
  • In this example 50% would be given for the answer “Flinder” and the student would be given the feedback “Almost right, but there should be an s on the end”
We work at {1:MULTICHOICE:Adelaide~%100%Flinders ~Monash~Griffith} University
  • This example produces a dropdown with the options of Adelaide, Flinders, Monash and Griffith.  “Flinders” is correct
We work at {1:MULTICHOICE:%25%Adelaide#Well you’ve got the right state, just the wrong uni~ %100%Flinders~Monash~Griffith} University
  • This example produces a dropdown with the options of Adelaide, Flinders, Monash and Griffith.  “Flinders” is correct, but “Adelaide” will earn you 25% of the marks and you will get some feedback “Well you’ve got the right state, just the wrong uni”

» How-to glossary