mathematics

mathematics

by Grace Corcoran -
Number of replies: 9
I am a new user to Moodle. I want to create maths questions that contain expressions. What is the best way to do this. I know how to create my quiz and can import images into the question. There has to be an easier way. I would appreciate any help.
Thanks
Grace
Average of ratings: -
In reply to Grace Corcoran

Re: mathematics

by Miles Berry -
Hello Grace.
There is indeed an easier way.
Moodle (well at least v1.4.1) comes with a couple of algebra filters, although these need to be enabled, in administration->configuration->filters
Just add the TEX and algebra filters to the list of active filters, and you should be able to include inline algebraic expressions.
The syntax takes a little getting used to (unless you know TEX already), but there is a helpful discussion group at http://moodle.org/mod/forum/view.php?f=130, which includes a particularly useful set of examples as a starting point.
Getting Moodle to cope with expressions in answers is more of a challenge, but there is work in progress here too, by the Serving Mathematics project.
Miles.

Average of ratings: Useful (1)
In reply to Miles Berry

Re: mathematics

by Philip Norton -
It possibly should be noted that the examples that you linked to are the Algebra filter as they use the "@@" expressions. TeX uses "$$$" to surround the expression. However, it's largely similar.

One difference is with fractions one has to use the \frac{numerator}{denominator} ($$\frac{numerator}{denominator}$$) syntax.

Sub and superscripts are easy with "A_1" giving $$A_1$$  and "a^2" giving something like $$a^2$$. Expressions can be grouped using "{ }"'s so it is possible to write things like "a^{2x+3}" ($$a^{2x+3}$$) or even "a^{\frac{2}{x^3}}" ($$a^{\frac{2}{x^3}}$$).

One short coming (at least for me!) as a geometry teacher, is no symbol for "Angle" (left half of half a "\triangle" ($$\triangle$$)!), and some way to insert the cap on the middle letter of a three letter angle ABC (where B needs a ^ on top!).

But on the whole, it works well. I have had issues with the algebra filter, but but all accounts it sounds like an issue that is only mine!


In reply to Philip Norton

Re: mathematics

by Miles Berry -
For middle letters try "A\hat BC": $$A\hat BC$$ , although the display rather lacks the elegance we're used to.
For angles, TEX does have an "\angle" tag but that doesn't seem to have been implemented. You could always use <  (less than)
There is a good list of TEX commands here, but I don't know which of these have been implementes.
In reply to Miles Berry

Re: mathematics

by Philip Norton -
Hello Miles,

Thanks for that! I will post a feature request on the bug list to see if we can't get that \hat looking a little more healthy, and perhaps to add in the "\angle" functionality.

Is there an easier way to get the degree sign other than going "^\circ"? For example, to get $$\cos 30^\circ$$, I have to write it $$$\cos 30^\circ$$$.

Philip
In reply to Philip Norton

Re: mathematics

by Miles Berry -
Hi Philip
Good idea to post the feature request.
HTML has a degree symbol built in as &#176 or &deg, which is available through the Moodle insert symbol button on the editior: cos 30º
I don't think the TEX filter will parse this though.
Miles.

In reply to Miles Berry

Re: algebra and tex filters

by Grace Corcoran -

Hello Miles,

I asked the administrator to enable the tex and algebra filter. I can now use the $$ before  and after the expression and it is interpreted correctly but when I use  @@ I get an undetermined error message. Should I select any particular formatting. I did try all of them. You may have another suggestion. Thanks for your help.

Grace

In reply to Grace Corcoran

Re: algebra and tex filters

by Miles Berry -
Hello Grace,
I think this may be beyond my level of competence but it sounds as though the algebra filter may not be installed correctly.
Your administrator can download the filter from http://moodle.org/download.php/modules/algebra.zip
The instructions say:

"To install these modules, unzip them in the filter subdirectory, then add the filter to the list of Filters in Admin Configuration Variables:
filter/filtername/filter.php"

  •  
If this doesn't work / help then you may get further by raising this in the mathematics tool discussion I mentioned above.
Miles.
In reply to Grace Corcoran

Re: algebra and tex filters

by Philip Norton -
Hi Grace,

I also had problems using the algebra filter and have since given up on it. I find that the TeX filter does everything I need it to (or almost!).

I found that by using the algebra filter, my webserver kept hanging. This left open threads in the mySQL db and that ultimately brought the whole system down! At any rate, noone has been able to reproduce these symptoms, so I have abandoned it for the time being and used the TeX filter exclusively.

Philip