Export questions

From MoodleDocs

Questions may be exported from the Quiz module and the Question bank in any one of 4 formats:

Questions may be exported into Word format using a contributed plugin, Word table format. These can then be easily used to support offline review and editing of all components of a set of questions, or to create paper tests. Questions may also be exported into an alternative HTML tabular format using another contributed plugin, HTML table format. This format displays all components of a question, for easier offline review.

Note: Images are only included if you export the questions using Moodle XML format.

Note: If you export questions from a Moodle 1.9 server, the exported file might contain only the relative URL to the image hosted in the 1.9 server, while exported questions from Moodle 2.x and 3.x severs might contain the actual image encoded in base 64. This explains why some question bank import-export operations include all the images and some others don't.

Process

  • Click into the Quiz
  • From Course navigation click the link Question bank
  • From the dropdown select Export.
Export quiz questions


  • Select the output type required for the exported file.
  • Use the pulldown menu to select the question category you want to export
  • Check if you want the category name to exported and/or the context to be included. This only applies to some formats and is used to restore this information on import.
  • Click on the export questions to file button
  • You are invited to download the file to your computer.

How to export a single question in XML format

  1. Click on the quiz name then, from the gear icon, select "Edit quiz":

    Download this question in XML format - 1.png

  2. Click on the "Preview question" icon of the file you want to export:

    Download this question in XML format - 2.png

  3. Click on the "Download this question in Moodle XML format":

    Download this question in XML format - 3.png

Example uses of exported files

  • GIFT and Moodle XML formats can be imported into the Lesson module And Question bank via an import question process.
  • Exported question files on one server, can be imported into another Moodle site/server
  • GIFT and Moodle XML formats can be tweaked to create word processing or spreadsheet documents suitable for paper tests or vetting.
  • GIFT format can be used with other tools created with this open-source GIFT parser.

See also