## Developers' Forum

### Feature suggestion: 'Reset question' button?

by Chris Nelson -
Number of replies: 8

Hi Richard,

Final suggestion from STEM colleagues :-) Again, it's from their use of informal/ungraded CR use.

The request is to add an optional 'Reset question' ("Start again"?) button. This would allow students to return to the start of the question after they have got it correct.

It could be tied to the score, so that it only shows on 0-score questions, with a confirmation box. That would stop students accidentally losing all of their work in more formal/summative contexts.

If you agree that this would be a useful feature, we're happy to contribute it.

Best wishes,

Chris.

### Re: Feature suggestion: 'Reset question' button?

by Richard Lobb -

Sorry, but I don't understand what is meant by "return to the start of the question". How is this different from select all then delete (CTRL-A, Backspace)?

### Re: Feature suggestion: 'Reset question' button?

by Chris Nelson -

Hi Richard,

Thank you for getting back to my posts so quickly :-)

I'm just using a demo quiz for this, but attachment CR01 shows a 'pristine' CR question. If you submit a response, but then remove the text to have another go, you are still left with the 'Test' table underneath, as shown in attachment CR02.

I understand that what my colleagues are asking for is a way to reset the question, including the test table, within an attempt.

So just to explain the use-case a bit better: the (informal, all questions are zero/ungraded) CR quiz is set up as various activities that the student must work through over several weeks. The course team would like students to be able to reset individual questions, because at the moment, the student has the submit the whole quiz attempt to start a completely new fresh question attempt.

Best wishes,

Chris.

### Re: Feature suggestion: 'Reset question' button?

by Richard Lobb -

I'm having trouble getting enthused about this one. I'm still not entirely sure of the expected semantics of the button. What, for example, would a teacher expect to see in the question's Review panel? And if there's randomisation, would you expect to get a new random variant or not?

Certainly it's not acceptable to me to reset the question in the sense of deleting all question attempt steps to date - rewinding history is anathema.

There is a question state notstarted, so it might be possible to have an extra button that resets the question to that state, but it still makes me nervous. There could well be assumptions within the question engine that would be contradicted by telling a lie like that.  And I find the idea of a button that mysteriously appears only with 0-mark questions a bit inelegant. The alternative - an extra UI button to turn this feature on - feels like feature bloat and I wouldn't be keen on that.

However, here's a much simpler idea, which might be good enough. There's a Reset question button that's displayed whenever there's a non-empty answer-box preload for the question. This warns students that they're about to lose all their current edits, but if they say OK, the answer-box is reset to its preload state. Although it doesn't currently do so, I think it would be OK if a reset button click also hid the Result Table. If it did that, and you preloaded all 0-mark question answer boxes with a comment like

# You can reset this question at any time with the Reset button.

Note that:

1. This is a local in-browser reset only. If the page is reloaded after clicking the button the state will revert to the non-reset state. The reset doesn't become "hard" until a new answer is (Pre)checked. But it is at least guaranteed not to cause any unpleasant side effects in the question engine.
2. If the question has built-in randomisation, you would still be dealing with the original variant - you wouldn't get a new random version of the question.

Another possible approach  which appeals more to me would be to allow the question author to relabel the "Precheck" button with a custom label. Then, using a combinator template grader the question author could place any desired interpretation on such button clicks. In your case, you could display a message saying the question had been reset in lieu of a result table. There would still need to be a way to reset the current answer, but I'm pretty sure we could find a way to do that. However, this approach still doesn't allow generation of an alternative randomisation of the question.

An even more general extension of the above is to allow question authors to add arbitrarily many additional custom buttons, but I fear we're again getting into feature bloat.

I'd be interested to hear Tim's and your team's thoughts on this request and the various possible solutions.

### Re: Feature suggestion: 'Reset question' button?

by Tim Hunt -

One other thought:

The reason that the usual button ('Try another question like this one' in a quiz with the right settings, 'Start again for embedded questions) never appears, is because with the adaptive behaviour, the question never 'finishes'

I forget, does the coderunner-adaptive behaviour suffer from the issue that the General feedback never appears during the quiz attempt, only after the whole quiz attempt is submitted?

So, the alternative suggesion would be to add a 'Give up' button (at the question author's option). That would stop the question, and show the general feedback - and hence allow the normal buttons to appear. Just a possible idea.

### Re: Feature suggestion: 'Reset question' button?

by Chris Nelson -

That's a good suggestion, Tim - that would let the student 'signal' they want to stop (and start afresh) while getting 0 marks (if there were any ever in play) but also receive the general feedback, which could help them learn from their experience and get it right on the second attempt.

I suppose that in this particular proposed use case, CodeRunner is being used more as a 'learning activity' than an assessment question per se, so STEM colleagues wouldn't be so worried about scores or number of attempts (other than students eventually complete the question). So having such a 'give up' button could be limited to 0-score questions only if that's preferable to more general changes.

### Re: Feature suggestion: 'Reset question' button?

by Anton Dil -
I like the idea of a 'give up' button, but colleagues have wondered whether there might be a more sympathetic wording. I'm not sure what it would be. I suppose that we can always reveal an answer in a discussion of a coderunner activity outside of the question itself.

### Re: Feature suggestion: 'Reset question' button?

by Chris Nelson -

'Show feedback' would be clear wording for a 'give up' button.

That would then display the Overall Feedback text, and then allow the student to 'Try another question like this one'/'Start again'.