Question import plug-in with support for Word and MathType equations

Question import plug-in with support for Word and MathType equations

by Eoin Campbell -
Number of replies: 4
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

I created a Moodle2Word plug-in to support importing and exporting questions to and from Microsoft Word a few years ago. I have now released an update to this plug-in with support for equations which readers of this forum may be interested in.

If you use Microsoft Word, and either MathType or the native Microsoft Word Equation Editor to insert equations, you can create and import quiz questions into Moodle question banks. The equations will be converted into images when you upload the questions.

Although probably not for the purists, it does at least offer the benefit that equations will render correctly inside Moodle once uploaded. Both MathType and the Microsoft Equation Editor offer a range of input facilities, including wizards, templates and direct TeX entry, so entering equations should be relatively easy for all levels of user.

Further documentation is available at http://docs.moodle.org/26/en/Word_table_format.

Average of ratings: -
In reply to Eoin Campbell

Re: Question import plug-in with support for Word and MathType equations

by Priyanka Sinha -

Hi Eoin,

I am using moodle2word to import questions to Question Bank. However, I am facing an issue when inserting equations in the file. I am using MS Word Equation Editor. Following is the issue:

I have installed moodle2word on 2 systems. When I create a file on one of the systems, the file imports but the places where equations are there shows blank.

In another system, the file does not import at all. I get the following error:

XSLT transformation failed ((XSLT: /home/tribecas/public_html/moodle/question/format/wordtable/xhtml2mqxml.xsl; XHTML: /home/tribecas/moodledata/temp/w2q-da08n1.if2))

I am attaching the file that gives me error.

Am I missing something? I have tried creating the quiz with images and it works properly, but somehow not able to make it work with equations.

Thanks in advance!

Priyanka

In reply to Priyanka Sinha

Re: Question import plug-in with support for Word and MathType equations

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

I believe the reason for the XSLT error message is that you have an older version of the plugin installed. You should upgrade to version 3.4.3 to fix it.

I'm not sure why the imported question fails to display on the other system. One possibility is that MathJax on the server isn't configured to display MathML. If you export the question to a file in XML format and post that here, then I can take a look. You should also specify your Moodle configuration (version and OS).

In reply to Eoin Campbell

Re: Question import plug-in with support for Word and MathType equations

by Priyanka Sinha -
Hi Eoin,


I upgraded the plugin to 3.4.3. Now I dp not get the XSLT error. However, 2/3 < 3/2 typed in Equation editor shows as 23<32 when imported. I have 2 installations - one Moodle 2.7 and one Moodle 2.9, both of them hosted on siteground hosting. I have attached the exported XML file. I have also sent you a private msg giving you admin access to the Moodle 2.7 installation.

I am using MS word 2016, latest version of Word.

Regards,

Priyanka

In reply to Priyanka Sinha

Re: Question import plug-in with support for Word and MathType equations

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

MathJax configuration was the issue, and this is now fixed, by adding "<math" to the setting "Additional equation delimiters" on the  Site administration > Plugins > Filters > MathJax page.

PS. I also just released a new plugin last week, which allows you import Word content into any page in Moodle, see https://moodle.org/plugins/view/atto_wordimport  It has essentially the same features as the WordTable import facility for questions, including embedded images, equations, tables and headings, but you can install it as an Atto text editor plugin, and then use it on any HTML editing textbox to drag and drop Word files. It's just an initial release, and so may not be suitable for production servers, but worth a look nonetheless.


If you need to insert equations in questions, then you probably need to insert them in other elearning content as well, and if you are already familiar with the Word Equation Editor, then this plugin would allow you edit all of your equations in Word and import them to wherever you want in a Moodle course.