Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: GIFT format.

GIFT format: Difference between revisions

From MoodleDocs
(→‎Short answer: give examples)
m (→‎Short answer: showing right answers)
Line 29: Line 29:


===Short answer===
===Short answer===
Here are two examples using the simple method:
Here are two examples using the simple method showing possible right answers for credit.
  Who's buried in Grant's tomb?{=Grant =Ulysses S. Grant =Ulysses Grant}
  Who's buried in Grant's tomb?{=Grant =Ulysses S. Grant =Ulysses Grant}



Revision as of 14:12, 4 November 2008

With GIFT format you can write multiple-choice, true-false, short answer, matching missing word and numerical questions in a text editor in a simple format. For large numbers of questions, GIFT is likely to provide the quickest way of bulk loading your questions.

File:Gift.jpg
screen shot from quiz help file documentation


Question format examples

Multiple choice

Here is a simple acceptable GIFT multiple choice format:

Who's buried in Grant's tomb?{=Grant ~no one ~Napoleon ~Churchill ~Mother Teresa }

The format below as a comment line //for the question, when Moodle exports it the question unique id number will appear here. The first set of  :: precedes the question title. 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.

 // question: 1 name: Grants tomb
::Grants tomb::Who is buried in Grant's tomb in New York City? {
=Grant
~No one
#Was true for 12 years, but Grant's remains were buried in the tomb in 1897
~Napoleon
#He was buried in France
~Churchill
#He was buried in England
~Mother Teresa
#She was buried in India
}

True-false

// question: 0 name: TrueStatement
::TrueStatement about Grant::Grant was buried in a tomb in New York City.{T}

Short answer

Here are two examples using the simple method showing possible right answers for credit.

Who's buried in Grant's tomb?{=Grant =Ulysses S. Grant =Ulysses Grant}
Two plus two equals {=four =4}.

Matching

Missing word

Numerical questions

At least one blank line must be left between each question.

Here is an GIFT example for quiz-import, easy to copy and change ...

The file must be correctly encoded in UTF8. Beware of some of Microsoft's "fake" Unicode implementation which is not compatible and may result in strange characters appearing in your quizzes.

Here is a 2-column GIFT format reference sheet I created for a training:

Hints and Tips

  • Use the ::title:: at the beginning of every question to organize this for you (01 - testquestion), otherwise it would be difficult to find the right question for changes, moodle will take the beginning of every question as internal title.
  • 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 "try again"). When importing from a GIFT format file, this is exactly the mechanism which is used.
  • 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. Please note, however, that a message "correct / incorrect" 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. "continue", "---", etc.) In case you want no visible message displayed then enter a non-breaking space as feedback, so you'll have to put a # after the answer which may be ~3 and write & n b s p ; after that.(without spaces between these characters)
  • If you want to use curly braces, { or }, or equal sign, =, or # or ~ in a GIFT file (for example in a math question including TeX expressions) you must "escape" 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.

Word processors and Spreadsheets tools that create GIFTs

Several contributors have used macros to generate GIFT files from a more familiar popular programs.

  • There are Word macros available for easily creating GIFT files. See this non-Moodle site for downloads and instructions for use.
  • There are several Excel spreadsheets for generating GIFT files. Several people have built upon other contributors work.
  • There are Open Office templates for generating GIFT files in Writer. These are located in the Quiz forum in theOOo template to write exams and convert to GIFT format thread.
    • The most recent for OO 2.x is "OOo2GIFT_Template_05.zip" postes 17 December 2005 by Enrique Castro.
    • An earlier version is "GIFT_template_OOo.zip" posted 22 March 2005 by Enrique Castro.

See also