Quiz Activity 1.4: Importing Questions in GIFT Format [Faculty]


GIFT format allows you 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 into Moodle ISU. The GIFT format is also an export file format available in the question bank.

This Guide Will Help You to:

  • GIFT Question Types/Formatting

  • Creating Questions Using the GIFT Format

  • Importing GIFT Questions into Moodle

  • Seek further assistance

GIFT Question Types/Formatting

Each type of question has two parts; question text and answer choices. Answer choices are always typed within a pair of “curly brackets” (i.e. {…answer choices…} ). For all questions except missing word, the answer choices appear after the question text. For missing word, they appear at the location of the missing word.

[Note: The missing word cannot be the last word in the sentence.]

  • What you need to know before creating questions in GIFT format:

  • GIFT supports a variety of question types including: multiple choice, true/false, essay, short answer, matching, and missing word.  

  • Multiple question types can be mixed in a single text file.

  • There cannot be any blank lines within the text of a question. If you need a blank line to show within the question, use the entity (\n).

  • You can include comments wherever you deem necessary, but they must begin with two forward slashes (//) at the start of the line.

  • There must be a blank line between EACH question.

  • These symbols ~ = # { } : are control characters and determine a question’s formatting.  They cannot be used as normal characters unless you indicate they are not to be read as control characters. The way to indicate these are normal characters is to insert a backslash (\) before a control character.

  • Type your questions in the Notepad software program and save them in plain text format (extension *.txt). The text encoding of your text file must be UTF-8.

  • If using a Macintosh computer the same can be accomplished using TextEdit. For more information, contact the ITRC - (208) 282-5880 or email itrc@isu.edu

  • When using Notepad (a word processor included with the Windows operating system), the encoding option will appear within the Save As window.

Question formatting

Here is a list of available question types and an example of how they should be written within the GIFT Format.

  • Multiple choice: For multiple choice questions, the brackets can contain an arbitrary number of choices. The correct answer choices are prefixed with an equal sign (=) and everything else is prefixed with a tilde (~). For True/False questions, the brackets contain either a T or F indicating the correct answer.

  • It is recommended that you use the Aiken format for importing multiple choice questions. For information regarding Aiken format, see Quiz: Importing Questions in Aiken Format


  • True/False: For True/False questions, the brackets contain either a T or F indicating the correct answer.  

  • It is recommended that you use the Aiken format for importing True/False questions. For information regarding Aiken format, see Quiz: Importing Questions in Aiken Format


  • Essay: The brackets should be left empty ( { } ).


  • Matching: Matching pairs should begin with an equal sign and be separated by a dash and carrot (->). There must be at least three matching pairs.


  • Missing Word: This function does not allow the missing word to be the last word in the sentence. To use this format, place the answers where you want the line to appear in the sentence (use the same format as Multiple Choice). The fill-in-the-blank line will appear automatically in the question.


  • Number: The answer section for Numerical questions must begin with the pound symbol (#). This question type can include an error margin, which must be written following the correct answer, separated by a colon (for example, if you have an answer that could range from 1.5 to 2.5, your answer should be written as {#2:0.5} ). If no error margin is specified, it is assumed to be zero. Answers can also be written as a range (this should appear as {#1.2 … 2.9} to specify a range from 1.2 to 2.9).


  • Short Answer: Answers in the short answer question type are all prefixed by an equal sign. This means that the student MUST use one of the specified answers in order to get credit for the question. If you choose to accept an answer that you did not originally include in the question, you will have to manually re-grade that student’s quiz.


Formatting Symbols

  • // text: Comment until end of line (optional)

  • ::title:: Question title (optional)

  • text: Question text (becomes title if no title specified)

  • [...format...]: Format of the following bit of text. Options are [html], [moodle], [plain] and [markdown]. The default is [moodle] for the question text, [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.

  • {: Start answer(s) -- without any answers, text is a description of following questions

  • {T} or {F}: True or False answer; also {TRUE} and {FALSE}

  • { ... =right ... }: Correct answer for multiple choice, or fill-in-the-blank

  • { ... ~wrong ... }: Incorrect answer for multiple choice or multiple answer

  • { ... =item -> match ... }: Answer for matching questions

  • #feedback text: Answer feedback for preceding multiple, fill-in-the-blank, or numeric answers

  • {#: Start numeric answer(s)

  • answer:tolerance: Numeric answer accepted within ± tolerance range

  • low..high: Lower and upper range values of accepted numeric answer

  • =%n%answer:tolerance: n percent credit for one of multiple numeric ranges within tolerance from answer

  • }: End answer(s)

  • \character: Backslash escapes the special meaning of ~, =, #, {, }, and

  • \n: Places a new line in question text -- blank lines delimit questions

Creating Questions Using the GIFT Format

  1. Open Notepad or TextEdit.

  2. See the above examples for recommended formatting options.

  3. Press Enter twice before starting the next question.


  1. Save the file after all of the questions have been typed out correctly.

To save the file in Notepad:

  1. Click File.

  2. Select Save as.


  1. Select a location for the file that will be easy to find in later steps.

  2. Type a name for the file in the File name text area.

  3. From the Encoding dropdown menu, Select UTF-8.

  4. Click Save.

Importing GIFT Questions into Moodle

  1. In the Settings gear menu, Click More.


  1. Click Import.


  1. Select GIFT format in the file format section.


  1. In the Import questions from file section, click Choose a file.


[Note: You can also select the file on your computer, drag it to the central area of the above block, and drop it there to upload.]

  1. In the File picker, click Browse.


  1. Select your file.

  2. Click Upload this file.


  1. Click Import.

[Note: The next screen should show that the questions and answers have been imported into Moodle ISU.  If you encounter an error when importing, contact the ITRC - (208) 282-5880 or email itrc@isu.edu]

  1. Click Continue once the questions have been successfully imported.

[Note: In order to keep your questions organized, you can choose to organize your questions into categories.  

For more information about Categories, see Quiz: Step 1: Adding Questions in the Questions Bank

Seek Further Assistance

For more information on Aiken format, see Quiz: Importing Questions in Aiken Format

For additional assistance please contact, ITRC at (208) 282 5880 or itrc@isu.edu


Creative Commons License
This work was created by the Idaho State University Instructional Technology Resource Center and is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License


Article ID: 53124
Wed 5/2/18 10:11 AM
Thu 7/29/21 3:12 PM