Keeping track of how many times students check their work

This is the activity in question, particularly screens 3 & 5.

I am working on preventing students from just clicking until it says correct so I have this on the “check” button:

p=this.pressCount
disabled: this.pressCount=3
label: “Check 1 & 2”

resetLabel: “Try Again”

and then this on the note component:

content: when q31.matchesKey and q32.matchesKey and button31.pressCount>0 “Good Job!” otherwise " "

I like that without the “Good Job” students know to click the “Try Again”, but students can also just click the options until “Good Job” appears. If I had to guess, the issue is in the pressCount portion of the note, but I am officially out of ideas :rofl: thank you so much for your help

Okay, I’ve found the problem, but I don’t know how to fix it. It’s when students press the check button. When they do, its allows the note to show whenever it wants. My idea is to do something like:

set state to 1 when the submit button is pressed
set note content to "Good Job" if state is 1 and answers are all correct
set state to 0 after correctness is evaluated
# this allows the note component to only evaluate once

would you like the button to reset once students start to change their answer? if so add this to each MC component:
selected =
when this.isSelected(1) 1
when this.isSelected(2) 2
when this.isSelected(3) 3
when this.isSelected(4) 4
otherwise 0

then in the button you can add:

resetOnChange: "${q31.script.selected},${q32.script.selected}"

and on the note that shows “good job” replace
button31.pressCount>0 with button31.timeSincePress>0

1 Like

oh that’s very smart… I was not aware of resetOnChange. Does that also reset the timeSincePress?

yes, resetOnChange will reset the timeSincePress

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.