I’m somewhat new to CL and slowly making my way through learning all the cool things from tons of cool people out there posting their activities. I’m having a little trouble on slide 4 figuring out how to make the submit button accept the answer or either 5,21 or 21,5. I’m not sure how to set up the latex/code for it. Any help would be much appreciated!
You could use countNumberUsage( ). First line checks if your button was recently pressed. The next two check if 21 and 5 are each used once. The last checks if there are only two numbers used. In your CL
check = this.timeSincePress( ) > 0
and countNumberUsage(inputName.latex,21) = 1
and countNumberUsage(inputName.latex,5) = 1
and countNumberUsage(inputName.latex) = 2
If you just want the checkmark for the dashboard, you can change check= to correct:. Otherwise, you can add another line correct: check in case you want to use check to give other feedback (like conditional content in a note).
Messing around with it some more I was able to figure out what I was doing wrong. Only thing I can’t seem to figure out is how to hold back the feedback of yes or no until the students hit the submit button on slide 4
parseOrderedPair accepts latex in the form (x,y), so if a student uses x= as you directed in other slides it won’t work. pair2 should work fine if they enter #,#. (I tried using parseEquation, but it didn’t work either.
And this should work fine once you’ve got your input figured out: