Red warning triangle

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).

Hi - thanks for the idea but I want the £ to be at the start of the input rather than at the end. What I really need is a prefix option! :smiley:

2 Likes

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 @Jay , any chance this can be added to the computation layer for math input?
Or is there a workaround?
Thanks!

1 Like

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?

1 Like

I put the $ sign as the initial.latex in this math input, but it won’t show a :heavy_check_mark:︎ mark on the teacher dashboard. when it checks for correct.

As for other prefix symbols- I can’t think of any. Thanks!

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.

Thanks! I’ll try countNumberUsage

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
1 Like

Hi @Jay - 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?

Thank you!

Nothing yet, sorry. We’ll keep it on our radar

1 Like