There is this prior thread, just change the conditions to suit your needs. I recommend thoroughly testing as you could lock students out of an entire activity if you haven’t coded well.
I’d also recommend adding another condition set to some variable you can toggle on an initial slide, so you don’t have to go through and answer every single question to test individual slides.
... when note1.script.testMode="yes" "" ...