Home › Quizzes › Platforms & LMS › Moodle Quiz Database Structure Practice

Practice the Moodle quiz database structure with AI questions

Upload your slides, PDFs, or notes and get multiple-choice, true/false, or open questions with explanations. Moodle XML export is available on the Pro plan.

Create quizzes nowFree · No credit card required

Free account · 3 sets a month · Creates quizzes in seconds

How the Moodle quiz database structure is organized

Moodle stores every quiz across a set of linked tables, and the Moodle quiz database structure is easiest to learn when you can see how those tables reference one another. Start with the quiz table, which holds settings such as time limit and attempts allowed, and then follow the links outward to questions and student responses.

  • The quiz table stores settings, and quiz_slots stores the order of questions.
  • Each quiz_attempts row is one student attempt, so retakes create new rows.
  • question_attempts links individual responses to their parent attempt.
  • Newer versions separate question bank entries from their versions.
Example Moodle quiz database structure questions
Which table stores the settings for a quiz, such as time limit and attempts allowed?The quiz table. It holds one row per quiz with its settings, while questions are linked through other tables.
Which table records the position of each question within a quiz?quiz_slots. Each row holds the slot number that controls question order within that quiz.
What does one row in quiz_attempts represent?One student's single attempt at a quiz. Retakes add new rows instead of overwriting earlier attempts.
Which table stores a student's response to a question within an attempt?question_attempts. Each row links to its parent attempt, and question_attempt_steps records the interactions.
In newer Moodle versions, what is the difference between a question bank entry and a question version?A bank entry is the stable item, and each edit creates a new version. Quizzes can reference a fixed version, so earlier attempts stay accurate.
Generate the full set

Questions from your own material

Upload PDFs, slides, DOCX files, or notes and get multiple-choice, true/false, or open questions with explanations.

Moodle XML export

The Pro plan exports Moodle XML and QTI 2.1, so generated questions can be moved into your course.

Study in the browser

The free plan includes three generations per month and browser study, so you can test the output before paying.

How it works

Upload your notes

Add a PDF, DOCX, PPTX, plain text file, or a photo of a page from your course materials.

Generate quiz questions

Choose question types and get an explanation for each correct answer.

Review and export

Check the questions for accuracy, then export Moodle XML on the Pro plan.

The quiz_slots table records each question's position within a quiz, while the question tables hold the question content itself. In newer Moodle versions, question banks use separate entries and versions, so a quiz can point to a fixed version of a question even after it is edited.

Each student attempt is stored as its own row in quiz_attempts, so retakes add records instead of overwriting old ones. The question_attempts table then links each response back to its attempt, which is why tracing a single attempt from top to bottom is a useful way to learn the schema.

Explore related topics

Frequently asked questions

Which Moodle quiz tables should I learn first?

Start with quiz, quiz_slots, quiz_attempts, and question_attempts, since they cover quiz settings, question order, student attempts, and responses. Once those relationships are clear, the question bank tables will be easier to follow.

How do I study database relationships like the ones in Moodle?

Draw each table as a box and mark the key columns that connect them, then trace one attempt from quiz_attempts down to question_attempts. Practicing simple JOIN queries on a test Moodle site will make the links stick.

Can DeckOwl export questions to Moodle?

Yes, Moodle XML export is included on the Pro plan, which also includes QTI 2.1 export. PDF and DOCX exports are part of the Plus plan.

Is there a free plan?

The free plan includes three generations per month and studying in the browser. No credit card is needed to start.

Generate free quizzes

Keep exploring the topic

Review the main ideas visually or practice recalling them.