Submit Code & Previous/Back Arrow

Can someone figure out how to fix my code so my students cannot go back to the assignment unless I input a code?

I setup the test so they cannot see their results unless they submitted. My first iteration had it change every screen to “Your test is submitted” I didn’t like that because it made it more difficult to debrief their test, and to see where a certain student was having difficulties.

So this new iteration, they submit their test and then they can see their results. If they accidentally submit or some students are allowed to correct their test, I wanted students to be able to go back through. I thought I had it coded so they could only go back with a specific code and once they restarted the test, they would not be able to see their results unless they resubmitted. However, I had a few tricky students who never input the code, but were able to go back and continued to see their results so they could “correct” by guess and check.

I got it! In this line:

hidden: when input20.submitCount=1 true otherwise false

You assume the student only presses the button once. However, if they just press it again, submitCount will be greater than 1 (2, 3, 4 …) and causing the whole test to be enabled again. Just change the = to >= and your sneaky students will be mad.

Edit: Also change input20 to submit

Tip: If you ever use a conditional (i.e. when-otherwise) that has true and false outputs, you’ll always be able to shorten it to some form of the condition:
hidden: input20.submitCount >= 1

… since that output is a boolean anyway.

+1 to using >= as there have been instances of button mashing moving past conditions!

When I try as a student, if I exit the activity, and then “Continue activity” it starts me back at Screen 1, so you’d need a start screen locking the next button as well. So may have nothing to do with the code.

I think the submit.submitCount >= 1 is necessary because students can just press it again to make it unhide.

I’m not sure what you mean. I was agreeing saying to definitely use >= because on slower computers it’s possible to get an extra button click in before it registers that it’s supposed to be hidden, which ensures that it gets hidden regardless of button count > 0.

Oh sorry, I must have misread or misunderstood what you were saying. Sorry for the confusion.