Hi - I have a slide where I have used CL to check for a correct answer. The downside is because I need an initial £ in the answer box, I have to check the latex rather than the numerical expression. So I have used this CL in the math input:
initialLatex: “£”
correct: this.latex=“£50.79”
When I preview the page, I get a red warning triangle next to the student dashboard preview that says “There are CL warnings so this might not match the dashboard. Try with fake students”.
I don’t have any CL warnings but when I remove the line of code defining correctness, this warning disappears. It seems to work when I run a mock class - does anyone know what is causing the error message?
I would happily check the numerical value if I could get it to ignore the £ but it doesn’t seem to allow that.
Many thanks!
I’ve seen that red warning symbol before. I’m unclear why it shows up.
what about using suffix: “£” instead of initialLatex. And then you can use correct: this.numericValue=50.79 That might solve the red triangle (though I know currency isn’t usually written that way).
I agree…
What we need is a CL command for a prefix:
Which unfortunately, doesn’t exists yet. I’d like to use the prefix for other items, such a $ sign or parenthesis for coordinate pairs.
Hey @JayChow , any chance this can be added to the computation layer for math input?
Or is there a workaround?
Thanks!
We’re working on trimming the £ symbol like we do $. That’ll allow desmos to evaluate the numeric value regardless of whether its there or not. Are there any other (prefixed) symbols that would make sense to trim?
As for a prefix sink, do you have a specific case where it couldn’t be handled with initialLatex and/or suffix?
Looks like you’re using an exact string match here. For reasons like what you’ve described we strongly recommend against using that type of check.
Consider comparing the numeric value to an amount. Making sure that only one number is entered (using countNumberUsage) is a possible addition if you want to avoid students writing the difference as an expression.
A suffix of “dollars” might he helpful here as well.
I found a way to ignore the dollar sign and not show a error message in the math input either… This is what I was looking for to do an initial latex, but ignore it.
initialLatex: "$"
errorMessage: when this.latex="$" "" otherwise ""
correct= this.numericValue=4.63
Hi @JayChow - just wondering if there are any new options for trimming the £ symbol as I need this functionality again. I am using a workaround of adding (£) as a suffix and then adding a note to tell them not to input a £ sign. Is there a better option now?
I have been working on a practice using the random generator for rounding currency.
I know it isn’t recommended, but I used matching latex. I couldn’t get the other ways to mark correct exactly the right number of zeros, like 3.00.
Now I can’t get it to mark as correct when I try to add the $ symbol in front. I’d prefer not to use a suffix of “dollars”- they need practice with the dollar sign as a prefix.
Is there a trick like the errorMessage: that will make the input.latex = ${R}.${r1}${R2} work with the $ sign for input.latex = $${R}.${r1}${R2}?
This is start of the activity. Rounding Currency • Activity Builder by Desmos
A slight improvement over an exact latex check would be to append the number with a digit and then check its numeric value.
e.g. appending 1 to the string would make 3→ 3.1 and 3.00→ 3.001, etc.
My preference would be to err on the permissive side, but if you must know that a student entered 2 dp you can use mod with this hack to get what you want.
Note: A HUGE reason why this isn’t totally recommended is that its still very easy to mark students wrong for things like 1.00+2.00 or other expressions. Though if you’re careful about blocking and error messages you can work around this.