GIFT
GIFT is Moodle's plain-text question format: one question per paragraph, with the answers in braces. Moodle can export it, and it is quick to write by hand in any text editor.
For how the preview, duplicates, quizzes and subjects work, see Import and Export.
Import a GIFT file
- Save the questions as a
.giftor.txtfile (UTF-8). Leave a blank line between questions. - Open Configuration → Import and choose the file, or paste its text into the box. The format is detected as GIFT.
- Press Next. The preview lists each question with its type and category, and names any question it cannot import.
- Press Import.

What Next Exams reads
$CATEGORY: Physics/Mechanics
// A line starting with // is a comment.
::Units of speed:: The SI unit of speed is {=metres per second ~kilometres per hour#Not the SI unit ~miles per hour}
::Noble gases:: Which are noble gases? {=Neon =Argon ~Nitrogen ~Oxygen}
::Capital:: The capital of France is {=Paris =paris}
::Gravity:: Near the Earth's surface, g in m/s² is about {#9.81:0.05}
::Mass and weight:: Mass and weight are the same quantity. {F}
::Inertia:: Explain inertia in your own words. {}
| GIFT | Becomes |
|---|---|
::Title:: before the question |
The question's title (otherwise it is made from the question text) |
One = answer and ~ wrong answers |
Multiple choice (single answer) |
Two or more = answers and ~ wrong answers |
Multiple choice (multiple answers) |
Only = answers |
Short answer, each = an accepted answer |
{#9.81:0.05} |
Short answer, numeric, with that tolerance ({#42} has none) |
{T}, {TRUE}, {F}, {FALSE} |
True / false |
{} |
Essay, marked by hand |
#text after an answer |
That answer's feedback, shown when a learner chooses it |
$CATEGORY: a/b/c |
The category of the questions after it, for quizzes and subjects |
Every question is worth 1 point. Change it in the question bank after the import.
What it does not read
- Matching questions (
{=a -> 1 =b -> 2}) are skipped and named in the preview. - Numeric ranges (
{#1..5}) and numeric questions with several answers are skipped and named in the preview. - Answer weights such as
%50%are dropped: the answer counts as correct (=) or wrong (~). - Missing-word questions, with text after the braces, and general feedback (
####) are not read. A block it cannot read at all is counted in the warning N block(s) could not be read and were skipped. - Escaped characters (
\=,\~,\{,\},\#) are not understood. The braces,=,~and#are read as GIFT markers wherever they appear, so maths such as\frac{1}{2}or\(x = 2\)does not import correctly. For maths questions, use Moodle XML.
Good to know
- Importing the same file twice adds nothing: questions already in the bank are duplicates and are skipped.
- A
$CATEGORY:line applies to every question after it, until the next one. Moodle's$course$/top/prefix is left out.
See also
- Import and Export
- Moodle (XML): the better choice for maths and answer feedback from Moodle
- Aiken: an even simpler format for multiple choice