Import from Moodle XML or JSON¶
EduBase imports questions from a Moodle XML file, the format Moodle exports its question banks in, and from JSON files with EduBase's own question fields. Both go through the same upload window as Excel and EDU files: up to 500 questions in one upload, into a folder of My Quiz questions or straight into a Quiz set.
Upload the file¶
- Open the folder of My Quiz questions you want the questions in, or the Quiz set (Tasks → add questions).
- Choose new question → Upload as file.
- Under File, choose the
.xmlor.jsonfile, or a.zipwith several of them, and choose Upload.
My Quiz questions → Moodle import → new question → Upload as file
The window lists XLSX, CSV, EDU, ZIP and Moodle XML; JSON files are accepted as well. After the upload, a message reports how many questions were imported and how many were skipped because of errors. See Import questions in bulk for what happens to an upload in general.
How Moodle questions are converted¶
| Moodle type | EduBase type |
|---|---|
| Multiple choice with one correct answer | Single choice |
| True/False | Single choice with the options "true" and "false" |
| Short answer | Generic (exact match) if the Moodle question ignores case, Text otherwise |
| Numerical, Calculated | Numerical; the wildcards of a calculated question become parameters |
| Essay | Free text (scored by hand) |
| Matching | Pairing |
| Description | Reading |
Not imported: Moodle multiple-answer questions, where each correct answer is worth part of the grade, and Cloze (embedded answers), Select missing words and the drag-and-drop types. Rebuild these by hand, for example as multiple-choice questions or hotspot questions.
Also carried over:
- The question text, with images embedded in the export and LaTeX formulas.
- The default mark as the question's points.
- The Moodle category: its last level becomes the Category, the two levels above it its parent categories.
- The Moodle ID number as the External ID: uploading the same export again updates these questions instead of adding copies.
- The question's Moodle name, as a private note in the editor.
In the demo, a statistics teacher moves a Moodle category of eight questions: six arrive, the multiple-answer question and the Cloze question do not.
My Quiz questions → Moodle import
Check after a Moodle import¶
- Short answer questions: whether they should ignore case and punctuation (type Text) or need an exact match (Generic).
- Numerical questions: the Moodle tolerance is not imported; set the tolerance again.
- Penalty: Moodle's penalty for each retry becomes penalty points for a wrong answer, which works differently; check the Penalty points under Answering and Scoring.
- Missing questions: compare the number of questions with the Moodle category, and rebuild those that were not imported.
JSON files¶
A JSON file holds one question as an object, with the same field names as an EDU file or an Excel column, such as TYPE, QUESTION, ANSWER and OPTIONS:
{
"TYPE": "NUMERICAL",
"QUESTION": "What is the median of 3, 7, 8, 12 and 20?",
"ANSWER": "8",
"POINTS": "2",
"CATEGORY": "Descriptive statistics",
"EXTERNAL_ID": "STAT1-MEDIAN-02"
}
To import many questions, put one JSON file per question in a ZIP. A JSON file that holds a list of questions imports nothing. Questions exported from EduBase as JSON import the same way, and the API takes the same fields in POST /question.
Limits¶
- Up to 500 questions per upload; split larger Moodle banks into several exports.
- Moodle quiz settings, attempts and results are not part of a question bank export and do not come across.
- A Moodle question without a default mark is imported with 0 points. Moodle's own exports always include it.

