Math equiton in quiz questions

Math equiton in quiz questions

Sudhir Singhal -
回帖数:4
I have Maths MCQ questions in MS word format. I used the Word file import plugin:
But math equations imported are taken in different format and sometimes brackets are not imported.
In HTML code I can see something like this:
<math xmlns=" http://www.w3.org/1998/Math/MathML">
        <mi>f</mi>
        <mo>(</mo>
        <mi>x</mi>
        <mo>)</mo>
So I need help for it:
1) First of all is this format okay, in terms of compatibilty and sped or do I need to use LaTeX format? Which one is recommended?
2) Is there any other way or any other updated plugin to import maths equation?
3) I have thousands of questions, so how to convert them in proper format? Do I need to write them again using LaTeX editor (may using Equatio) and insert each question individually In Moodle or some sort of automation is possible using some other tool?

回复Sudhir Singhal

Re: Math equiton in quiz questions

Dominique Bauer -
Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

To format equations, you can use LaTeX, MathML or AsciiMath. There is also UnicodeMath and perhaps a few other lesser known languages.

LaTeX is the oldest, probably the most used and most complete. It is easy to use because you can write the equation code directly without using any software. It is particularly suitable for mathematics and scientific texts.

MathML is also an excellent language for formatting equations. Although in theory you can write the code for the equations directly, in practice this is nearly impossible. So you need software to write the code, but in fact this makes it easy to write equations. Perhaps the best known software is MathType, recently purchased by the Wiris company, and which is a paid product. You can find other editors that are free for example by visiting https://dynamiccourseware.org/course/view.php?id=36➚. MathML is very well suited, for example, for engineering texts and other texts that do not need the look often used in mathematics, with fonts resembling Times New Roman.

AsciiMath is a very simple language, but it still gives excellent results.

UnicodeMath is a language created by Microsoft and can only be used with the Office 365 series of software. It is of no use for Moodle.

1) First of all is this format okay, in terms of compatibility and speed or do I need to use LaTeX format? Which one is recommended?

What you have shown is in MathML language. It is perfectly okay in terms of compatibility and speed. You don't have to use the LaTeX language. You can use LaTeX or MathML, both are excellent. Be careful though because LaTeX users are often die-hard fanatics and they will try to convince you to use LaTeX at all costs. It's not necessary, you can use MathML and get just as good results in most cases.

2) Is there any other way or any other updated plugin to import maths equation?

There may be other plugins, but the Microsoft Word File Import/Export plugin works just fine. See https://moodle.org/mod/forum/discuss.php?d=430409#p1732244 for details. Note that this plugin takes equations created with Microsoft's equation editor and transforms them only to MathML in Moodle.

3) I have thousands of questions...

What question type are they? Have they been prepared with a template, for example Moodle2Word, for importing into Moodle? Or are they in Aiken format or in GIFT format? Were the equations created with Microsoft's UnicodeMath equation editor, or for example using MathType?

If the equations were created with the Microsoft equation editor, you can view them in LaTeX format. If you move the LaTeX code outside the equation editing box, they will import as LaTeX equations in Moodle. Once imported, you need only to add the delimiters \​( \​).

回复Dominique Bauer

Re: Math equiton in quiz questions

Sudhir Singhal -
Thanks, Dominique for explaining it in detail.
I created questions in MS Word using Microsoft Equation editor and then converted them as per the template of Moodle2Word and imported them in Moodle using the plugin: https://moodle.org/plugins/qformat_wordtable.
The plugin developer Eoin helped me to solve the issue by using an additional equation delimiter '<math'.
Eoin  explained that:
"Equations are displayed using MathJAX filter, which uses a combination of CSS (stylesheets) and JavaScript (programming language). When you are editing a question in the Atto or TinyMCE editor, they are also using a combination of CSS and JavaScript to present the content. To avoid clashes between the two different sets of JavaScript code (MathJAX and Atto/TinyMCE), the editor disables the MathJAX JavaScript. Therefore when previewing a question or doing a quiz, the equation is presented OK, but when in edit mode, it is not fully displayed."


回复Sudhir Singhal

Re: Math equiton in quiz questions

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
Listen to Dominique!

The visual equation editors are dead-ends. They are images, drawings. Equations written in text are like program code, the computer "understands" them. Moodle, based on further open source programs like Maxima, MathJax, etc., have a path to the university level mathematics, whether algebra, analysis or even physics - provided that the teacher sees the connection.