spec chars in calc'd answer

spec chars in calc'd answer

by david benedetto -
Number of replies: 5
i'm creating calculated questions re: money.

how do i put a dollar sign in the "Correct Answer Formula =" line so a dollar sign will show up in the answer line, after which the student will type in the number?
i have tex & ascii filters active.

david
Average of ratings: -
In reply to david benedetto

Re: spec chars in calc'd answer

by Ian Wild -
Picture of Plugin developers
Hi,

Try putting a backslash before the dollar: \$

That's what I do on my site.

Cheers,

Ian.
In reply to Ian Wild

Re: spec chars in calc'd answer

by david benedetto -
thanks, but that didn't work.

i get this error:

Illegal formula syntax starting with '\\$'

i tried flanking the $ w/backslashes,
i tried putting a plus sign after the $,
even spaces;
nothing seems to work,.

david
In reply to david benedetto

Re: spec chars in calc'd answer

by Mauno Korpelainen -
I suppose you can't use dollars in answers of this question type ... see http://docs.moodle.org/en/Calculated_question_type
In reply to Mauno Korpelainen

Re: spec chars in calc'd answer

by Ian Wild -
Picture of Plugin developers
blush Oops... sorry... I've just read your post again and realised that you are talking about the correct answer formula field. Mauno is right: Moodle is expecting a mathematical expression in there. When it comes to questions of this sort, and being as I'm based in the UK, I end up having to specify at the end of question something like "Give your answer in £"... or something like that.

Apologies again. Ian is sent off to write "You must read the question properly" 100 times.

Ian.
In reply to Ian Wild

Re: spec chars in calc'd answer

by david benedetto -
thanks ian. as for uk, i love many of the math site you have there. i'm using them at virtualmathclass.com/moodle

david approve