Table assessment for correctness

I have these tables that require the students to input numbers and it will assess correctness. Two questions:

  1. when they get something wrong, is there any code to make the note specifically say which input is incorrect?

  2. Is there a way to assess correctness without them having to hit the submit button? On my activities that are equation input, the second that the student types the correct function the note will update and say “correct”. Is that possible with a table, or do they have to hit submit?

UPDATE: figured out the 2nd one, just need help with the first one now

To answer your first question, I’ve used this suggestion by @Daniel_Grubbs a lot. Since you don’t need to press submit, just add another column in your table and have the content set to display a certain emoji depending on whether the answer is correct.

I am working with that now, but I am struggling a bit on how to reassign some of the code with a button missing. The button was capturing the inputs and then telling the table to assess. Without the button, how do I still capture the inputs?

my code, found only in the notes section:

figure1number = table3.cellNumericValue(1,3)
figure2number = table3.cellNumericValue(2,3)
figure3number = table3.cellNumericValue(3,3)
figure4number = table3.cellNumericValue(4,3)
figure5number = table3.cellNumericValue(5,3)

correct = when (figure1number =7 or figure1number=2)
and (figure2number = 5 or figure2number = 9)
and (figure3number = 15 or figure3number = 3)
and figure4number = 9
and (figure5number = 13 or figure5number = 4) “Correct” otherwise “Not there yet, keep working”

content:

"Complete the table by writing in which angle will make the statement true

Your answer: ${correct}."


His code:
table section:
check1=when this.cellContent(1,2)=“1” 1
otherwise 0

check2=when this.cellContent(2,2)=“2” 1
otherwise 0

check3=when simpleFunction(this.cellContent(3,1)).evaluateAt(2)=simpleFunction(this.cellContent(3,2)).evaluateAt(2) 1
otherwise 0

check4=when this.cellContent(4,2)=“4” 1
otherwise 0

cellContent(1,3): when Button3.lastValue(“r_1”)=1 “:white_check_mark:
when Button3.lastValue(“r_1”)=0 “:x:
otherwise “”

cellContent(2,3): when Button3.lastValue(“r_2”)=1 “:white_check_mark:
when Button3.lastValue(“r_2”)=0 “:x:
otherwise “”

cellContent(3,3): when Button3.lastValue(“r_3”)=1 “:white_check_mark:
when Button3.lastValue(“r_3”)=0 “:x:
otherwise “”

cellContent(4,3): when Button3.lastValue(“r_4”)=1 “:white_check_mark:
when Button3.lastValue(“r_4”)=0 “:x:
otherwise “”

Button section:
#Conditional label with limited number of button presses

pressLeft=simpleFunction(“5-x”,“x”).evaluateAt(this.pressCount)

disabled: this.pressCount=5

label: when this.pressCount =0 “Check Your Answer (5 left)”
otherwise “Check Again (${pressLeft} left)”

capture(“r_1”): Table3.script.check1
capture(“r_2”): Table3.script.check2
capture(“r_3”): Table3.script.check3
capture(“r_4”): Table3.script.check4

capture is only a button command. I use it so that the correctness doesn’t change as soon as the student enters an answer. If you don’t care about that, you can just set the correctness to whatever value you’re looking for without a button.

So, say you have a check1 variable, just set your correctness to that instead of the capture. Using capture just allows me to only check answers when the button is clicked, instead of correctness being assessed constantly.

Edit: It also allowed me to limit student attempts. (I didn’t want them to just keep trying each answer without any understanding. I’m forcing them to commit to an answer before checking it’s correctness.)

I took a look at your activity and got you started on the code you referenced. All your work needs to be done in the table component. I copied some code over from your note component to the table, but the initialCellContent is what you will need.

Random question as I looked at your activity – how did you manage to put the check mark and x icons in? I can copy and paste them from your code for use – but I’m curious how you got them there in the first place.

Someone posted this link that I bookmarked. It’s not easy to navigate, so I copied most of what I like to use to blank activity and I copy/paste from there. (Note: the checkmark actually shows as gray check instead of green on the chromebooks my students use)

Edit: Actually, here it is.