Why this exists
Moodle's question bank makes it hard to pull together “everything this quiz actually uses” when those questions are scattered across several subcategories, or to carry a whole course's quiz question banks over to a different course. This block builds that structure for you, then exports it.
How it works
Every course gets one grouping category in the question bank (it holds no questions of its own) with one subcategory per quiz, named after the quiz, directly underneath. Each export rebuilds the relevant subcategory first, so it always matches the quiz's current questions, not a stale snapshot.
Features
Export one quiz, or all of them
Export a specific quiz's subcategory, or rebuild and export every quiz in the course together in one file. A quiz with nothing to export is skipped, not a dealbreaker for the whole run.
Structure survives re-import
Importing a single quiz's export creates a new subcategory named after the quiz, wherever you import it, not a flat dump into whatever category happens to be selected. A bulk export recreates the entire course structure automatically, even in a course with no existing question bank.
Works across Moodle versions
Handles both Moodle 4.x (question categories live in the course context) and Moodle 5.x (categories live in a question bank activity) transparently, with no configuration needed.
Random question slots, your choice
Export just as many questions as the quiz uses (one per random slot), or every question in the slot's full source category. Your call per export.
Handles messy real-world data
Correctly includes questions whose only version is "hidden" (still in active use by the quiz, just no longer addable to new ones), something Moodle's own export tools silently skip.
Any installed export format
Moodle XML, GIFT, Aiken, XHTML: whatever question formats your site has installed.
Installation
Requires Moodle 4.0 or later. From your Moodle root folder:
git clone https://github.com/germanbobadilla/moodle-block_exportquizquestions.git blocks/exportquizquestions
Then log in as an admin and visit Site administration › Notifications, or run php admin/cli/upgrade.php.
Usage
- Open a course, turn editing on, and add the Export Quiz Questions block.
- Choose a specific quiz or all quizzes in this course, and pick a format.
- If a quiz has random question slots, choose whether to export only as many questions as it uses, or every question in their source categories.
- Select Export. The relevant subcategory (or subcategories) is rebuilt, then downloaded.
| Capability | Who |
|---|---|
block/exportquizquestions:addinstance | Add the block to a course (editing teacher, manager) |
block/exportquizquestions:myaddinstance | Add the block to the Dashboard |
Only users who can manage the question bank (moodle/question:managecategory) see the block and can export.
Changelog
Recent highlights. Full history in CHANGES.md on GitHub ↗.
v1.3.2
Added the plugin icon.
v1.3.1
Fixed a quiz name containing a slash breaking the single-quiz category marker into two nested categories on import.
v1.3.0
Single-quiz exports now create a correctly named subcategory on import, instead of adding questions into whatever category was selected.
v1.2.0
Added bulk export (all quizzes in a course) and the shared course grouping category.