<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/402/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marcusgreen</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/402/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marcusgreen"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/Special:Contributions/Marcusgreen"/>
	<updated>2026-05-15T09:26:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=145388</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=145388"/>
		<updated>2023-01-06T21:21:41Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Double Not [!!] gap */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching English and is broken into approximately 31 categories such as irregular verbs, tenses etc., each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import questions#Importing questions from an existing file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Display Answers checkboxes==&lt;br /&gt;
Because only certain combinations of the checkboxes are logical, the checkboxes will become enabled/disabled according to the dropdown selected. So for example it makes no sense to have single use draggable selected with dropdown questions. This animation shows the checkboxes being enabled/disabled.&lt;br /&gt;
[[Image:gapfill_checkboxes2.gif|Checkboxes changing with dropdown selection]]&lt;br /&gt;
&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc. etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg question type]] and also&lt;br /&gt;
[[Regular Expression Short-Answer question type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not gap ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
[[Image:blank_correct_gaps.gif|Gapfill Categories]]&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Prevent typing into gaps==&lt;br /&gt;
By default students can type into the gaps when dragdrop mode is enabled.  This can be prevented by adding some css  by a user with admin access via the&lt;br /&gt;
additional HTML form. This can be found at http://yourmoodle.com/admin/settings.php?section=additionalhtml&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
.que.gapfill input.droptarget {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    pointer-events: none;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is the pointer-events:none that does the work. This is only a style change and a determined/knowledgeable student could always work around it.&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in other modules that use the quiz engine including the excellent [[StudentQuiz module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=145387</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=145387"/>
		<updated>2023-01-06T21:20:18Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Double Not gap [!!] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching English and is broken into approximately 31 categories such as irregular verbs, tenses etc., each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import questions#Importing questions from an existing file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Display Answers checkboxes==&lt;br /&gt;
Because only certain combinations of the checkboxes are logical, the checkboxes will become enabled/disabled according to the dropdown selected. So for example it makes no sense to have single use draggable selected with dropdown questions. This animation shows the checkboxes being enabled/disabled.&lt;br /&gt;
[[Image:gapfill_checkboxes2.gif|Checkboxes changing with dropdown selection]]&lt;br /&gt;
&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc. etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg question type]] and also&lt;br /&gt;
[[Regular Expression Short-Answer question type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not [!!] gap ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
[[Image:blank_correct_gaps.gif|Gapfill Categories]]&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Prevent typing into gaps==&lt;br /&gt;
By default students can type into the gaps when dragdrop mode is enabled.  This can be prevented by adding some css  by a user with admin access via the&lt;br /&gt;
additional HTML form. This can be found at http://yourmoodle.com/admin/settings.php?section=additionalhtml&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
.que.gapfill input.droptarget {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    pointer-events: none;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is the pointer-events:none that does the work. This is only a style change and a determined/knowledgeable student could always work around it.&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in other modules that use the quiz engine including the excellent [[StudentQuiz module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=145386</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=145386"/>
		<updated>2023-01-06T21:18:43Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Tables with category columns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching English and is broken into approximately 31 categories such as irregular verbs, tenses etc., each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import questions#Importing questions from an existing file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Display Answers checkboxes==&lt;br /&gt;
Because only certain combinations of the checkboxes are logical, the checkboxes will become enabled/disabled according to the dropdown selected. So for example it makes no sense to have single use draggable selected with dropdown questions. This animation shows the checkboxes being enabled/disabled.&lt;br /&gt;
[[Image:gapfill_checkboxes2.gif|Checkboxes changing with dropdown selection]]&lt;br /&gt;
&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc. etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg question type]] and also&lt;br /&gt;
[[Regular Expression Short-Answer question type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not gap [!!] ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
[[Image:blank_correct_gaps.gif|Gapfill Categories]]&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Prevent typing into gaps==&lt;br /&gt;
By default students can type into the gaps when dragdrop mode is enabled.  This can be prevented by adding some css  by a user with admin access via the&lt;br /&gt;
additional HTML form. This can be found at http://yourmoodle.com/admin/settings.php?section=additionalhtml&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
.que.gapfill input.droptarget {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    pointer-events: none;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is the pointer-events:none that does the work. This is only a style change and a determined/knowledgeable student could always work around it.&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in other modules that use the quiz engine including the excellent [[StudentQuiz module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:blank_correct_gaps.gif&amp;diff=145385</id>
		<title>File:blank correct gaps.gif</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:blank_correct_gaps.gif&amp;diff=145385"/>
		<updated>2023-01-06T21:15:46Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Gaps using !! to indicate that the correct response is to leave blank/empty&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=145384</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=145384"/>
		<updated>2023-01-06T21:14:20Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Double Not */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching English and is broken into approximately 31 categories such as irregular verbs, tenses etc., each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import questions#Importing questions from an existing file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Display Answers checkboxes==&lt;br /&gt;
Because only certain combinations of the checkboxes are logical, the checkboxes will become enabled/disabled according to the dropdown selected. So for example it makes no sense to have single use draggable selected with dropdown questions. This animation shows the checkboxes being enabled/disabled.&lt;br /&gt;
[[Image:gapfill_checkboxes2.gif|Checkboxes changing with dropdown selection]]&lt;br /&gt;
&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc. etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg question type]] and also&lt;br /&gt;
[[Regular Expression Short-Answer question type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not gap [!!] ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
[[Image:blank_correct_gaps.gif|Gapfill Categories]]&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Prevent typing into gaps==&lt;br /&gt;
By default students can type into the gaps when dragdrop mode is enabled.  This can be prevented by adding some css  by a user with admin access via the&lt;br /&gt;
additional HTML form. This can be found at http://yourmoodle.com/admin/settings.php?section=additionalhtml&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
.que.gapfill input.droptarget {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    pointer-events: none;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is the pointer-events:none that does the work. This is only a style change and a determined/knowledgeable student could always work around it.&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in other modules that use the quiz engine including the excellent [[StudentQuiz module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Formulas_question_type&amp;diff=144315</id>
		<title>Formulas question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Formulas_question_type&amp;diff=144315"/>
		<updated>2022-10-02T09:04:45Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background:#d9edf7;color:#000000;padding:8px 20px 16px;border:1px solid #d9d9d9;border-radius:4px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For complete, up-to-date documentation on the Formulas question type, please see [https://https://dynamiccourseware.org// &#039;&#039;&#039;https://dynamiccourseware.org/&#039;&#039;&#039;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;br /&gt;
[[Category:Questions]]&lt;br /&gt;
[[Category:Mathematics]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta fórmulas]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=User:Marcus_Green&amp;diff=144314</id>
		<title>User:Marcus Green</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=User:Marcus_Green&amp;diff=144314"/>
		<updated>2022-10-02T08:59:35Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Changed moodleformulas link to dynamiccourseware (may need course id appended)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please see https://dynamiccourseware.org/&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Wordselect_question_type&amp;diff=143825</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Wordselect_question_type&amp;diff=143825"/>
		<updated>2022-07-16T16:13:44Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Description */  dealing with duplicate words&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/qtype_wordselect&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_wordselect/issues&lt;br /&gt;
|discussion = https://moodle.org/mod/forum/discuss.php?d=337262&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
You can install automatically, or download manually, this plugin from [https://moodle.org/plugins/qtype_wordselect the Moodle plugins database]. You can also download the latest development version of this plugin from [https://github.com/marcusgreen/moodle-qtype_wordselect GitHub].&lt;br /&gt;
&lt;br /&gt;
If you download the ZIP file, follow the generic [[Installing plugins]] documentation. The files must be in the directory moodle\question\type\wordselect. If you uncompressed the ZIP file from GitHub, please rename &#039;moodle-qtype_wordselect-master&#039; into &#039;wordselect&#039;.&lt;br /&gt;
==Word Select Question Type==&lt;br /&gt;
A very easy to use Moodle question type that allows a teacher to create text where one or more words are indicated to be the correct answers. The student is presented with the text and can select one or more words and is marked according to if they are correct.&lt;br /&gt;
&lt;br /&gt;
You can see a short video of it in action in this YouTube video&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=FGv-c7fJIxo&lt;br /&gt;
==Description==&lt;br /&gt;
This question type is designed to ask students to select text according to some criteria. For example &amp;quot;select the verb in the following sentence&amp;quot;. Conceptually this is a little like a multiple choice question type (with multiple selectable options). The student responds by clicking on words to select them, and clicking a second time to unselect them.&lt;br /&gt;
&lt;br /&gt;
It provides an introduction field where words will not be selectable at runtime and a questiontext field. In the question text any words with braces around them will be considered correct. All words can be clicked-on to select. A word can occur multiple times, but only the ones with the braces around it in the source will be considered correct.&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_nouns2.png|Wordselect creation|600px]]&lt;br /&gt;
&lt;br /&gt;
A word is considered to be some text with space around it. HTML characters are stripped out first to generate a list of potentially selectable words, meaning it is possible to put words within a table. At runtime the question looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_selected3.png|Wordselect selected word|600px]]&lt;br /&gt;
&lt;br /&gt;
Pedagogically, this type of question has the advantage of it being possible to give no clue as to which word is to be selected. You might address the problem by offering four multiple choice options with different words in locations but this will narrow down the selection that the student can possibly make. By making every word selectable the student has little guide as to which is the correct answer.&lt;br /&gt;
&lt;br /&gt;
If it is not possible to use square braces (e.g. in the context of maths where they have a special meaning), alternative delimters are available from the Delimit Characters dropdown&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_delimitchar.png|Wordselect delimit characters|400px]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as &#039;The cat {sat} on the mat&#039;.&lt;br /&gt;
==Formatting in selectable text==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All formatting except the &amp;amp;lt;sub&amp;amp;gt;,&amp;amp;lt;sup&amp;amp;gt;,&amp;amp;lt;i&amp;amp;gt;,&amp;amp;lt;u&amp;amp;gt;,&amp;amp;lt;b&amp;amp;gt; is stripped from selectable text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These display as expected i.e. &amp;lt;sub&amp;gt;sub&amp;lt;/sub&amp;gt; &amp;lt;sup&amp;gt;sup&amp;lt;/sup&amp;gt; &#039;&#039;i&#039;&#039; &amp;lt;u&amp;gt;u&amp;lt;/u&amp;gt; &#039;&#039;&#039;b&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Multiword mode==&lt;br /&gt;
If any text is surrounded by double delimiters e.g. &amp;lt;nowiki&amp;gt;[[cat]]&amp;lt;/nowiki&amp;gt; it will be treated as correct, and any selectable non correct text must be given single delimiters e.g. [mat]. Text can thus include multiple words. CSS Formatting indicates which text is selectable.&lt;br /&gt;
[[File:ws_multiword.png]]&lt;br /&gt;
&lt;br /&gt;
The code for the body of this is as follows.&lt;br /&gt;
&lt;br /&gt;
To make &amp;lt;nowiki&amp;gt;[[more than]]&amp;lt;/nowiki&amp;gt; &amp;lt;nowiki&amp;gt;[[one]]&amp;lt;/nowiki&amp;gt; word selectable add double delimiters for correct text and single for incorrect text. Once one item has double delimiters any text without delimiters will not be selectable.&lt;br /&gt;
&lt;br /&gt;
[This is selectable incorrect text]&lt;br /&gt;
&lt;br /&gt;
The multiword mode allows the creation of multiple choice questions as follows.&lt;br /&gt;
&lt;br /&gt;
How many beans make five?&lt;br /&gt;
&lt;br /&gt;
[a] one&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[b]] &amp;lt;/nowiki&amp;gt;five&lt;br /&gt;
&lt;br /&gt;
[c] two&lt;br /&gt;
&lt;br /&gt;
[d] none&lt;br /&gt;
==Category Questions==&lt;br /&gt;
Words can be placed inside tables and students asked to identify which words match the category in the heading:&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_table_categories2.png|Wordselect table categories|300px]]&lt;br /&gt;
&lt;br /&gt;
This is the code used to create that table:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
   &amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #c0c0c0;&amp;quot;&amp;gt;Feline&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background-color: #c0c0c0;&amp;quot;&amp;gt;Canine&amp;lt;/td&amp;gt;&lt;br /&gt;
   &amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;wolf&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
   &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;cow&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;zebra&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
   &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[cat]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;lion&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Creating a Wordselect question with a nice table ===&lt;br /&gt;
* The Moodle [[Text editor]] has an option for creating tables which can have any number of columns and rows.&lt;br /&gt;
* You begin by creating a new question of the Wordselect type.&lt;br /&gt;
* Choose a good name for your new question.&lt;br /&gt;
* Write the introduction.&lt;br /&gt;
* Expand the Atto toolbar by clicking on its very first button (blue square in the next image).&lt;br /&gt;
* Locate the table creation button (green square) and click on it:&lt;br /&gt;
[[File:wordselect_category_table_creation_01.png|600px]]&lt;br /&gt;
* For this example we will use a table with 3 columns and 4 rows (the top row will be used for the categories: Canine, Feline and Avian):&lt;br /&gt;
[[File:Wordselect step 2 .png|400px]]&lt;br /&gt;
* Notice in the above image that we left both the &#039;Caption&#039; and &#039;Caption position&#039; options blank. This is intentional, because the regular table captions are just too large for this situation. Also notice that we have selected 4 rows and 3 columns&lt;br /&gt;
[[File:Wordselect step 2.png|600px]]&lt;br /&gt;
* We now have an empty table, that we will fill with our words:&lt;br /&gt;
[[File:Wordselect step 3.png|300px]]&lt;br /&gt;
* Notice that we put the right answers (cat, dog and canary) enclosed in square brackets&lt;br /&gt;
* Our question in now complete (but we will later see that it is not very nice). &lt;br /&gt;
* We will now save the changes and preview the question (notice the looking glass icon in the following image):&lt;br /&gt;
[[File:Wordselect step 4.png|500px]]&lt;br /&gt;
* The question works:&lt;br /&gt;
[[File:Wordselect step 5.png|500px]]&lt;br /&gt;
* But the lack of the gridlines to signal the cells could make this table a bit difficult to use:&lt;br /&gt;
[[File:Wordselect step 6.png|400px]]&lt;br /&gt;
* We will now put some gridlines inside the table with this instruction inside angle brackets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The trick is finding where and how to put it.&lt;br /&gt;
&lt;br /&gt;
* We will now click on the Atto button tool with the &amp;lt;&amp;gt; characters to expand the HTML code inside the Question text box:&lt;br /&gt;
[[File:Wordselect step 7.png|600px]]&lt;br /&gt;
* And now we have a lot of HTML instructions, that we don&#039;t really need to understand. We will just insert the gridlines instruction right after the first instruction that seems to be related to our table (look at the image below), and we will see if it works:&lt;br /&gt;
[[File:Wordselect step 8.png|600px]]&lt;br /&gt;
* It works: &lt;br /&gt;
[[File:Wordselect step 9.png|300px]]&lt;br /&gt;
*And now we will put some nice colours in some of our text.&lt;br /&gt;
* For this we will use a Moodle additional plugin for the Atto editor, that we must first download from [https://moodle.org/plugins/browse.php?list=category&amp;amp;id=53 the Moodle plugins database].&lt;br /&gt;
** We wil need to add the [https://moodle.org/plugins/atto_morefontcolors more font colours additional plugin for Atto]&lt;br /&gt;
** Install the plugin directory as usual in lib/editor/atto/plugins.&lt;br /&gt;
** Then visit Site Administration &amp;gt; Plugins &amp;gt; Atto &amp;gt; More font colors to define the colors you want your users to be able to chose from. As a default, the same colors as the core atto_fontcolor colours are defined.&lt;br /&gt;
** Finally, enable the plugin by adding &#039;morefontcolors&#039; (without the quotes) in the Atto toolbar settings.&lt;br /&gt;
* We can now choose a nice colour for our selected text:&lt;br /&gt;
[[File:Wordselect step 10.png|200px]]&lt;br /&gt;
* This will give us a nicer-looking table for our Wordselect question:&lt;br /&gt;
[[File:Wordselect step 11.png|200px]]&lt;br /&gt;
* We still might want to change the background colour for the first row cells.&lt;br /&gt;
* We will now install the [https://moodle.org/plugins/view.php?id=1479 More background colours] additional plugin for Atto, and see if it does the job...&lt;br /&gt;
[[File:Wordselect step 12.png|300px]]&lt;br /&gt;
*Notice in the above image the two new buttons in the Atto toolbar: more font colours (blue square) and more background colours (yellow square), that we will use to give our first row the intended font and background colours:&lt;br /&gt;
[[File:Wordselect step 13.png|300px]]&lt;br /&gt;
* So, it seems we have managed to create a Wordselect question with a nice table, without having to learn any HTML code syntax. &lt;br /&gt;
* We could now customize the colour palettes available for the more font colours and the more background colours plugins, by replacing the default values with some [https://en.wikipedia.org/wiki/Web_colors#HTML_color_names HTML hexadecimal color codes from the wikipedia].&lt;br /&gt;
* Perhaps a more elegant technique might have been been to use the [https://moodle.org/plugins/view.php?id=1424 Styles plugin for Atto], but that remains to be tested later...&lt;br /&gt;
==Grading==&lt;br /&gt;
An attempt will be graded as correct if all correct and no incorrect words are selected. If any&lt;br /&gt;
incorrect words are selected it will be marked as partially correct. In interactive mode (with hints) the penalty&lt;br /&gt;
defined in the editing form will be applied with each new check/attempt. This defaults to 33.33%&lt;br /&gt;
&lt;br /&gt;
The marking is designed to discourage a strategy of &amp;quot;select all words so you are bound to&lt;br /&gt;
select all the right words&amp;quot;. Each incorrectly selected word will deduct a mark down to zero.&lt;br /&gt;
For example, selecting one correct and one incorrect mark will result in zero marks. Selecting one correct and&lt;br /&gt;
two incorrect will also result in zero. A count of all incorrect marks is deducted from a count of&lt;br /&gt;
all correct marks unless there is a negative result, in which case the mark is set to zero.&lt;br /&gt;
&lt;br /&gt;
If this seems harsh, e.g. the wordpenalty value can reduce the deuction made for each incorrect selection&lt;br /&gt;
==Wordpenalty==&lt;br /&gt;
Instead of the default 1 mark deduction for each incorrect selection this can be used to set a percentage of a mark deduction.&lt;br /&gt;
[[Image:word_penalty2.png|500px|Word Penalty]]&lt;br /&gt;
==Feedback==&lt;br /&gt;
If the quiz has the right answer display selected, square braces will be shown around any unselected&lt;br /&gt;
correct words. The square braces are not related to the default characters used in the editing interface.&lt;br /&gt;
This is designed to allow the user to see the correct responses within the text rather than look at the feedback&lt;br /&gt;
area (an approach used in some other question types).&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect partially_correct_answers.png]]&lt;br /&gt;
==Mobile Use==&lt;br /&gt;
It has been tested with a variety of mobile devices both android and iOS tablets and phones. It also supports the Moodle mobile App.&lt;br /&gt;
==Accessibility==&lt;br /&gt;
It is possible to move forwards and backwards through words with tab and shift-tab. Words can be selected and unselected using the space bar. It uses the aria tags to help screen readers recognise when a word is selected and unselected.&lt;br /&gt;
==Sample Word squarequestion==&lt;br /&gt;
The question type comes with a set of sample questions in [[XML]] format in a file called sample_questions.xml (it is located in the moodle\question\type\wordselect. directory). These illustrate issues such as non ASCII characters, the inclusion of images and the creation of word squares where each &amp;quot;word&amp;quot; is a single letter and the user has to click on the letters that make up words (e.g. find the animals in this square).&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect example 1.png|400px]]&lt;br /&gt;
==Sample Comprehension question==&lt;br /&gt;
This is an example question of using Wordselect for an English literature reading comprehension assessment:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect example reading comprehension.png|700px]]&lt;br /&gt;
&lt;br /&gt;
You can find instructions on importing questions at [[Import questions]].&lt;br /&gt;
==Compatibility with other third party Moodle plugins==&lt;br /&gt;
This question type has been briefly tested in the [[Question practice module]] and the [[Question Creation module]] (QCreate).&lt;br /&gt;
[[Category:Questions]]&lt;br /&gt;
[[es:Tipo de pregunta seleccionarpalabra]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Wordselect_question_type&amp;diff=143630</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Wordselect_question_type&amp;diff=143630"/>
		<updated>2022-06-13T09:29:06Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/qtype_wordselect&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_wordselect/issues&lt;br /&gt;
|discussion = https://moodle.org/mod/forum/discuss.php?d=337262&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
You can install automatically, or download manually, this plugin from [https://moodle.org/plugins/qtype_wordselect the Moodle plugins database]. You can also download the latest development version of this plugin from [https://github.com/marcusgreen/moodle-qtype_wordselect GitHub].&lt;br /&gt;
&lt;br /&gt;
If you download the ZIP file, follow the generic [[Installing plugins]] documentation. The files must be in the directory moodle\question\type\wordselect. If you uncompressed the ZIP file from GitHub, please rename &#039;moodle-qtype_wordselect-master&#039; into &#039;wordselect&#039;.&lt;br /&gt;
&lt;br /&gt;
==Word Select Question Type==&lt;br /&gt;
&lt;br /&gt;
A very easy to use Moodle question type that allows a teacher to create text where one or more words are indicated to be the correct answers. The student is presented with the text and can select one or more words and is marked according to if they are correct.&lt;br /&gt;
&lt;br /&gt;
You can see a short video of it in action in this YouTube video&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=FGv-c7fJIxo&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This question type is designed to ask students to select text according to some criteria. For example &amp;quot;select the verb in the following sentence&amp;quot;. Conceptually this is a little like a multiple choice question type (with multiple selectable options). The student responds by clicking on words to select them, and clicking a second time to unselect them.&lt;br /&gt;
&lt;br /&gt;
It provides an introduction field where words will not be selectable at runtime and a questiontext field. In the question text any words with braces around them will be considered correct. All words can be clicked-on to select.&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_nouns2.png|Wordselect creation|600px]]&lt;br /&gt;
&lt;br /&gt;
A word is considered to be some text with space around it. HTML characters are stripped out first to generate a list of potentially selectable words, meaning it is possible to put words within a table. At runtime the question looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_selected3.png|Wordselect selected word|600px]]&lt;br /&gt;
&lt;br /&gt;
Pedagogically, this type of question has the advantage of it being possible to give no clue as to which word is to be selected.  You might address the problem by offering four multiple choice options with different words in locations but this will narrow down the selection that the student can possibly make. By making every word selectable the student has little guide as to which is the correct answer.&lt;br /&gt;
&lt;br /&gt;
If it is not possible to use square braces (e.g. in the context of maths where they have a special meaning), alternative delimters are available from the Delimit Characters dropdown&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_delimitchar.png|Wordselect delimit characters|400px]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as &#039;The cat {sat} on the mat&#039;.&lt;br /&gt;
&lt;br /&gt;
==Formatting in selectable text==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All formatting except the &amp;amp;lt;sub&amp;amp;gt;,&amp;amp;lt;sup&amp;amp;gt;,&amp;amp;lt;i&amp;amp;gt;,&amp;amp;lt;u&amp;amp;gt;,&amp;amp;lt;b&amp;amp;gt; is stripped from selectable text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These display as expected i.e. &amp;lt;sub&amp;gt;sub&amp;lt;/sub&amp;gt; &amp;lt;sup&amp;gt;sup&amp;lt;/sup&amp;gt; &#039;&#039;i&#039;&#039; &amp;lt;u&amp;gt;u&amp;lt;/u&amp;gt; &#039;&#039;&#039;b&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Multiword mode==&lt;br /&gt;
&lt;br /&gt;
If any text is surrounded by double delimiters e.g. &amp;lt;nowiki&amp;gt;[[cat]]&amp;lt;/nowiki&amp;gt; it will be treated as correct, and any selectable non correct text must be given single delimiters e.g. [mat]. Text can thus include multiple words. CSS Formatting indicates which text is selectable.&lt;br /&gt;
[[File:ws_multiword.png]]&lt;br /&gt;
&lt;br /&gt;
The code for the body of this is as follows.&lt;br /&gt;
&lt;br /&gt;
To make  &amp;lt;nowiki&amp;gt;[[more than]]&amp;lt;/nowiki&amp;gt; &amp;lt;nowiki&amp;gt;[[one]]&amp;lt;/nowiki&amp;gt; word selectable add double delimiters for correct text and single for incorrect text. Once one item has double delimiters any text without delimiters will not be selectable.&lt;br /&gt;
&lt;br /&gt;
[This is selectable incorrect text]&lt;br /&gt;
&lt;br /&gt;
The multiword mode allows the creation of multiple choice questions as follows.&lt;br /&gt;
&lt;br /&gt;
How many beans make five?&lt;br /&gt;
&lt;br /&gt;
[a] one&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[b]] &amp;lt;/nowiki&amp;gt;five&lt;br /&gt;
&lt;br /&gt;
[c] two&lt;br /&gt;
&lt;br /&gt;
[d] none&lt;br /&gt;
&lt;br /&gt;
==Category Questions==&lt;br /&gt;
Words can be placed inside tables and students asked to identify which words match the category in the heading:&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_table_categories2.png|Wordselect table categories|300px]]&lt;br /&gt;
&lt;br /&gt;
This is the code used to create that table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
   &amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #c0c0c0;&amp;quot;&amp;gt;Feline&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background-color: #c0c0c0;&amp;quot;&amp;gt;Canine&amp;lt;/td&amp;gt;&lt;br /&gt;
   &amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;wolf&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
   &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;cow&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;zebra&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
   &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[cat]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;lion&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Creating a Wordselect question with a nice table ===&lt;br /&gt;
* The Moodle [[Text editor]] has an option for creating tables which can have any number of columns and rows.&lt;br /&gt;
* You begin by creating a new question of the Wordselect type.&lt;br /&gt;
* Choose a good name for your new question.&lt;br /&gt;
* Write the introduction.&lt;br /&gt;
* Expand the Atto toolbar by clicking on its very first button  (blue square in the next image).&lt;br /&gt;
* Locate the table creation button (green square) and click on it:&lt;br /&gt;
&lt;br /&gt;
[[File:wordselect_category_table_creation_01.png|600px]]&lt;br /&gt;
&lt;br /&gt;
* For this example we will use a table with 3 columns and 4 rows (the top row will be used for the categories: Canine, Feline and Avian):&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 2 .png|400px]]&lt;br /&gt;
&lt;br /&gt;
* Notice in the above image that we left both the &#039;Caption&#039; and &#039;Caption position&#039; options blank. This is intentional, because the regular table captions are just too large for this situation. Also notice that we have selected 4 rows and 3 columns&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 2.png|600px]]&lt;br /&gt;
&lt;br /&gt;
* We now have an empty table, that we will fill with our words:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 3.png|300px]]&lt;br /&gt;
&lt;br /&gt;
* Notice that we put the right answers (cat, dog and canary) enclosed in square brackets&lt;br /&gt;
* Our question in now complete (but we will later see that it is not very nice). &lt;br /&gt;
* We will now save the changes and preview the question (notice the looking glass icon in the following image):&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 4.png|500px]]&lt;br /&gt;
&lt;br /&gt;
* The question works:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 5.png|500px]]&lt;br /&gt;
&lt;br /&gt;
* But the lack of the gridlines to signal the cells could make this table a bit difficult to use:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 6.png|400px]]&lt;br /&gt;
&lt;br /&gt;
* We will now put some gridlines inside the table with this instruction inside angle brackets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The trick is finding where and how to put it.&lt;br /&gt;
&lt;br /&gt;
* We will now click on the Atto button tool with the &amp;lt;&amp;gt; characters to expand the HTML code inside the Question text box:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 7.png|600px]]&lt;br /&gt;
&lt;br /&gt;
* And now we have a lot of HTML instructions, that we don&#039;t really need to understand. We will just insert the gridlines instruction right after the first instruction that seems to be related to our table (look at the image below), and we will see if it works:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 8.png|600px]] &lt;br /&gt;
&lt;br /&gt;
* It works: &lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 9.png|300px]]&lt;br /&gt;
&lt;br /&gt;
*And now we will put some nice colours in some of our text.&lt;br /&gt;
* For this we will use a Moodle additional plugin for the Atto editor, that we must first download from [https://moodle.org/plugins/browse.php?list=category&amp;amp;id=53 the Moodle plugins database].&lt;br /&gt;
** We wil need to add the [https://moodle.org/plugins/atto_morefontcolors more font colours additional plugin for Atto]&lt;br /&gt;
** Install the plugin directory as usual in lib/editor/atto/plugins.&lt;br /&gt;
** Then visit Site Administration &amp;gt; Plugins &amp;gt; Atto &amp;gt; More font colors to define the colors you want your users to be able to chose from. As a default, the same colors as the core atto_fontcolor colours are defined.&lt;br /&gt;
** Finally, enable the plugin by adding &#039;morefontcolors&#039; (without the quotes) in the Atto toolbar settings.&lt;br /&gt;
* We can now choose a nice colour for our selected text:&lt;br /&gt;
 &lt;br /&gt;
[[File:Wordselect step 10.png|200px]]&lt;br /&gt;
&lt;br /&gt;
* This will give us a nicer-looking table for our Wordselect question:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 11.png|200px]]&lt;br /&gt;
&lt;br /&gt;
* We still might want to change the background colour for the first row cells.&lt;br /&gt;
* We will now install the [https://moodle.org/plugins/view.php?id=1479 More background colours] additional plugin for Atto, and see if it does the job...&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 12.png|300px]]&lt;br /&gt;
&lt;br /&gt;
*Notice in the above image the two new buttons in the Atto toolbar: more font colours (blue square) and more background colours (yellow square), that we will use to give our first row the intended font and background colours:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 13.png|300px]]&lt;br /&gt;
&lt;br /&gt;
* So, it seems we have managed to create a Wordselect question with a nice table, without having to learn any HTML code syntax. &lt;br /&gt;
* We could now customize the colour palettes available for the more font colours and the more background colours plugins, by replacing the default values with some [https://en.wikipedia.org/wiki/Web_colors#HTML_color_names HTML hexadecimal color codes from the wikipedia].&lt;br /&gt;
* Perhaps a more elegant technique might have been been to use the [https://moodle.org/plugins/view.php?id=1424 Styles plugin for Atto], but that remains to be tested later...&lt;br /&gt;
&lt;br /&gt;
==Grading==&lt;br /&gt;
An attempt will be graded as correct if all correct and no incorrect words are selected. If any  &lt;br /&gt;
incorrect words are selected it will be marked as partially correct. In interactive mode (with hints) the penalty&lt;br /&gt;
defined in the editing form will be applied with each new check/attempt. This defaults to 33.33%&lt;br /&gt;
&lt;br /&gt;
The marking is designed to discourage a strategy of &amp;quot;select all words so you are bound to &lt;br /&gt;
select all the right words&amp;quot;. Each incorrectly selected word will deduct a mark down to zero.&lt;br /&gt;
For example, selecting one correct and one incorrect mark will result in zero marks. Selecting one correct and&lt;br /&gt;
two incorrect will also result in zero. A count of all incorrect marks is deducted from a count of&lt;br /&gt;
all correct marks unless there is a negative result, in which case the mark is set to zero.&lt;br /&gt;
&lt;br /&gt;
If this seems harsh, e.g. the wordpenalty value can reduce the deuction made for each incorrect selection&lt;br /&gt;
&lt;br /&gt;
==Wordpenalty==&lt;br /&gt;
Instead of the default 1 mark deduction for each incorrect selection this can be used to set a percentage of a mark deduction.&lt;br /&gt;
[[Image:word_penalty2.png|500px|Word Penalty]]&lt;br /&gt;
&lt;br /&gt;
==Feedback==&lt;br /&gt;
If the quiz has the right answer display selected, square braces will be shown around any unselected&lt;br /&gt;
correct words. The square braces are not related to the default characters used in the editing interface.&lt;br /&gt;
This is designed to allow the user to see the correct responses within the text rather than look at the feedback&lt;br /&gt;
area (an approach used in some other question types).&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect partially_correct_answers.png]]&lt;br /&gt;
&lt;br /&gt;
==Mobile Use==&lt;br /&gt;
It has been tested with a variety of mobile devices both android and iOS tablets and phones. It also supports the Moodle mobile App.&lt;br /&gt;
&lt;br /&gt;
==Accessibility==&lt;br /&gt;
It is possible to move forwards and backwards through words with tab and shift-tab. Words can be selected and unselected using the space bar. It uses the aria tags to help screen readers recognise when a word is selected and unselected.&lt;br /&gt;
&lt;br /&gt;
==Sample Word squarequestion==&lt;br /&gt;
The question type comes with a set of sample questions in [[XML]] format in a file called sample_questions.xml (it is located in the moodle\question\type\wordselect. directory). These illustrate issues such as non ASCII characters, the inclusion of images and the creation of word squares where each &amp;quot;word&amp;quot; is a single letter and the user has to click on the letters that make up words (e.g. find the animals in this square).&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect example 1.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Sample Comprehension question==&lt;br /&gt;
&lt;br /&gt;
This is an example question of using Wordselect for an English literature reading comprehension assessment:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect example reading comprehension.png|700px]]&lt;br /&gt;
&lt;br /&gt;
You can find instructions on importing questions at [[Import questions]].&lt;br /&gt;
&lt;br /&gt;
==Compatibility with other third party Moodle plugins==&lt;br /&gt;
This question type has been briefly tested in the [[Question practice module]] and the [[Question Creation module]] (QCreate).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Questions]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta seleccionarpalabra]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=143629</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=143629"/>
		<updated>2022-06-13T09:26:13Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching english and is broken into approximately 31 categories such as irregular verbs, tenses etc, each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import_questions#Importing_questions_from_an_existing_file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Display Answers checkboxes==&lt;br /&gt;
Because only certain combinations of the checkboxes are logical, the checkboxes will become enabled/disabled according to the dropdown selected. So for example it makes no sense to have single use draggable selected with dropdown questions. This animation shows the checkboxes being enabled/disabled.&lt;br /&gt;
[[Image:gapfill_checkboxes2.gif|Checkboxes changing with dropdown selection]]&lt;br /&gt;
&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg_question_type]] and also&lt;br /&gt;
[[Regular_Expression_Short-Answer_question_type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[Unicode|unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Prevent typing into gaps==&lt;br /&gt;
By default students can type into the gaps when dragdrop mode is enabled.  This can be prevented by adding some css  by a user with admin acces via the&lt;br /&gt;
additional HTML form. This can be found at http://yourmoodle.com/admin/settings.php?section=additionalhtml&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
.que.gapfill input.droptarget {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    pointer-events: none;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is the pointer-events:none that does the work. This is only a style change and a determined/knowledgeable student could always work around it.&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in other modules that use the quiz engine including the excellent [[StudentQuiz_module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=BTEC_marking&amp;diff=143346</id>
		<title>BTEC marking</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=BTEC_marking&amp;diff=143346"/>
		<updated>2022-04-29T19:58:37Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /*Make lowest grade available as aggregation type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = Advanced Grading Methods&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=gradingform_btec&lt;br /&gt;
|tracker = &lt;br /&gt;
|discussion = &lt;br /&gt;
|maintainer = [[User:Marcus Green|Marcus Green]]&lt;br /&gt;
|&lt;br /&gt;
}}&lt;br /&gt;
{{Advanced grading methods}}&lt;br /&gt;
==The BTEC Advanced Grading Method==&lt;br /&gt;
BTEC ([http://en.wikipedia.org/wiki/Business_and_Technology_Education_Council Business and Technology Education Council]) marking is an [[Advanced grading methods|advanced grading method]] for use with Moodle assignments. This method of marking is used mainly with the vocational criteria assessed assignments as found in secondary and further education in the UK. The classic example is the [http://en.wikipedia.org/wiki/Business_and_Technology_Education_Council BTEC] qualifications from the [http://en.wikipedia.org/wiki/Edexcel Edexcel] exam board. A teacher enters a comment per pre-defined criteria and indicates if the student has met the criteria or not. There is no concept of percentages, numbers or letters. Criteria are either met or not met. An assignment can have criteria at Pass, Merit and Distinction level and any combination of those levels (referred to for short as P, M and D). For example an assignment might have P1, M1, D1, or only P1 or P1, P2 and D1. If a student fails to get all P criteria they get an overall Refer for the assignment. If they get all P all D but miss an M they will get an overall Pass. This table shows how the grades can work out.&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:65%;height: 172px;&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(255, 204, 204); width: 112px;&amp;quot;&lt;br /&gt;
rowspan=&amp;quot;1&amp;quot; colspan=&amp;quot;6&amp;quot;&amp;gt;Criteria (Pass, Merit and Distinction)&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(153, 255, 153);&amp;quot;&amp;gt;Grade Achieved&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 10%; background-color: rgb(255, 204, 153);&amp;quot;&amp;gt;P1&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 10%; background-color: rgb(255, 204, 153);&amp;quot;&amp;gt;P2&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 10%; background-color: rgb(255, 204, 153);&amp;quot;&amp;gt;M1&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 10%; background-color: rgb(255, 204, 153);&amp;quot;&amp;gt;M2&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 10%; background-color: rgb(255, 204, 153);&amp;quot;&amp;gt;D1&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 112px; background-color: rgb(255, 204, 153);&amp;quot;&amp;gt;D2&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 616px; background-color: rgb(153, 255, 153);&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 84px; background-color: red;&amp;quot;&amp;gt;No&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 70px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 75px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 64px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 26px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 112px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top;  background-color: rgb(153, 255, 153);&amp;quot;&amp;gt;Refer&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 84px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 70px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 75px; background-color: red;&amp;quot;&amp;gt;No&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 64px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 26px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; width: 112px; background-color: rgb(183, 186, 181);&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(153, 255, 153);&amp;quot;&amp;gt;Pass&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 84px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 70px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 75px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 64px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: red; width: 26px;&amp;quot;&amp;gt;No&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 112px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(153, 255, 153);&amp;quot;&amp;gt;Merit&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 84px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 70px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 75px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 64px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 26px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(183, 186, 181); width: 112px;&amp;quot;&amp;gt;Yes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&lt;br /&gt;
style=&amp;quot;vertical-align: top; background-color: rgb(153, 255, 153);&amp;quot;&amp;gt;Distinction&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Selecting BTEC marking for an assignment==&lt;br /&gt;
*Create an assignment, and in the &#039;&#039;Grades&#039;&#039; section, select the BTEC scale. This is inserted into the system when the BTEC marking grading method is installed.&lt;br /&gt;
[[File:scaleselect.jpg]]&lt;br /&gt;
&lt;br /&gt;
From the &#039;&#039;Grading method&#039;&#039; drop down menu select the &#039;&#039;BTEC marking&#039;&#039; option:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:gradingmethod.jpg]]&lt;br /&gt;
==Creating a new BTEC marking form==&lt;br /&gt;
*When the assignment has been created and BTEC marking selected as above, click &#039;&#039;Save and display&#039;&#039; and choose &#039;&#039;Define new grading form from scratch&#039;&#039;&lt;br /&gt;
[[File:advancedgrading.jpg]]&lt;br /&gt;
*Give the BTEC marking a name and description.&lt;br /&gt;
*Add the level of the criteria you want to define (this must be P, M or D followed by a number bigger than 0)&lt;br /&gt;
[[File:leveledit.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on the greyed out text &#039;Click to edit&#039; under the title &amp;quot;Requirements for completing criteria&amp;quot; and enter a description of what the student needs to do to achieve this criteria.&lt;br /&gt;
&lt;br /&gt;
[[File:editrequirement.png]]&lt;br /&gt;
&lt;br /&gt;
Add the remaining criteria. Typically the criteria are spread over two or more assignment. So Assignment 1 might have P1, P2, M2, and D1&lt;br /&gt;
and Assignment 2 will have the remaining criteria according to the specification. &lt;br /&gt;
&lt;br /&gt;
Add in any frequently used comments you might want to easily add and Click the Save BTEC marking and make ready button to apply the method to the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:saveandmakeready.jpg]]&lt;br /&gt;
==Grading Submissions==&lt;br /&gt;
Double clicking on a Frequently used comment will bring it into the currently selected feedback box. The final grade is calculated when the save changes button is clicked.&lt;br /&gt;
[[File:gradesheet.png]]&lt;br /&gt;
==Course total in gradebook==&lt;br /&gt;
In the gradebook the course total will appear as a number by default but it can be changed to the BTEC scale in the category. If the course only has BTEC&lt;br /&gt;
graded items and every item has chance for a Distinction grade it can make sense to set the course total to reflect the lowest grade achieved. This should mean the course total will reflect the correct overall grade for students.&lt;br /&gt;
&lt;br /&gt;
By default, the only available aggregation type is &#039;Natural.&#039; To be able to choose the lowest grade, other aggregation types must be made available in Site administration &amp;gt; Grades &amp;gt; Grade category settings &amp;gt; Available aggregation types.&lt;br /&gt;
&lt;br /&gt;
[[File:categorytotal.png]]&lt;br /&gt;
&lt;br /&gt;
Then set the Aggregation to Lowest grade, select grade type as scale and set the scale to BTEC.&lt;br /&gt;
&lt;br /&gt;
[[File:categoryscale.png]]&lt;br /&gt;
==Other BTEC Grading Solutions==&lt;br /&gt;
An alternative more comprehensive solution to grading BTEC assignments is available from Bedford College. See here&lt;br /&gt;
http://moodlegrades.bedford.ac.uk&lt;br /&gt;
&lt;br /&gt;
The checklist plugin can be helpful with BTEC graded assignments&lt;br /&gt;
https://moodle.org/plugins/view.php?plugin=mod_checklist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[es:Calificación BTEC]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141561</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141561"/>
		<updated>2021-08-22T14:04:36Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Assignment report that exports Excel spreadsheet showing individual component grades, works for [https://docs.moodle.org/en/Marking_guide Marking Guide], [[Rubrics]] or [[BTEC marking|BTEC]] Grading&lt;br /&gt;
&lt;br /&gt;
Git repo here https://github.com/pauln/moodle-report_componentgrades&lt;br /&gt;
&lt;br /&gt;
Moodle.org plugins database here https://moodle.org/plugins/report_componentgrades&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
=== Marking Guide ===&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
=== Rubric Grading ===&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|thumb|700x700px|Rubric Graded Assignment|none]]&lt;br /&gt;
=== BTEC Grading ===&lt;br /&gt;
[[File:BTEC grade.png|alt=BTEC Grading|none|thumb|899x899px|BTEC Grading with component grades plugin]]&lt;br /&gt;
=== Blind Marking ===&lt;br /&gt;
The blind marking setting in an assignment will be respected. The firstname and lastname fields will be left blank and the username field will contain the anonymised value as shown in the gradebook.[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;br /&gt;
=== Additional Attempts ===&lt;br /&gt;
This report is not compatible with additional attempts as describe here&lt;br /&gt;
&lt;br /&gt;
[[Assignment settings#Submission settings]]&lt;br /&gt;
&lt;br /&gt;
And as raised in this issue&lt;br /&gt;
&lt;br /&gt;
https://github.com/pauln/moodle-report_componentgrades/issues/7&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141560</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141560"/>
		<updated>2021-08-22T14:03:51Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Assignment report that exports Excel spreadsheet showing individual component grades, works for [[Marking Guide]], [[Rubrics]] or [[BTEC marking|BTEC]] Grading&lt;br /&gt;
&lt;br /&gt;
Git repo here https://github.com/pauln/moodle-report_componentgrades&lt;br /&gt;
&lt;br /&gt;
Moodle.org plugins database here https://moodle.org/plugins/report_componentgrades&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
=== Marking Guide ===&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
=== Rubric Grading ===&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|thumb|700x700px|Rubric Graded Assignment|none]]&lt;br /&gt;
=== BTEC Grading ===&lt;br /&gt;
[[File:BTEC grade.png|alt=BTEC Grading|none|thumb|899x899px|BTEC Grading with component grades plugin]]&lt;br /&gt;
=== Blind Marking ===&lt;br /&gt;
The blind marking setting in an assignment will be respected. The firstname and lastname fields will be left blank and the username field will contain the anonymised value as shown in the gradebook.[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;br /&gt;
=== Additional Attempts ===&lt;br /&gt;
This report is not compatible with additional attempts as describe here&lt;br /&gt;
&lt;br /&gt;
[[Assignment settings#Submission settings]]&lt;br /&gt;
&lt;br /&gt;
And as raised in this issue&lt;br /&gt;
&lt;br /&gt;
https://github.com/pauln/moodle-report_componentgrades/issues/7&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141559</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141559"/>
		<updated>2021-08-22T13:59:22Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Assignment report that exports Excel spreadsheet showing individual component grades, works for Marking Guide, Rubric or [[BTEC marking|BTEC]] Grading&lt;br /&gt;
&lt;br /&gt;
Git repo here https://github.com/pauln/moodle-report_componentgrades&lt;br /&gt;
&lt;br /&gt;
Moodle.org plugins database here https://moodle.org/plugins/report_componentgrades&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
=== Marking Guide ===&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
=== Rubric Grading ===&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|thumb|700x700px|Rubric Graded Assignment|none]]&lt;br /&gt;
=== BTEC Grading ===&lt;br /&gt;
[[File:BTEC grade.png|alt=BTEC Grading|none|thumb|899x899px|BTEC Grading with component grades plugin]]&lt;br /&gt;
=== Blind Marking ===&lt;br /&gt;
The blind marking setting in an assignment will be respected. The firstname and lastname fields will be left blank and the username field will contain the anonymised value as shown in the gradebook.[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;br /&gt;
=== Additional Attempts ===&lt;br /&gt;
This report is not compatible with additional attempts as describe here&lt;br /&gt;
&lt;br /&gt;
[[Assignment settings#Submission settings]]&lt;br /&gt;
&lt;br /&gt;
And as raised in this issue&lt;br /&gt;
&lt;br /&gt;
https://github.com/pauln/moodle-report_componentgrades/issues/7&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141558</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141558"/>
		<updated>2021-08-22T13:58:31Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Assignment report that exports Excel spreadsheet showing individual component grades, works for Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
&lt;br /&gt;
Git repo here https://github.com/pauln/moodle-report_componentgrades&lt;br /&gt;
&lt;br /&gt;
Moodle.org plugins database here https://moodle.org/plugins/report_componentgrades&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
=== Marking Guide ===&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
=== Rubric Grading ===&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|thumb|700x700px|Rubric Graded Assignment|none]]&lt;br /&gt;
=== BTEC Grading ===&lt;br /&gt;
[[File:BTEC grade.png|alt=BTEC Grading|none|thumb|899x899px|BTEC Grading with component grades plugin]]&lt;br /&gt;
=== Blind Marking ===&lt;br /&gt;
The blind marking setting in an assignment will be respected. The firstname and lastname fields will be left blank and the username field will contain the anonymised value as shown in the gradebook.[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;br /&gt;
=== Additional Attempts ===&lt;br /&gt;
This report is not compatible with additional attempts as describe here&lt;br /&gt;
&lt;br /&gt;
[[Assignment settings#Submission settings]]&lt;br /&gt;
&lt;br /&gt;
And as raised in this issue&lt;br /&gt;
&lt;br /&gt;
https://github.com/pauln/moodle-report_componentgrades/issues/7&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141557</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141557"/>
		<updated>2021-08-22T11:58:38Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
&lt;br /&gt;
Git repo here https://github.com/pauln/moodle-report_componentgrades&lt;br /&gt;
&lt;br /&gt;
Moodle.org plugins database here https://moodle.org/plugins/report_componentgrades&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
=== Marking Guide ===&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
=== Rubric Grading ===&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|thumb|700x700px|Rubric Graded Assignment|none]]&lt;br /&gt;
=== BTEC Grading ===&lt;br /&gt;
[[File:BTEC grade.png|alt=BTEC Grading|none|thumb|899x899px|BTEC Grading with component grades plugin]]&lt;br /&gt;
=== Blind Marking ===&lt;br /&gt;
The blind marking setting in an assignment will be respected. The firstname and lastname fields will be left blank and the username field will contain the anonymised value as shown in the gradebook.[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;br /&gt;
=== Additional Attempts ===&lt;br /&gt;
This report is not compatible with additional attempts as describe here&lt;br /&gt;
&lt;br /&gt;
[[Assignment settings#Submission settings]]&lt;br /&gt;
&lt;br /&gt;
And as raised in this issue&lt;br /&gt;
&lt;br /&gt;
https://github.com/pauln/moodle-report_componentgrades/issues/7&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141556</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141556"/>
		<updated>2021-08-22T11:56:33Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: changes to headers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
=== Marking Guide ===&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
=== Rubric Grading ===&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|thumb|700x700px|Rubric Graded Assignment|none]]&lt;br /&gt;
=== BTEC Grading ===&lt;br /&gt;
[[File:BTEC grade.png|alt=BTEC Grading|none|thumb|899x899px|BTEC Grading with component grades plugin]]&lt;br /&gt;
=== Blind Marking ===&lt;br /&gt;
&lt;br /&gt;
The blind marking setting in an assignment will be respected. The firstname and lastname fields will be left blank and the username field will contain the anonymised value as shown in the gradebook.[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;br /&gt;
=== Additional Attempts ===&lt;br /&gt;
This report is not compatible with additional attempts as describe here&lt;br /&gt;
&lt;br /&gt;
[[Assignment settings#Submission settings]]&lt;br /&gt;
&lt;br /&gt;
And as raised in this issue&lt;br /&gt;
&lt;br /&gt;
https://github.com/pauln/moodle-report_componentgrades/issues/7&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141555</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141555"/>
		<updated>2021-08-22T11:54:26Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Additional attempts incompatibility&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
== Marking Guide ==&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
== Rubric Grading ==&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|thumb|700x700px|Rubric Graded Assignment|none]]&lt;br /&gt;
=== BTEC Grading ===&lt;br /&gt;
[[File:BTEC grade.png|alt=BTEC Grading|none|thumb|899x899px|BTEC Grading with component grades plugin]]&lt;br /&gt;
== Blind Marking ==&lt;br /&gt;
The blind marking setting in an assignment will be respected. The firstname and lastname fields will be left blank and the username field will contain the anonymised value as shown in the gradebook.[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;br /&gt;
&lt;br /&gt;
=== Additional Attempts ===&lt;br /&gt;
This report is not compatible with additional attempts as describe here&lt;br /&gt;
&lt;br /&gt;
[[Assignment settings#Submission settings]]&lt;br /&gt;
&lt;br /&gt;
And as raised in this issue&lt;br /&gt;
&lt;br /&gt;
https://github.com/pauln/moodle-report_componentgrades/issues/7&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141554</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141554"/>
		<updated>2021-08-22T07:19:06Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Added BTEC. screenshot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
== Marking Guide ==&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
== Rubric Grading ==&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|thumb|700x700px|Rubric Graded Assignment|none]]&lt;br /&gt;
&lt;br /&gt;
=== BTEC Grading ===&lt;br /&gt;
[[File:BTEC grade.png|alt=BTEC Grading|none|thumb|899x899px|BTEC Grading with component grades plugin]]&lt;br /&gt;
&lt;br /&gt;
== Blind Marking ==&lt;br /&gt;
The blind marking setting in an assignment will be respected. The firstname and lastname fields will be left blank and the username field will contain the anonymised value as shown in the gradebook.[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:BTEC_grade.png&amp;diff=141553</id>
		<title>File:BTEC grade.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:BTEC_grade.png&amp;diff=141553"/>
		<updated>2021-08-22T07:17:23Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BTEC grading output&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141528</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141528"/>
		<updated>2021-08-19T20:28:41Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
&lt;br /&gt;
== Marking Guide ==&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
&lt;br /&gt;
== Rubric Grading ==&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|thumb|700x700px|Rubric Graded Assignment|none]]&lt;br /&gt;
== Blind Marking ==&lt;br /&gt;
[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141527</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141527"/>
		<updated>2021-08-19T20:26:45Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
[[File:rubric spreadsheet.png|alt=Rubric Graded Assignment|left|thumb|700x700px|Rubric Graded Assignment]]&lt;br /&gt;
&lt;br /&gt;
== Blind Marking ==&lt;br /&gt;
[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:rubric_spreadsheet.png&amp;diff=141526</id>
		<title>File:rubric spreadsheet.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:rubric_spreadsheet.png&amp;diff=141526"/>
		<updated>2021-08-19T20:25:23Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rubric Graded Assignment Export&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141525</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141525"/>
		<updated>2021-08-19T20:24:02Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
[[File:Marking Guide Export.png|alt=Marcus Guid|none|thumb|700x700px|Marking Guide]]&lt;br /&gt;
&lt;br /&gt;
== Blind Marking ==&lt;br /&gt;
[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:Marking_Guide_Export.png&amp;diff=141524</id>
		<title>File:Marking Guide Export.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:Marking_Guide_Export.png&amp;diff=141524"/>
		<updated>2021-08-19T20:20:45Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Layout and fields when exporting from a Marking Guide&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141523</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141523"/>
		<updated>2021-08-19T20:18:49Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Blind Marking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px|none]]&lt;br /&gt;
== Blind Marking ==&lt;br /&gt;
[[File:componentreport blindmarking.png|alt=Blind Marking|border|thumb|700x700px|Anonymise usernames when blind marking is set in the assignment.|none]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141522</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141522"/>
		<updated>2021-08-19T20:09:40Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Blind Marking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|left|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu|800x800px]]&lt;br /&gt;
==== Blind Marking ====&lt;br /&gt;
[[File:componentreport blindmarking.png|alt=Blind Marking|border|left|thumb|400x400px|Anonymise usernames when blind marking is set in the assignment.]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141521</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141521"/>
		<updated>2021-08-19T20:09:04Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Menu to select report&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
&lt;br /&gt;
[[File:componentgrade report menu.png|alt=Menu showing report|left|thumb|Navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading. A new menu item will appear in the Assignment Administration menu]]&lt;br /&gt;
==== Blind Marking ====&lt;br /&gt;
[[File:componentreport blindmarking.png|alt=Blind Marking|border|left|thumb|400x400px|Anonymise usernames when blind marking is set in the assignment.]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:componentgrade_report_menu.png&amp;diff=141520</id>
		<title>File:componentgrade report menu.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:componentgrade_report_menu.png&amp;diff=141520"/>
		<updated>2021-08-19T20:02:02Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;navigate to an assignment which uses a Rubric,  Marking Guide or BTEC grading, A new menu item will appear in the Assignment Administration menu:&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141519</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141519"/>
		<updated>2021-08-19T19:18:48Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Blind Marking screen shot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;br /&gt;
&lt;br /&gt;
==== Blind Marking ====&lt;br /&gt;
[[File:componentreport blindmarking.png|alt=Blind Marking|border|left|thumb|400x400px|Anonymise usernames when blind marking is set in the assignment.]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:componentreport_blindmarking.png&amp;diff=141518</id>
		<title>File:componentreport blindmarking.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:componentreport_blindmarking.png&amp;diff=141518"/>
		<updated>2021-08-19T19:15:33Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Respect the blind marking setting in assignments and show the anonymised version of the submitters name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Respect the blind marking setting in assignments and show the anonymised version of the submitters name&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141508</id>
		<title>report/componentgrades</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=report/componentgrades&amp;diff=141508"/>
		<updated>2021-08-18T09:26:29Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Basic introduction placeholder&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Excel spreadsheet export tool for individual component grades for assignments using Marking Guide, Rubric or BTEC Grading&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139947</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139947"/>
		<updated>2021-04-05T09:19:26Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Use in modules other than quiz */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching english and is broken into approximately 31 categories such as irregular verbs, tenses etc, each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import_questions#Importing_questions_from_an_existing_file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Display Answers checkboxes==&lt;br /&gt;
Because only certain combinations of the checkboxes are logical, the checkboxes will become enabled/disabled according to the dropdown selected. So for example it makes no sense to have single use draggable selected with dropdown questions. This animation shows the checkboxes being enabled/disabled.&lt;br /&gt;
[[Image:gapfill_checkboxes2.gif|Checkboxes changing with dropdown selection]]&lt;br /&gt;
&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg_question_type]] and also&lt;br /&gt;
[[Regular_Expression_Short-Answer_question_type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[Unicode|unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Prevent typing into gaps==&lt;br /&gt;
By default students can type into the gaps when dragdrop mode is enabled.  This can be prevented by adding some css  by a user with admin acces via the&lt;br /&gt;
additional HTML form. This can be found at http://yourmoodle.com/admin/settings.php?section=additionalhtml&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
.que.gapfill input.droptarget {&lt;br /&gt;
    text-align: center;&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
    pointer-events: none;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is the pointer-events:none that does the work. This is only a style change and a determined/knowledgeable student could always work around it.&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in other modules that use the quiz engine including the excellent [[StudentQuiz_module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Wordselect_question_type&amp;diff=139705</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Wordselect_question_type&amp;diff=139705"/>
		<updated>2021-02-19T10:17:16Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Sample questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/qtype_wordselect&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_wordselect/issues&lt;br /&gt;
|discussion = https://moodle.org/mod/forum/discuss.php?d=337262&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
You can install automatically, or download manually, this plugin from [https://moodle.org/plugins/qtype_wordselect the Moodle plugins database]. You can also download the latest development version of this plugin from [https://github.com/marcusgreen/moodle-qtype_wordselect GitHub].&lt;br /&gt;
&lt;br /&gt;
If you download the ZIP file, follow the generic [[Installing plugins]] documentation. The files must be in the directory moodle\question\type\wordselect. If you uncompressed the ZIP file from GitHub, please rename &#039;moodle-qtype_wordselect-master&#039; into &#039;wordselect&#039;.&lt;br /&gt;
&lt;br /&gt;
==Word Select Question Type==&lt;br /&gt;
&lt;br /&gt;
A very easy to use Moodle question type that allows a teacher to create text where one or more words are indicated to be the correct answers. The student is presented with the text and can select one or more words and is marked according to if they are correct.&lt;br /&gt;
&lt;br /&gt;
You can see a short video of it in action in this Youtube video&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=FGv-c7fJIxo&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
This question type is designed to ask students to select text according to some criteria. For example &amp;quot;select the verb in the following sentence&amp;quot;. Conceptually this is a little like a multiple choice question type (with multiple selectable options). The student responds by clicking on words to select them, and clicking a second time to unselect them.&lt;br /&gt;
&lt;br /&gt;
It provides an introduction field where words will not be selectable at runtime and a questiontext field. In the question text any words with braces around them will be considered correct. All words can be clicked-on to select.&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_nouns2.png|Wordselect creation|600px]]&lt;br /&gt;
&lt;br /&gt;
A word is considered to be some text with space around it. HTML characters are stripped out first to generate a list of potentially selectable words, meaning it is possible to put words within a table. At runtime the question looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_selected3.png|Wordselect selected word|600px]]&lt;br /&gt;
&lt;br /&gt;
Pedagogically, this type of question has the advantage of it being possible to give no clue as to which word is to be selected.  You might address the problem by offering four multiple choice options with different words in locations but this will narrow down the selection that the student can possibly make. By making every word selectable the student has little guide as to which is the correct answer.&lt;br /&gt;
&lt;br /&gt;
If it is not possible to use square braces (e.g. in the context of maths where they have a special meaning), alternative delimters are available from the Delimit Characters dropdown&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_delimitchar.png|Wordselect delimit characters|400px]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as &#039;The cat {sat} on the mat&#039;.&lt;br /&gt;
&lt;br /&gt;
==Formatting in selectable text==&lt;br /&gt;
&amp;lt;p&amp;gt;All formatting except the &amp;amp;lt;sub&amp;amp;gt;,&amp;amp;lt;sup&amp;amp;gt;,&amp;amp;lt;i&amp;amp;gt;,&amp;amp;lt;u&amp;amp;gt;,&amp;amp;lt;b&amp;amp;gt; is stripped from selectable text.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;These display as expected i.e. &amp;lt;sub&amp;gt;sub&amp;lt;/sub&amp;gt; &amp;lt;sup&amp;gt;sup&amp;lt;/sup&amp;gt; &amp;lt;i&amp;gt;i&amp;lt;/i&amp;gt; &amp;lt;u&amp;gt;u&amp;lt;/u&amp;gt; &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Multiword mode==&lt;br /&gt;
&lt;br /&gt;
If any text is surrounded by double delimiters e.g. &amp;lt;nowiki&amp;gt;[[cat]]&amp;lt;/nowiki&amp;gt; it will be treated as correct, and any selectable non correct text must be given single delimiters e.g. [mat]. Text can thus include multiple words. CSS Formatting indicates which text is selectable.&lt;br /&gt;
[[File:ws_multiword.png]]&lt;br /&gt;
&lt;br /&gt;
The code for the body of this is as follows.&lt;br /&gt;
&lt;br /&gt;
To make  &amp;lt;nowiki&amp;gt;[[more than]]&amp;lt;/nowiki&amp;gt; &amp;lt;nowiki&amp;gt;[[one]]&amp;lt;/nowiki&amp;gt; word selectable add double delimiters for correct text and single for incorrect text. Once one item has double delimiters any text without delimiters will not be selectable.&lt;br /&gt;
&lt;br /&gt;
[This is selectable incorrect text]&lt;br /&gt;
&lt;br /&gt;
The multiword mode allows the creation of multiple choice questions as follows.&lt;br /&gt;
&lt;br /&gt;
How many beans make five?&lt;br /&gt;
&lt;br /&gt;
[a] one&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[b]] &amp;lt;/nowiki&amp;gt;five&lt;br /&gt;
&lt;br /&gt;
[c] two&lt;br /&gt;
&lt;br /&gt;
[d] none&lt;br /&gt;
&lt;br /&gt;
==Category Questions==&lt;br /&gt;
Words can be placed inside tables and students asked to identify which words match the category in the heading:&lt;br /&gt;
&lt;br /&gt;
[[Image:wordselect_table_categories2.png|Wordselect table categories|300px]]&lt;br /&gt;
&lt;br /&gt;
This is the code used to create that table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
   &amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;background-color: #c0c0c0;&amp;quot;&amp;gt;Feline&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;background-color: #c0c0c0;&amp;quot;&amp;gt;Canine&amp;lt;/td&amp;gt;&lt;br /&gt;
   &amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;wolf&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
   &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;cow&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;zebra&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
   &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[cat]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;lion&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Creating a Wordselect question with a nice table ===&lt;br /&gt;
* The Moodle [[Text editor]] has an option for creating tables which can have any number of columns and rows.&lt;br /&gt;
* You begin by creating a new question of the Wordselect type.&lt;br /&gt;
* Choose a good name for your new question.&lt;br /&gt;
* Write the introduction.&lt;br /&gt;
* Expand the Atto toolbar by clicking on it&#039;s very first button  (blue square in the next image).&lt;br /&gt;
* Locate the table creation button (green square) and click on it:&lt;br /&gt;
&lt;br /&gt;
[[File:wordselect_category_table_creation_01.png|600px]]&lt;br /&gt;
&lt;br /&gt;
* For this example we will use a table with 3 columns and 4 rows (the top row will be used for the categories: Canine, Feline and Avian):&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 2 .png|400px]]&lt;br /&gt;
&lt;br /&gt;
* Notice in the above image that we left both the &#039;Caption&#039; and &#039;Caption position&#039; options blank. This is intentional, because the regular table captions are just too large for this situation. Also notice that we have selected 4 rows and 3 columns&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 2.png|600px]]&lt;br /&gt;
&lt;br /&gt;
* We now have an empty table, that we will fill with our words:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 3.png|300px]]&lt;br /&gt;
&lt;br /&gt;
* Notice that we put the right answers (cat, dog and canary) enclosed in square brackets&lt;br /&gt;
* Our question in now complete (but we will later see that it is not very nice). &lt;br /&gt;
* We will now save the changes and preview the question (notice the looking glass icon in the following image):&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 4.png|500px]]&lt;br /&gt;
&lt;br /&gt;
* The question works:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 5.png|500px]]&lt;br /&gt;
&lt;br /&gt;
* But the lack of the gridlines to signal the cells could make this table a bit difficult to use:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 6.png|400px]]&lt;br /&gt;
&lt;br /&gt;
* We will now put some gridlines inside the table with this instruction inside angle brackets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The trick is finding where and how to put it.&lt;br /&gt;
&lt;br /&gt;
* We will now click on the Atto button tool with the &amp;lt;&amp;gt; characters to expand the HTML code inside the Question text box:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 7.png|600px]]&lt;br /&gt;
&lt;br /&gt;
* And now we have a lot of HTML instructions, that we don&#039;t really need to understand. We will just insert the gridlines instruction right after the first instruction that seems to be related to our table (look at the image below), and we will see if it works:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 8.png|600px]] &lt;br /&gt;
&lt;br /&gt;
* It works: &lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 9.png|300px]]&lt;br /&gt;
&lt;br /&gt;
*And now we will put some nice colours in some of our text.&lt;br /&gt;
* For this we will use a Moodle additional plugin for the Atto editor, that we must first download from [https://moodle.org/plugins/browse.php?list=category&amp;amp;id=53 the Moodle plugins database].&lt;br /&gt;
** We wil need to add the [https://moodle.org/plugins/atto_morefontcolors more font colours additional plugin for Atto]&lt;br /&gt;
** Install the plugin directory as usual in lib/editor/atto/plugins.&lt;br /&gt;
** Then visit Site Administration &amp;gt; Plugins &amp;gt; Atto &amp;gt; More font colors to define the colors you want your users to be able to chose from. As a default, the same colors as the core atto_fontcolor colours are defined.&lt;br /&gt;
** Finally, enable the plugin by adding &#039;morefontcolors&#039; (without the quotes) in the Atto toolbar settings.&lt;br /&gt;
* We can now choose a nice colour for our selected text:&lt;br /&gt;
 &lt;br /&gt;
[[File:Wordselect step 10.png|200px]]&lt;br /&gt;
&lt;br /&gt;
* This will give us a nicer-looking table for our Wordselect question:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 11.png|200px]]&lt;br /&gt;
&lt;br /&gt;
* We still might want to change the backgroud colour for the first row cells.&lt;br /&gt;
* We will now install the [https://moodle.org/plugins/view.php?id=1479 More background colours] additional plugin for Atto, and see if it does the job...&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 12.png|300px]]&lt;br /&gt;
&lt;br /&gt;
*Notice in the above image the two new buttons in the Atto toolbar: more font colours (blue square) and more backgound colours (yellow square), that we will use to give our first row the intended font and background colours:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect step 13.png|300px]]&lt;br /&gt;
&lt;br /&gt;
* So, it seems we have managed to create a a Wordselect question with a nice table, without having to learn any HTML code syntax. &lt;br /&gt;
* We could now customize the colour palettes available for the more font colours and the more backgound colours plugins, by replacing the default values with some [https://en.wikipedia.org/wiki/Web_colors#HTML_color_names HTML hexadecimal color codes from the wikipedia].&lt;br /&gt;
* Perhaps a more elegant technique might have been been to use the [https://moodle.org/plugins/view.php?id=1424 Styles plugin for Atto], but that remains to be tested later...&lt;br /&gt;
&lt;br /&gt;
==Grading==&lt;br /&gt;
An attempt will be graded as correct if all correct and no incorrect words are selected. If any  &lt;br /&gt;
incorrect words are selected it will be marked as partially correct. In interactive mode (with hints) the penalty&lt;br /&gt;
defined in the editing form will be applied with each new check/attempt. This defaults to 33.33%&lt;br /&gt;
&lt;br /&gt;
The marking is designed to discourage a strategy of &amp;quot;select all words so you are bound to &lt;br /&gt;
select all the right words&amp;quot;. Each incorrectly selected word will deduct a mark down to zero.&lt;br /&gt;
For example, selecting one correct and one incorrect mark will result in zero marks. Selecting one correct and&lt;br /&gt;
two incorrect will also result in zero. A count of all incorrect marks is deducted from a count of&lt;br /&gt;
all correct marks unless there is a negative result, in which case the mark is set to zero.&lt;br /&gt;
&lt;br /&gt;
If this seems harsh, e.g. the wordpenalty value can reduce the deuction made for each incorrect selection&lt;br /&gt;
&lt;br /&gt;
==Wordpenalty==&lt;br /&gt;
Instead of the default 1 mark deduction for each incorrect selection this can be used to set a percentage of a mark deduction.&lt;br /&gt;
[[Image:word_penalty2.png|500px|Word Penalty]]&lt;br /&gt;
&lt;br /&gt;
==Feedback==&lt;br /&gt;
If the quiz has the right answer display selected, square braces will be shown around any unselected&lt;br /&gt;
correct words. The square braces are not related to the default characters used in the editing interface.&lt;br /&gt;
This is designed to allow the user to see the correct responses within the text rather than look at the feedback&lt;br /&gt;
area (an approach used in some other question types).&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect partially_correct_answers.png]]&lt;br /&gt;
&lt;br /&gt;
==Mobile Use==&lt;br /&gt;
It has been tested with a variety of mobile devices both android and iOS tablets and phones. It also supports the Moodle mobile App.&lt;br /&gt;
&lt;br /&gt;
==Accessibility==&lt;br /&gt;
It is possible to move forwards and backwards through words with tab and shift-tab. Words can be selected and unselected using the space bar. It uses the aria tags to help screen readers recognise when a word is selected and unselected.&lt;br /&gt;
&lt;br /&gt;
==Sample Word squarequestion==&lt;br /&gt;
The question type comes with a set of sample questions in [[XML]] format in a file called sample_questions.xml (it is located in the moodle\question\type\wordselect. directory). These illustrate issues such as non ASCII characters, the inclusion of images and the creation of word squares where each &amp;quot;word&amp;quot; is a single letter and the user has to click on the letters that make up words (e.g. find the animals in this square).&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect example 1.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Sample Comprehension question==&lt;br /&gt;
&lt;br /&gt;
This is an example question of using Wordselect for an English literature reading comprehension assessment:&lt;br /&gt;
&lt;br /&gt;
[[File:Wordselect example reading comprehension.png|700px]]&lt;br /&gt;
&lt;br /&gt;
You can find instructions on importing questions at [[Import questions]].&lt;br /&gt;
&lt;br /&gt;
==Compatibility with other third party Moodle plugins==&lt;br /&gt;
This question type has been briefly tested in the [[Question practice module]] and the [[Question Creation module]] (QCreate).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Questions]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta seleccionarpalabra]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139269</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139269"/>
		<updated>2021-01-10T15:28:02Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Display Answers checkboxes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching english and is broken into approximately 31 categories such as irregular verbs, tenses etc, each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import_questions#Importing_questions_from_an_existing_file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Display Answers checkboxes==&lt;br /&gt;
Because only certain combinations of the checkboxes are logical, the checkboxes will become enabled/disabled according to the dropdown selected. So for example it makes no sense to have single use draggable selected with dropdown questions. This animation shows the checkboxes being enabled/disabled.&lt;br /&gt;
[[Image:gapfill_checkboxes2.gif|Checkboxes changing with dropdown selection]]&lt;br /&gt;
&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg_question_type]] and also&lt;br /&gt;
[[Regular_Expression_Short-Answer_question_type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[Unicode|unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in other modules that use the quiz engine including the excellent [[StudentQuiz_module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:gapfill_checkboxes2.gif&amp;diff=139268</id>
		<title>File:gapfill checkboxes2.gif</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:gapfill_checkboxes2.gif&amp;diff=139268"/>
		<updated>2021-01-10T15:27:26Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139267</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139267"/>
		<updated>2021-01-10T15:24:12Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Options After Text */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching english and is broken into approximately 31 categories such as irregular verbs, tenses etc, each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import_questions#Importing_questions_from_an_existing_file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Display Answers checkboxes==&lt;br /&gt;
Because only certain combinations of the checkboxes are logical, the checkboxes will become enabled/disabled according to the dropdown selected. So for example it makes no sense to have single use draggable selected with dropdown questions. This animation shows the checkboxes being enabled/disabled.&lt;br /&gt;
[[Image:gapfill_checkboxes.gif|Checkboxes changing with dropdown selection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg_question_type]] and also&lt;br /&gt;
[[Regular_Expression_Short-Answer_question_type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[Unicode|unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in other modules that use the quiz engine including the excellent [[StudentQuiz_module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:gapfill_checkboxes.gif&amp;diff=139266</id>
		<title>File:gapfill checkboxes.gif</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:gapfill_checkboxes.gif&amp;diff=139266"/>
		<updated>2021-01-10T15:22:29Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139201</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139201"/>
		<updated>2020-12-27T16:57:20Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Use in modules other than quiz */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching english and is broken into approximately 31 categories such as irregular verbs, tenses etc, each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import_questions#Importing_questions_from_an_existing_file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg_question_type]] and also&lt;br /&gt;
[[Regular_Expression_Short-Answer_question_type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[Unicode|unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in other modules that use the quiz engine including the excellent [[StudentQuiz_module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139200</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=139200"/>
		<updated>2020-12-27T16:51:49Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* In the Mobile App */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching english and is broken into approximately 31 categories such as irregular verbs, tenses etc, each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import_questions#Importing_questions_from_an_existing_file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg_question_type]] and also&lt;br /&gt;
[[Regular_Expression_Short-Answer_question_type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[Unicode|unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in the [[Question_practice_module]] and the [[Question_Creation_module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=138494</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=138494"/>
		<updated>2020-09-20T12:50:09Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Letter Hints */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching english and is broken into approximately 31 categories such as irregular verbs, tenses etc, each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import_questions#Importing_questions_from_an_existing_file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used. Click the &#039;show more&#039; options under the More options heading to see this setting.&lt;br /&gt;
[[Image:letterhints2.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Version 1.93 includes code for the  Mobile App. If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg_question_type]] and also&lt;br /&gt;
[[Regular_Expression_Short-Answer_question_type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[Unicode|unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in the [[Question_practice_module]] and the [[Question_Creation_module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:letterhints2.png&amp;diff=138493</id>
		<title>File:letterhints2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:letterhints2.png&amp;diff=138493"/>
		<updated>2020-09-20T12:48:43Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=138492</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=138492"/>
		<updated>2020-09-20T12:46:23Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Options After Text */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching english and is broken into approximately 31 categories such as irregular verbs, tenses etc, each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import_questions#Importing_questions_from_an_existing_file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext2.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used.&lt;br /&gt;
[[Image:letterhints.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Version 1.93 includes code for the  Mobile App. If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg_question_type]] and also&lt;br /&gt;
[[Regular_Expression_Short-Answer_question_type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[Unicode|unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in the [[Question_practice_module]] and the [[Question_Creation_module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:optionsaftertext2.png&amp;diff=138491</id>
		<title>File:optionsaftertext2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:optionsaftertext2.png&amp;diff=138491"/>
		<updated>2020-09-20T12:45:46Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=138490</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Gapfill_question_type&amp;diff=138490"/>
		<updated>2020-09-20T10:38:51Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Options After Text */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|tracker = https://github.com/marcusgreen/moodle-qtype_gapfill/issues&lt;br /&gt;
|discussion = https://moodle.org/plugins/view.php?plugin=qtype_gapfill&lt;br /&gt;
|maintainer = [[user:Marcus Green|Marcus Green]]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
{{Questions}}&lt;br /&gt;
&lt;br /&gt;
==Installing this question type==&lt;br /&gt;
&lt;br /&gt;
Follow the generic [[Installing plugins]] documentation.&lt;br /&gt;
&lt;br /&gt;
== The Gapfill Question Type ==&lt;br /&gt;
All you need to learn to get started with this question type is the contents of one 7 word sentence as follows&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Put square braces around the missing words&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the programmers and mathematicians, don&#039;t worry that it says square braces, you can use other delimiters on a per question basis. The classic example of a question is a question where the text reads. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The [cat] sat on the [mat]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Which will create a question with two gaps where the answers are cat and mat. Although it was designed with the idea of single missing words it will accept a sequence of words with spaces between them in the gaps. This type of question can be particularly useful for teaching languages.&lt;br /&gt;
&lt;br /&gt;
== Example questions available ==&lt;br /&gt;
Over 500 example questions are available for re-use and modification under a creative commons license. The examples are installed with the question type but the latest versions of these can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_gapfill/tree/master/examples/en. There are two files, gapfill_examples.xml  has about 20 questions containing examples of how to use the features of the question type. &lt;br /&gt;
&lt;br /&gt;
The other file,  english_language.xml is aimed at people teaching english and is broken into approximately 31 categories such as irregular verbs, tenses etc, each question includes tags.  This is a companion file to the additional 100 English questions that ships with the Wordselect question type&lt;br /&gt;
https://github.com/marcusgreen/moodle-qtype_wordselect/tree/master/examples/en&lt;br /&gt;
These files are in xml format, instructions on how to import  them can be found here &lt;br /&gt;
[[Import_questions#Importing_questions_from_an_existing_file]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit11.png|Gapfill Edit]]&lt;br /&gt;
&lt;br /&gt;
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. When a student is answering one of these questions javascript only updates the text contents of the field, so even in this mode it is possible to type the answers into the field. As of version 1.4 it was updated to work with touch devices such as tablets and mobile phones and this post in the forum shows how it works with a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
https://moodle.org/mod/forum/discuss.php?d=251406#p1092014&lt;br /&gt;
&lt;br /&gt;
==At Runtine==&lt;br /&gt;
&lt;br /&gt;
[[Image:gfruntime.jpg|Gapfill runtime]]&lt;br /&gt;
&lt;br /&gt;
Changing the display answer options allows the question to be presented with either no prompts or dropdown lists. Here is where you can make that change&lt;br /&gt;
[[Image:displayoptions.png|Display answer config]]&lt;br /&gt;
&lt;br /&gt;
This is how the same question will appear with dropdown lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:dropdowns.png|Gapfill with dropdowns]]&lt;br /&gt;
&lt;br /&gt;
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}. &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 the marking process case sensitive.&lt;br /&gt;
&lt;br /&gt;
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 [[Question behaviours|behaviours]], hinting and combined feedback options. If an incorrect answer is entered and if display right answer has been selected in the quiz review options the correct answer will be shown next to the gap within braces as in the following screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_correct_answer2.png|Gapfill complete]]&lt;br /&gt;
&lt;br /&gt;
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. If you need commas to appear in your distractors they can be escaped with a backslash \,&lt;br /&gt;
==Options After Text==&lt;br /&gt;
This setting only makes a difference in dragdrop mode. It positions the draggable answer options after the body of the text instead of above it. This can be useful where the gaps are at the end of an explanatory block of text. It means the answers do not have to be dragged as far and is useful on smaller screens such as mobile devices as it reduces the need for screen scroll.&lt;br /&gt;
&lt;br /&gt;
[[Image:optionsaftertext.png|Checkbox to display options after text]]&lt;br /&gt;
&lt;br /&gt;
==Single use draggables==&lt;br /&gt;
This only applies to drag drop mode. When a draggable option is dropped into a gap it is removed from the list. This can be useful to simplify the selection of answer options.&lt;br /&gt;
&lt;br /&gt;
[[Image:single_use_draggables.png|Single use draggables]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only applies when the Interactive with multiple tries behaviour is used.&lt;br /&gt;
[[Image:letterhints.png|Checkbox to set letter hints]]&lt;br /&gt;
&lt;br /&gt;
When a student gives an incorrect response they will be given incrementing letters from the correct answer when they press try again. So if the correct response is cat and the student responds with dog, on the next attempt that gap will contain c, and if they the respond with mouse, on the next response the gap will contain ca etc etc.&lt;br /&gt;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Version 1.93 includes code for the  Mobile App. If you access a quiz with the mobile app that contains Gapfill questions it will be automatically loaded as a remote addon. The selection of &amp;quot;draggables&amp;quot;  follows the pattern set by the core [[Drag and drop into text question type]]. Instead of dragging answers into gaps, the answer will be clicked to select and then a gap will be clicked to drop into. Clicking away from an answer and into a gap will allow a gap to be cleared. In the screen shot the word New has been selected ready to drop into the second gap.&lt;br /&gt;
&lt;br /&gt;
[[Image:mobile_gapfill4.png|Gapfill in Moodle mobile]]&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions==&lt;br /&gt;
It is possible to use regular expressions in answers, for example if you wanted both the US 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   &amp;quot;What [color|colour] is the sky?&amp;quot;. You can search for any string that starts with c and ends with r as &amp;quot;What [c.*r] is the sky&amp;quot;. More complex regular expressions should also work.&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
[[Preg_question_type]] and also&lt;br /&gt;
[[Regular_Expression_Short-Answer_question_type]]&lt;br /&gt;
&lt;br /&gt;
==Show Correct Responses ==&lt;br /&gt;
In interactive mode  (set in the [[Question behaviours|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 &amp;quot;show number of correct responses option&amp;quot; in the hint field under the multiple tries option. Note, that if you have given an incorrect answer it will not show what the correct answer is. You can of course put in the text of the whole including all correct answer into the &amp;quot;For any partially correct response&amp;quot; text area in the combined feedback section.&lt;br /&gt;
&lt;br /&gt;
[[Image:hints.jpg|hints r]]&lt;br /&gt;
&lt;br /&gt;
==No Duplicates Mode ==&lt;br /&gt;
This allows a question in the form Name three examples of X. So you could ask &amp;quot;Name the colours of medals awarded in the Olympic Games&amp;quot;. The syntax of the question fields would be [gold|silver|bronze] three 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, otherwise you will have confusing draggable prompts appearing.&lt;br /&gt;
&lt;br /&gt;
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 occurrence of the selection. As of version 1.1, when this happens the background of the duplicated values will be displayed in yellow and a message added to the feedback will say &amp;quot;Credit is partial because you have duplicate answers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:duplicate_gapfill.png|Duplicate answers]]&lt;br /&gt;
&lt;br /&gt;
==Tables with category columns==&lt;br /&gt;
By combining No duplicates mode with the | (or) operator it is possible to create tables with category columns. So in the following screen shot there are two distinct gaps containing [lion|tiger] [dog|wolf] but these are duplicated to allow for all four answers. These are then placed in a table to allow the student to drag into the appropriate category columns.&lt;br /&gt;
[[Image:gapfill_categories.gif|Gapfill Categories]]&lt;br /&gt;
&amp;lt;br/&amp;gt;This screen shot shows how the question text appears in the editor. Note that the shading for the heading row is done by including &amp;lt;th&amp;gt; tags for the first row instead of &amp;lt;td&amp;gt; tags and by setting the class table tag as &amp;amp;lt;table class=gapfilltable&amp;amp;gt;, The gapfilltable class is supplied in the css for the question type.&lt;br /&gt;
If you are using the HTML editor, switch to HTML mode and paste in the following code as an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;2&amp;quot; rules=&amp;quot;rows&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feline&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Canine&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[tiger|lion]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[dog|wolf]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Tables with images==&lt;br /&gt;
Tables with images can be used to create a question where the student must drag the word into the gap next to the appropriate picture&lt;br /&gt;
[[Image:fruit2.png|Tables with images]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;gapfilltable&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://apple.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;50&amp;quot; height=&amp;quot;51&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[apple]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;img src=&amp;quot;http://pear.png&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;58&amp;quot; height=&amp;quot;55&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[pear]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gapfill crossword==&lt;br /&gt;
It is a bit of a fiddle but it is not wildly difficult. You might also be able to do this with [[Embedded Answers (Cloze) question type|the core Cloze question type]], but the source text would probably be a bit ugly.&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill crossword.png|400px]]&lt;br /&gt;
&lt;br /&gt;
In order to make the above crossword you would need to:&lt;br /&gt;
* Write in paper (preferably using a lined or graph paper) the completed crossword.&lt;br /&gt;
* Make a new Gapfill question instance&lt;br /&gt;
* Type the relevant instructions (if necessary)&lt;br /&gt;
* Type the Across and Down definitions of the words that the user must guess.&lt;br /&gt;
* Build a table with the proper number of rows and columns.&lt;br /&gt;
* Leave the empty table cells empty.&lt;br /&gt;
* Populate the interesting parts of the table with either &lt;br /&gt;
** a fixed character (if you will be helping the reader, as most crosswords do) &lt;br /&gt;
** or each character to be guessed enclosed within square brackets.&lt;br /&gt;
* Save your question and preview&lt;br /&gt;
* Fix mistakes (if present)&lt;br /&gt;
* Try as a student&lt;br /&gt;
&lt;br /&gt;
Here is the HTML code that was used to create that example. Note that the gapfillcol class ships with the question type and sets the light grey background among other things. It is probably easiest to create the table/grid using the Moodle built in Atto editor and then tweak the HTML code afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;text-center gapfillcol&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tbody&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[T]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[M]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[U]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[L]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[D]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[O]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt; 4  &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[W]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[I]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[N]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[E]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Disable Regex ==&lt;br /&gt;
The Gapfill question uses regular expressions by default to compare the answer given by a user with the correct answer stored in the database. There are times where it is more convenient to turn this off and use plain string comparisons. This is true where the answer text contains characters that have a special meaning in regular expressions such as &amp;lt; &amp;gt; * . / \. This can be done by checking the Disable Regex option in the More options section as in the screen shot.&lt;br /&gt;
&lt;br /&gt;
[[Image:disableregex3.png |Disable Regex]]&lt;br /&gt;
&lt;br /&gt;
==Fixed Gapsize==&lt;br /&gt;
When this is checked all gaps will be set to the size of the largest gap. If the gap includes the or operator | the size will be set to the widest of the words used.&lt;br /&gt;
[[Image:fixedgapsize.png |Fixed Gap size checkbox]]&lt;br /&gt;
&lt;br /&gt;
==Letter Hints==&lt;br /&gt;
This setting only has an effect when the [[Question behaviours|interactive with multiple tries question behaviour]] is selected and when hints have been added to the question. If a student submits an incorrect answer the first letter of the correct answer will be added. If they submit another incorrect answer first two letters of the correct answer will be added and this continues for the number of hints that are added for the question.&lt;br /&gt;
[[Image:gapfill_letter_hints.png|Letter Hints]]&lt;br /&gt;
&lt;br /&gt;
==Double Not ==&lt;br /&gt;
The use of !! indicates that a gap can be left empty and considered a correct response.&lt;br /&gt;
&lt;br /&gt;
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].&lt;br /&gt;
&lt;br /&gt;
This is illustrated in a new sample question in the sample_questions.xml files shipped with this question type called &amp;quot;Correct_empty_gaps with !!&amp;quot; As part of this change the calculation of maximum score per question instance has been modified, so a question with &amp;quot;The [cat] sat on the [!!]&amp;quot; will be worth two marks in total one for entering cat and one for leaving the second gap blank. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.&lt;br /&gt;
&lt;br /&gt;
==Extended Characters==&lt;br /&gt;
&lt;br /&gt;
Gapfill will only work with characters that will display in a standard HTML form. This means it will not render any [[HTML]] or [[LaTeX]]. It should be possible to display [[Unicode|unicode]] characters such as these examples of &amp;quot;powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 3?[10³]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 4?[10⁴]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 5?[10⁵] &lt;br /&gt;
&lt;br /&gt;
What is ten to the power 6?[10⁶]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 7?[10⁷]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 8?[10⁸ ]&lt;br /&gt;
&lt;br /&gt;
What is ten to the power 9?[10⁹]&lt;br /&gt;
&lt;br /&gt;
[[Image:tenpower.png|extended characters]]&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;can use some HTML codes&#039;&#039; inside gapfill questions, but you must first click on the &amp;lt;&amp;gt; button to show HTML code. Please note  that you could actually type most of these codes directly. The following HTML codes are available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
&lt;br /&gt;
[[File:Gapfill with extended HTML characters.png|Gapfill using some HTML codes]]&lt;br /&gt;
&lt;br /&gt;
==Set defaults for new questions==&lt;br /&gt;
&lt;br /&gt;
Some default values can be configured for new instances of the question. With an admin login account go &#039;&#039; Site administration &amp;gt; Plugins  &amp;gt; Question types  &#039;&#039; and select &#039;&#039; Gapfill  &amp;gt; Settings &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This was very easy with the Clean theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin with Clean theme]]&lt;br /&gt;
&lt;br /&gt;
It may be a little cumbersome with the Boost theme:&lt;br /&gt;
&lt;br /&gt;
[[Image:Boost gapfill admin.png|Gapfill Admin with Boost theme]]&lt;br /&gt;
&lt;br /&gt;
Select settings and you will see the following form&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_settings.png|Gapfill Settings]]&lt;br /&gt;
&lt;br /&gt;
==Use in modules other than quiz==&lt;br /&gt;
This question type has been used in the [[Question_practice_module]] and the [[Question_Creation_module]]&lt;br /&gt;
&lt;br /&gt;
==Related Question Types ==&lt;br /&gt;
&lt;br /&gt;
There is a &#039;companion&#039; question type called [[Wordselect question type|Wordselect]] that may be of interest to users of this question type. Word select questions are created in a similar way, i.e. putting sqare braces around certain words. The difference is that all words are shown and the student has to click on the words they consider to be correct. &lt;br /&gt;
&lt;br /&gt;
This Gapfill question was designed to be simpler to use than the [[Embedded Answers (Cloze) question type|the core Cloze question type]].  However, the Gapfill type has fewer features than [[Embedded Answers (Cloze) question type|the Cloze type]]. There are [[Cloze editor module|cloze editors available for both TinyMCE and Atto]] that greatly ease the making of Cloze question types, without having to learn the complex cloze syntax.&lt;br /&gt;
&lt;br /&gt;
There are two other core question types  that cover a slightly similar area to Gapfill&lt;br /&gt;
* the [[Drag and drop into text question type]]&lt;br /&gt;
* and the [[Select missing words question type|Select missing words  (gapselect) question type]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Language teaching]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:single_use_draggables.png&amp;diff=138489</id>
		<title>File:single use draggables.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:single_use_draggables.png&amp;diff=138489"/>
		<updated>2020-09-20T10:37:10Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Drag_and_drop_markers_question_type&amp;diff=138488</id>
		<title>Drag and drop markers question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Drag_and_drop_markers_question_type&amp;diff=138488"/>
		<updated>2020-09-19T20:05:08Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Creating polygons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Questions}}&lt;br /&gt;
&lt;br /&gt;
This  question type allows students to drop markers onto an area on a background image. Drag and drop markers questions differ from [[Drag and drop onto image question type]] in that there are no predefined areas on the underlying image that are visible to the student. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to create a question==&lt;br /&gt;
&lt;br /&gt;
Give the question a descriptive name to help you find it in the question bank. (Students won&#039;t see the name.) In our example, students must correctly locate regions of Australia.&lt;br /&gt;
&lt;br /&gt;
Add the question to the text editor, using any formatting you wish.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Preview&#039;&#039;&#039; section, click the background image button to upload an image. Larger images will be displayed at a maximum 600 x 400.Your image will then display under the file upload box. Note that grid lines are visible:&lt;br /&gt;
&lt;br /&gt;
[[File:dragdropmarkerimageupload.png]]&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Markers&#039;&#039;&#039; section, add the words you want the students to drag onto the areas you select. &lt;br /&gt;
&lt;br /&gt;
[[File:ddmarkerswords.png]]&lt;br /&gt;
&lt;br /&gt;
In  the &#039;Number&#039; dropdown, you can select the number of times the marker can be used. Selecting 1 means that when it has been used once, it will no longer be available in the list. It is fine to leave the numbers as the default &#039;Unlimited&#039;; it just means that each marker will still remain once it has been used.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Dropzones&#039;&#039;&#039; section, decide the shape you want the selectable areas to be: circle, polygon or rectangle. Our example uses a rectangle. In each &#039;Marker&#039; dropdown, choose the item you want for that area. &lt;br /&gt;
&lt;br /&gt;
You will now see by your uploaded image that these names are displayed:&lt;br /&gt;
&lt;br /&gt;
[[File:ddmarkersimageandwords.png]]&lt;br /&gt;
&lt;br /&gt;
Drop zones may be dragged into position and resized using a mouse. Alternatively they can be defined by coordinates. Click the question mark icon next to Drop zone 1 to see how to add coordinates for your chosen shape.&lt;br /&gt;
&lt;br /&gt;
Generally, you should make the drop zones a little bit too big. That is, it is better to occasionally grade an incorrect response right, than to ever grade a correct response as incorrect.&lt;br /&gt;
&lt;br /&gt;
Once all the drop zones have been defined, you can save the changes and preview the question.&lt;br /&gt;
&lt;br /&gt;
[[File:ddexamplepositioning1.png]]&lt;br /&gt;
&lt;br /&gt;
Note: When dragging a marker, students must position the little circle top left of the marker in the centre of the area they have selected, &#039;&#039;not the whole marker&#039;&#039;, as this might cause confusion and an unexpected incorrect answer.&lt;br /&gt;
&lt;br /&gt;
===Using markers and drop zones more than once===&lt;br /&gt;
If &#039;Unlimited&#039; is selected from the &#039;Numbers&#039; dropdown in the &#039;&#039;&#039;Markers&#039;&#039;&#039; section, then the markers may be used more than once.&lt;br /&gt;
&lt;br /&gt;
If the same coordinates must used for several markers in the &#039;&#039;&#039;Drop zones&#039;&#039;&#039; section, then more than one marker may be placed in a single area, as in the example below (1) , where students identify regions of Great Britain, the UK and the British Isles (2):&lt;br /&gt;
&lt;br /&gt;
[[File:partsofGBUKBI.png|thumb|600px|center]]&lt;br /&gt;
&lt;br /&gt;
===Creating polygons===&lt;br /&gt;
When creating a polygon drop zone it starts off as a triangle. Click on it to reveal &#039;handles&#039; at each corner. &lt;br /&gt;
&lt;br /&gt;
[[File:ddm_triangle.jpg|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
To add a new  handle click on one of the existing ones while holding down the Ctrl key (Windows) or Cmd (Mac) and drag. This will create a new handle that can be dragged to change its position between the existing handles.&lt;br /&gt;
&lt;br /&gt;
==Scoring and feedback==&lt;br /&gt;
All drop zones are weighted identically. Only drop zones that are correctly labelled gain marks. There is no negative marking of drop zones that are incorrectly labelled.&lt;br /&gt;
&lt;br /&gt;
If more markers are placed on the image than there are drop-zones a penalty is applied for the extra markers. If there are n drop zones and n+m markers are placed of which p are placed correctly the score is calculated as p/(m+n).&lt;br /&gt;
&lt;br /&gt;
If the question is used in &#039;interactive with multiple tries&#039; style the marking is modified as follows:&lt;br /&gt;
&lt;br /&gt;
*The mark is reduced for each try by the penalty factor.&lt;br /&gt;
*Allowance is made for when a correct choice is first chosen providing it remains chosen in subsequent tries.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Show the number of correct responses:&#039;&#039;&#039; Include in the feedback a statement of how many choices are correct.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;State which markers are incorrectly placed:&#039;&#039;&#039; Include in the feedback a list of markers which are incorrectly placed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Move incorrectly placed markers back to default start position below image:&#039;&#039;&#039; When ‘Try again’ is clicked incorrectly positioned labels are removed.&lt;br /&gt;
&lt;br /&gt;
==Accessibility==&lt;br /&gt;
Marker questions are keyboard accessible. Use the &amp;lt;tab&amp;gt; key to move between the markers and the &amp;lt;arrow&amp;gt; keys to position the markers.&lt;br /&gt;
&lt;br /&gt;
Note: This question type is not accessible to users who are visually impaired.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*This question type was originally developed  by the UK Open University and was a contributed plugin for several years before becoming part of standard Moodle. Find more [https://moodle.org/plugins/browse.php?list=set&amp;amp;id=10 Open University plugins here].&lt;br /&gt;
* [http://www.somerandomthoughts.com/blog/2012/02/20/review-question-type-drag-and-drop-marker-for-moodle-2/ Review of this question type]&lt;br /&gt;
* [http://www.youtube.com/watch?v=Tvl4GuGvtxc Video tutorial: How to Create a Question Using the Drag and Drop with Markers Question Type]&lt;br /&gt;
&lt;br /&gt;
[[Category:Questions]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta arrastrar y soltar marcadores]]&lt;br /&gt;
[[de:Fragetyp Drag-and-Drop Markierungen]]&lt;br /&gt;
[[fr:Question_marqueurs_à_glisser-déposer]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=Drag_and_drop_markers_question_type&amp;diff=138487</id>
		<title>Drag and drop markers question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=Drag_and_drop_markers_question_type&amp;diff=138487"/>
		<updated>2020-09-19T19:49:10Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Using markers and drop zones more than once */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Questions}}&lt;br /&gt;
&lt;br /&gt;
This  question type allows students to drop markers onto an area on a background image. Drag and drop markers questions differ from [[Drag and drop onto image question type]] in that there are no predefined areas on the underlying image that are visible to the student. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to create a question==&lt;br /&gt;
&lt;br /&gt;
Give the question a descriptive name to help you find it in the question bank. (Students won&#039;t see the name.) In our example, students must correctly locate regions of Australia.&lt;br /&gt;
&lt;br /&gt;
Add the question to the text editor, using any formatting you wish.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Preview&#039;&#039;&#039; section, click the background image button to upload an image. Larger images will be displayed at a maximum 600 x 400.Your image will then display under the file upload box. Note that grid lines are visible:&lt;br /&gt;
&lt;br /&gt;
[[File:dragdropmarkerimageupload.png]]&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Markers&#039;&#039;&#039; section, add the words you want the students to drag onto the areas you select. &lt;br /&gt;
&lt;br /&gt;
[[File:ddmarkerswords.png]]&lt;br /&gt;
&lt;br /&gt;
In  the &#039;Number&#039; dropdown, you can select the number of times the marker can be used. Selecting 1 means that when it has been used once, it will no longer be available in the list. It is fine to leave the numbers as the default &#039;Unlimited&#039;; it just means that each marker will still remain once it has been used.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Dropzones&#039;&#039;&#039; section, decide the shape you want the selectable areas to be: circle, polygon or rectangle. Our example uses a rectangle. In each &#039;Marker&#039; dropdown, choose the item you want for that area. &lt;br /&gt;
&lt;br /&gt;
You will now see by your uploaded image that these names are displayed:&lt;br /&gt;
&lt;br /&gt;
[[File:ddmarkersimageandwords.png]]&lt;br /&gt;
&lt;br /&gt;
Drop zones may be dragged into position and resized using a mouse. Alternatively they can be defined by coordinates. Click the question mark icon next to Drop zone 1 to see how to add coordinates for your chosen shape.&lt;br /&gt;
&lt;br /&gt;
Generally, you should make the drop zones a little bit too big. That is, it is better to occasionally grade an incorrect response right, than to ever grade a correct response as incorrect.&lt;br /&gt;
&lt;br /&gt;
Once all the drop zones have been defined, you can save the changes and preview the question.&lt;br /&gt;
&lt;br /&gt;
[[File:ddexamplepositioning1.png]]&lt;br /&gt;
&lt;br /&gt;
Note: When dragging a marker, students must position the little circle top left of the marker in the centre of the area they have selected, &#039;&#039;not the whole marker&#039;&#039;, as this might cause confusion and an unexpected incorrect answer.&lt;br /&gt;
&lt;br /&gt;
===Using markers and drop zones more than once===&lt;br /&gt;
If &#039;Unlimited&#039; is selected from the &#039;Numbers&#039; dropdown in the &#039;&#039;&#039;Markers&#039;&#039;&#039; section, then the markers may be used more than once.&lt;br /&gt;
&lt;br /&gt;
If the same coordinates must used for several markers in the &#039;&#039;&#039;Drop zones&#039;&#039;&#039; section, then more than one marker may be placed in a single area, as in the example below (1) , where students identify regions of Great Britain, the UK and the British Isles (2):&lt;br /&gt;
&lt;br /&gt;
[[File:partsofGBUKBI.png|thumb|600px|center]]&lt;br /&gt;
&lt;br /&gt;
===Creating polygons===&lt;br /&gt;
When creating a polygon drop zone it starts off as a triangle. Click on it to reveal &#039;handles&#039; at each corner. &lt;br /&gt;
&lt;br /&gt;
[[File:ddm_triangle.jpg|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
To add a new  handle click on one of the existing ones while holding down the Ctrl key (windows) or Cmd (Mac) and drag. This will create a new handle that can be dragged to change its position between the existing handles.&lt;br /&gt;
&lt;br /&gt;
==Scoring and feedback==&lt;br /&gt;
All drop zones are weighted identically. Only drop zones that are correctly labelled gain marks. There is no negative marking of drop zones that are incorrectly labelled.&lt;br /&gt;
&lt;br /&gt;
If more markers are placed on the image than there are drop-zones a penalty is applied for the extra markers. If there are n drop zones and n+m markers are placed of which p are placed correctly the score is calculated as p/(m+n).&lt;br /&gt;
&lt;br /&gt;
If the question is used in &#039;interactive with multiple tries&#039; style the marking is modified as follows:&lt;br /&gt;
&lt;br /&gt;
*The mark is reduced for each try by the penalty factor.&lt;br /&gt;
*Allowance is made for when a correct choice is first chosen providing it remains chosen in subsequent tries.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Show the number of correct responses:&#039;&#039;&#039; Include in the feedback a statement of how many choices are correct.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;State which markers are incorrectly placed:&#039;&#039;&#039; Include in the feedback a list of markers which are incorrectly placed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Move incorrectly placed markers back to default start position below image:&#039;&#039;&#039; When ‘Try again’ is clicked incorrectly positioned labels are removed.&lt;br /&gt;
&lt;br /&gt;
==Accessibility==&lt;br /&gt;
Marker questions are keyboard accessible. Use the &amp;lt;tab&amp;gt; key to move between the markers and the &amp;lt;arrow&amp;gt; keys to position the markers.&lt;br /&gt;
&lt;br /&gt;
Note: This question type is not accessible to users who are visually impaired.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*This question type was originally developed  by the UK Open University and was a contributed plugin for several years before becoming part of standard Moodle. Find more [https://moodle.org/plugins/browse.php?list=set&amp;amp;id=10 Open University plugins here].&lt;br /&gt;
* [http://www.somerandomthoughts.com/blog/2012/02/20/review-question-type-drag-and-drop-marker-for-moodle-2/ Review of this question type]&lt;br /&gt;
* [http://www.youtube.com/watch?v=Tvl4GuGvtxc Video tutorial: How to Create a Question Using the Drag and Drop with Markers Question Type]&lt;br /&gt;
&lt;br /&gt;
[[Category:Questions]]&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta arrastrar y soltar marcadores]]&lt;br /&gt;
[[de:Fragetyp Drag-and-Drop Markierungen]]&lt;br /&gt;
[[fr:Question_marqueurs_à_glisser-déposer]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=File:ddm_triangle.jpg&amp;diff=138486</id>
		<title>File:ddm triangle.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=File:ddm_triangle.jpg&amp;diff=138486"/>
		<updated>2020-09-19T19:38:13Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Triangle with handles that is shown when a dragdrop marker question is creating a polygon.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Triangle with handles that is shown when a dragdrop marker question is creating a polygon.&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/402/en/index.php?title=qbehaviour_interactiveexplain&amp;diff=137428</id>
		<title>qbehaviour interactiveexplain</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/402/en/index.php?title=qbehaviour_interactiveexplain&amp;diff=137428"/>
		<updated>2020-06-25T20:48:33Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Interactive with explanation question behaviour ==&lt;br /&gt;
&lt;br /&gt;
This can be installed from the plugins database at &lt;br /&gt;
https://moodle.org/plugins/qbehaviour_interactiveexplain&lt;br /&gt;
&lt;br /&gt;
The source code  can be found at &lt;br /&gt;
https://github.com/marcusgreen/moodle-qbehaviour_interactiveexplain&lt;br /&gt;
&lt;br /&gt;
This plugin is based heavily on Tim Hunts deferred feedback with explanation question behaviour.&lt;br /&gt;
https://moodle.org/plugins/qbehaviour_deferredfeedbackexplain&lt;br /&gt;
&lt;br /&gt;
It requires that this plugin https://github.com/marcusgreen/moodle-local_qbehaviour_interactiveexplain is also installed &lt;br /&gt;
&lt;br /&gt;
This behaviour is like the interactive with multiple attempts behaviour, but with an additional text box where students can give a reason why they gave the answer they did. No attempt is made to automatically grade the explanation, nor is it required. However, it may be used in various ways, for example&lt;br /&gt;
&lt;br /&gt;
The teacher may want to manually edit the grades where the student gave a wrong answer, to give partial credit if the student used the right method or approach.&lt;br /&gt;
The student might want to explain their thinking, so that later, when the results and feedback are revealed, they are reminded of what they were thinking at the time, and so can reflect more deeply.&lt;br /&gt;
Note: 3rd party question behaviours do not work with the mobile app and there is no API at the moment to allow for that.&lt;br /&gt;
&lt;br /&gt;
=== Appearance for students ===&lt;br /&gt;
[[File:interactiveexplain.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Feedback/Explanations ===&lt;br /&gt;
The explanations given can be seen by the user or teacher after quiz submission by reviewing the quiz as in this screen shot.&lt;br /&gt;
&lt;br /&gt;
[[File:Interactive_With_Feedback.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
This plugin has a requirement that a companion local plugin local_qbehaviour_interactiveexplainis installed to configure strings and behaviour. This can be accessed at &lt;br /&gt;
yourmoodle/admin/settings.php?section=local_qbehaviour_interactiveexplain&lt;br /&gt;
&lt;br /&gt;
This is because question behaviour settings cannot be stored via a settings.php file in core moodle. There is a ticket to address this at some point in the future.&lt;br /&gt;
https://tracker.moodle.org/browse/MDL-68335&lt;br /&gt;
&lt;br /&gt;
[[File:qbconfig.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Questions]]&lt;br /&gt;
[[es:qbehaviour interactiveexplain]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
</feed>