<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/310/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsvien</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/310/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsvien"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/Special:Contributions/Jsvien"/>
	<updated>2026-04-17T15:50:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=Embedded_Answers_(Cloze)_question_type&amp;diff=128117</id>
		<title>Embedded Answers (Cloze) question type</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=Embedded_Answers_(Cloze)_question_type&amp;diff=128117"/>
		<updated>2017-05-31T07:04:28Z</updated>

		<summary type="html">&lt;p&gt;Jsvien: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Questions}}&lt;br /&gt;
&#039;&#039;&#039;Embedded answers (Cloze)&#039;&#039;&#039; questions consist of a passage of text (in Moodle format) that has various answers embedded within it, including multiple choice, short answers and numerical answers.&lt;br /&gt;
&lt;br /&gt;
Until mid2013, there was no graphical interface to create these questions within your Moodle site - you needed to specify the question format using the text box or by importing them from external files.&lt;br /&gt;
&lt;br /&gt;
You can link to an external web site that does create these questions from a graphical interface, see the &#039;&#039;[http://projects.ael.uni-tuebingen.de/quiz/htmlarea/index.php Online Cloze Question quiz generator]&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
There is an Excel-based [http://hbwubecc.wixsite.com/jordan/tools Cloze and GIFT Generator] that was presented at the 2017 Moodle Moot Japan.&lt;br /&gt;
&lt;br /&gt;
There is a [[Cloze editor for TinyMCE]] that will let you create these questions from a graphical interface within your Moodle site, but it will overwrite your current HTML editor and only works with the [[TinyMCE editor]] but not with [[Atto]]. In 2016 a [[Cloze editor for Atto]] additional plugin was created.&lt;br /&gt;
&lt;br /&gt;
Lots of people suggested that [[Hot Potatoes]] software is the easiest way to create Embedded answer (Cloze) questions.  Once you have created your questions on your PC, you can then import them into Moodle&#039;s quiz module.&lt;br /&gt;
&lt;br /&gt;
However, the flexibility of the Cloze question type is hard to equal and despite the minor coding that you need to create the questions, it has great worth in the Moodle Quiz.&lt;br /&gt;
&lt;br /&gt;
==Question set-up==&lt;br /&gt;
&lt;br /&gt;
#Select the question category&lt;br /&gt;
#Give the question a descriptive name - this allows you to identify it in the question bank.&lt;br /&gt;
#Enter the passage of text (in Moodle format - see [[Embedded_Answers_%28Cloze%29_question_type#Format|Format]] below) into the &#039;question text&#039; field.&lt;br /&gt;
#Select an image to display if you want to add a picture to the question. For the student, it appears immediately above the question text.&lt;br /&gt;
#Set the &#039;default question grade&#039; (i.e. the maximum number of marks for this question).&lt;br /&gt;
#Set the &#039;Penalty factor&#039; (see [[Embedded_Answers_%28Cloze%29_question_type#Penalty_factor|Penalty factor]] below).&lt;br /&gt;
#If you wish, add general feedback. This is text that appears to the student after he/she has answered the question.&lt;br /&gt;
#The editor has been modified and allows you to test if your syntax is good. The different questions elements decoded will be displayed and syntax errors pinpoint. However, it cannot check if the question decoded is two questions in one because of an error syntax.&lt;br /&gt;
#Click Save changes to add the question to the category.&lt;br /&gt;
&lt;br /&gt;
=== Penalty factor ===&lt;br /&gt;
&lt;br /&gt;
The &#039;penalty factor&#039; only applies when the question is used in a quiz using adaptive mode - i.e. where the student is allowed multiple attempts at a question even within the same attempt at the quiz. If the penalty factor is more than 0, then the student will lose that proportion of the &#039;&#039;&#039;maximum&#039;&#039;&#039; grade upon each successive attempt. For example, if the default question grade is 10, and the penalty factor is 0.2, then each successive attempt after the first one will incur a penalty of 0.2 x 10 = 2 points.  The grading for the cloze question applies the penalty to each subpart of the question as a whole.  For example, if you have three fill in the blanks each worth 1 point each, then the penalty will only be incurred on the incorrect parts, not the questions as a whole.&lt;br /&gt;
&lt;br /&gt;
==Question rendering==&lt;br /&gt;
&lt;br /&gt;
The question answer entry space or INPUT HTML ELEMENT (for Short Answer and Numerical question types) and the dropdown list or SELECT HTML ELEMENT (for multichoice) are normally displayed in-line with the text.&lt;br /&gt;
&lt;br /&gt;
The size of the entry space or INPUT HTML ELEMENT ( Short and Numerical) will be adjustable to the length of the longest answer (good or bad) + a random number (0 to 15% total length).([[User:Pierre Pichet|Pierre Pichet]] 15:37, 26 January 2008 (CST))&lt;br /&gt;
&lt;br /&gt;
The size will adjust to the length of the student response when displayed in the grading and feedback process.&lt;br /&gt;
&lt;br /&gt;
The size of the dropdown list or SELECT HTML ELEMENT (multichoice) adjusts itself automatically to the longest answer.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
Questions consist of a passage of text (in Moodle format) that has various sub-questions embedded within it, including&lt;br /&gt;
&lt;br /&gt;
* short answers (SHORTANSWER or SA or MW), case is unimportant,&lt;br /&gt;
* short answers (SHORTANSWER_C or SAC or MWC), case must match,&lt;br /&gt;
* numerical answers (NUMERICAL or NM),&lt;br /&gt;
* multiple choice (MULTICHOICE or MC), represented as a dropdown menu in-line in the text,&lt;br /&gt;
* multiple choice (MULTICHOICE_V or MCV), represented as a vertical column of radio buttons, or&lt;br /&gt;
* multiple choice (MULTICHOICE_H or MCH), represented as a horizontal row of radio-buttons,&lt;br /&gt;
* when the quiz question behavior shuffle option IS SET YES, the following multiple choice sub-questions elements will be shuffled,&lt;br /&gt;
* multiple choice (MULTICHOICE_S or MCS), represented as a dropdown menu in-line in the text,&lt;br /&gt;
* multiple choice (MULTICHOICE_VS or MCVS), represented as a vertical column of radio buttons, or&lt;br /&gt;
* multiple choice (MULTICHOICE_HS or MCHS), represented as a horizontal row of radio-buttons.&lt;br /&gt;
&lt;br /&gt;
{{Note|MCS, MCVS, MCHS are new (Moodle 3.0) Cloze subquestion types with shuffling of answers. See MDL-38214.}}&lt;br /&gt;
&lt;br /&gt;
The structure of  each cloze sub-question is identical:&lt;br /&gt;
:&#039;&#039;&#039;{&#039;&#039;&#039;  start the cloze sub-question with a bracket (AltGr+7)&lt;br /&gt;
:&#039;&#039;&#039;1&#039;&#039;&#039; define a grade for each cloze by  a number (optional). This used for calculation of question grading.&lt;br /&gt;
:&#039;&#039;&#039;:SHORTANSWER:&#039;&#039;&#039; define the type of cloze sub-question. Definition is bounded by &#039;:&#039;. &lt;br /&gt;
:&#039;&#039;&#039;~&#039;&#039;&#039; is a seperator between answer options&lt;br /&gt;
:&#039;&#039;&#039;=&#039;&#039;&#039; marks a correct answer&lt;br /&gt;
:&#039;&#039;&#039;#&#039;&#039;&#039; marks the beginning of an (optional) feedback message&lt;br /&gt;
:&#039;&#039;&#039;}&#039;&#039;&#039;  close the cloze sub-question at the end with a bracket (AltGr+0)&lt;br /&gt;
&lt;br /&gt;
Now a very simple example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{1:SHORTANSWER:=Berlin} is the capital of Germany.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For full details of the format for embedded-answers questions, see the [[Embedded_Answers_%28Cloze%29_question_type#Detailed_syntax_explanations|detailed syntax explanation]] below.&lt;br /&gt;
&lt;br /&gt;
NB: Be careful when copying a cloze type question into the WYSIWYG HTML editor, as line breaks tend to get added, which destroys the question.&lt;br /&gt;
&lt;br /&gt;
If the correct answer contains } # ~ / &amp;quot; or \ you will have to escape them by putting a \ in front of each such character. But [[https://moodle.org/mod/forum/discuss.php?d=275299 this is tricky]]. The { shouldn&#039;t be escaped, this can be vital in getting TeX expressions to work. In the feedback ~ and } must be escaped otherwise it will be interpreted as &#039;&#039;the next answer&#039;&#039; or &#039;&#039;end of the short answer section&#039;&#039; respectively. Quotation signs: &amp;quot; can lead to trouble anyhow in both places. Use the HTML entity: &amp;amp; quot; (without the space between &#039;&#039;&amp;amp;&#039;&#039; and &#039;&#039;quot;&#039;&#039;). If you want to have Mathematical symbols there can be problems with the \ used in TeX expressions. One alternative can be to use [[unicode]] characters. &lt;br /&gt;
&lt;br /&gt;
See the notes further down about numerical embedded question!&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Example 1====&lt;br /&gt;
The following text creates a simple embedded-answers question:&lt;br /&gt;
&lt;br /&gt;
 Match the following cities with the correct state:&lt;br /&gt;
 * San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}&lt;br /&gt;
 * Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}&lt;br /&gt;
 * Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}&lt;br /&gt;
 * Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}&lt;br /&gt;
 The capital of France is {1:SHORTANSWER:%100%Paris#Congratulations!&lt;br /&gt;
 ~%50%Marseille#No, that is the second largest city in France (after&lt;br /&gt;
 Paris).~*#Wrong answer. The capital of France is Paris, of course.}.&lt;br /&gt;
&lt;br /&gt;
And the result will be:&lt;br /&gt;
 &lt;br /&gt;
[[Image:Cloze.gif|Cloze question type]] &lt;br /&gt;
&lt;br /&gt;
====Example 2====&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 1em;border: 1px dashed #FFB53A;color: black;background-color: #f9f9f9;font-family: monospace;font-size:1.2em;&amp;quot;&amp;gt;&lt;br /&gt;
This question consists of some text with an answer embedded right here {1:MULTICHOICE:Wrong answer#Feedback for this wrong answer~Another wrong answer#Feedback for the other wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer}&lt;br /&gt;
&lt;br /&gt;
and right after that you will have to deal with this short answer {1:SHORTANSWER:Wrong answer#Feedback for this wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer}&lt;br /&gt;
&lt;br /&gt;
and finally we have a floating point number {2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8~%50%23.8:2#Feedback for half credit answer in the nearby region of the correct answer}.&lt;br /&gt;
&lt;br /&gt;
The  multichoice question can also be shown in the vertical display of the standard moodle multiple choice.&lt;br /&gt;
{2:MCV:1. Wrong answer#Feedback for this wrong answer~2. Another wrong answer#Feedback for the other wrong answer~=3. Correct answer#Feedback for correct answer~%50%4. Answer that gives half the credit#Feedback for half credit answer}&lt;br /&gt;
&lt;br /&gt;
Or in an horizontal display that is included here in a table&lt;br /&gt;
{2:MCH:a. Wrong answer#Feedback for this wrong answer~b. Another wrong answer#Feedback for the other wrong answer~=c. Correct answer#Feedback for correct answer~%50%d. Answer that gives half the credit#Feedback for half credit answer}&lt;br /&gt;
&lt;br /&gt;
A shortanswer question where case must match. Write moodle in upper case letters {1:SHORTANSWER_C:moodle#Feedback for moodle in lower case ~=MOODLE#Feedback for MOODLE in upper case ~%50%Moodle#Feedback for only first letter in upper case}&lt;br /&gt;
&lt;br /&gt;
Note that addresses like www.moodle.org and smileys :-) all work as normal:&lt;br /&gt;
&lt;br /&gt;
a) How good is this? {:MULTICHOICE:=Yes#Correct~No#We have a different opinion}&lt;br /&gt;
&lt;br /&gt;
b) What grade would you give it? {3:NUMERICAL:=3:2}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
[[Image:Cloze example.png]]&lt;br /&gt;
&lt;br /&gt;
Some things to note:&lt;br /&gt;
* The individual embedded answers are represented by the code in braces {}.&lt;br /&gt;
* The number at the start is the &#039;weight&#039;, so in this case each answer contributes an equal share of the overall grade.&lt;br /&gt;
* The correct option in each case is preceded either by an = sign or by %100%. &lt;br /&gt;
* The text appearing after the # that follows each option is the feedback that the student will see if they choose that option.&lt;br /&gt;
* If the student enters &#039;Marseille&#039; in the final example, they score 50% of the total grade.&lt;br /&gt;
* The asterisk * preceding the &amp;quot;Wrong answer&amp;quot; feedback in the final example means that the student will see this feedback if they enter anything other than &amp;quot;Paris&amp;quot; or &amp;quot;Marseille&amp;quot;.&lt;br /&gt;
* For multiple choice vertical or horizontal rendering there is no automatic numbering, though can added at each answer.&lt;br /&gt;
&lt;br /&gt;
==Detailed syntax explanations==&lt;br /&gt;
# all question items within a cloze-type question are coded inside curled braces { }&lt;br /&gt;
# the number which appears between the opening brace and the colon {1: is the weighting of that item; if it is set at 1 for all the items, it needs not be specified, so you can have {:&lt;br /&gt;
# after the colon we have the item question type: MULTICHOICE, SHORTANSWER, NUMERICAL&lt;br /&gt;
# &#039;&#039;&#039;NOTE&#039;&#039;&#039;.- If you have installed the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=338 REGEXP question type plugin] you can also use the REGEXP question type&lt;br /&gt;
# the syntax for MULTICHOICE and SHORTANSWER is the same; the only difference is in the displaying of the item to the student&lt;br /&gt;
# the order of the various answers is indifferent (except if you want a catch-all for wrong answers, see #13 below)&lt;br /&gt;
# a correct answer is preceded with the equal sign = or a percentage (usually %100%) - &#039;&#039;&#039;Note&#039;&#039;&#039;: [[Talk:Embedded_Answers_(Cloze)_question_type| The equal sign (=) doesn&#039;t seem to work with SHORTANSWER.]]&lt;br /&gt;
# a wrong answer is preceded with nothing or a percentage (usually %0%)but you can even use negative points by preceding with ~%-25% [not before Moodle 2.0])&lt;br /&gt;
# you can allocate some points between 0 and 100 to some answers, if you put the appropriate percentage&lt;br /&gt;
# all answers except the first one are separated from one another by the tilde ~ sign&lt;br /&gt;
# answers can be followed by an optional feedback message, preceded with the # sign; if there is no feedback message, the # sign can be present or absent, it does not matter&lt;br /&gt;
# note that the feedback message and the correct answer are displayed in a small popup window (if and when the correct and or feedback have been declared accessible to the students in the Quiz settings) upon mouse hovering. The popup window has a title &amp;quot;feedback&amp;quot; and you can use HTML tags to format your feedback. In some browsers (For example IE5.5) the form fields can cover part of the feedback windows. It can help to not have the formfields for the answers too close to each other.&lt;br /&gt;
# in the SHORTANSWER type you may want to put a catch-all (wrong) answer in order to send a &amp;quot;wrong, try again&amp;quot; feedback; you can do this by inserting an asterisk &#039;&#039;&#039;*&#039;&#039;&#039; as &#039;&#039;&#039;the very last expected answer&#039;&#039;&#039; in your formula&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Numerical Cloze questions==	 &lt;br /&gt;
		 &lt;br /&gt;
From the student perspective, a numerical Cloze question looks just like a short-answer question or &#039;&#039;fill in the blanks&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The difference is that numerical answers are allowed to have an accepted error. This allows a continuous range of answers to be set. You can also express your answer in some different numerical formats. 23.4 23,4 (some countries use , as a decimal separator) and 2.34E+1 (meaning 2.34*10^1) would be interpreted as the same.&lt;br /&gt;
&lt;br /&gt;
=== False positives ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; the following examples of false positives do &#039;&#039;&#039;not&#039;&#039;&#039; apply to Moodle 1.8+, where you cannot use percentages or fractions as the answers in a numerical Cloze test; Moodle will generate an error if you try to save such a question. However the following may be relevant for earlier versions of Moodle.&lt;br /&gt;
&lt;br /&gt;
 More examples:	 &lt;br /&gt;
 0.5 accepts .5 0.5 ,5 0,5 0.500 5e-1 5E-1 but not 1/2 50% 	 &lt;br /&gt;
 50% accepts 50% 50.0% 5E1% 50/100 even &#039;&#039;&#039;50/1000 50&#039;&#039;&#039; but not 500/1000 0.5	 &lt;br /&gt;
 1/2 accepts 1/2 &#039;&#039;&#039;1/3 1twenty&#039;&#039;&#039; but not 2/4 0.5 0,5 3/6 50% ½	 &lt;br /&gt;
 ½ accepts ½	 &lt;br /&gt;
 HALF doesn&#039;t even accept HALF (maybe &#039;&#039;&#039;0&#039;&#039;&#039;?)	 &lt;br /&gt;
&lt;br /&gt;
If you want to accept several variants you can have them in the same {} but &#039;&#039;&#039;be careful, notice the &amp;quot;false positives&amp;quot; in bold&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
===Syntax for numerical Cloze questions===&lt;br /&gt;
&lt;br /&gt;
The format of a NUMERICAL Cloze question is similar to that of the other Cloze types and they can be mixed in the same question. As with other Cloze tests, you write your question or incomplete text, and add the Cloze code at the point where the student is supposed to enter their numerical answer.&lt;br /&gt;
&lt;br /&gt;
An example of the syntax used is shown below:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: &#039;&#039;&#039; It is preferable to write the code in &#039;source code&#039; mode. The WSIWYG editor can insert linebreaks that make the question not function. The linebreak in the example box below is for readability only! A problem with these questions is the readability of the code! :(	&lt;br /&gt;
		 &lt;br /&gt;
 {2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8	 &lt;br /&gt;
 ~%50%23.8:2#Feedback for ½credit near correct answer}. 	 &lt;br /&gt;
	 &lt;br /&gt;
In this example:&lt;br /&gt;
* 2: is the question point weight, which means that this question has twice the weight in the final point(s) for this question as other partial answers with weight 1 (or no declared weight - you can start with {: for the default weight 1) in the same question.&lt;br /&gt;
* NUMERICAL: says what kind of question it is. It must be in CAPS. &lt;br /&gt;
* =23.8:0.1 = or %100% means correct if the answer is 23.8 with an accepted error of 0.1, then any number between 23.7 and 23.9 will be accepted as correct. (In the GIFT numerical question one can express an interval like this 13..15 or 14:1 but in Cloze only 14:1 works.)	 &lt;br /&gt;
* #Feedback for correct answer 23.8 is preceded by #&lt;br /&gt;
* ~%50%23.8:2 ~ is the separator for answer alternatives %50% means this answer would get 50% of the score that the more precise answer had gotten. Because the tolerance here is 2, 21.8 to 25.8 would get this point and feedback.&lt;br /&gt;
&lt;br /&gt;
The feedback (which is seen within a popup window when the user hovers over the answer space) is formattable with HTML tags. For example, if you want an exponent, surround it with superscript tags: &amp;amp;lt;sup&amp;amp;gt; &amp;amp;lt;/sup&amp;amp;gt;. You can even include pictures in the feedback popup, but you must clean out all &amp;quot; characters and save while still in source code mode (not WYSIWYG). So, this works in feedback popup:&lt;br /&gt;
 #See this picture:&amp;amp;lt;br&amp;amp;gt;&amp;amp;lt;img src=Something.gif /&amp;gt;}	 &lt;br /&gt;
but not this:&lt;br /&gt;
 #See this picture:&amp;amp;lt;br&amp;amp;gt;&amp;amp;lt;img src=&amp;quot;Something.gif&amp;quot; /&amp;gt;}	 &lt;br /&gt;
&lt;br /&gt;
(ALGEBRA and TEX filters don&#039;t work in the feedback popups, but they can be very useful in the question writing for math/science expressions). But you can use [[Unicode]] characters.	 &lt;br /&gt;
&lt;br /&gt;
If you want to give feedback for any answer that didn&#039;t fit the intervals you already have specified feedback for, add some BIG general intervals, like for positive answers (if they aren&#039;t bigger than 20000 you could add:	 &lt;br /&gt;
 ~%0%10000.0001:10000#Feedback for unspecified not_right answers}	 &lt;br /&gt;
This would give feedback for anything from 0.0001 to 20000.0001 (that hadn&#039;t already gotten feedback). I didn&#039;t want to include 0 since that special case as well as negative ought to have specific reactions.	 &lt;br /&gt;
 ~%0%0#Hey! It can&#039;t be zero	 &lt;br /&gt;
 ~%0%-10000.0001:10000#We just want the size here,	 &lt;br /&gt;
 so a negative value is not what we want}			 &lt;br /&gt;
&lt;br /&gt;
Numerical questions could, before version 1.7, also have case-insensitive non-numerical answers. This is useful whenever the answer for a numerical question is something like +inf, -inf, NaN etc.&lt;br /&gt;
==Importing CLOZE questions==&lt;br /&gt;
If you try importing directly as CLOZE this text:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Single line per question! Match the following cities with the correct state:&lt;br /&gt;
* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}&lt;br /&gt;
* Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}&lt;br /&gt;
* Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}&lt;br /&gt;
* Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}&lt;br /&gt;
&lt;br /&gt;
The capital of France is {1:SHORTANSWER:%100%Paris#Congratulations!~%50%Marseille#No, that is the second largest city in France (after Paris).~*#Wrong answer. The capital of France is Paris, of course.}.&lt;br /&gt;
&lt;br /&gt;
23+ 0.8 = {2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8 ~%50%23.8:2#Feedback for ½credit near correct answer}. 	 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You would get all three questions as different parts of &#039;&#039;&#039;ONE question&#039;&#039;&#039;. (NOTE see that there are no linebreaks between the { } !)&lt;br /&gt;
&lt;br /&gt;
Multiple CLOZE questions can be imported using the XML format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;quiz&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- question: 1  --&amp;gt;&lt;br /&gt;
&amp;lt;question type=&amp;quot;cloze&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;&amp;lt;text&amp;gt;Book Test #1&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;questiontext&amp;gt;&lt;br /&gt;
&amp;lt;text&amp;gt;&amp;lt;![CDATA[..............]]&amp;gt;&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/questiontext&amp;gt;&lt;br /&gt;
&amp;lt;generalfeedback&amp;gt;&lt;br /&gt;
&amp;lt;text&amp;gt;&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/generalfeedback&amp;gt;&lt;br /&gt;
&amp;lt;shuffleanswers&amp;gt;0&amp;lt;/shuffleanswers&amp;gt;&lt;br /&gt;
&amp;lt;/question&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- question: 2 --&amp;gt;&lt;br /&gt;
&amp;lt;question type=&amp;quot;cloze&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;&amp;lt;text&amp;gt;Book Test #2&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;questiontext&amp;gt;&lt;br /&gt;
&amp;lt;text&amp;gt;&amp;lt;![CDATA[............]]&amp;gt;&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/questiontext&amp;gt;&lt;br /&gt;
&amp;lt;generalfeedback&amp;gt;&lt;br /&gt;
&amp;lt;text&amp;gt;&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/generalfeedback&amp;gt;&lt;br /&gt;
&amp;lt;shuffleanswers&amp;gt;0&amp;lt;/shuffleanswers&amp;gt;&lt;br /&gt;
&amp;lt;/question&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/quiz&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You would put the question text including CLOZE code in the  .......  spaces.&lt;br /&gt;
&lt;br /&gt;
==Online Cloze Question generator==&lt;br /&gt;
* There is a website to generate CLOZE quizzes for Moodle (1.9 and 2.x and 3.x versions) and/or to try out the CLOZE editor integration for Moodle.&lt;br /&gt;
* This editor was built at the Chair of Applied English Linguistics at Universitaet Tuebingen, Germany, by Andreas Glombitza (andiglombitza(at)googlemail.com) and Achim Skuta (achim.skuta(at)googlemail.com).&lt;br /&gt;
* The authors are currently maintaining this software and webservice as a private project.&lt;br /&gt;
&lt;br /&gt;
Website: [http://projects.ael.uni-tuebingen.de/quiz/htmlarea/index.php http://projects.ael.uni-tuebingen.de/quiz/htmlarea/index.php]&lt;br /&gt;
 &lt;br /&gt;
==Cloze editor plugin for TinyMCE==&lt;br /&gt;
* You can download a [https://moodle.org/plugins/view.php?plugin=other_cloze Moodle plugin from the Moodle plugins database] that will let you create these questions from a graphical interface within your Moodle site. There are versions available for Moodle 1.9, 2.x and 3.x.&lt;br /&gt;
&lt;br /&gt;
==Cloze editor plugin for Atto==&lt;br /&gt;
This [[Cloze editor for Atto|new plugin for Moodle 3.1]] was developed by Daniel Thies and is available for download and install from the Moodle plugins database..&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* See the [http://projects.ael.uni-tuebingen.de/quiz/htmlarea/index.php online Cloze question generator].&lt;br /&gt;
* Download the newest version of the [[Cloze editor for TinyMCE]] for Moodle 1.9 and for Moodle 2.0 to 2.9 and 3.0) from [https://moodle.org/plugins/view.php?plugin=tinymce_clozeeditor the Moodle plugins database]&lt;br /&gt;
&lt;br /&gt;
This information was drawn from:&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=36521 Is there a guide to using the cloze format?] forum discussion&lt;br /&gt;
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=36430&amp;amp;parent=170308 Cloze-type question syntax] forum post&lt;br /&gt;
&lt;br /&gt;
[[de:Lückentext-Frage]]&lt;br /&gt;
[[es:Tipo de Pregunta con respuestas incrustadas (Cloze)]]&lt;br /&gt;
[[fr:Question Cloze à réponses intégrées]]&lt;br /&gt;
[[ja: 穴埋め問題 ( Cloze ) タイプ]]&lt;br /&gt;
[[zh:填空題(克漏字)]]&lt;/div&gt;</summary>
		<author><name>Jsvien</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=GIFT_format&amp;diff=128049</id>
		<title>GIFT format</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=GIFT_format&amp;diff=128049"/>
		<updated>2017-05-29T04:27:12Z</updated>

		<summary type="html">&lt;p&gt;Jsvien: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Export questions}}&lt;br /&gt;
&#039;&#039;&#039;GIFT format&#039;&#039;&#039; allows someone to use a text editor to write multiple-choice, true-false, short answer, matching missing word and numerical questions in a simple format that can be imported. The GIFT format is also an export file format available in Question bank. The format has been developed within the Moodle Community but other software may support it to a greater or lesser degree.&lt;br /&gt;
&lt;br /&gt;
*When creating a large numbers of questions, GIFT can provide a quick way of bulk loading questions either into a [[Question bank|question category]], or into a [[Adding_a_question_page#Importing_questions|Lesson]]. &lt;br /&gt;
*Sometimes it is easier proofing questions in a question category by viewing them in a GIFT file.&lt;br /&gt;
&lt;br /&gt;
== General instructions ==&lt;br /&gt;
At least one blank line must be left between each question. &lt;br /&gt;
&lt;br /&gt;
In the simple form, the question comes first, then the answers are set in between brackets, with an equal sign (=) indicating the correct answer(s) and tilde (~) the wrong answers.  A hash (#) will insert a response.  Questions can be weighted by placing percentage signs (%..%) around the weight.  Comments are preceded by double slashes (//) and are not imported.&lt;br /&gt;
&lt;br /&gt;
Here are some useful [http://moodle.org/pluginfile.php/134/mod_forum/attachment/236161/GIFT-examples.zip GIFT examples] than can be imported or used as rough template.  Many of the examples below used the questions in the file as a starting point.&lt;br /&gt;
&lt;br /&gt;
=== UTF-8 encoding ===&lt;br /&gt;
Any GIFT file &#039;&#039;&#039;must&#039;&#039;&#039; be correctly encoded in [[UTF-8]]. You can use Microsoft&#039;s text editor Notepad which comes with Windows to save your file in UTF-8. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: ANSI format will (only) work for languages without any special characters (like ä, ö, ü, æ, å, ø, œ or ß). And don&#039;t use &amp;quot;Unicode&amp;quot; as format as this is actually UTF-16 and won&#039;t work. See [[Converting files to UTF-8]] for further information.&lt;br /&gt;
&lt;br /&gt;
===Format symbols===&lt;br /&gt;
&lt;br /&gt;
Here are some common GIFT symbols and their use.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Symbols !! Use&lt;br /&gt;
|-&lt;br /&gt;
| // text || Comment until end of line (optional)&lt;br /&gt;
|-&lt;br /&gt;
| ::title:: || Question title (optional)&lt;br /&gt;
|-&lt;br /&gt;
| text || Question text (becomes title if no title specified)&lt;br /&gt;
|-&lt;br /&gt;
| [...format...] || The format of the following bit of text. Options are [html], [moodle], [plain] and [markdown]. The default is [moodle] for the question text, other parts of the question default to the format used for the question text.&lt;br /&gt;
|-&lt;br /&gt;
| { || Start answer(s) -- without any answers, text is a description of following questions&lt;br /&gt;
|-&lt;br /&gt;
| {T} or {F} || True or False answer; also {TRUE} and {FALSE}&lt;br /&gt;
|-&lt;br /&gt;
| { ... =right ... } || Correct answer for multiple choice, (multiple answer? -- see page comments) or fill-in-the-blank&lt;br /&gt;
|-&lt;br /&gt;
| { ... ~wrong ... } || Incorrect answer for multiple choice or multiple answer&lt;br /&gt;
|-&lt;br /&gt;
| { ... =item -&amp;gt; match ... } || Answer for matching questions&lt;br /&gt;
|-&lt;br /&gt;
| #feedback text || Answer feedback for preceding multiple, fill-in-the-blank, or numeric answers&lt;br /&gt;
|-&lt;br /&gt;
| ####general feedback || General feedback&lt;br /&gt;
|-&lt;br /&gt;
| {# || Start numeric answer(s)&lt;br /&gt;
|-&lt;br /&gt;
| answer:tolerance || Numeric answer accepted within ± tolerance range&lt;br /&gt;
|-&lt;br /&gt;
| low..high || Lower and upper range values of accepted numeric answer &lt;br /&gt;
|-&lt;br /&gt;
| =%n%answer:tolerance || n percent credit for one of multiple numeric ranges within tolerance from answer&lt;br /&gt;
|-&lt;br /&gt;
| } || End answer(s)&lt;br /&gt;
|-&lt;br /&gt;
| \character || Backslash escapes the special meaning of ~, =, #, {, }, and :&lt;br /&gt;
|-&lt;br /&gt;
| \n || Places a newline in question text -- blank lines delimit questions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here are some quick examples:&lt;br /&gt;
&lt;br /&gt;
 // true/false&lt;br /&gt;
 ::Q1:: 1+1=2 {T}&lt;br /&gt;
 &lt;br /&gt;
 // multiple choice with specified feedback for right and wrong answers&lt;br /&gt;
 ::Q2:: What&#039;s between orange and green in the spectrum? &lt;br /&gt;
 { =yellow # right; good! ~red # wrong, it&#039;s yellow ~blue # wrong, it&#039;s yellow }&lt;br /&gt;
 &lt;br /&gt;
 // fill-in-the-blank&lt;br /&gt;
 ::Q3:: Two plus {=two =2} equals four.&lt;br /&gt;
 &lt;br /&gt;
 // matching&lt;br /&gt;
 ::Q4:: Which animal eats which food? { =cat -&amp;gt; cat food =dog -&amp;gt; dog food }&lt;br /&gt;
 &lt;br /&gt;
 // math range question&lt;br /&gt;
 ::Q5:: What is a number from 1 to 5? {#3:2}&lt;br /&gt;
 &lt;br /&gt;
 // math range specified with interval end points&lt;br /&gt;
 ::Q6:: What is a number from 1 to 5? {#1..5}&lt;br /&gt;
 // translated on import to the same as Q5, but unavailable from Moodle question interface&lt;br /&gt;
 &lt;br /&gt;
 // multiple numeric answers with partial credit and feedback&lt;br /&gt;
 ::Q7:: When was Ulysses S. Grant born? {#&lt;br /&gt;
          =1822:0      # Correct! Full credit.&lt;br /&gt;
          =%50%1822:2  # He was born in 1822. Half credit for being close.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // essay&lt;br /&gt;
 ::Q8:: How are you? {}&lt;br /&gt;
&lt;br /&gt;
===Format symbols explained===&lt;br /&gt;
The multiple choice format below as a comment line // for the question, when Moodle exports it the question unique id number will appear here.&lt;br /&gt;
&lt;br /&gt;
The first set of  :: precedes the question title.&lt;br /&gt;
&lt;br /&gt;
The second :: precedes the actual question. The first { indicates the start of the answers.  The correct answer is preceded by an = sign and wrong answers by a ~.  Teacher responses have a # in front of them.  The question ends with a } and then a blank line. NOTE it is { } not ( ) parenthesis! Usually these are obtained with help of the [AltGr] key.&lt;br /&gt;
&lt;br /&gt;
 //Comment line &lt;br /&gt;
 ::Question title &lt;br /&gt;
 :: Question {&lt;br /&gt;
 =A correct answer&lt;br /&gt;
 ~Wrong answer1&lt;br /&gt;
 #A response to wrong answer1&lt;br /&gt;
 ~Wrong answer2&lt;br /&gt;
 #A response to wrong answer2&lt;br /&gt;
 ~Wrong answer3&lt;br /&gt;
 #A response to wrong answer3&lt;br /&gt;
 ~Wrong answer4&lt;br /&gt;
 #A response to wrong answer4&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The shortest format for a multiple choice question is:&lt;br /&gt;
 Question{= A Correct Answer ~Wrong answer1 ~Wrong answer2 ~Wrong answer3 ~Wrong answer4 }&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Tip:&#039;&#039; If you don&#039;t specify a question title the WHOLE question will be used as the title at the time of import into Moodle. There are pros and cons to allowing this to happen. &lt;br /&gt;
** Cons: This can add a lot of unnecessary words. This can include characters which might confuse the export GIFT process.&lt;br /&gt;
** Pros: On the other hand. if the start of each question is different, it can make finding a single question easier in a category list of questions. It will save you typing.  Having the same title for every question is a very bad idea.&lt;br /&gt;
&lt;br /&gt;
==Question format examples==&lt;br /&gt;
There are several ways to use a text editor to write a GIFT format.  We will try to show the simple version for example and in some formats we will introduce some more complex features that can be imported into many Moodle Question formats.  &lt;br /&gt;
&lt;br /&gt;
===Multiple choice===&lt;br /&gt;
For multiple choice questions, wrong answers are prefixed with a tilde (~) and the correct answer is prefixed with an equal sign (=).&lt;br /&gt;
&lt;br /&gt;
Here is a simple acceptable GIFT multiple choice format:&lt;br /&gt;
 Who&#039;s buried in Grant&#039;s tomb?{=Grant ~no one ~Napoleon ~Churchill ~Mother Teresa }&lt;br /&gt;
&lt;br /&gt;
Here is a longer format that uses most of the GIFT elements:&lt;br /&gt;
&lt;br /&gt;
  // question: 1 name: Grants tomb&lt;br /&gt;
 ::Grants tomb::Who is buried in Grant&#039;s tomb in New York City? {&lt;br /&gt;
 =Grant&lt;br /&gt;
 ~No one&lt;br /&gt;
 #Was true for 12 years, but Grant&#039;s remains were buried in the tomb in 1897&lt;br /&gt;
 ~Napoleon&lt;br /&gt;
 #He was buried in France&lt;br /&gt;
 ~Churchill&lt;br /&gt;
 #He was buried in England&lt;br /&gt;
 ~Mother Teresa&lt;br /&gt;
 #She was buried in India&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Multiple choice with multiple right answers===&lt;br /&gt;
&lt;br /&gt;
That is, using checkboxes, not radio buttons:&lt;br /&gt;
&lt;br /&gt;
 What two people are entombed in Grant&#039;s tomb? {&lt;br /&gt;
    ~%-100%No one&lt;br /&gt;
    ~%50%Grant&lt;br /&gt;
    ~%50%Grant&#039;s wife&lt;br /&gt;
    ~%-100%Grant&#039;s father&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===True-false===&lt;br /&gt;
&lt;br /&gt;
In this question-type the answer indicates whether the statement is true or false. The answer should be written as {TRUE} or {FALSE}, or abbreviated to {T} or {F}.&lt;br /&gt;
&lt;br /&gt;
 // question: 0 name: TrueStatement using {T} style&lt;br /&gt;
 ::TrueStatement about Grant::Grant was buried in a tomb in New York City.{T}&lt;br /&gt;
 &lt;br /&gt;
 // question: 0 name: FalseStatement using {FALSE} style&lt;br /&gt;
 ::FalseStatement about sun::The sun rises in the West.{FALSE}&lt;br /&gt;
&lt;br /&gt;
===Short answer===&lt;br /&gt;
&lt;br /&gt;
Answers in Short Answer question-type are all prefixed by an equal sign (=), indicating that they are all correct answers. The answers must not contain a tilde.&lt;br /&gt;
&lt;br /&gt;
Here are two examples using the simple method showing possible right answers for credit.&lt;br /&gt;
 Who&#039;s buried in Grant&#039;s tomb?{=Grant =Ulysses S. Grant =Ulysses Grant}&lt;br /&gt;
&lt;br /&gt;
 Two plus two equals {=four =4}&lt;br /&gt;
&lt;br /&gt;
If there is only one correct Short Answer, it may be written without the equal sign prefix, as long as it cannot be confused as True-False.&lt;br /&gt;
&lt;br /&gt;
===Matching===&lt;br /&gt;
Matching pairs begin with an equal sign (=) and are separated by this symbol &amp;quot;-&amp;gt;&amp;quot;. There must be at least three matching pairs.&lt;br /&gt;
 &lt;br /&gt;
 Match the following countries with their corresponding capitals. {&lt;br /&gt;
    =Canada -&amp;gt; Ottawa&lt;br /&gt;
    =Italy  -&amp;gt; Rome&lt;br /&gt;
    =Japan  -&amp;gt; Tokyo&lt;br /&gt;
    =India  -&amp;gt; New Delhi&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Matching questions do not support feedback or percentage answer weights.&lt;br /&gt;
&lt;br /&gt;
===Missing word===&lt;br /&gt;
The Missing Word format automatically inserts a fill-in-the-blank line (like this _____) in the middle of the sentence. To use the Missing Word format, place the answers where you want the line to appear in the sentence.&lt;br /&gt;
 Moodle costs {~lots of money =nothing ~a small amount} to download from moodle.org.&lt;br /&gt;
&lt;br /&gt;
If the answers come before the closing punctuation mark, a fill-in-the-blank line will be inserted for the &amp;quot;missing word&amp;quot; format. All question types can be written in the Missing Word format.&lt;br /&gt;
&lt;br /&gt;
There must be a blank line (double carriage return) separating questions. For clarity, the answers can be written on separate lines and even indented. Some examples:&lt;br /&gt;
&lt;br /&gt;
 Mahatma Gandhi&#039;s birthday is an Indian holiday on  {&lt;br /&gt;
 ~15th&lt;br /&gt;
 ~3rd&lt;br /&gt;
 =2nd&lt;br /&gt;
 } of October.&lt;br /&gt;
 &lt;br /&gt;
 Since {&lt;br /&gt;
   ~495 AD&lt;br /&gt;
   =1066 AD&lt;br /&gt;
   ~1215 AD&lt;br /&gt;
   ~ 43 AD&lt;br /&gt;
 }&lt;br /&gt;
 the town of Hastings England has been &amp;quot;famous with visitors&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Numerical questions===&lt;br /&gt;
&lt;br /&gt;
The answer section for Numerical questions must start with a number sign (#). Numerical answers can include an error margin, which is written following the correct answer, separated by a colon. So for example, if the correct answer is anything between 1.5 and 2.5, then it would be written as follows {#2:0.5}. This indicates that 2 with an error margin of 0.5 is correct (i.e., the span from 1.5 to 2.5). If no error margin is specified, it will be assumed to be zero.&lt;br /&gt;
&lt;br /&gt;
Here is a simple numerical format question. It will accept a range of 5 years.&lt;br /&gt;
 When was Ulysses S. Grant born?{#1822:5}&lt;br /&gt;
It is a good idea to check the margins of the range, 3.141 is not counted as correct and 3.142 is considered in the range. &lt;br /&gt;
 What is the value of pi (to 3 decimal places)? {#3.14159:0.0005}.&lt;br /&gt;
&lt;br /&gt;
Optionally, numerical answers can be written as a span in the following format {#MinimumValue..MaximumValue}.&lt;br /&gt;
&lt;br /&gt;
 What is the value of pi (to 3 decimal places)? {#3.141..3.142}.&lt;br /&gt;
&lt;br /&gt;
Moodle&#039;s browser interface does not support multiple numerical answers, but Moodle&#039;s code can and so does GIFT. This can be used to specify numerical multiple spans, and can be particularly usefully when combined with percentage weight grades. If multiple answers are used, they must be separated by an equal sign, like short answer questions.&lt;br /&gt;
&lt;br /&gt;
 When was Ulysses S. Grant born? {#&lt;br /&gt;
    =1822:0&lt;br /&gt;
    =%50%1822:2&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that since Moodle&#039;s browser GUI didn&#039;t support multiple answers for Numerical questions, there&#039;s no way in older Moodle versions to see them or edit them through Moodle. The only way to change a numerical answer beyond the first, is to delete the question and re-import it (or use something like phpMyAdmin). But better would be to upgrade your Moodle to at least 1.9.&lt;br /&gt;
&lt;br /&gt;
===Essay===&lt;br /&gt;
An essay question is simply a question with an empty answer field. Nothing is permitted between the curly braces at all.&lt;br /&gt;
&lt;br /&gt;
 Write a short biography of Dag Hammarskjöld. {}&lt;br /&gt;
&lt;br /&gt;
===Description===&lt;br /&gt;
A description &amp;quot;question&amp;quot; has no answer part at all&lt;br /&gt;
&lt;br /&gt;
 You can use your pencil and paper for these next math questions.&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
In addition to these basic question types, this filter offers the following options: line comments, question name, feedback and percentage answer weight.&lt;br /&gt;
&lt;br /&gt;
===Line Comments===&lt;br /&gt;
Comments that will not be imported into Moodle can be included in the text file. This can be used to provide headers or more information about questions. All lines that start with a double backslash (not counting tabs or spaces) will be ignored by the filter.&lt;br /&gt;
&lt;br /&gt;
 // Subheading: Numerical questions below&lt;br /&gt;
 What&#039;s 2 plus 2? {#4}&lt;br /&gt;
&lt;br /&gt;
Comments will be exported from Moodle and will include the unique question id.  The above question after it was imported and then exported from Moodle:&lt;br /&gt;
 // question: 914  name: What&#039;s 2 plus 2? &lt;br /&gt;
 ::What&#039;s 2 plus 2?::What&#039;s 2 plus 2?{#&lt;br /&gt;
     =4:0#&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Question Name===&lt;br /&gt;
A question name can be specified by placing it first and enclosing it within double colons (::...::).&lt;br /&gt;
&lt;br /&gt;
 ::Kanji Origins::Japanese characters originally&lt;br /&gt;
 came from what country? {=China}&lt;br /&gt;
&lt;br /&gt;
 ::Thanksgiving Date::The American holiday of Thanksgiving is &lt;br /&gt;
 celebrated on the {~second ~third =fourth} Thursday of November.&lt;br /&gt;
&lt;br /&gt;
If no question name is specified, the entire question will be used as the name by default.&lt;br /&gt;
&lt;br /&gt;
===Feedback===&lt;br /&gt;
Feedback can be included for each answer by following the answer with a number sign (# also known as a hash mark) and the feedback.&lt;br /&gt;
&lt;br /&gt;
 What&#039;s the answer to this multiple-choice question? {&lt;br /&gt;
   ~wrong answer#feedback comment on the wrong answer&lt;br /&gt;
   ~another wrong answer#feedback comment on this wrong answer&lt;br /&gt;
   =right answer#Very good!&lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 //From The Hitchhiker&#039;s Guide to the Galaxy&lt;br /&gt;
 Deep Thought said &amp;quot; {&lt;br /&gt;
   =forty two#Correct according to The Hitchhiker&#039;s Guide to the Galaxy!&lt;br /&gt;
   =42#Correct, as told to Loonquawl and Phouchg&lt;br /&gt;
   =forty-two#Correct!&lt;br /&gt;
 }  is the Ultimate Answer to the Ultimate Question of Life, The Universe, and Everything.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    42 is the Absolute Answer to everything.{&lt;br /&gt;
 FALSE#42is the Ultimate Answer.#You gave the right answer.}&lt;br /&gt;
&lt;br /&gt;
For Multiple Choice questions, feedback is displayed only for the answer the student selected. For short answer, feedback is shown only when students input the corresponding correct answer. For true-false questions, there can be one or two feedback strings. The first is shown if the student gives the wrong answer. The second if the student gives the right answer.&lt;br /&gt;
&lt;br /&gt;
===Percentage Answer Weights===&lt;br /&gt;
Percentage answer weights are available for both Multiple Choice and Short Answer questions. Percentage answer weights can be included by following the tilde (for Multiple Choice) or equal sign (for Short Answer) with the desired percent enclosed within percent signs (e.g., %50%). This option can be combined with feedback comments.&lt;br /&gt;
&lt;br /&gt;
Difficult question.{~wrong answer ~%50%half credit answer =full credit answer}&lt;br /&gt;
&lt;br /&gt;
 ::Jesus&#039; hometown::Jesus Christ was from {&lt;br /&gt;
    ~Jerusalem#This was an important city, but the wrong answer.&lt;br /&gt;
    ~%25%Bethlehem#He was born here, but not raised here.&lt;br /&gt;
    ~%50%Galilee#You need to be more specific.&lt;br /&gt;
    =Nazareth#Yes! That&#039;s right!&lt;br /&gt;
 }.&lt;br /&gt;
     &lt;br /&gt;
 ::Jesus&#039; hometown:: Jesus Christ was from {&lt;br /&gt;
    =Nazareth#Yes! That&#039;s right!&lt;br /&gt;
    =%75%Nazereth#Right, but misspelled.&lt;br /&gt;
    =%25%Bethlehem#He was born here, but not raised here.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that the last two examples are essentially the same question, first as multiple choice and then as short answer.&lt;br /&gt;
&lt;br /&gt;
Note that it is possible to specify percentage answer weights that are NOT available through the browser interface. The Match Grades drop-down on the import page determines how these are handled. You can either request that an error be reported or that the answer weight be adjusted to the nearest valid answer weight.&lt;br /&gt;
&lt;br /&gt;
Note specifically, that Moodle uses 5 decimal places to do its math, so if you wish to divide percentages in thirds, use %33.33333 instead of %33 or %33.33.&lt;br /&gt;
&lt;br /&gt;
Specify text-formatting for the question&lt;br /&gt;
The question text (only) may have an optional text format specified. Currently the available formats are moodle (Moodle Auto-Format), html (HTML format), plain (Plain text format) and markdown (Markdown format). The format is specified in square brackets immediately before the question text. See [[Formatting text]] for further information.&lt;br /&gt;
&lt;br /&gt;
 [markdown]The *American holiday of Thanksgiving* is celebrated on the {&lt;br /&gt;
    ~second&lt;br /&gt;
    ~third&lt;br /&gt;
    =fourth&lt;br /&gt;
 } Thursday of November.&lt;br /&gt;
&lt;br /&gt;
===Multiple Answers===&lt;br /&gt;
The Multiple Answers option is used for multiple choice questions when two or more answers must be selected in order to obtain full credit. The multiple answers option is enabled by assigning partial answer weight to multiple answers, while allowing no single answer to receive full credit.&lt;br /&gt;
&lt;br /&gt;
 What two people are entombed in Grant&#039;s tomb? {&lt;br /&gt;
    ~No one&lt;br /&gt;
    ~%50%Grant&lt;br /&gt;
    ~%50%Grant&#039;s wife&lt;br /&gt;
    ~Grant&#039;s father&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that there is no equal sign (=) in any answer and the answers should total no more than 100%, otherwise Moodle will return an error. To avoid the problem of students automatically getting 100% by simply checking all of the answers, it is best to include negative answer weights for wrong answers.&lt;br /&gt;
&lt;br /&gt;
 What two people are entombed in Grant&#039;s tomb? {&lt;br /&gt;
    ~%-50%No one&lt;br /&gt;
    ~%50%Grant&lt;br /&gt;
    ~%50%Grant&#039;s wife&lt;br /&gt;
    ~%-50%Grant&#039;s father&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Special Characters ~ = # { }===&lt;br /&gt;
These symbols ~ = # { } : control the operation of this filter and cannot be used as normal text within questions. Since these symbols have a special role in determining the operation of this filter, they are called &amp;quot;control characters.&amp;quot; But sometimes you may want to use one of these characters, for example to show a mathematical formula in a question. The way to get around this problem is &amp;quot;escaping&amp;quot; the control characters. This means simply putting a backslash (\) before a control character so the filter will know that you want to use it as a literal character instead of as a control character. For example:&lt;br /&gt;
&lt;br /&gt;
 Which answer equals 5? {&lt;br /&gt;
    ~ \= 2 + 2&lt;br /&gt;
    = \= 2 + 3&lt;br /&gt;
    ~ \= 2 + 4&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 ::GIFT Control Characters::&lt;br /&gt;
 Which of the following is NOT a control character for the GIFT import format? {&lt;br /&gt;
   ~ \~     # \~ is a control character.&lt;br /&gt;
   ~ \=     # \= is a control character.&lt;br /&gt;
   ~ \#     # \# is a control character.&lt;br /&gt;
   ~ \{     # \{ is a control character.&lt;br /&gt;
   ~ \}     # \} is a control character.&lt;br /&gt;
   = \      # Correct! \ (backslash) is not a control character. BUT,&lt;br /&gt;
              it is used to escape the control characters.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
When the question is processed, the backslash is removed and is not saved in Moodle.&lt;br /&gt;
&lt;br /&gt;
===HTML in answers===&lt;br /&gt;
The GIFT format will interpret HTML correctly if you add [html] in front of the question. See [https://moodle.org/mod/forum/discuss.php?d=334375 this forum thread].&lt;br /&gt;
&lt;br /&gt;
===Specifying Categories===&lt;br /&gt;
&lt;br /&gt;
It is possible to change the category into which the questions are added within the GIFT file. You can change the category as many times as you wish within the file. All questions after the modifier up to the next modifier or the end of the file will be added to the specified category. Up to the first category modifier the category specified on the import screen will be used. Note that for this to work the from file: box must be ticked on the import screen.&lt;br /&gt;
&lt;br /&gt;
To include a category modifier include a line like this (with a blank line before and after):&lt;br /&gt;
&lt;br /&gt;
 $CATEGORY: tom/dick/harry&lt;br /&gt;
&lt;br /&gt;
or simply&lt;br /&gt;
&lt;br /&gt;
 $CATEGORY: mycategory&lt;br /&gt;
&lt;br /&gt;
...the first example specifies a path of nested categories. In this case the questions will go into harry. The categories are created if they do not exist.&lt;br /&gt;
&lt;br /&gt;
To find out how your categories are organized, you might try exporting some questions including category data first and check the exported GIFT formatted file. The lowest level of system context might give you something like $CATEGORY: $system$/.... &lt;br /&gt;
&lt;br /&gt;
===Making questions case sensitive===&lt;br /&gt;
Short Answer questions can be made case sensitive by changing &amp;quot;0&amp;quot; to &amp;quot;1&amp;quot; in the following line &#039;&#039;&#039;of your moodle/question/format/gift/format.php file&#039;&#039;&#039;:&lt;br /&gt;
 $question-&amp;gt;usecase = 0; // Ignore case&lt;br /&gt;
&lt;br /&gt;
==Hints and Tips==&lt;br /&gt;
* Use the ::title:: at the beginning of every question to organize your questions when Moodle presents a list or exports them as another GIFT file.  When the title is left blank, Moodle will put the beginning of the question as the title. Some teachers want to see something like &amp;quot;001 LIT101 Poe ref Purloin Letter&amp;quot; or &amp;quot;The Purloin Letter was written by (AmLit pg 254)&amp;quot; in the title.  &lt;br /&gt;
&lt;br /&gt;
* You can specify markup if you need to format the question by setting [html], [moodle], [plain] or [markdown] just before the question text. See more about this in the reference pdf below.&lt;br /&gt;
* In the Lesson module, in a question page, correct answers jump by default to Next page and incorrect answers jump to This page (i.e. student has to &amp;quot;try again&amp;quot;). When importing from a GIFT format file, this is exactly the mechanism which is used.&lt;br /&gt;
* If you want a student to be taken directly from one question to the next irrespective of their answer being correct or incorrect: in the Lesson Settings, set Maximum number of attempts: to 1. &lt;br /&gt;
**Please note, however, that a message &amp;quot;correct / incorrect&amp;quot; will still be displayed to the student upon answering each question. If you do not want this (default) feedback message to be displayed then enter your own feedback message (i.e. &amp;quot;continue&amp;quot;, &amp;quot;---&amp;quot;, etc.) &lt;br /&gt;
**In case you want no visible message displayed then enter a non-breaking space as feedback. Moodle will not put it&#039;s automatic response because it sees the blank space. To do this, put a # after the answer and write [[Image:Nbsp.png]] (without spaces between these characters). &lt;br /&gt;
* Need to use a special GIFT character in your question or answer?  Put a \ in front of the GIFT character.  &lt;br /&gt;
**For example if you want to use curly braces, { or }, or equal sign, =, or # or ~ in a GIFT file (in a math question including TeX expressions) you must &amp;quot;escape&amp;quot; them by preceding them with a \ directly in front of each { or } or =. It is possible to use a replace program/macro/editor filter to do this conversion before importing to Moodle.&lt;br /&gt;
* Want to change T/F type questions to multiple choice? Consider exporting the T/F questions as a GIFT file, then using a text editor to replace the (T) with (=True ~False). Perhaps change the title slightly so you will recognize the new questions.&lt;br /&gt;
* Alphabetic case-sensitive comparison is disabled by default. If you need case-sensitive comparison for short answer questions (an unusual need), precede them with:&lt;br /&gt;
   $question-&amp;gt;usecase = 1;&lt;br /&gt;
surrounded by blank lines.&lt;br /&gt;
&lt;br /&gt;
==Word processor and spreadsheet tools that create GIFTs==&lt;br /&gt;
Several contributors have used macros to generate GIFT files from a more familiar popular programs.&lt;br /&gt;
*Here is a [http://hbwubecc.wixsite.com/jordan/tools Moodle Cloze and Gift generator] as presented at the 2017 Moodle Moot Japan.    &lt;br /&gt;
* There are Word macros available for easily creating GIFT files. See [https://moodle.org/mod/forum/discuss.php?d=135112 this forum thread] for links to downloadable files for different Word versions..&lt;br /&gt;
* There are several Excel spreadsheets for generating GIFT files. Several people have built upon other contributors work.  &lt;br /&gt;
**The latest version was posted on 10 April 2007 and can be found in this thread with this file name: [http://moodle.org/mod/forum/discuss.php?d=66660 Excel2GIFTv1.1.zip by Timothy Takemoto].  There is also a set of instructions Excel2GIFTv1.1_Instructions.rtf by Jeff Shek on the same day in that thread.&lt;br /&gt;
** [http://video.google.com/videoplay?docid=-6612645502883459334# video tutorial] for using Excel2GIFTv2.xls &lt;br /&gt;
**An earlier version of this Excel spreadsheet for generating multiple choice GIFT files [http://moodle.org/mod/forum/discuss.php?d=45245 initially created by Olga Forlani and improved by A. T. Wyatt].&lt;br /&gt;
*There is a project, Libre Office templates,  for generating GIFT files in Writer. It is located in &lt;br /&gt;
[https://code.google.com/p/libre-gift/downloads/list OOo template 2013 to write exams and convert to GIFT format]&lt;br /&gt;
*There are Open Office templates for generating GIFT files in Writer.  These are located in the Quiz forum in the [http://moodle.org/mod/forum/discuss.php?d=20705&amp;amp;parent=168385 OOo template to write exams and convert to GIFT format thread].&lt;br /&gt;
**The most recent for OO 2.x is &amp;quot;OOo2GIFT_Template_05.zip&amp;quot; posted 17 December 2005 by Enrique Castro.&lt;br /&gt;
**An earlier version is &amp;quot;GIFT_template_OOo.zip&amp;quot; posted 22 March 2005 by Enrique Castro.&lt;br /&gt;
*There is an easy to use on line multiple question generator at [http://a4esl.org/c/qw.html  a4esl.org]. Here you write your question(s) without formating marks, select Moodle and press the generate quiz button.  This creates GIFT formatted text that can be pasted into a file for importing into Moodle.&lt;br /&gt;
**The initial format requires fewer keystrokes (it uses line position and returns) than the GIFT format, so you should save time and be less likely to create invalid data.&lt;br /&gt;
** Quiz authoring template for Microsoft Word [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=578 link]&lt;br /&gt;
** Moodle XML Converter [http://vletools.com]&lt;br /&gt;
** GIFT format parser library in Ruby [http://github.com/stuart/gift-parser]&lt;br /&gt;
&lt;br /&gt;
==GIFT format with medias (images, sound...)==&lt;br /&gt;
The [https://moodle.org/plugins/pluginversions.php?plugin=qformat_giftmedia GIFT with medias optional plugin] is an  import format similar to Gift and uses the same syntax, but instead of a text file it imports a zip file containing the gift text file and media files (images, sounds, ...).&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Here is a 2-column PDF [http://buypct.com/gift_reference.pdf GIFT Reference Sheet]&lt;br /&gt;
*[[Import and export FAQ]]&lt;br /&gt;
*[[Aiken Format]]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://en.wikiversity.org/wiki/Google_Summer_of_Code_2010_Proposal:_GIFT_Conversion Google Summer of Code 2010 Proposal: GIFT Conversion] (Wikiversity)&lt;br /&gt;
*[http://www.moodlenews.com/2014/gift-format-for-quiz-items-with-images/ GIFT Format for Quiz Items with Images]&lt;br /&gt;
*[http://text2gift.atwebpages.com/Text2GiftConverter.html On line Gift format generator from plain text]&lt;br /&gt;
[[de:GIFT]]&lt;br /&gt;
[[es:Formato GIFT]]&lt;br /&gt;
[[fr:Format GIFT]]&lt;br /&gt;
[[ja:GIFTフォーマット]]&lt;/div&gt;</summary>
		<author><name>Jsvien</name></author>
	</entry>
</feed>