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

Description

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 believe is 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

Notepad file page with the following question and answer choices all in plain text: Where is the Instructional Technology Resource Center located? In the basement of the Library. In the Student Union building. In the College of Business.

  • 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

Notepad file with the following text: The Instructional Technology Resource Center located in the basement of the Library. {T}

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

Notepad file with the following text: Write a short essay about your summer. { }

  • 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.

Notepad file page with the following text:
Match the following states with their capitals. {
=Idaho -> Boise
=Wyoming -> Cheyenne
=Colorado -> Denver
=Utah -> Salt Lake City
=South Dakota -> Pierre
=Montana -> Helena
}

  • 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.

Notepad file with the following text:
The ISU mascot, a {Tiger ~Lion =Bengal}, is named Benny and appears at all athletic events.

  • 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).

Notepad file with the following text:
When was Martin Luther King born? {#1929:1}

  • 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.

Notepad file with the following text: 
Who was the first president of the United States?
{=George =Washington =George Washington}

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 above examples for recommended formatting options.

  3. Press Enter twice before starting the next question.

Notepad file with the following four questions: 
Write a short essay about your summer. { }
When was Martin Luther King born? {#1929:1}
The ISU mascot, a {~Tiger ~Lion =Bengal}, is named Benny and appears at all athletic events.
Who was the first president of the United States? {=George =Washington =George Washington}

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

To save the file in Notepad:

  1. Select File.

  2. Select Save as.

Notepad File menu with arrow pointing at Save As option

  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. Select Save.

Importing GIFT Questions into Moodle

  1. Login to Moodle ISU. See Overview: Access Moodle ISU [Faculty & Student

  2. In the course navigation menu, select More and then select Question bank.

  3. In the top left drop down, select Import

    1. This will take you to the Import questions from file page.

File format heading has Aiken format, Blackboard, Embedded answers (Cloze), GIFT format, Missing word format, Moodle XML format choices to select from

File format

  1. In the file format section, select GIFT format

Menu with radio buttons to the left of each option; qui question type options are listed vertically with the radio button selected next to the GIFT format option; the options from top to bottom are: Aiken format, Blackboard, Embedded answers (Cloze), GIFT format, Missing word format, Moodle XML format

General

  1. Import category -  This setting determines the category into which the imported questions will be placed within your Question Bank. Certain import formats, such as GIFT and Moodle XML, may include category and context data in the import file

    • To make use of this data, the appropriate boxes should be checked

    • If categories specified in the import file do not exist, they will be created

  2. Match grades - Imported grades must match one of the fixed list of valid grades. If not, there are two options:

    • Error if grade not listed -  If a question contains any grades not found in the list, an error is displayed and that question will not be imported

    • Nearest grade if not listed - If a grade is found that does not match a value in the list, the grade is changed to the closest matching value in the list

  3. Stop on error - This setting determines whether the import process stops when an error is detected, resulting in no questions being imported, or whether any questions containing errors are ignored and valid questions are still imported

Import questions from file

  1. In the Import section, select Choose a file

Arrow pointing to Choose a file button; area to drag a file in is below Choose a file button; Import button below area to drag in a file

  1. In the File picker, select Upload a file and then select Choose 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.] 

Left side menu has the following choices: Content bank, Server files, Recent files, Upload a file, URL downloader, Private files, Wikimedia, Google Drive; arrow pointing to Upload a file; Choose a File button appears to the right of the menu with arrow pointing to it; Save as box, Author box, and Choose license box appear in descending order; Upload this file button appears at bottom center of page

  1. Find the file on your computer

  2. Select Open to select the file

  3. Select Upload this file

  4. Select Import

Choose a file button at the top with a file area box underneath, which has a file entitled, "GIFT Format Quiz Questions.rtf" and an import button at the bottom with an arrow pointing to it

[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. Select 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

Details

Article ID: 53124
Created
Wed 5/2/18 10:11 AM
Modified
Sun 11/5/23 8:49 AM