Trying to create self-checking graphs/equations. Latex is not matching

I was able to find an example of what you meant (i followed this thread from you Check Algebraic Expression Answer). I have defined a check1 variable that evaluates the equation they type in. However, now I am trying to make it say correct when check1 is true. How would I type this in to code so that it says

content
when submitted and ${check1}=true