DragMath not displaying properly.

DragMath not displaying properly.

by Fred Frazelle -
Number of replies: 8
Have installed the latest DragMath module but when i create an equation and view it all i get is

$$ \sqrt{45} $$

Am using a WebPage and Moodle 1.8 i think it is.

Any ideas as to what i'm not doing correctly?

Have a great evening! smile
Average of ratings: -
In reply to Fred Frazelle

Re: DragMath not displaying properly.

by Fred Frazelle -
Wow, that's weird! Now it displays correctly in this browser??!!

i finally figured out that i had to go to Site Administration/Modules/Filters and turn on Algebra and TexNotation. As i see above, it displays o.k. in the browser, but not on my Moodle site. Maybe i need to refresh the cache. Hmmm...

Have a great evening! smile

test ...
$$ \sqrt[3]{4} $$

Hmm... on this site it displays correctly, with the URL as

http://moodle.org/filter/tex/displaytex.php?+%5Csqrt%5B3%5D%7B4%7D+

But on my site is points to

http://www.fundacionanisa.org/moodle_anisa/filter/tex/texdebug.php

How do i change this so that it points to displaytex.php instead of texdebug.php?
In reply to Fred Frazelle

Re: DragMath not displaying properly.

by John Isner -
texdebug.php is a tex debugger that exists in every Moodle install. It is there to allow you to check that the TeX filter is working properly, and to debug the problem if it is not working properly. I am not a developer, but I think displaytex.php is the code that generates the tooltip when you place your mouse over a math image. You shouldn't be concerned with it.

Incidentally, it makes no difference whether you type the LaTeX by hand or enter it using DragMath. DragMath is just an accessory to help you enter text into Moodle. Your problem (if you still have one) has nothing to do with DragMath.

Now I am confused. After activating the TeX filter and clearing the cache, are you still having problems? If so, the next step is to point your browser at the http://yoursite/filter/tex/texdebug.php and report the results to this discussion.
In reply to John Isner

Re: DragMath not displaying properly.

by Fred Frazelle -
Uh, o.k. Here is the address "pointer" i used

http://www.fundacionanisa.org/filter/tex/texdebug.php

and the result reported

(none) 201.143.216.205 /filter/tex/texdebug.php www.fundacionanisa.org Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071201 PCLinuxOS/2.0.0.11-3pclos2007 (2007) Firefox/2.0.0.11 404

Thanks for the reply and have a great evening! smile
In reply to Fred Frazelle

Re: DragMath not displaying properly.

by John Isner -
The URL is wrong. It should be

http://www.fundacionanisa.org/moodle_anisa/filter/tex/texdebug.php

When we say "yoursite" we mean your moodle site (the part in red).

Here is what you get when you point your browser to the correct URL:

Warning: escapeshellarg() has been disabled for security reasons in /home/fundacio/public_html/moodle_anisa/filter/tex/texdebug.php on line 114

Warning: system() has been disabled for security reasons in /home/fundacio/public_html/moodle_anisa/filter/tex/texdebug.php on line 140

Warning: shell_exec() has been disabled for security reasons in /home/fundacio/public_html/moodle_anisa/filter/tex/texdebug.php on line 157

...

File size of mimetex executable /home/fundacio/public_html/moodle_anisa/filter/tex/mimetex.linux is 491043
The file permissions are: 100644
The md5 checksum of the file is c294ab11905323bb5cb0f451241bedc1
Image not found!

The first message is telling you that for "security reasons" your Web host does not allow their Web servers to execute other programs (in this case, mimetex.linux). Talk to your Web host about this and see if they can relax the policy (let them see the first few error messages). Otherwise, you will have to use jsMath instead of the TeX filter.
In reply to John Isner

Re: DragMath not displaying properly.

by Fred Frazelle -
Thanks, John! i'll talk to them & see if i can get them to relax their policy w/regard to this.

Have a great weekend! smile and thanks again for the reply.
In reply to John Isner

Re: DragMath not displaying properly.

by Michael Rothwell -
Hello John

I have my Moodle site hosted on Frihost, and need LaTeX text to display properly for Maths expressions. I tried the test script above, got similar output, and requested a lightening of security. However, I got the following answer:

sorry won't happen, stuff like 'shell_exec()' will never be enabled. You'll have to find some other way to do the same, because I don't think this software can be used on frihost.

This didn't surprise me in the least - no third party host will allow arbitrary command execution via shell_exec(). Is there really no way around this?

Thanks,
Michael
In reply to Michael Rothwell

Re: DragMath not displaying properly.

by Marc Grober -
You can by pass most of this kind of dispute by moving to asciimath.
In reply to Michael Rothwell

Re: DragMath not displaying properly.

by Davide Cervone -
John has already mentioned another alternative: the jsMath filter as a replacement for the TeX filter.