Joomla 6.2.2 Security Update: Why You Should Turn On Automated Updates PHP 8.6 Is Out: New Features With Examples, and When Joomla Will Use Them Next File Manager 6.1.0: share links, Trash, a phone app and a Health check Next Exams 6.3.0: exam parts, scaled scores, listening and speaking tests Next Restaurant 6.1.0: move your data in, run payroll, and connect other systems
NextSoftware

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

  1. Save the questions as a .gift or .txt file (UTF-8). Leave a blank line between questions.
  2. Open Configuration → Import and choose the file, or paste its text into the box. The format is detected as GIFT.
  3. Press Next. The preview lists each question with its type and category, and names any question it cannot import.
  4. Press Import.

The import preview of a GIFT file: four new questions in the category Physics › Mechanics (multiple choice, numeric short answer, true/false and essay) and a warning that the matching question "Pair the units" is not supported and was skipped


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

All Extensions