Mathematics in Moodle and the OU

Mathematics in Moodle and the OU

by Tim Lowe -
Number of replies: 9

Hi folks,

I’m working as part of a Mathematics Online Project at the Open University (OU), UK, looking at how best we can teach mathematics in an online environment. As you probably know, the Open University has adopted Moodle as the basis of its VLE and one of my tasks is to look at doing mathematics in Moodle.

Whilst I’m very reluctant to propose “yet-another-maths-filter” we do have a few needs that don’t seem to be supported by the current maths solutions, namely

o Ability to cut-and-paste mathematics from Moodle to other applications (word processors, maths software etc)

o High quality display of mathematics in course materials, quizzes, discussion forums, wikis, in fact everywhere

o Accessibility issues: ability to change the size/colour of the mathematics with the text, support for screen-readers.

o Ability for students of all abilities to input mathematics.


I’ve put an outline of some development work that the OU is proposing to undertake on the OU VLE blog (http://www.open.ac.uk/ouvle/?cat=9) and I’d really appreciate your comments/input.

Thanks,

Tim

Average of ratings: -
In reply to Tim Lowe

Re: Mathematics in Moodle and the OU

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It *used* to be a problem pre-1.8 that Moodle was not XHTML compliant, and thus MathML was not viable, but since we are now compliant with XHTML Strict 1.0 (and it can even remain that way if you disable the HTML editor wink) perhaps native MathML is more possible now.

I can't really comment on the specifics, I've not looked into it lately, but any solution that is easy for people to use on all popular browsers gets my vote.
In reply to Martin Dougiamas

Re: Mathematics in Moodle and the OU

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
To clarify, you already mentioned the problem - Moodle is still not XHTML compliant because users can create content which is not XHTML compliant. smile At least that's my understanding. This is why we probably can't just turn on the option to serve as XHTML (which is currently on when in debugging mode, at least in our system). In addition, serving as XHTML totally breaks IE6 so is not a solution for those users.

As for my opinions on the proposal, I think the proposal is in general a good idea but I disagree with all the parts Tim L changed after the version I came up with. smile [Kidding, somewhat. I'm being unfair - we actually came up with it in a discussion together, wasn't just me at all.]

To review the general idea/bit I agree with:
  • Equations by default display as images, with some meaningful alt tag
  • If you click on the image you get to a page about the equation, which includes a version presented as MathML, the MathML source, and other metadata such as a TeX equivalent.
  • From this page you can, if you wish, turn on a checkbox to enable 'enhanced mode', in which MathML is sent directly as part of normal Moodle pages.
But, here's the bit copied from the blog entry which is what you would put into an HTML area when adding an equation:
< math type="display/inline" >

< mathContent type="MathML" >
 ... Presentational MathML content
 ... Optional Content MathML or OpenMath content
< /mathContent >

< mathContent type="image" >
 ... an image of the rendered mathematics for use when MathML cannot be displayed
< /mathContent >

< mathContent type="html" >
 ... optional simple HTML/unicode representation
< /mathContent >

< mathContent type="tex" >
 ... optional tex encodeing
< /mathContent >

... possible other content types

< /math >

As you can see this is humungously long and overcomplicated - and that's in addition to the humungously long and overcomplicated MathML rendition! Also, you cannot include images inside XML like that (unless you are going to use base64 - PLEASE GOD NO).

I would prefer to include only the MathML content. This is much simpler and is standards-based rather than introducing a random new wrapper standard. Hopefully we can then provide automated rendering for:
  • The image (automatic generation via external MathTran server)
  • Text equivalent (image alt tag), possibly also via external server
    [If we can't provide an automatic text equivalent then we should allow for a custom-namespaced alt attribute on the mathml.]
  • TeX (automatic conversion via external MathTran server)
  • Simple HTML in cases where it is appropriate - single letters, x2, etc (simple automatic conversion, doesn't need to cover everything, only hit the most-common cases).
No information that can be automatically generated should be stored. (If we need to store autogenerated information for performance, this can be managed through caching.)

We also need to bear in mind that the first iteration of this effort is likely not to include a visual editor because of the complexity involved.

My opinions might change a bit if it turns out we actually can't automatically generate some of the things I thought we could. smile

(Note that MathTran doesn't support MathML yet, but it's supposed to eventually.)

--sam
In reply to sam marshall

Re: Mathematics in Moodle and the OU

by Ramon Eixarch -
Hi everybody,

we have very recently published a Plugin for Mathematics. Our Plugin integrates WIRIS tools with the HTML editor. A summary
  • WIRIS Editor, a WYSIWYG MathML based formula editor.
    To edit you use a Java applet.
    Users see an image that is generated by a web service.
    In the database we store MathML. (To be 100% true we have had to change the open and close < > characters for a very nice unicode character. Including mathml tags inside Moodle has been impossible for us)
  • WIRIS CAS, an online Computer Algebra System, that allows you to include calculations in your Moodle content. (Integrals, derivatives ,límits, 2D and 3D graphics,..)
If you are interested in a math chat as well (install not integrated in Moodle) check www.wiris.com/demo/moodlemoot/conference/

We plan to make a presentation at MoodleMoot UK http://moodlemoot.org/mod/data/view.php?d=1&rid=31


In reply to Ramon Eixarch

Re: Mathematics in Moodle and the OU

by John Isner -
Users would like to know more about the Wiris Web service. Is it open source and can I download it for free and install it on my own server? Or is a third-party service that I have to depend on and possibly pay for?
In reply to John Isner

Re: Mathematics in Moodle and the OU

by Ramon Eixarch -
Hi John,

WIRIS Web Service will be a commercial service. We are still working on the on-line shop and price definition but it will be commercial for sure.

The plugin for Moodle is and will always be free.

WIRIS CAS is free for many users since we have agreements with Ministries of Education to provide access to WIRIS CAS. From now on those national licenses will probably also include the Editor services. There are currently versions for WIRIS in several Spanish public funded educational servers but also in Italy, Luxemburg, Estonia and very soon in Austria.

Ramon
In reply to Martin Dougiamas

Re: Mathematics in Moodle and the OU

by Marc Grober -
I am a bit lost here.... I assumed (first bad move) that moodle 1.9.2 would not display MathML because it was producing html as opposed to xhtml. But having read through this I did a quick check of the page source and yes indeedy, it is coming up xhtml..... so could someone explain why MathML won't work in moodle and whether there is a hack such as is suggested for drupal for addressing this....
In reply to Marc Grober

Re: Mathematics in Moodle and the OU

by Tim Lowe -
Hi Marc,

I'm not an expert in how Moodle serves pages to web-browsers, nor how web-browsers work, but here is what has been explained to me by Sam Marshall.

Yes, Moodle serves pages with headers of the form
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
but (strangely) that itself doesn't tell the browser what form the data is in.

The crucial bit is the Content-Type.

Moodle serves pages with Content-Type=text/html, ie, it is HTML.

For XHTML the Content-Type would need to be application/xhtml+xml or similar.

I understand the main reason pages are not served as XHTML is that currently user-generated content (both newly input and old) isn't guaranteed to be compliant.


Regarding work-arounds....

IE does not require MathML to be within an XHTML document, but does require a plug-in to display it (MathPlayer). Firefox requires MathML to be in an XHTML document.

Currently under development at the OU is a filter to take MathML contained in pages (nb, proper MathML, not the data format in an earlier post), and display it as such if the user is using IE+plug-in and has preferences set. Otherwise, it is converted to an image using JEuclid. Each image is a link to a page to set image preferences (size/colour) and containing the MathML for cut/paste etc.

Tim