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
- Generate and download your questions from ClassCraft AI in Moodle XML format.
- The downloaded file will have a
.xmlextension. - 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
- Visit your Moodle site and log in with your credentials.
- Navigate to the course where you want to import the questions.
Step 3: Import the Moodle XML File
-
Access the Question Bank:
- Go to your course.
- Click on the Settings menu (gear icon).
- Select More > Question bank > Import.
-
Choose the Moodle XML Format:
- Under File format, select Moodle XML format.
-
Upload Your File:
- Click Choose a file and select your
.xmlfile. - Alternatively, drag and drop the file into the upload area.
- Click Choose a file and select your
-
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
-
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.
-
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
-
Preview Your Quiz:
- Use the Preview option to check that the questions appear and function correctly.
-
Publish the Quiz:
- Make the quiz available to students by updating the quiz settings or course visibility.
Moodle XML vs GIFT Format
| Feature | Moodle XML | GIFT |
|---|---|---|
| Question types | All Moodle question types | Limited set |
| Images & media | Supported | Not supported |
| Question feedback | Fully supported | Basic support |
| File format | .xml | .txt |
| Complexity | More structured | Simple 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
-
Import Errors
- Ensure the file is a valid
.xmlfile 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.
- Ensure the file is a valid
-
Missing Questions
- If some questions do not appear after import, review the import log for warnings or errors.
-
Encoding Issues
- Ensure the XML file uses UTF-8 encoding, which is the default for ClassCraft AI exports.