Many thanks Tim. I agree that this is something several people have asked for ,so while I'm not sure it's something I want to use myself, I'm more than happy to have it as an option. I like that its availability can be set to Always, Never or When mark cannot be improved.
The two things that do worry me a bit are the wording and the button location and style. One poster has suggested that the wording might be author-customisable and I rather like that idea. I can imagine different users wanting to provide very different forms of feedback (particularly in the case of non-programming questions) and being able to specify more exactly what happens when the button is clicked would be nice. For example "Abandon and see answer", "Give up and move on". Also, the wording "Stop and read final feedback" might be open to misinterpretation if people see it as similar to "Stop and think about the problem", expecting to continue after having read the feedback. Granted, they'd soon learn the error of their ways, so this certainly isn't a show stopper, but might happen occasionally.
So, I'm wondering: how much effort would it be to have an option for the author to provide alternative wording, if they chose to?
The other concern relates to the position and style of the button. We use the Preview button on most but not all of our questions. This means that the Check button might be alone, or the rightmost of 2 buttons or the leftmost of 2 buttons, or the centre of 3 buttons. I feel that that's not good UI design. So ... would it be possible to float the new button to the right-hand side, and preferably colour it differently? Red might be nice :)
Lastly some musing (longish) ...
From a pedagogical standpoint I'm not all that keen on providing students with any sort of "Give up" button, particularly if what it presents is the answer. Students like to believe that they can learn to program by reading answers to questions - it's so much quicker and easier than actually writing them, right? But in my experience they're deluding themselves and I'm very reluctant to give them that easy out. But it's hard to see what else you could provide, other than the answer. If it's a hint for solving the question, then it's too late as the question is now closed. And anyway, providing hints for programming questions is extremely problematic because different students get stuck in a myriad of different ways. The only idea we've come in our teaching team discussions that would keep the learning process going is to provide students with a Parsons Problem version of the question. While it's probably much easier than the raw question, and should be worth less marks, it at least keeps the active learning going. We do have the option in our current question type to provide a scrambled answer (like a Parsons problem) to students after a given number of failed attempts, but it's not very intuitive. What I'd much prefer is a button that students could click to change the mode of a question to a Parsons problem, forfeiting some but not all of the marks in the process.
So can you see where this is taking me ... ?
I'm wondering if we could can think of the new button as a Custom button, where the author chooses the text (possibly from a drop down with 'Customise' as one of the options) and where the action can be either to abort the question (as with your implementation) or merely to set another question state variable, like the Preview button, that the question author can then use within the template for whatever purposes they want?
I accept that this involves more work than the current one, and complicates the UI but I think the complication could be minimised if the Customise behaviour were available only via a checkbox or at the bottom of a dropdown.
What do you think? Is it worth pondering further on this? We're at the end of semester here and things will be pretty busy until the end of exams (11 November) but after that I hope to have some time to put into CodeRunner development.