Your Moodle version

Question formats: Microsoft Word table format (wordtable)

Maintained by Picture of Eoin Campbell Eoin Campbell
Export questions (including images) in a question bank into a Word file, and also import questions from structured tables in a Word file.
Moodle 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7

Moodle2Word is a plugin that allows quiz questions to be exported from Moodle into a Word file. The Word file can then be used to quickly review large numbers of questions (either online or in print), or to prepare paper tests (where the answers and feedback are hidden).

Moodle2Word also supports importing questions from structured tables in Word, directly into the Moodle question database. The tables support all the question components (stem, answer options, option-specific and general feedback), as well as embedded images and equations. All the main question types are supported except for Numerical and Calculated.

The Cloze question syntax is particularly useful, as it does not require any knowledge of the arcane Moodle syntax; instead, use bold for drop-down menu items, and italic for fill-in text fields. See attached screenshot for an example.

Word templates to go with the plugin can be downloaded from the demonstration website, and are available for Word 2002/XP, 2003, 2007 and 2010 (Windows), and Word 2004/2011 (MacOSX). The Windows templates also support a simple question preview facility, and a facility to upload questions from within Word.



  • You need Moodle Administrator rights to install the plug-in.
  • You also need read/write access to the /question/format folder in your Moodle installation.
  • Check that your Moodle installation supports XSLT (for exporting) and CURL (for importing). Log in as Administrator, go to Site Administration -> Server -> PHP info, and view the PHP configuration. Look for the package details for 'curl' and for 'xsl'. If they are not present, then you will need to re-configure PHP and re-start the server.
  • To enable XSLT and/or CURL on your Windows Moodle server, open your PHP configuration file (e.g. d:\winmoodle2\server\php\php.ini) and uncomment the lines containing "extension=php_xsl.dll" and "extension=php_curl.dll" by removing the semi-colon before them, if present.
  • For more reliable export to Word, ensure that the PHP Tidy extension is enabled, by uncommenting the  "extension=php_tidy.dll" line in the PHP ini file (Windows).  

Installation instructions (within Moodle)

  1. Download the PHP source code Zip file for your Moodle version (click on the Download link above) to your local computer, and note its' location.
  2. Log in to your Moodle server as Administrator, and go to Site Administration > Plugins > Install add-ons.
  3. Click on the link "Install add-on from ZIP file", and in the Plugin type drop-down field, select "Question import/export format (qformat)". Moodle should then tell you if the folder is writable. If it isn't, you will need to fix it before proceeding.

    (Note that for reasons unknown, installing this plugin by clicking on the "Install add-ons from the Moodle plugins directory" button won't work.)

  4. Click on the "Choose a file..." button in the "ZIP package" field, and select the downloaded Zip file, then check the "Acknowledgement" box, and click the "Install add-on from the ZIP file" button.
  5. Moodle validates the package and displays the results. Click on the "Install add-on!" button.
  6. Moodle displays the list of plugins to be installed. Click the "Upgrade Moodle database now" button.
  7. Moodle should display a success page, and redirect you back to the Administration page.

Configuration instructions

  1. Go to any course, and select a question bank that contains at least 1 question.
  2. Use the Moodle Question Export page to export a Word file. You should see a new item in the File format list, 'Microsoft Word table format'. Select this item, and choose any question category containing some questions.
  3. You should see the list of question names, and be prompted to save or open a Word file, or else you should click on the link at the bottom of the page.
  4. If you see the error message "You need the XSLT library installed in PHP to save this Word file" (xsltunavailable in non-English installations), then your Moodle configuration is not configured to support exporting to Word format, and you will need to update it. See this forum thread.
  5. Regardless of whether the export to Word facility works, use the web-based facility to import a Word file. You should see a new item in the File format list, 'Microsoft Word table format'. Select this item, and choose any Word file, it doesn't matter what format.
  6. You will be redirected to the registration page, and prompted to register your installation. Most fields are filled in automatically, but you must choose a password.
  7. Submit the form, and you should see a "Registration successful" message in a few moments. You will then be redirected back to the question import page.
  8. Install the appropriate Word template (guest login required) on your PC, and create a question file. Use the question import form to upload and convert the Word file.
  9. If all goes well, your questions should be imported into your course. If not, send me an email at and I will try to help you out.
  10. After you complete the registration process successfully, you will be able to import questions in Word tables into Moodle.


  • There is no limit to the number of questions that can be exported into Word format.
  • When Cloze questions are exported into Word format, the Cloze notation is used for word placeholders, not the nice formatting (bold/italic) used when importing questions.
  • The Word to Moodle question import facility converts a maximum of 5 questions in a single Word file by default. Register the plugin after installation to increase this limit to 10 questions. You may purchase an annual subscription (€200) to remove this limitation on your own Moodle site. To avoid any charge, just use the website to import unlimited numbers of questions, then export them as XML files, and import the XML file into your own Moodle site.
This plugin contains potential privacy issues:
When importing questions (from a Word file), the file is sent to an external website for conversion into Moodle Question XML format.




Picture of Eoin Campbell
Eoin Campbell (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Eoin Campbell
    Mon, Apr 29, 2013, 5:11 PM
    Added Moodle 1.9 download, and fixed errors in Cloze question Word output for 1.9
  • Picture of mart van der niet
    Sat, May 25, 2013, 5:16 PM
    A Warning:
    When you have debugging on (siteadmin/development/debugging) a file is produced containing debugging messages. Obviously the export does not work anymore.
    Deactivating debug gets it going again.
  • Picture of GAPbuster Worldwide
    Tue, Jul 2, 2013, 10:54 AM
    Is this plugin supported/compatible with Moodle 2.5?
  • Picture of Eoin Campbell
    Wed, Jul 3, 2013, 4:29 PM
    Yes, it should be fine with Moodle 2.5, though I haven't had a chance to test it yet.
  • Picture of German Valero
    Wed, Oct 16, 2013, 11:22 PM
    Hi Eoin,
    Could you please update the link for 'More documentation on this plugin' to point to ?

    Thanks in advance.
  • Picture of Marty Jacobs
    Wed, Jan 29, 2014, 9:10 PM
    I'm getting the following error when trying to export (using Moodle 2.4): "Word-compatible XHTML template is not available". I'm fairly sure this isn't a permissions issue. Any ideas? Thanks.
  • Picture of Daniel Kaelin
    Thu, Feb 13, 2014, 6:27 AM
    I'm running into this error when attempting to immediately re-import the exported .doc file into a new category:

    Incorrect Word format: please use File>Save As... to save questions-EXP001-Default for 6530Spr11-20140212-1713.doc in native Word (.doc) format and import again

    The only way I am able to import it properly is if I open it in word and save it as a .doc file. When I do a save as on the document in word it initially shows it as a .htm file.

    When I do change it to a .doc and try to import it I am running into problems with it properly importing all of the questions. In multiple tests on a set of 10 questions it only imported 5 of the questions during both tests.

    In another tests I ran into this error:

    Error importing question Question type {$a} is not supported by XML import
    Error importing question Question type {$a} is not supported by XML import
    Error importing question Question type {$a} is not supported by XML import

    The only types of questions on the exam were essay and description questions which are both default Moodle question types. There were 3 of the description question types so I imagine it has a hard time with these.

    I can't imagine what I am doing wrong with the plugin. I am using it according to the documentation. I am using it on a 2.4.6+ portal (Build: 20131018)

    I just wanted to offer my feedback on here to see if anyone else was experiencing the same issues or if I was alone on this one.
  • Picture of Eoin Campbell
    Thu, Feb 13, 2014, 9:37 PM
    Hi Daniel, you have identified 3 different issues, so I'll address each one:

    1. Exported Word file format
    When you export questions to Word format, the file has a '.doc' suffix, but inside, it's really HTML, with some extra Word-specific content that helps Word format it nicely. However, the plugin cannot re-import this format directly, you must first save it in true Word 2003 (.doc) format, which is a non-text binary format.

    If you save the file using the "File > Save" command, or using +S, Word automatically saves it in the original HTML format. You must manually override this by saving the file using the "File > Save As..." command instead. Word detects that it is really HTML, and so it sets the "Save as type" field to HTML by default. You must manually override this setting and choose "Word 97-2003 Document" instead. Ideally, I should write some VBA code to do this automatically, but it isn't that easy.

    2. Question import limited to 5 questions
    When you install the plugin on your own server, there is a default limit of 5 questions that can be imported in a single Word file. To remove this limit, you must purchase an annual subscription which costs €200 for your whole site. To avoid this subscription, you could use the public Moodle server instead.

    The question import facility relies on a commercial web-based Word to XML conversion service, so cannot be made free.

    3. Question import errors
    The error messages are caused by the fact that you are using a "Heading 3" style inside the table cell intended for the question stem. The "Heading 3" style is reserved for the question name. If you set the "Stop on error" flag to "No" when importing the questions, then they will all import correctly.
  • Picture of Erjon B
    Sat, Feb 15, 2014, 1:51 AM
    I cannot seem to be able to import or export from the moodlequiz course in I get the error below:
    Sorry, but you do not currently have permissions to do that (access question edit tab import)

    More information about this error

    Debug info:
    Error code: nopermissions
    Stack trace:
    line 463 of /lib/setuplib.php: moodle_exception thrown
    line 1697 of /lib/questionlib.php: call to print_error()
    line 1674 of /question/editlib.php: call to question_edit_contexts->require_one_edit_tab_cap()
    line 33 of /question/import.php: call to question_edit_setup()

    Do you have the option to import and export from that course for free removed?
    Thank you
  • Picture of Eoin Campbell
    Mon, Feb 17, 2014, 6:49 PM
    Hi Erjon, I have now fixed this problem. I had forgotten to allow enrolments on the course, which I have now enabled. You can convert unlimited numbers of questions once you enrol in the course.
  • Picture of Sam PK
    Thu, Feb 20, 2014, 10:24 PM
    i install plugin in my server but After exporting quiz it shows only blank word file.
  • Picture of Giancarlo De Pol
    Fri, Apr 11, 2014, 2:59 AM
    I am trying to install the plugin on 2.6, but I am getting this error message:

    Validation failed!Help with Validation failed!
    Status Message Info
    OK Name of the add-on to be installedHelp with Name of the add-on to be installed


    Error Add-on does not declare its version

    Any hints?
    Thanks, Giancarlo
  • Picture of Eoin Campbell
    Mon, Apr 14, 2014, 9:43 PM
    Hi Giancarlo, the "Site administration > Plugins > Add-on installer" facility in Moodle doesn't quite work. Instead of clicking on the "Install add-ons from the Moodle Plugins directory" button, use the updated installation instructions above.
  • Picture of Tim Martinez
    Fri, Apr 18, 2014, 5:56 AM
    We just downloaded the plugin and tried it. All we get is a blank document. In the error log we see numerous errors like these:

    PHP Warning: DOMDocument::load(): Opening and ending tag mismatch: td line 11 and font in file:///D:/moodle2/data/temp/wt26E31.tmp, line: 11 in D:\moodle2\www\question\format\wordtable\ on line 46

    PHP Warning: DOMDocument::load(): Opening and ending tag mismatch: tr line 11 and span in file:///D:/moodle2/data/temp/wt26E31.tmp, line: 11 in D:\moodle2\www\question\format\wordtable\ on line 46

    PHP Warning: DOMDocument::load(): Opening and ending tag mismatch: tbody line 10 and p in file:///D:/moodle2/data/temp/wt26E31.tmp, line: 11 in D:\moodle2\www\question\format\wordtable\ on line 46

    PHP Warning: DOMDocument::load(): Opening and ending tag mismatch: font line 11 and td in file:///D:/moodle2/data/temp/wt26E31.tmp, line: 11 in D:\moodle2\www\question\format\wordtable\ on line 46

    Any ideas on how we can fix it?
  • Picture of Eoin Campbell
    Tue, Apr 29, 2014, 6:15 PM
    This problem is caused by badly-formed HTML inside question components, and has now been fixed in version 2.8 of the plugin.
1 2
Please login to post comments