Teacher dashboard for multiple mathinputs

I have three math input boxes asking for a b and c. I am trying to get a check mark when all three answers are correct. This is what I have in the final input box. It is not working. (No error message, so not sure why not working)

correct: mthwhatsa.numericValue=1 and mthwhatsb.numericValue=-5 and mathwhatsc.numericValue=5

Also, in the interest of learning the programming, Can you do something with a counter?

Numcorrect = 0 , and then add 1 each time they get the correct answer, and then correct: Numcorrect = 3

If possible, I would like to see that code, because I think that would help me with other types of problems.

I am really just learning this, so any help would be appreciated.

You need correct sinks for each input. (Or readOnly: true in the first two.)

You can use a button to capture numeric values each time a button is pressed. I think you’ll need a graph component to work with the numberList, but you can hide it.

  1. Make a correctness check for whatever conditions you want. This sets check=1 if correct and 0 if incorrect.
check=when this.numericValue=10 1
      otherwise 0
  1. Make a capture in the button CL. This creates a list of 1’s and 0’s from the input component’s variable, check.
capture("check"): inputName.script.check
  1. In the graph CL, create a list from the capture history, and find the sum of the elements of that list (you could put the second part in the graph if you wanted)
numberList("L"): buttonName.history("check")
Numcorrect = numericValue("\total(L)")

You could use the button pressCount for the number of questions attempted if you needed it as well.