Skip to main content

How to Import Moodle XML Questions into Moodle

Moodle XML is Moodle's native question format, supporting a wide range of question types including multiple choice, true/false, short answer, matching, and more. ClassCraft AI can export quiz questions in this format for direct import into Moodle.


Step 1: Prepare Your Moodle XML File

  1. Generate and download your questions from ClassCraft AI in Moodle XML format.
  2. The downloaded file will have a .xml extension.
  3. You can open the file in a text editor to verify it contains valid Moodle XML markup if needed.

Step 2: Log in to Moodle

  1. Visit your Moodle site and log in with your credentials.
  2. Navigate to the course where you want to import the questions.

Step 3: Import the Moodle XML File

  1. Access the Question Bank:

    • Go to your course.
    • Click on the Settings menu (gear icon).
    • Select More > Question bank > Import.
  2. Choose the Moodle XML Format:

    • Under File format, select Moodle XML format.
  3. Upload Your File:

    • Click Choose a file and select your .xml file.
    • Alternatively, drag and drop the file into the upload area.
  4. Import the Questions:

    • Click Import.
    • Review the questions in the preview screen to ensure they have been imported correctly.
    • Click Continue to finish the import process.

Step 4: Add Questions to a Quiz

  1. Create or Edit a Quiz:

    • Go to your course.
    • Click Add an activity or resource and select Quiz.
    • Name your quiz and configure the settings as needed.
  2. Add Questions from the Question Bank:

    • Edit the quiz.
    • Click Add > From question bank.
    • Select the imported questions and click Add selected questions to the quiz.

Step 5: Preview and Publish

  1. Preview Your Quiz:

    • Use the Preview option to check that the questions appear and function correctly.
  2. Publish the Quiz:

    • Make the quiz available to students by updating the quiz settings or course visibility.

Moodle XML vs GIFT Format

FeatureMoodle XMLGIFT
Question typesAll Moodle question typesLimited set
Images & mediaSupportedNot supported
Question feedbackFully supportedBasic support
File format.xml.txt
ComplexityMore structuredSimple plain text

Tip: Use Moodle XML when you need richer question types or want to include images and detailed feedback. Use GIFT for quick, text-only question imports.


Troubleshooting

  1. Import Errors

    • Ensure the file is a valid .xml file and has not been modified manually in a way that breaks the XML structure.
    • Check that your Moodle version supports the question types included in the file.
  2. Missing Questions

    • If some questions do not appear after import, review the import log for warnings or errors.
  3. Encoding Issues

    • Ensure the XML file uses UTF-8 encoding, which is the default for ClassCraft AI exports.