AsciiMathML in Moodle 2.*

AsciiMathML in Moodle 2.*

by mana mboh -
Number of replies: 3

Before I begin, I am almost certain this is the wrong place to post this? Apologies in that case.

I have been using AsciiMathML extensively in creating a question bank in 1.9.* all with few or no problems.

Until last week, I had not found out how to install the plug-in in Moodle 2, and, therefore had been missing out on the slickness that comes with 2.*.

I have upgraded a clone of my 1.9.12+ to both 2.0.3 and then to 2.1. Was impressed at how smoothly the upgrades went but puzzled as to why I could not create new questions.  In this case, I could choose a question type to  create but the OK button would be grayed out.

I could not browse system-wide question categories either (don't ask, suffice to say I found that setup useful   when creating quizzes in 1.9*) and though I could preview and edit existing questions, the previews opened in the current tab and would not close when I click CLOSE PREVIEW....

This morning I was relieved to find I could do all the aforementioned and was about to break into cartwheels (only mentally) until I previewed a question containing an asciisvg and found it would not display.

I checked and found that I had not installed asciimathml plug-in...

My problems returned as soon as I installed the plug-in.

So the good news is I know exactly what is causing the issues.

The bad news is how to fix it.

Help!!!

Mana

Average of ratings: -
In reply to mana mboh

Re: AsciiMathML in Moodle 2.*

by Jean-Michel Védrine -

Hello,

The best place ever to ask "math in Moodle" questions is the Mathematics tools forum. Very helpfull people and lots of interestings posts to browse.

In Moodle 2.0 the solution (given in the mathematics tools forum big grin ) that I use to activate AsciimathML is to go to :

Site administration > Appearance > Additional HTML > Within HEAD

and enter something like
<script type="text/javascript" src="http://pathtoyourfile/ASCIIMathML.js"></script>

where pathtoyourfile is the exact path to the javascript file that you use

For instance on my moodle I entered

<script type="text/javascript" src="http://www.vedrine.net/moodle2/lib/asciimath/AM.js"></script>

because my file is named AM.js and located in the lib/asciimath/ subfolder and my Moodle 2 test site is installed in the moodle2/ subdir of my website www.vedrine.net

you can enter several lines with similar syntax in this field if you need to include other javascript files (I also added 2 more lines to include jsxgraphcore.js and GeonextReader.js)

It works wonderfully and for all themes.

In reply to Jean-Michel Védrine

Re: AsciiMathML in Moodle 2.*

by mana mboh -

Thanks Jean-Michel,

I will have a look at the forum you suggest and will certainly be exploring the additional scripts you mention.

My problem was that some functionality is adversely affected when I activate the aciimathml plugin and I seeking help from anyone who has noticed the same effects.

The symptoms that I can describe are:

  1. I cannot browse the list of questions anywhere but in the current category
  2. When I preview any questions, they open in the same tab and I have to use the browser's 'back' button to return to the originating page.
  3. I cannot create new questions as the OK button is grayed out at after i choose the question type.

I accidentally realised these issues were linked to ascimathml when I launched them successfully before realising I had not activated the plugin - and immediately ran into the same issues upon activating it.

Not being fluent in PHP I haven't a clue where to look first.

If you are running these plugins happily, maybe a wor-around/solution could lie with the metrhod of installation or the versions of your server components.

I have;

 

mysql 5.3.8

php 3.3.9

apache 2.2.11

 

Thanks in advance for any further help youcan offer.

Mana

In reply to mana mboh

Re: AsciiMathML in Moodle 2.*

by Jean-Michel Védrine -

Hello,

After some tests I can't reproduce your problems.

My only idea is that maybe you have some backtits (`) in a question bank category name and that break the drop down menu ?

My advice when you use asciimath is to only use it in places that you are sure will not be used in menus, dropdown menus, ... because in some cases it will break something, and if your users don't use firefox as the formula will be replaced by an image it will surely break !!

Using asciimath in a question description is safe. Using it in answer is safe for most question types except maybe matching if the answer is to be put in a dropdown menu (check, I rarely use matching questions so I am not sure)

Using it in most other places is safe (forum posts, lessons pages, ...)

But as I said you have to be carefull.

Tell me if my idea was good