Gapfill question type

Revision as of 20:29, 17 May 2013 by Marcus Green (talk | contribs)

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: Gapfill question type.

The gapfill question type allows the creation of questions with multiple answers by using special characters. For example The [cat] sat on the [mat] will create a question with two gaps where the answers are cat and mat. This type of question can be useful for teaching languages.

Gapfill Edit

By default the student will see the questions in dragdrop mode where they can use the mouse to drag the answers from a displayed list into the matching field. The javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field.

At Runtine

Gapfill runtime

There is a drop down list of alternative delimiting characters ## {} and @@ which will allow a question in the form The {cat} sat on the {mat}. It is possible to select dropdown or gapfill mode. Dropdown shows a list of all possible answers in each field and gapfill shows only an empty field with no list of options to select.

By default marking is not case sensitive. So if the student enters CAT in a field of the form [cat] it will be considered correct. The editing form has an option to make an individual question case sensitive.

Each (correct) field is worth exactly 1 mark, so The [cat] sat on the [mat] has a maximum possible score of 2 marks. There is no concept of negative marking. The question supports the standard behaviours, hinting and combined feedback options.

Gapfill complete

The editing form offers a field for adding wrong or distractor options. These only make sense in dragdrop or dropdown mode. Wrong answers must be entered as a comma delimited list and a shuffled list of correct and incorrect answers will be displayed with the question.

Regular Expressions

It is possible to use regular expressions in answers, for example if you wanted both the use and UK spelling of colour as an answer you could add a field with the broken bar operator to act as an OR as in "What [color|colour] is the sky?" More complex regular expressions should also work. You could use regular expressions to mitigate common spelling errors, e.g. {cal[e|a]ndar} (note the selection of alternative delimiters to get around the use of the square brackets in the operator. This question type makes no attempt to check the validity of your regular expressions. You can read more about using regular expressions in the documentation for the PReg type see and also

Show Correct Responses

In interactive mode (set in the question behaviour of the quiz) it is possible to have a question indicate the number of questions that are correct and for this to be displayed for each field. This takes the form of red/green background colour and a tick or cross. To make this happen check the "show number of correct responses option" in the hint field under the multiple tries option.

hints r

No Duplicates Mode

This allows a question in the form Name three examples of X. So you could ask "Name the colours of medals awarded in the Olympic Games". The syntax of the question fields would be [gold|silver|medal] four times. Note the separator is the broken bar character which acts as an OR operator. Make sure you select gapfill mode for this type of question.

By checking the No duplicates box in the question editing form, when it comes to marking any duplicates will be discarded. Correct answers will still be displayed with a green check/tick (as they are actually correct), but marks will only be awarded for the first occurance of the selection. The student will not be warned they have entered duplicates, they just will not get the marks.

Alternative Gapfill Questions

This question was designed to be simpler to use than the core Cloze question type. however the gapfill type has fewer features than the Cloze type.

The OU (UK Open University) has two Moodle Question Types that covers similar ground.