Home › Quizzes › Platforms & LMS › Moodle Quiz XML Format Guide

Turn your lecture notes into a Moodle XML quiz file

Upload a PDF, slides or notes, get multiple-choice, true/false or open questions with explanations, and export them in the Moodle XML format for your question bank.

Create quizzes nowFree · No credit card required

Free account · 5 sets a week · Creates quizzes in seconds

How the Moodle quiz XML format is built

The moodle quiz XML format is a plain-text file that wraps each question in a question element, with a type attribute, question text, answers and feedback. Moodle reads that structure when you import a question file, so a whole quiz can be loaded in one step instead of typed one item at a time.

  • Each question element carries a type such as multichoice, truefalse or shortanswer.
  • Answer fraction values set credit: 100 marks the correct option and 0 marks a wrong one.
  • Question text and feedback can hold HTML when it is wrapped in CDATA.
  • Test the import on a small sample in a course you can delete before loading a full bank.
Example Moodle XML quiz questions and answers
What is the root element that wraps every question in a Moodle XML import file?The quiz element. Moodle expects all question blocks to sit inside it, so the file will not import correctly without it.
Which type value would you use for a true/false question in Moodle XML?truefalse. The type attribute tells Moodle which question format to build, and the answers must then be marked true or false.
In a multiple-choice question, what does a fraction of 100 on an answer mean?That answer earns full credit. Wrong options are usually set to 0, and partial credit uses other percentages.
Which element holds the visible question text in Moodle XML?The questiontext element, with a text child inside it. It holds the prompt students read before the answers appear.
Why wrap question text in CDATA when it contains HTML?CDATA stops the XML parser from reading tags such as bold or image markup as file structure. Without it, the import can break or show raw code.
Generate the full set

Import-ready Moodle XML

Export questions as Moodle XML on the Pro plan and import them straight into your question bank.

Explanations in every item

Each question includes an explanation, so the file carries feedback that students can learn from.

Built from your own material

Upload a PDF, DOCX, PPTX, notes or a photo of a page and get questions drawn from that source.

How it works

Upload your material

Add a PDF, DOCX, PPTX, text notes or a photo of a page. Scanned pages are read with text recognition.

Generate and review

Choose question types, then check the answers and explanations and edit anything that does not match your course.

Export and import

On Pro, export Moodle XML and import it through your course question bank.

Writing that file by hand is slow, and small errors such as a missing fraction value or an unclosed tag can stop an import. DeckOwl starts from your own lecture slides or notes, drafts multiple-choice, true/false or open questions with explanations, and gives you the Moodle XML file to check before you upload it.

Explore related topics

Frequently asked questions

How do I write a Moodle XML quiz file by hand?

Start with a quiz root element, then add one question block per item with a type attribute, a name, question text, answers and feedback. Import the file from your Moodle question bank and check the preview before saving.

What does the fraction value mean in a Moodle XML answer?

It sets how much credit that answer earns as a percentage of the question. A fraction of 100 marks the fully correct option, and 0 marks an incorrect one.

Can I export Moodle XML on the free plan?

No. The free plan includes 5 generations a week and study in the browser only. Moodle XML export is included on Pro at $14.99 per month.

Which files can I upload to generate questions?

You can upload PDF, DOCX, PPTX, plain text or notes, and images of pages, which are read with text recognition. You can review every question before exporting.

Generate free quizzes

Keep exploring the topic

Review the main ideas visually or practice recalling them.