I cannot get the CL correct to match the latex in the student’s input so that they receive the “correct” response. Any suggestions are appreciated.
I don’t understand what you mean by “match”. Do you want to see if the Math Response matches the Correct Answer note (that can be done easily with correct: ), or something else?
It looks like you have an extra set of curly braces surrounding graph27.number(`f`) in the latex you’re trying to match. It’s generally not recommended to try to match strings because it’s inflexible. For example, your initialLatex has a space in the sine function which if not removed will never match your intended answer, so it may be to your benefit to remove the initial space.
It’s generally recommended to use evaluative and/or pattern-based correctness. Here I’m taking the left and right hand sides and comparing the values of each to what is expected, as well as comparing the form of the fractions on each side. (I’ve put the correctness in the input, and referenced correct in the note.) I’d initially tried using a .differenceFunction() (i.e. lhs-rhs) to check it was within a tolerance, but the rounding of angle measure in the graph was throwing that off a bit.
The answer note is temporary. It shows the correct response which I should be able to copy and paste resulting in the correct answer feedback. But, this is not working.
Thank you for finding and correcting the error.
Thank you for the recommendation using the .differenceFunction( )
I would not actually recommend differenceFunction() here unless you’re okay with a more lenient tolerance, but you’d still want the pattern match in there too. Otherwise, any true equation would be marked correct.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.