Question Authors' Forum



by Anton Dil -
Number of replies: 2

I'm exploring adding output dependent on the number of attempts a student has made.

By way of experimenting, I tried printing this from a java template

public static void main(String[] args) {
        __tester__ main = new __tester__();

 System.out.println(" numchecks " + {{QUESTION.stepinfo.numchecks}});


However, this number is fixed at 0. Shouldn't it increase?

I expect I am missing something obvious...

In reply to Anton Dil

Re: Question.stepinfo

by Matthew Toohey -
Hi Anton

This works as expected for me.

Make sure you are making some change to the code in the answer box before you submit (such as adding extra spaces). If the code is identical to what was submitted previously the result is cached and the num checks will not increment.

In reply to Matthew Toohey

Re: Question.stepinfo

by Anton Dil -

Thank you Matthew - it was that simple! I wonder if this is documented.