VidQuiz
All posts
How-to

Import Questions Into Moodle: GIFT Format, Step by Step

Moodle imports questions through the question bank, and it reads neither QTI nor CSV. Here is the full format list, the GIFT syntax line by line, the escaping rule that breaks hand written files, and what gets left behind.

By the VidQuiz team

August 2026 · 9 min read

Try it while you read

Sample quiz
Real output, not generated live

Moodle imports questions through the question bank, not through the quiz activity. Open your course, go to Question bank, choose Import, pick a format, upload the file, and confirm the preview. For a quiz you generated somewhere else, GIFT is almost always the right format: it is plain text, it handles multiple choice, true/false and short answer, and it is the only simple format that carries feedback on each answer. Moodle core does not import QTI and has no CSV importer at all, which is where most failed attempts start.

Those two absences catch people out constantly. QTI is a genuine standard, Canvas and Blackboard and Brightspace all read it, so it is reasonable to assume Moodle does too. It does not. And a spreadsheet of questions, which is how most people draft them, cannot be uploaded in any form. Both facts are easy to verify on your own site and both change what you should export before you start.

This guide covers what Moodle actually accepts, the GIFT syntax line by line, the escaping rule that breaks hand written files, and what does not survive the trip. The format list here was read from the Moodle 4.5 source in August 2026.

What formats can Moodle import questions from?

A standard Moodle install ships seven question format plugins. You can see exactly which ones your site has under Site administration, Plugins, Question formats, and the import screen lists them as radio buttons.

FormatFile typeCarries feedback?Use it when
GIFT.txtYes, per answer and generalYou are importing generated or hand written questions and want the explanations to come with them
Aiken.txtNoYou have single answer multiple choice only and do not care about feedback
Moodle XML.xmlYes, everythingYou need images, unusual question types, or you are moving between Moodle sites
Embedded answers (Cloze).txtYesYou are writing passages with several blanks inside one item
Missing word.txtLimitedYou are writing fill in the blank items inline
Blackboard.datPartialYou are migrating a course out of Blackboard
XHTML.htmlExport onlyNever for import. Moodle exports to it for printing a bank or putting it on a page

Notice what is not on that list. There is no QTI importer and no CSV importer. If a tool offers you a QTI package for Moodle, either it is assuming a third party plugin your administrator has installed, or it is wrong. If a tool offers you a CSV, you will have to convert it before Moodle will read a single question.

Can I import questions into Moodle from Excel?

No. There is no Excel plugin and no CSV plugin in core Moodle, so an .xlsx file is rejected at the import screen. The fix is a conversion: reshape the spreadsheet into GIFT or Aiken, both of which are plain text, then import that. A single spreadsheet formula that joins the columns into GIFT syntax handles a bank of any size.

Aiken is the tempting target because it is simpler, but it carries no feedback and no point values, so anything you wrote in an explanation column is silently dropped. GIFT keeps both. The full walkthrough, with the formula and the escaping wrapper, is in Moodle import questions from Excel, and the commercial overview of every route into a Moodle question bank sits on import questions into Moodle.

How do you import questions into Moodle step by step

  1. Open the course and go to Question bank. In Moodle 4.0 and later it is under the More menu in the course; in 3.x it is in the course administration block.
  2. Choose the Import tab.
  3. Select GIFT format from the file format list.
  4. Open General and set the category the questions should land in. Do this now, not later.
  5. Drag your .txt file into the drop area, or use Choose a file.
  6. Click Import. Moodle parses the file and shows you every question it found.
  7. Read the preview, then click Continue to commit them to the bank.

Importing fills the bank. It does not create a quiz. To build the actual assessment, go to the quiz activity, choose Add, then from question bank, and select the questions you want. Moodle splits it this way on purpose: one import can feed several quizzes, and a question you correct in the bank stays corrected everywhere it is used.

Set the category before importing rather than after. Questions that land in a course default category are tedious to move in bulk, and if you import three recordings across a term you will want them separated by week or topic.

What is GIFT format and how do you write it?

GIFT is Moodle's own plain text question format, built so a teacher can write questions in any text editor. The question text comes first, the answers sit inside curly braces, a tilde marks a wrong answer, and an equals sign marks the right one.

::Churn drivers:: What does the speaker name as the leading cause of churn? {
    ~Price
    =Slow onboarding #Cited as the top driver in the intro.
    ~Missing features
    ~Support response time
}

Reading that back: the text between the double colons is an optional question name, which shows in the bank list and is worth setting so you are not scrolling through a wall of identical stems. The hash mark attaches feedback to that one answer, so the explanation is shown to a student who picks it. Four hash marks instead of one attaches general feedback shown after the attempt regardless of what they answered.

True/false items take the literal words TRUE or FALSE, and their feedback runs in the order wrong then right:

::Release cadence:: The team ships weekly.
{TRUE#Wrong, the intro says weekly.#Right, stated in the intro.}

Short answer items list every accepted answer with an equals sign and no distractors at all:

::Framework:: Which framework does the session use?
{=Jobs to be Done =JTBD}

Questions are separated by a blank line. Lines starting with a double slash are comments and are ignored. A line reading $CATEGORY: Week 3 sets the category for everything below it, which is a neat way to split one file across several bank categories.

The escaping rule that breaks most hand written GIFT files

This is the single most common reason an import fails or produces mangled questions. GIFT treats six characters as control characters: the tilde, the equals sign, the hash mark, the colon, and both curly braces. Any of them appearing in your real question text has to be escaped with a backslash.

So a question about a 50% margin is fine, because the percent sign is not special, but a question containing a timestamp like 12:04 will break, and so will one containing an equals sign in a formula or a hash in a product code. Written correctly they look like 12\:04 and revenue \= price x volume.

The failure mode is worth understanding because it is not always loud. An unescaped brace usually produces a clear parse error, which is the good case. An unescaped colon inside a question name silently truncates the name. An unescaped equals sign inside answer text can turn a distractor into a second correct answer, which imports without complaint and grades wrong forever after. That last one is the same class of quiet failure as the answer key column in the Wayground spreadsheet importer, where letters upload happily and grade everything incorrectly.

If you are generating the file rather than typing it, this is handled for you. Our Moodle quiz generator escapes all six characters on the way out, which is most of the reason a generated GIFT file imports on the first attempt.

GIFT or Aiken: which should you use?

Aiken is the format people reach for first because it looks friendlier. It is genuinely simple:

What does the speaker name as the leading cause of churn?
A. Price
B. Slow onboarding
C. Missing features
ANSWER: B

The catch is what it cannot do. Aiken handles single answer multiple choice and nothing else, so no true/false as a native type, no short answer, no numerical. More importantly it has no feedback field anywhere in the format. If your questions carry explanations, Aiken discards every one of them and you retype them in the bank by hand.

For a handful of plain recall questions with no explanations, Aiken is fine and slightly quicker to eyeball. For anything you intend to keep, reuse, or defend to a student, GIFT is the better target for the small cost of a few more punctuation marks.

Does Moodle import QTI files?

No. Moodle core has no QTI importer. The question/format directory on the Moodle 4.5 and 5.0 stable branches holds exactly seven plugins: aiken, blackboard_six, gift, missingword, multianswer (Embedded answers), xhtml and xml. QTI is not among them, and neither are the Examview and WebCT importers that older guides still list, which were dropped from core. Third party QTI plugins exist and a site administrator can install one, but you cannot assume it is there, and most instructors do not have the rights to add plugins to their own institution's install.

This is a real fork in the road if your questions have to reach more than one system. A department running Canvas and a department running Moodle need different files from the same question set. The sensible approach is to write the questions once and export twice: a QTI package for the Canvas or Blackboard side, and a GIFT file for Moodle. Writing the quiz twice is the thing to avoid, not exporting it twice.

What does not survive the import

Images. GIFT is plain text, so a question that needs a diagram has to have it added in the Moodle editor afterward. This is the main reason Moodle XML still exists for people who need media in the bank.

Timestamps. Moodle has no field for the point in a recording a question came from. Our export writes it into the general feedback line so the information is kept rather than lost, but if you would rather students not see it, delete those lines before importing.

Partial credit. GIFT supports weighted answers with a percentage, but a generated quiz marks one answer fully correct and the rest wrong, which is what you want in nearly every case. If you run partial credit, set it in the bank after the import.

Question order. Order in the file does not guarantee order in a quiz. The quiz activity has its own ordering and shuffle settings, so set those in the quiz rather than expecting the file to control them.

Where the questions come from in the first place

Everything above assumes you already have questions written. Writing them is usually the slower half, particularly for a recorded lecture or training session where you have to rewatch an hour of material to decide what is worth asking.

That is the part we automate. Paste a YouTube link to the recording, or upload the file with its transcript, and VidQuiz reads the spoken content and drafts multiple choice questions with the correct answer marked and a short explanation of why it is right. You edit what needs changing, then export a GIFT file that imports into the question bank with the explanations attached. Recorded lectures, seminars, training sessions, webinars, screen recordings and podcasts all work the same way, and if the module has no recording yet you can generate the video from a script first and quiz it afterward.

Two honest limits. The input has to be video or audio, so a PDF reading or a slide deck is not a source we read. And the questions are a first draft generated from your own recording with no accuracy guarantee, so the review pass before you import is a real step rather than a formality. What it removes is the blank page, not your judgement.

Quick troubleshooting

Nothing imported and Moodle showed no error. Check the file encoding. GIFT files should be UTF-8, and a file saved as UTF-16 by a Windows text editor often parses as empty.

One question became several, or several became one. Blank lines separate questions. A stray blank line inside a question splits it; a missing one merges two.

Every answer is marked wrong. The block has no equals sign in it, so Moodle read it as a multiple answer question where no choice scores anything. Find the intended correct answer and change its tilde to an equals sign.

The import screen has no GIFT option. The plugin is disabled on your site. An administrator can enable it under Site administration, Plugins, Question formats, Manage question formats.

Questions imported but the quiz is empty. Expected. Import fills the bank; you still have to add the questions to the quiz activity from the bank.

Turn any video into a quiz

Paste a YouTube link (a lecture, training or webinar) and VidQuiz writes the questions for you, with answers and explanations. See how it works or explore use cases.

Make your first quiz from a video

VidQuiz reads your video and writes interactive multiple-choice questions in seconds. Explore use cases, review pricing, or learn how it works.

Any video in · A ready quiz out · In seconds