<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/33/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/33/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marcusgreen"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/Special:Contributions/Marcusgreen"/>
	<updated>2026-04-18T05:41:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Global_search&amp;diff=128180</id>
		<title>Global search</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Global_search&amp;diff=128180"/>
		<updated>2017-06-16T05:59:27Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* The Solr server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{More features}}&lt;br /&gt;
==What is Global search?==&lt;br /&gt;
*Global search lets you search everywhere on the Moodle site that you have access to. A student can search their courses for particular lecture notes, for example, or a teacher could search for subject-related activities.&lt;br /&gt;
*The feature needs to be enabled by the administrator and a search box is then available next to the user menu.&lt;br /&gt;
&lt;br /&gt;
[[File:NFGlobalsearchbox.png|thumb|center|480px|Searching the site (when global search is enabled)]]&lt;br /&gt;
&lt;br /&gt;
*A [[Global search block]] may also be added to course pages.&lt;br /&gt;
&lt;br /&gt;
==What can I search for?==&lt;br /&gt;
You can search for your courses, activities information and some activities contents like forum posts, book chapters, glossary entries or collaborative wikis pages. We will add more contents in future Moodle versions. Developers interested in adding plugin&#039;s contents to global search may be interested in looking at the [https://docs.moodle.org/dev/Search_API Search API].&lt;br /&gt;
&lt;br /&gt;
==How does it work?==&lt;br /&gt;
*Click the search icon by the user menu and type a search term into the box that appears, or type into the box in the [[Global search block]] if enabled.&lt;br /&gt;
*On the next screen, you can simply click the search button to search everywhere, or expand the Filter to search in specific areas:&lt;br /&gt;
&lt;br /&gt;
[[File:NFFilteringGlobalSearch2.png|thumb|center|600px|Filtering the search]]&lt;br /&gt;
&lt;br /&gt;
*You will then see results displayed from all areas of Moodle you have access to:&lt;br /&gt;
&lt;br /&gt;
[[File:31GSResults2a.png|thumb|center|600px|Search results]]&lt;br /&gt;
&lt;br /&gt;
===Solr search query features===&lt;br /&gt;
&lt;br /&gt;
You can improve your search using any of the following search query features:&lt;br /&gt;
&lt;br /&gt;
* Specifying the field to be searched by prefixing the search query with &#039;title:&#039;, &#039;content:&#039;, &#039;name:&#039;, or &#039;intro:&#039; e.g.&#039;title:news&#039; returns results with the word &#039;news&#039; in the title&lt;br /&gt;
* Boolean operators (&#039;AND&#039;, &#039;OR&#039;, &#039;NOT&#039;) to combine or exclude keywords&lt;br /&gt;
* Wildcard characters (&#039;*&#039; or &#039;?&#039; ) to represent characters in the search query&lt;br /&gt;
* Proximity searches (&#039;~&#039;) e.g. mood~2 returns &amp;quot;moodle&amp;quot; (2 letters away from &amp;quot;mood&amp;quot;), Moodle Australia~3 returns results containing &amp;quot;Moodle HQ in Perth, Australia&amp;quot; (the queried terms were within 3 words of each other)&lt;br /&gt;
* Boosting terms (&#039;^&#039;) to boost certain words or phrases e.g. &amp;quot;Perth Australia&amp;quot;^5 &amp;quot;Australia&amp;quot; will return results with the phrase &amp;quot;Perth Australia&amp;quot; as more relevant.&lt;br /&gt;
&lt;br /&gt;
Note: The above features are only available when using the Solr search engine.&lt;br /&gt;
&lt;br /&gt;
==How is it set up?==&lt;br /&gt;
&lt;br /&gt;
{{Note|Global search needs a search engine. Instructions for the installing the PHP Solr extension and a Solr server are below. See the [https://docs.moodle.org/dev/Search_engines Developer docs on Search engine plugins] if you wish to write your own. It&#039;s recommended you set everything up first, index the site contents &#039;&#039;and only then&#039;&#039; enable Global search.}}&lt;br /&gt;
&lt;br /&gt;
===Setting up Solr===&lt;br /&gt;
&lt;br /&gt;
====General Setup====&lt;br /&gt;
&lt;br /&gt;
# Set the feature up in &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Search &amp;gt; Manage global search&#039;&#039; by selecting Solr as the search engine and ticking search area checkboxes as required&lt;br /&gt;
# In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Search &amp;gt; Solr&#039;&#039;, set &#039;&#039;&#039;Host name&#039;&#039;&#039; to localhost, &#039;&#039;&#039;Port&#039;&#039;&#039; to 8983 and &#039;&#039;&#039;Index name&#039;&#039;&#039; to &#039;moodle&#039; (the name of the index in Solr) &lt;br /&gt;
# If you are using Solr with SSL encryption, you will need to configure Moodle as such. This is important if solr is not installed in the web server server.&lt;br /&gt;
## You will need a separate key file and cacert file, both in pem format, located on your server Moodle, and readable by the PHP process.&lt;br /&gt;
## Go to &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Search &amp;gt; Solr&#039;&#039;&lt;br /&gt;
## Set &#039;&#039;&#039;Secure mode&#039;&#039;&#039; to Yes&lt;br /&gt;
## &#039;&#039;&#039;SSL certificate&#039;&#039;&#039; to /path/to/certs/solr-ssl.cacert.pem&lt;br /&gt;
## &#039;&#039;&#039;SSL key&#039;&#039;&#039; to /path/to/certs/solr-ssl.key.pem&lt;br /&gt;
## &#039;&#039;&#039;SSL key Password&#039;&#039;&#039; to The password used to lock the SSL Key&lt;br /&gt;
## &#039;&#039;&#039;SSL CA certificates name&#039;&#039;&#039; to /path/to/certs/solr-ssl.cacert.pem&lt;br /&gt;
# You now need to populate the created Solr index with your site&#039;s data. You can do it via the web interface by going to &#039;&#039;Site administration &amp;gt; Reports &amp;gt; Global search info&#039;&#039; or from the CLI by running the &amp;lt;tt&amp;gt;search/cli/indexer.php&amp;lt;/tt&amp;gt; script. The CLI script is the recommended option for big sites.&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;# sudo -u www-run php search/cli/indexer.php --force&amp;lt;/code&amp;gt;&lt;br /&gt;
# Enable Global search in &#039;&#039;Site administration &amp;gt; Advanced features&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====File Indexing====&lt;br /&gt;
&lt;br /&gt;
Solr has the ability to index the contents of files, such as File resources and attachments to Forum posts. This uses the [https://tika.apache.org/ Tika] engine which comes bundled with Solr. To enable this feature:&lt;br /&gt;
# In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Search &amp;gt; Solr&#039;&#039; enable the checkbox &#039;&#039;&#039;Enable file indexing&#039;&#039;&#039;&lt;br /&gt;
# Set &#039;&#039;&#039;Maximum file size to index (kB)&#039;&#039;&#039; to some value - the default is &#039;&#039;&#039;2097152&#039;&#039;&#039; (2GB)&lt;br /&gt;
#* Files larger than this limit will not be sent for Solr for indexing, but the file name will still be indexed.&lt;br /&gt;
&lt;br /&gt;
===How to install Solr===&lt;br /&gt;
&lt;br /&gt;
You need PHP Solr extension installed. You can download the official latest versions from [http://pecl.php.net/package/solr](http://pecl.php.net/package/solr) The minimum required version is PECL Solr 2.1 for PHP 5 branch and PECL Solr 2.4 for PHP 7 branch.&lt;br /&gt;
&lt;br /&gt;
Basic installation steps (using apache web server):&lt;br /&gt;
&lt;br /&gt;
==== Linux (Debian/Ubuntu) ====&lt;br /&gt;
With PHP5.x&lt;br /&gt;
    sudo apt-get install libpcre3-dev libxml2-dev libcurl4-openssl-dev&lt;br /&gt;
    sudo apt-get install php5-dev&lt;br /&gt;
    sudo apt-get install php-pear&lt;br /&gt;
    sudo pecl install solr&lt;br /&gt;
    sudo sh -c &amp;quot;echo &#039;extension=solr.so&#039; &amp;gt; /etc/php5/apache2/conf.d/solr.ini&amp;quot;&lt;br /&gt;
    sudo sh -c &amp;quot;echo &#039;extension=solr.so&#039; &amp;gt; /etc/php5/cli/conf.d/solr.ini&amp;quot;&lt;br /&gt;
    sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
With PHP 7&lt;br /&gt;
    sudo apt-get install libpcre3-dev libxml2-dev libcurl4-openssl-dev&lt;br /&gt;
    sudo apt-get install php7.0-dev&lt;br /&gt;
    sudo apt-get install php-pear&lt;br /&gt;
    sudo pecl install solr&lt;br /&gt;
    sudo sh -c &amp;quot;echo &#039;extension=solr.so&#039; &amp;gt; /etc/php/7.0/apache2/conf.d/solr.ini&amp;quot;&lt;br /&gt;
    sudo sh -c &amp;quot;echo &#039;extension=solr.so&#039; &amp;gt; /etc/php/7.0/cli/conf.d/solr.ini&amp;quot;&lt;br /&gt;
    sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
==== Linux (Redhat/Centos 6 &amp;amp; 7) ====&lt;br /&gt;
&lt;br /&gt;
===== Using built in php5 packages =====&lt;br /&gt;
  yum install php-pecl-solr2&lt;br /&gt;
  service httpd restart&lt;br /&gt;
&lt;br /&gt;
===== Using 3rd party php7 packages (webtactic) =====&lt;br /&gt;
  yum install libxml2-devel pcre-devel libcurl-devel php70w-devel php70w-pear&lt;br /&gt;
  pecl install solr&lt;br /&gt;
  echo &amp;quot;extension=solr.so&amp;quot; &amp;gt; /etc/php.d/solr.ini&lt;br /&gt;
  service httpd restart&lt;br /&gt;
&lt;br /&gt;
==== OSX using macports ====&lt;br /&gt;
&lt;br /&gt;
    sudo port install apache-solr4&lt;br /&gt;
    sudo port install php54-solr&lt;br /&gt;
&lt;br /&gt;
==== OSX using homebrew ====&lt;br /&gt;
&lt;br /&gt;
    brew install homebrew/php/php56-solr&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
Install the pecl package as usual. (This has not yet been tested.)&lt;br /&gt;
&lt;br /&gt;
==== The Solr server ====&lt;br /&gt;
&lt;br /&gt;
Moodle 3.1 supports Solr server from 4.0 onwards, although you can only use the Solr schema setup script that we provide with Moodle from Solr 5. The latest Solr 5 available version is the recommended one; the same will apply to Solr 6 once it is released. &lt;br /&gt;
&lt;br /&gt;
Note that for medium/large sites you may need to increase maxBooleanClauses setting. In [https://tracker.moodle.org/browse/MDL-54992 MDL-54992] we are working on an alternative way to query the server. &lt;br /&gt;
 &lt;br /&gt;
The following example snippet (feel free to copy &amp;amp; paste into a .sh script with execution permissions) will download Solr 5.4.1 (replace it with latest 5.x) in the current directory, start the solr server and create an index in it named &#039;&#039;&#039;moodle&#039;&#039;&#039; to add moodle data to it. If wget gives an error, check  http://www-us.apache.org/dist/lucene/solr and update SOLRVERSION&lt;br /&gt;
&lt;br /&gt;
    #!/bin/bash&lt;br /&gt;
    set -e&lt;br /&gt;
    SOLRVERSION=5.4.1&lt;br /&gt;
    SOLRNAME=solr-$SOLRVERSION&lt;br /&gt;
    SOLRTAR=$SOLRNAME&#039;.tgz&#039;&lt;br /&gt;
    INDEXNAME=moodle&lt;br /&gt;
    if [ -d $SOLRNAME ]; then&lt;br /&gt;
        echo &amp;quot;Error: Directory $SOLRNAME already exists, remove it before starting the setup again.&amp;quot;&lt;br /&gt;
        exit 1&lt;br /&gt;
    fi&lt;br /&gt;
    if [ ! -f $SOLRTAR ]; then&lt;br /&gt;
        wget http://www-us.apache.org/dist/lucene/solr/$SOLRVERSION/$SOLRTAR&lt;br /&gt;
    fi&lt;br /&gt;
    tar -xvzf $SOLRTAR&lt;br /&gt;
    cd $SOLRNAME&lt;br /&gt;
    bin/solr start&lt;br /&gt;
    bin/solr create -c $INDEXNAME&lt;br /&gt;
    # After setting it up and creating the index use:&lt;br /&gt;
    # - &amp;quot;/yourdirectory/solrdir/bin/solr start&amp;quot; from CLI to start the server&lt;br /&gt;
    # - &amp;quot;/yourdirectory/solrdir/bin/solr stop&amp;quot; from CLI to stop the server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Solr 5/6 schema setup=====&lt;br /&gt;
&lt;br /&gt;
Moodle will use Solr&#039;s managed schema interface to install the required fields. You will be directed on what to do from the Manage global search page.&lt;br /&gt;
&lt;br /&gt;
For very large or busy sites, it is recommended that you manually remove the &#039;&#039;&#039;_text_&#039;&#039;&#039; field, and associated copy directive from, the default Solr schema. This field is not used by Moodle, and will significantly slow indexing, and increase the size of the resulting Solr core.&lt;br /&gt;
&lt;br /&gt;
=====Solr 4 schema setup=====&lt;br /&gt;
&lt;br /&gt;
You cannot  use the schema setup script when using a Solr 4 server. If you really want to use the Solr 4x branch, here are the field types descriptions:&lt;br /&gt;
&lt;br /&gt;
Extracted from search/classes/document.php&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Field type&lt;br /&gt;
! Stored&lt;br /&gt;
! Indexed&lt;br /&gt;
! Query field&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| title&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|-&lt;br /&gt;
| content&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|-&lt;br /&gt;
| contextid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| areaid&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| owneruserid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| modified&lt;br /&gt;
| org.apache.solr.schema.TrieDateField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| description1&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|-&lt;br /&gt;
| description2&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|-&lt;br /&gt;
| solr_filegroupingid&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| solr_fileid&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| solr_filecontenthash&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| solr_fileindexstatus&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| solr_filecontent&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| false&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Memory and File indexing considerations=====&lt;br /&gt;
&lt;br /&gt;
For large sites, and particularly if you are using the File indexing feature, it&#039;s a good idea to give Solr plenty of memory, eg aound 10-20GB. To start Solr with more than its default 512MB of RAM, use the &#039;&#039;-m&#039;&#039; option: &lt;br /&gt;
 solr start -m 12g&lt;br /&gt;
&lt;br /&gt;
See the documents for your version of Solr on how to increases memory when Solr is started automatically.&lt;br /&gt;
&lt;br /&gt;
=====Too many boolean clauses error=====&lt;br /&gt;
&lt;br /&gt;
Because of the way Moodle handles permissions for searches, if you have non-admin users with access to a large number of activities (&amp;gt;1000), they may an error similar to the following:&lt;br /&gt;
&lt;br /&gt;
    The query you provided could not be parsed by the search engine: org.apache.solr.search.SyntaxError: Cannot parse &lt;br /&gt;
    ...&lt;br /&gt;
    too many boolean clauses&lt;br /&gt;
&lt;br /&gt;
To correct this, you need to increase the &#039;&#039;maxBooleanClauses&#039;&#039; setting in your Solr core. The setting is located in &#039;&#039;corename/conf/solrconfig.xml&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This important note is included in the config file:&lt;br /&gt;
    ** WARNING **&lt;br /&gt;
    &lt;br /&gt;
    This option actually modifies a global Lucene property that&lt;br /&gt;
    will affect all SolrCores.  If multiple solrconfig.xml files&lt;br /&gt;
    disagree on this property, the value at any given moment will&lt;br /&gt;
    be based on the last SolrCore to be initialized.&lt;br /&gt;
&lt;br /&gt;
This means that for consistent behavior you should update this value for all cores in the Solr server.&lt;br /&gt;
&lt;br /&gt;
====Commannd for installing Solr Server on Centos 7====&lt;br /&gt;
First of all install java (openjdk)&lt;br /&gt;
 yum install java-1.8.0-openjdk&lt;br /&gt;
Add user for solr&lt;br /&gt;
 adduser solr&lt;br /&gt;
Download solr server, find latest here : http://lucene.apache.org/solr/mirrors-solr-latest-redir.html, from the list there download latest solr-[version].tgz&lt;br /&gt;
&lt;br /&gt;
Here is the list of needed commands (note that latest solr is suggested, change command to appropriate version) &lt;br /&gt;
 cd /opt&lt;br /&gt;
 wget http://www-eu.apache.org/dist/lucene/solr/6.1.0/solr-6.1.0.tgz&lt;br /&gt;
 tar zxvf solr-6.1.0.tgz&lt;br /&gt;
 cp solr-6.1.0/bin/install_solr_service.sh .&lt;br /&gt;
 rm -rf solr-6.1.0&lt;br /&gt;
 ./install_solr_service.sh solr-6.1.0.tgz&lt;br /&gt;
 chkconfig solr on&lt;br /&gt;
Create the index&lt;br /&gt;
 su - solr -c &amp;quot;/opt/solr/bin/solr create_core -c moodle&amp;quot;&lt;br /&gt;
Then go to your Moodle and set index name as created (moodle)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
Forum discussions:&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=334938 Global search doesn&#039;t index plugins?]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=339819 Global Search on Moodle 3.1]&lt;br /&gt;
&lt;br /&gt;
[[es:Búsqueda global]]&lt;br /&gt;
[[de:Globale Suche]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Global_search&amp;diff=128179</id>
		<title>Global search</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Global_search&amp;diff=128179"/>
		<updated>2017-06-16T05:58:14Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* The Solr server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{More features}}&lt;br /&gt;
==What is Global search?==&lt;br /&gt;
*Global search lets you search everywhere on the Moodle site that you have access to. A student can search their courses for particular lecture notes, for example, or a teacher could search for subject-related activities.&lt;br /&gt;
*The feature needs to be enabled by the administrator and a search box is then available next to the user menu.&lt;br /&gt;
&lt;br /&gt;
[[File:NFGlobalsearchbox.png|thumb|center|480px|Searching the site (when global search is enabled)]]&lt;br /&gt;
&lt;br /&gt;
*A [[Global search block]] may also be added to course pages.&lt;br /&gt;
&lt;br /&gt;
==What can I search for?==&lt;br /&gt;
You can search for your courses, activities information and some activities contents like forum posts, book chapters, glossary entries or collaborative wikis pages. We will add more contents in future Moodle versions. Developers interested in adding plugin&#039;s contents to global search may be interested in looking at the [https://docs.moodle.org/dev/Search_API Search API].&lt;br /&gt;
&lt;br /&gt;
==How does it work?==&lt;br /&gt;
*Click the search icon by the user menu and type a search term into the box that appears, or type into the box in the [[Global search block]] if enabled.&lt;br /&gt;
*On the next screen, you can simply click the search button to search everywhere, or expand the Filter to search in specific areas:&lt;br /&gt;
&lt;br /&gt;
[[File:NFFilteringGlobalSearch2.png|thumb|center|600px|Filtering the search]]&lt;br /&gt;
&lt;br /&gt;
*You will then see results displayed from all areas of Moodle you have access to:&lt;br /&gt;
&lt;br /&gt;
[[File:31GSResults2a.png|thumb|center|600px|Search results]]&lt;br /&gt;
&lt;br /&gt;
===Solr search query features===&lt;br /&gt;
&lt;br /&gt;
You can improve your search using any of the following search query features:&lt;br /&gt;
&lt;br /&gt;
* Specifying the field to be searched by prefixing the search query with &#039;title:&#039;, &#039;content:&#039;, &#039;name:&#039;, or &#039;intro:&#039; e.g.&#039;title:news&#039; returns results with the word &#039;news&#039; in the title&lt;br /&gt;
* Boolean operators (&#039;AND&#039;, &#039;OR&#039;, &#039;NOT&#039;) to combine or exclude keywords&lt;br /&gt;
* Wildcard characters (&#039;*&#039; or &#039;?&#039; ) to represent characters in the search query&lt;br /&gt;
* Proximity searches (&#039;~&#039;) e.g. mood~2 returns &amp;quot;moodle&amp;quot; (2 letters away from &amp;quot;mood&amp;quot;), Moodle Australia~3 returns results containing &amp;quot;Moodle HQ in Perth, Australia&amp;quot; (the queried terms were within 3 words of each other)&lt;br /&gt;
* Boosting terms (&#039;^&#039;) to boost certain words or phrases e.g. &amp;quot;Perth Australia&amp;quot;^5 &amp;quot;Australia&amp;quot; will return results with the phrase &amp;quot;Perth Australia&amp;quot; as more relevant.&lt;br /&gt;
&lt;br /&gt;
Note: The above features are only available when using the Solr search engine.&lt;br /&gt;
&lt;br /&gt;
==How is it set up?==&lt;br /&gt;
&lt;br /&gt;
{{Note|Global search needs a search engine. Instructions for the installing the PHP Solr extension and a Solr server are below. See the [https://docs.moodle.org/dev/Search_engines Developer docs on Search engine plugins] if you wish to write your own. It&#039;s recommended you set everything up first, index the site contents &#039;&#039;and only then&#039;&#039; enable Global search.}}&lt;br /&gt;
&lt;br /&gt;
===Setting up Solr===&lt;br /&gt;
&lt;br /&gt;
====General Setup====&lt;br /&gt;
&lt;br /&gt;
# Set the feature up in &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Search &amp;gt; Manage global search&#039;&#039; by selecting Solr as the search engine and ticking search area checkboxes as required&lt;br /&gt;
# In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Search &amp;gt; Solr&#039;&#039;, set &#039;&#039;&#039;Host name&#039;&#039;&#039; to localhost, &#039;&#039;&#039;Port&#039;&#039;&#039; to 8983 and &#039;&#039;&#039;Index name&#039;&#039;&#039; to &#039;moodle&#039; (the name of the index in Solr) &lt;br /&gt;
# If you are using Solr with SSL encryption, you will need to configure Moodle as such. This is important if solr is not installed in the web server server.&lt;br /&gt;
## You will need a separate key file and cacert file, both in pem format, located on your server Moodle, and readable by the PHP process.&lt;br /&gt;
## Go to &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Search &amp;gt; Solr&#039;&#039;&lt;br /&gt;
## Set &#039;&#039;&#039;Secure mode&#039;&#039;&#039; to Yes&lt;br /&gt;
## &#039;&#039;&#039;SSL certificate&#039;&#039;&#039; to /path/to/certs/solr-ssl.cacert.pem&lt;br /&gt;
## &#039;&#039;&#039;SSL key&#039;&#039;&#039; to /path/to/certs/solr-ssl.key.pem&lt;br /&gt;
## &#039;&#039;&#039;SSL key Password&#039;&#039;&#039; to The password used to lock the SSL Key&lt;br /&gt;
## &#039;&#039;&#039;SSL CA certificates name&#039;&#039;&#039; to /path/to/certs/solr-ssl.cacert.pem&lt;br /&gt;
# You now need to populate the created Solr index with your site&#039;s data. You can do it via the web interface by going to &#039;&#039;Site administration &amp;gt; Reports &amp;gt; Global search info&#039;&#039; or from the CLI by running the &amp;lt;tt&amp;gt;search/cli/indexer.php&amp;lt;/tt&amp;gt; script. The CLI script is the recommended option for big sites.&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;# sudo -u www-run php search/cli/indexer.php --force&amp;lt;/code&amp;gt;&lt;br /&gt;
# Enable Global search in &#039;&#039;Site administration &amp;gt; Advanced features&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====File Indexing====&lt;br /&gt;
&lt;br /&gt;
Solr has the ability to index the contents of files, such as File resources and attachments to Forum posts. This uses the [https://tika.apache.org/ Tika] engine which comes bundled with Solr. To enable this feature:&lt;br /&gt;
# In &#039;&#039;Site administration &amp;gt; Plugins &amp;gt; Search &amp;gt; Solr&#039;&#039; enable the checkbox &#039;&#039;&#039;Enable file indexing&#039;&#039;&#039;&lt;br /&gt;
# Set &#039;&#039;&#039;Maximum file size to index (kB)&#039;&#039;&#039; to some value - the default is &#039;&#039;&#039;2097152&#039;&#039;&#039; (2GB)&lt;br /&gt;
#* Files larger than this limit will not be sent for Solr for indexing, but the file name will still be indexed.&lt;br /&gt;
&lt;br /&gt;
===How to install Solr===&lt;br /&gt;
&lt;br /&gt;
You need PHP Solr extension installed. You can download the official latest versions from [http://pecl.php.net/package/solr](http://pecl.php.net/package/solr) The minimum required version is PECL Solr 2.1 for PHP 5 branch and PECL Solr 2.4 for PHP 7 branch.&lt;br /&gt;
&lt;br /&gt;
Basic installation steps (using apache web server):&lt;br /&gt;
&lt;br /&gt;
==== Linux (Debian/Ubuntu) ====&lt;br /&gt;
With PHP5.x&lt;br /&gt;
    sudo apt-get install libpcre3-dev libxml2-dev libcurl4-openssl-dev&lt;br /&gt;
    sudo apt-get install php5-dev&lt;br /&gt;
    sudo apt-get install php-pear&lt;br /&gt;
    sudo pecl install solr&lt;br /&gt;
    sudo sh -c &amp;quot;echo &#039;extension=solr.so&#039; &amp;gt; /etc/php5/apache2/conf.d/solr.ini&amp;quot;&lt;br /&gt;
    sudo sh -c &amp;quot;echo &#039;extension=solr.so&#039; &amp;gt; /etc/php5/cli/conf.d/solr.ini&amp;quot;&lt;br /&gt;
    sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
With PHP 7&lt;br /&gt;
    sudo apt-get install libpcre3-dev libxml2-dev libcurl4-openssl-dev&lt;br /&gt;
    sudo apt-get install php7.0-dev&lt;br /&gt;
    sudo apt-get install php-pear&lt;br /&gt;
    sudo pecl install solr&lt;br /&gt;
    sudo sh -c &amp;quot;echo &#039;extension=solr.so&#039; &amp;gt; /etc/php/7.0/apache2/conf.d/solr.ini&amp;quot;&lt;br /&gt;
    sudo sh -c &amp;quot;echo &#039;extension=solr.so&#039; &amp;gt; /etc/php/7.0/cli/conf.d/solr.ini&amp;quot;&lt;br /&gt;
    sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
==== Linux (Redhat/Centos 6 &amp;amp; 7) ====&lt;br /&gt;
&lt;br /&gt;
===== Using built in php5 packages =====&lt;br /&gt;
  yum install php-pecl-solr2&lt;br /&gt;
  service httpd restart&lt;br /&gt;
&lt;br /&gt;
===== Using 3rd party php7 packages (webtactic) =====&lt;br /&gt;
  yum install libxml2-devel pcre-devel libcurl-devel php70w-devel php70w-pear&lt;br /&gt;
  pecl install solr&lt;br /&gt;
  echo &amp;quot;extension=solr.so&amp;quot; &amp;gt; /etc/php.d/solr.ini&lt;br /&gt;
  service httpd restart&lt;br /&gt;
&lt;br /&gt;
==== OSX using macports ====&lt;br /&gt;
&lt;br /&gt;
    sudo port install apache-solr4&lt;br /&gt;
    sudo port install php54-solr&lt;br /&gt;
&lt;br /&gt;
==== OSX using homebrew ====&lt;br /&gt;
&lt;br /&gt;
    brew install homebrew/php/php56-solr&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
Install the pecl package as usual. (This has not yet been tested.)&lt;br /&gt;
&lt;br /&gt;
==== The Solr server ====&lt;br /&gt;
&lt;br /&gt;
Moodle 3.1 supports Solr server from 4.0 onwards, although you can only use the Solr schema setup script that we provide with Moodle from Solr 5. The latest Solr 5 available version is the recommended one; the same will apply to Solr 6 once it is released. &lt;br /&gt;
&lt;br /&gt;
Note that for medium/large sites you may need to increase maxBooleanClauses setting. In [https://tracker.moodle.org/browse/MDL-54992 MDL-54992] we are working on an alternative way to query the server. &lt;br /&gt;
 &lt;br /&gt;
The following example snippet (feel free to copy &amp;amp; paste into a .sh script with execution permissions) will download Solr 5.4.1 (replace it with latest 5.x) in the current directory, start the solr server and create an index in it named &#039;&#039;&#039;moodle&#039;&#039;&#039; to add moodle data to it. If wget gives an error check the version numbers at http://www-us.apache.org/dist/lucene/solr.&lt;br /&gt;
&lt;br /&gt;
    #!/bin/bash&lt;br /&gt;
    set -e&lt;br /&gt;
    SOLRVERSION=5.4.1&lt;br /&gt;
    SOLRNAME=solr-$SOLRVERSION&lt;br /&gt;
    SOLRTAR=$SOLRNAME&#039;.tgz&#039;&lt;br /&gt;
    INDEXNAME=moodle&lt;br /&gt;
    if [ -d $SOLRNAME ]; then&lt;br /&gt;
        echo &amp;quot;Error: Directory $SOLRNAME already exists, remove it before starting the setup again.&amp;quot;&lt;br /&gt;
        exit 1&lt;br /&gt;
    fi&lt;br /&gt;
    if [ ! -f $SOLRTAR ]; then&lt;br /&gt;
        wget http://www-us.apache.org/dist/lucene/solr/$SOLRVERSION/$SOLRTAR&lt;br /&gt;
    fi&lt;br /&gt;
    tar -xvzf $SOLRTAR&lt;br /&gt;
    cd $SOLRNAME&lt;br /&gt;
    bin/solr start&lt;br /&gt;
    bin/solr create -c $INDEXNAME&lt;br /&gt;
    # After setting it up and creating the index use:&lt;br /&gt;
    # - &amp;quot;/yourdirectory/solrdir/bin/solr start&amp;quot; from CLI to start the server&lt;br /&gt;
    # - &amp;quot;/yourdirectory/solrdir/bin/solr stop&amp;quot; from CLI to stop the server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Solr 5/6 schema setup=====&lt;br /&gt;
&lt;br /&gt;
Moodle will use Solr&#039;s managed schema interface to install the required fields. You will be directed on what to do from the Manage global search page.&lt;br /&gt;
&lt;br /&gt;
For very large or busy sites, it is recommended that you manually remove the &#039;&#039;&#039;_text_&#039;&#039;&#039; field, and associated copy directive from, the default Solr schema. This field is not used by Moodle, and will significantly slow indexing, and increase the size of the resulting Solr core.&lt;br /&gt;
&lt;br /&gt;
=====Solr 4 schema setup=====&lt;br /&gt;
&lt;br /&gt;
You cannot  use the schema setup script when using a Solr 4 server. If you really want to use the Solr 4x branch, here are the field types descriptions:&lt;br /&gt;
&lt;br /&gt;
Extracted from search/classes/document.php&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Field type&lt;br /&gt;
! Stored&lt;br /&gt;
! Indexed&lt;br /&gt;
! Query field&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| title&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|-&lt;br /&gt;
| content&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|-&lt;br /&gt;
| contextid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| areaid&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| owneruserid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| modified&lt;br /&gt;
| org.apache.solr.schema.TrieDateField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| description1&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|-&lt;br /&gt;
| description2&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|-&lt;br /&gt;
| solr_filegroupingid&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| solr_fileid&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| solr_filecontenthash&lt;br /&gt;
| org.apache.solr.schema.StrField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| solr_fileindexstatus&lt;br /&gt;
| org.apache.solr.schema.TrieIntField&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
| false&lt;br /&gt;
|-&lt;br /&gt;
| solr_filecontent&lt;br /&gt;
| org.apache.solr.schema.TextField&lt;br /&gt;
| false&lt;br /&gt;
| true&lt;br /&gt;
| true&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Memory and File indexing considerations=====&lt;br /&gt;
&lt;br /&gt;
For large sites, and particularly if you are using the File indexing feature, it&#039;s a good idea to give Solr plenty of memory, eg aound 10-20GB. To start Solr with more than its default 512MB of RAM, use the &#039;&#039;-m&#039;&#039; option: &lt;br /&gt;
 solr start -m 12g&lt;br /&gt;
&lt;br /&gt;
See the documents for your version of Solr on how to increases memory when Solr is started automatically.&lt;br /&gt;
&lt;br /&gt;
=====Too many boolean clauses error=====&lt;br /&gt;
&lt;br /&gt;
Because of the way Moodle handles permissions for searches, if you have non-admin users with access to a large number of activities (&amp;gt;1000), they may an error similar to the following:&lt;br /&gt;
&lt;br /&gt;
    The query you provided could not be parsed by the search engine: org.apache.solr.search.SyntaxError: Cannot parse &lt;br /&gt;
    ...&lt;br /&gt;
    too many boolean clauses&lt;br /&gt;
&lt;br /&gt;
To correct this, you need to increase the &#039;&#039;maxBooleanClauses&#039;&#039; setting in your Solr core. The setting is located in &#039;&#039;corename/conf/solrconfig.xml&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This important note is included in the config file:&lt;br /&gt;
    ** WARNING **&lt;br /&gt;
    &lt;br /&gt;
    This option actually modifies a global Lucene property that&lt;br /&gt;
    will affect all SolrCores.  If multiple solrconfig.xml files&lt;br /&gt;
    disagree on this property, the value at any given moment will&lt;br /&gt;
    be based on the last SolrCore to be initialized.&lt;br /&gt;
&lt;br /&gt;
This means that for consistent behavior you should update this value for all cores in the Solr server.&lt;br /&gt;
&lt;br /&gt;
====Commannd for installing Solr Server on Centos 7====&lt;br /&gt;
First of all install java (openjdk)&lt;br /&gt;
 yum install java-1.8.0-openjdk&lt;br /&gt;
Add user for solr&lt;br /&gt;
 adduser solr&lt;br /&gt;
Download solr server, find latest here : http://lucene.apache.org/solr/mirrors-solr-latest-redir.html, from the list there download latest solr-[version].tgz&lt;br /&gt;
&lt;br /&gt;
Here is the list of needed commands (note that latest solr is suggested, change command to appropriate version) &lt;br /&gt;
 cd /opt&lt;br /&gt;
 wget http://www-eu.apache.org/dist/lucene/solr/6.1.0/solr-6.1.0.tgz&lt;br /&gt;
 tar zxvf solr-6.1.0.tgz&lt;br /&gt;
 cp solr-6.1.0/bin/install_solr_service.sh .&lt;br /&gt;
 rm -rf solr-6.1.0&lt;br /&gt;
 ./install_solr_service.sh solr-6.1.0.tgz&lt;br /&gt;
 chkconfig solr on&lt;br /&gt;
Create the index&lt;br /&gt;
 su - solr -c &amp;quot;/opt/solr/bin/solr create_core -c moodle&amp;quot;&lt;br /&gt;
Then go to your Moodle and set index name as created (moodle)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
Forum discussions:&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=334938 Global search doesn&#039;t index plugins?]&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=339819 Global Search on Moodle 3.1]&lt;br /&gt;
&lt;br /&gt;
[[es:Búsqueda global]]&lt;br /&gt;
[[de:Globale Suche]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126807</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126807"/>
		<updated>2017-02-10T20:40:20Z</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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of this file from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/master/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Version 1.93 include 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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
Some default values can be configured for new instances of the question. With an admin login account go to the plugins, question types and select gapfill settings&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin]]&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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126804</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126804"/>
		<updated>2017-02-10T13:13:37Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Set defaults for new 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/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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of this file from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/master/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Code is under development to allow this question type to run within the Mobile App. This will follow 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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
Some default values can be configured for new instances of the question. With an admin login account go to the plugins, question types and select gapfill settings&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin]]&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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126803</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126803"/>
		<updated>2017-02-10T13:13:09Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Set defaults for new 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/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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of this file from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/master/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Code is under development to allow this question type to run within the Mobile App. This will follow 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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
Some default values can be configured for new instances of the question. With an admin login account go to the plugins, question types and select gapfill settings&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin]]&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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126802</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126802"/>
		<updated>2017-02-10T13:12:46Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Set defaults for new 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/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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of this file from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/master/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Code is under development to allow this question type to run within the Mobile App. This will follow 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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
Some default values can be configured for new instances of the question. With an admin login account go to the plugins, question types and select gapfill settings&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin]]&lt;br /&gt;
Select settings and you will see the following form&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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=File:gapfill_settings.png&amp;diff=126801</id>
		<title>File:gapfill settings.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:gapfill_settings.png&amp;diff=126801"/>
		<updated>2017-02-10T13:11:25Z</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/33/en/index.php?title=Gapfill_question_type&amp;diff=126800</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126800"/>
		<updated>2017-02-10T13:10:34Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Set defaults for new 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/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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of this file from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/master/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Code is under development to allow this question type to run within the Mobile App. This will follow 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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
Some default values can be configured for new instances of the question. With an admin login account go to the plugins, question types and select gapfill settings&lt;br /&gt;
[[Image:gapfill_admin.png|Gapfill Admin]]&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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=File:gapfill_admin.png&amp;diff=126799</id>
		<title>File:gapfill admin.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:gapfill_admin.png&amp;diff=126799"/>
		<updated>2017-02-10T13:07:42Z</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/33/en/index.php?title=Gapfill_question_type&amp;diff=126798</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126798"/>
		<updated>2017-02-10T13:06:41Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Extended Characters */&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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of this file from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/master/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Code is under development to allow this question type to run within the Mobile App. This will follow 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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
Some default values can be configured for new instances of the question&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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126797</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126797"/>
		<updated>2017-02-10T12:53:14Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* The Gapfill Question Type */&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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of this file from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/master/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Code is under development to allow this question type to run within the Mobile App. This will follow 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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
==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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126796</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126796"/>
		<updated>2017-02-10T12:51:12Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* The Gapfill Question Type */&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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of this file from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/master/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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;
It does not work with the Moodle mobile app and there are no current plans to make it work with it.&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:dropdownconfig.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 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;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Code is under development to allow this question type to run within the Mobile App. This will follow 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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
==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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=File:mobile_gapfill4.png&amp;diff=126771</id>
		<title>File:mobile gapfill4.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:mobile_gapfill4.png&amp;diff=126771"/>
		<updated>2017-02-08T20:24:21Z</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/33/en/index.php?title=Gapfill_question_type&amp;diff=126770</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126770"/>
		<updated>2017-02-08T20:21:58Z</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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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;
It does not work with the Moodle mobile app and there are no current plans to make it work with it.&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:dropdownconfig.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 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;
&lt;br /&gt;
==In the Mobile App==&lt;br /&gt;
Code is under development to allow this question type to run within the Mobile App. This will follow 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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
==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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126769</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=126769"/>
		<updated>2017-02-08T20:19:46Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* At Runtine */&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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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;
It does not work with the Moodle mobile app and there are no current plans to make it work with it.&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:dropdownconfig.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 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;
==In the Mobile App==&lt;br /&gt;
Code is under development to allow this question type to run within the Mobile App. This will follow 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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;
==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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125416</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125416"/>
		<updated>2016-09-20T16:34:48Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* The Gapfill Question Type */&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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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;
It does not work with the Moodle mobile app and there are no current plans to make it work with it.&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:dropdownconfig.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 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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 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;
==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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125415</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125415"/>
		<updated>2016-09-20T16:34:02Z</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;
{{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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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 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;
==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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125414</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125414"/>
		<updated>2016-09-20T16:31:16Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Alternative Gapfill 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/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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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 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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground. Since Moodle 3.0 these have been in core Moodle:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125413</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125413"/>
		<updated>2016-09-20T16:30:23Z</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;
{{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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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 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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125412</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125412"/>
		<updated>2016-09-20T16:29:14Z</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;
{{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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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 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.jpg|extended characters]]&lt;br /&gt;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=File:tenpower.png&amp;diff=125411</id>
		<title>File:tenpower.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:tenpower.png&amp;diff=125411"/>
		<updated>2016-09-20T16:27:55Z</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/33/en/index.php?title=Gapfill_question_type&amp;diff=125410</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125410"/>
		<updated>2016-09-20T16:25:59Z</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;
{{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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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:disableregex.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;
&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 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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This 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]].&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground:&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;
&lt;br /&gt;
[[es:Tipo de pregunta llenarhueco]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125246</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125246"/>
		<updated>2016-09-09T16:23:23Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Gapfill crossword */&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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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 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:disableregex.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;
&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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This question was designed to be simpler to use than the core Cloze question type. https://docs.moodle.org/33/en/Embedded_Answers_(Cloze)_question_type however the Gapfill type has fewer features than the Cloze type.&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground.&lt;br /&gt;
https://docs.moodle.org/33/en/question/type/ddwtos&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
https://docs.moodle.org/33/en/question/type/gapselect&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/33/en/index.php?title=Gapfill_question_type&amp;diff=125245</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125245"/>
		<updated>2016-09-09T16:22:35Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Gapfill crossword */&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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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 the core Cloze question type, but the 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:disableregex.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;
&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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This question was designed to be simpler to use than the core Cloze question type. https://docs.moodle.org/33/en/Embedded_Answers_(Cloze)_question_type however the Gapfill type has fewer features than the Cloze type.&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground.&lt;br /&gt;
https://docs.moodle.org/33/en/question/type/ddwtos&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
https://docs.moodle.org/33/en/question/type/gapselect&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/33/en/index.php?title=Gapfill_question_type&amp;diff=125244</id>
		<title>Gapfill question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Gapfill_question_type&amp;diff=125244"/>
		<updated>2016-09-09T16:22:00Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Source for Gapfill crossword example */&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. The question type ships with a file called sample_questions.xml which illustrates the various ways it can be used. You can get the text of these files from this link&lt;br /&gt;
https://raw.githubusercontent.com/marcusgreen/moodle-qtype_gapfill/gapfill_1.7/sample_questions.xml and you can find instructions on how to import questions from this type of file here&lt;br /&gt;
https://docs.moodle.org/33/en/Import_questions#Importing_questions_from_an_existing_file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:gapfill_edit3.jpg|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:dropdownconfig.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 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;
&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;
&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;
https://docs.moodle.org/24/en/Preg_question_type and also&lt;br /&gt;
https://docs.moodle.org/33/en/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 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 the core Cloze question type, but the 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 ligh tgrey 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:disableregex.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;
&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;
==Alternative Gapfill Questions ==&lt;br /&gt;
This question was designed to be simpler to use than the core Cloze question type. https://docs.moodle.org/33/en/Embedded_Answers_(Cloze)_question_type however the Gapfill type has fewer features than the Cloze type.&lt;br /&gt;
&lt;br /&gt;
The OU (UK Open University) has two Moodle Question Types that covers similar ground.&lt;br /&gt;
https://docs.moodle.org/33/en/question/type/ddwtos&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
https://docs.moodle.org/33/en/question/type/gapselect&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/33/en/index.php?title=Question_practice_module&amp;diff=125167</id>
		<title>Question practice module</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Question_practice_module&amp;diff=125167"/>
		<updated>2016-09-01T21:02:54Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = Activity&lt;br /&gt;
|entry = https://moodle.org/plugins/view.php?plugin=mod_qpractice&lt;br /&gt;
|tracker = [https://github.com/jacks92/moodle-mod_qpractice/issues Github]&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/view.php?id=737 Quiz Forum]&lt;br /&gt;
|maintainer = [https://moodle.org/user/profile.php?id=2246 Marcus Green]&lt;br /&gt;
|float = right&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Concept of Question Practice Module==&lt;br /&gt;
&lt;br /&gt;
The basic idea is that the teacher sets up a bank of questions organised into categories. Then the student can then choose what questions they want to practice when. This is about student-centred learning based on the capabilities of the Moodle question bank. For more information about question categories see here https://docs.moodle.org/30/Question_categories&lt;br /&gt;
&lt;br /&gt;
==Steps to follow to set-up module==&lt;br /&gt;
&lt;br /&gt;
Below are some steps with snapshots that teacher can follow in order to create a working Question Practice instance.&lt;br /&gt;
&lt;br /&gt;
===Teacher side===&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
First step for any teacher is to create an instance of module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Creating a new instance====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractice_new_instance.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
After the instance for Question Practice module has been created, teacher is redirected to setting form for that instance. The setting form contains some general options like name, introduction and behaviour. The behaviour selected by teacher in settings are the only ones that will be visible to student ie: the student will have to select only from those behaviour.&lt;br /&gt;
&lt;br /&gt;
====Settings for Question Practice====&lt;br /&gt;
&lt;br /&gt;
This is an overview of settings available in Question Practice module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractce_settings.JPG|600px|center]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
After editing settings for an instance, the next step for teacher is to add questions to question bank. There are certain rules to be followed while adding questions to question bank.&lt;br /&gt;
&lt;br /&gt;
# Questions should be added only in context space of that instance.&lt;br /&gt;
# All the parent level categories created by teacher are visible to students: Example: If a teacher has 3 parent level categories ie: Topic 1 , Topic 2, Topic 3. These top level categories will be visible to student. Whenever a student starts practice he will be provided with option to select category from list of available categories. After that students are asked questions randomly from that category without being repetated.&lt;br /&gt;
# Teacher can create any number of sub-categories inside parent level category. Only parent level category are visible to student.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Adding Questions to module====&lt;br /&gt;
&lt;br /&gt;
This is an overview of question bank for Question Practice instance. Teacher can create categories and add or update questions here. Parent level categories created by teacher will be available to students for practice. Questions present in each category will be made available to students.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractice_question_bank.JPG|600px|center]]&lt;br /&gt;
&lt;br /&gt;
===Step 4===&lt;br /&gt;
&lt;br /&gt;
After setting up module , if a teacher wants to view history of all sessions for all students they can simply click on view past sessions as shown in screenshot and the list will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====View all Reports by Teacher====&lt;br /&gt;
&lt;br /&gt;
This is an overview of report.php at teacher&#039;s side. Teacher will be able to view all the data of all students.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractice_view_allreports.JPG|600px|center]]&lt;br /&gt;
&lt;br /&gt;
==Student Side==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Options visible to students===&lt;br /&gt;
&lt;br /&gt;
This is an overview of view.php. Students on start-up will be provided with 2 options. Either they can start a new session or can view history of all past sessions that they have done uptill now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractice_options.JPG|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Creating a new session===&lt;br /&gt;
&lt;br /&gt;
This page gives students option for selecting how a session should be. Student can select the category they want to practice and also select the behaviour that they want for a particular session.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractice_session.JPG|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Attempt page as visible to students===&lt;br /&gt;
&lt;br /&gt;
This page shows how a question is visible to student. He can attempt as many questions as he wishes to or stop the practice when he gets bored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractice_question.JPG|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Checking current Question===&lt;br /&gt;
&lt;br /&gt;
This page briefs on how answers are checked once students clicks on check button, therby giving accurate information about marks for same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractice_check_question.jpeg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
===Summary of Current Session===&lt;br /&gt;
&lt;br /&gt;
This page shows summary of current session in progress. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractice_summary.JPG|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===View individual report of all Past Sessions===&lt;br /&gt;
&lt;br /&gt;
This page shows the history of all practices of the student logged in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:qpractice_view_myreport.JPG|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* https://docs.moodle.org/dev/Self-assessment_activity_using_the_question_bank&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125166</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125166"/>
		<updated>2016-09-01T20:59:26Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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;
==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, but for that we will need some help from someone who actually knows how to do that...&lt;br /&gt;
&lt;br /&gt;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&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;
There is one 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;
It has been briefly tested in the &lt;br /&gt;
Question Practice module&lt;br /&gt;
https://docs.moodle.org/en/Question_practice_module&lt;br /&gt;
and the QCreate (Question Creation) module&lt;br /&gt;
https://moodle.org/plugins/mod_qcreate&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125106</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125106"/>
		<updated>2016-08-29T19:41:32Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as The cat {sat} on the mat.&lt;br /&gt;
&lt;br /&gt;
==Category Questions==&lt;br /&gt;
Words can be placed in tables and students asked to identify which match the category in the heading. &lt;br /&gt;
[[Image:wordselect_table_categories2.png|Wordselect table categories]]&lt;br /&gt;
&lt;br /&gt;
This is the code used to create that table. The Moodle editor car has an option for creating tables which can be any variation of&lt;br /&gt;
columns and rows.&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;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format in a file called sample_questions.xml. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
You can find instructions on importing questions at &lt;br /&gt;
https://docs.moodle.org/en/Import_questions&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125105</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125105"/>
		<updated>2016-08-29T19:38:49Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as The cat {sat} on the mat.&lt;br /&gt;
&lt;br /&gt;
==Category Questions==&lt;br /&gt;
Words can be placed in tables and students asked to identify which match the category in the heading. &lt;br /&gt;
[[Image:wordselect_table_categories2.png|Wordselect table categories]]&lt;br /&gt;
&lt;br /&gt;
This is the code used to create that table. The Moodle editor bcar has an option for creating tables which can be any variation of&lt;br /&gt;
columns and rows.&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;&lt;br /&gt;
&amp;lt;td style=&amp;quot;background-color: #c0c0c0;&amp;quot;&amp;gt;Feline&amp;lt;/td&amp;gt;&lt;br /&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;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;wolf&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[dog]&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;cow&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;zebra&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;[cat]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;lion&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;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format in a file called sample_questions.xml. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
You can find instructions on importing questions at &lt;br /&gt;
https://docs.moodle.org/en/Import_questions&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125104</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125104"/>
		<updated>2016-08-29T19:32:46Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as The cat {sat} on the mat.&lt;br /&gt;
&lt;br /&gt;
==Category Questions==&lt;br /&gt;
Words can be placed in tables and students asked to identify which match the category in the heading. &lt;br /&gt;
[[Image:wordselect_table_categories2.png|Wordselect table categories]]&lt;br /&gt;
&lt;br /&gt;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format in a file called sample_questions.xml. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
You can find instructions on importing questions at &lt;br /&gt;
https://docs.moodle.org/en/Import_questions&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=File:wordselect_table_categories2.png&amp;diff=125103</id>
		<title>File:wordselect table categories2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:wordselect_table_categories2.png&amp;diff=125103"/>
		<updated>2016-08-29T19:31:42Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Marcusgreen uploaded a new version of File:wordselect table categories2.png&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/33/en/index.php?title=File:wordselect_table_categories2.png&amp;diff=125102</id>
		<title>File:wordselect table categories2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:wordselect_table_categories2.png&amp;diff=125102"/>
		<updated>2016-08-29T19:27:39Z</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/33/en/index.php?title=File:wordselect_table_categories.PNG&amp;diff=125101</id>
		<title>File:wordselect table categories.PNG</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:wordselect_table_categories.PNG&amp;diff=125101"/>
		<updated>2016-08-29T19:26:04Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Marcusgreen uploaded a new version of File:wordselect table categories.PNG&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/33/en/index.php?title=File:wordselect_table_categories.PNG&amp;diff=125100</id>
		<title>File:wordselect table categories.PNG</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:wordselect_table_categories.PNG&amp;diff=125100"/>
		<updated>2016-08-29T19:25:43Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: Marcusgreen uploaded a new version of File:wordselect table categories.PNG&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/33/en/index.php?title=Wordselect_question_type&amp;diff=125099</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125099"/>
		<updated>2016-08-29T19:24:53Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as The cat {sat} on the mat.&lt;br /&gt;
&lt;br /&gt;
==Category Questions==&lt;br /&gt;
Words can be placed in tables and students asked to identify which match the category in the heading. &lt;br /&gt;
[[Image:wordselect_table_categories.png|Wordselect table categories]]&lt;br /&gt;
&lt;br /&gt;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format in a file called sample_questions.xml. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
You can find instructions on importing questions at &lt;br /&gt;
https://docs.moodle.org/en/Import_questions&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=File:wordselect_table_categories.PNG&amp;diff=125098</id>
		<title>File:wordselect table categories.PNG</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:wordselect_table_categories.PNG&amp;diff=125098"/>
		<updated>2016-08-29T19:22:45Z</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/33/en/index.php?title=Wordselect_question_type&amp;diff=125097</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125097"/>
		<updated>2016-08-29T19:21:14Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as The cat {sat} on the mat.&lt;br /&gt;
&lt;br /&gt;
==Category Questions==&lt;br /&gt;
Words can be placed in tables and students asked to identify which match the category in the heading. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format in a file called sample_questions.xml. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
You can find instructions on importing questions at &lt;br /&gt;
https://docs.moodle.org/en/Import_questions&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125088</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125088"/>
		<updated>2016-08-29T08:15:51Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as The cat {sat} on the mat.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format in a file called sample_questions.xml. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
You can find instructions on importing questions at &lt;br /&gt;
https://docs.moodle.org/en/Import_questions&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125087</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125087"/>
		<updated>2016-08-29T07:44:08Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as The cat {sat} on the mat.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format in a file called sample_question.xml. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
You can find instructions on importing questions at &lt;br /&gt;
https://docs.moodle.org/en/Import_questions&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125080</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125080"/>
		<updated>2016-08-28T17:54:46Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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]]&lt;br /&gt;
&lt;br /&gt;
So selecting {} would allow a question to be created as The cat {sat} on the mat.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=File:wordselect_delimitchar.png&amp;diff=125079</id>
		<title>File:wordselect delimitchar.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:wordselect_delimitchar.png&amp;diff=125079"/>
		<updated>2016-08-28T17:51:22Z</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/33/en/index.php?title=Wordselect_question_type&amp;diff=125078</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125078"/>
		<updated>2016-08-28T17:43:44Z</updated>

		<summary type="html">&lt;p&gt;Marcusgreen: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox plugin&lt;br /&gt;
|type = question type&lt;br /&gt;
|entry = https://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125077</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125077"/>
		<updated>2016-08-28T17:42:16Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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). &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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125076</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125076"/>
		<updated>2016-08-28T17:41:12Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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). &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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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;
==Grading==&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;
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 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;
==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;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&lt;br /&gt;
&lt;br /&gt;
==Accessibility==&lt;br /&gt;
It is possible to tab forwards through wards and backwards with 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 questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125075</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125075"/>
		<updated>2016-08-28T17:19:37Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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). &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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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;
==Grading==&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;
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 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;
==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;
==Sample questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta seleccionarpalabra]]&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. There is no version available for the Moodle mobile app and no current plans to develop one.&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125074</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125074"/>
		<updated>2016-08-28T11:09:15Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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). &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]]&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;
[[Image:wordselect_selected3.png|Wordselect selected word]]&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;
==Grading==&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;
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 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;
==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;
==Sample questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
&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/33/en/index.php?title=File:wordselect_selected3.png&amp;diff=125073</id>
		<title>File:wordselect selected3.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:wordselect_selected3.png&amp;diff=125073"/>
		<updated>2016-08-28T11:07:48Z</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/33/en/index.php?title=File:wordselect_nouns2.png&amp;diff=125072</id>
		<title>File:wordselect nouns2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=File:wordselect_nouns2.png&amp;diff=125072"/>
		<updated>2016-08-28T11:05:12Z</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/33/en/index.php?title=Wordselect_question_type&amp;diff=125071</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125071"/>
		<updated>2016-08-28T11:04:23Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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). &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]]&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;
[[Image:runtime_wordselect.png|Wordselect selected word]]&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;
==Grading==&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;
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 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;
==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;
==Sample questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
&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/33/en/index.php?title=Wordselect_question_type&amp;diff=125070</id>
		<title>Wordselect question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/33/en/index.php?title=Wordselect_question_type&amp;diff=125070"/>
		<updated>2016-08-28T11:03:20Z</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://github.com/marcusgreen/moodle-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;
&lt;br /&gt;
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). &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_nouns.png|Wordselect creation]]&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;
[[Image:runtime_wordselect.png|Wordselect selected word]]&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;
==Grading==&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;
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 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;
==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;
==Sample questions==&lt;br /&gt;
The question type comes with a set of sample questions in xml format. 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&lt;br /&gt;
has to click on the letters that make up words (e.g. find the animals in this square)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[es:Tipo de pregunta seleccionarpalabra]]&lt;/div&gt;</summary>
		<author><name>Marcusgreen</name></author>
	</entry>
</feed>