Enabling students to use DragMath

Enabling students to use DragMath

by Diane Coupal -
Number of replies: 4

Our university has just adopted and installed Moodle. I am not part of the gurus, but a user of the system. I have asked them how to enable students to use DragMath to respond to quiz questions, but have not received a reply. I suspect they find the request to be a bit daunting.

Could you please tell me how to enable students so that I can then assure them that it can be done.

I hope this doesn't sound patronizing in any way to our system administrators. I imagine it is just a bit much for them to do all at once.

Thanks.

Diane

Average of ratings: -
In reply to Diane Coupal

Re: Enabling students to use DragMath

by Mauno Korpelainen -

I suppose your new site is using moodle 2.X.X

In core moodle 2 there is an editor setting that ties dragmath to Tex filter - tex filter must be enabled before you even see the icon in tinymce. So your site administrators could check first if they have installed a fully functional distribution of latex (for example TexLive) together with Imagemagick or Ghostscript (or some other tool for converting tex to pngs) and check if ticks for 3 paths of tex filter in Site administration > Plugins > Filters > Manage filters > Tex filter > Settings are green (selected binaries there executable). Usually this is not done.

Tex filter

If no other (optional) latex renderer is installed moodle/tex filter will try to use mimetex fallback from folder filter/tex and to make this second option available your system administrators must check that mimetex binary in that folder is executable by all users (on linux mimetex.linux, on Windows servers mimetex.exe, ...)

Third option is to use some other renderer for maths and then your system administrator needs to edit file lib/editor/tinymce/lib.php and for example replace lines

        if (array_key_exists('filter/tex', $filters)) {
            $xdragmath = 'dragmath,';
        } else {
            $xdragmath = '';
        }

with

            $xdragmath = 'dragmath,';

and install the scripts or filters you want to use for maths. If they absolutely refuse to install non core things you have still some options left - for example as a moodle administrator you can go to Site administration > Appearance > Additional HTML > Within HEAD and add there tags from attached file examplenet.txt and disable tex filter & change those dragmath init lines in file lib/editor/tinymce/lib.php to use dragmath with mathJax from external http://cdn.mathjax.org/mathjax/latest/MathJax.js without tex filter but with the same tokens (double dollars) for inline maths that dragmath by default adds to mathematical notations...

Universities usually do have knowledge and hard disk space for installing a full distribution of latex which allows use of tex filter with all the benefits it gives so I would suggest the first option smile - or you could as well suggest downloading a full package of MathJax from http://www.mathjax.org/ to your server and use it like with examplenet.txt tags  to avoid overloading external and public http://cdn.mathjax.org/mathjax/latest/MathJax.js

In reply to Mauno Korpelainen

Re: Enabling students to use DragMath

by Diane Coupal -

Thank you for your prompt reply. I forwarded the information to our moodle administrator. As a result, students can now use DragMath. They are working on the mathjax component.

In reply to Diane Coupal

Re: Enabling students to use DragMath

by Mauno Korpelainen -

Diane,

you could ask your system administrators to check one more thing:

If Theme designer mode is in default setting 'No' in Site administration > Appearance > Themes > Theme settings then moodle will cache lots of things and for some strange reason mathJax script AMSsymbols.js that renders a set of AMS symbols can become unresponsive IF configuration of mathJax is set to

config: ["MMLorHTML.js"],

that I have used in my previous example.

I did not notice it before yesterday because I was using moodle 2 in Theme designer mode on my test sites.

Anyway, if your site administrators change "MMLorHTML" to "TeX-AMS-MML_HTMLorMML" in

config: ["TeX-AMS-MML_HTMLorMML.js"],

scripts should run much quicker both with external or internal mathJax and cache. They can also test different configurations of MathJax from pages like http://www.mathjax.org/docs/1.1/options/index.html#configuration-options-by-component and http://www.mathjax.org/docs/1.1/upgrade.html?highlight=amssymbols if some other modifications are needed.

In reply to Mauno Korpelainen

Re: Enabling students to use DragMath

by Diane Coupal -

I will forward the information to them. Thanks again!