Change status (Correct/Incorrect) of CodeRunner question in Summary of attempt

Change status (Correct/Incorrect) of CodeRunner question in Summary of attempt

by Joseph Tonien -
Number of replies: 3

Hi all,

Is there a way to change the status (Correct/Incorrect) of question in a quiz?

I have a quiz which contains CodeRunner questions and in the summary after the quiz, it displays the status "Correct/Incorrect".

Is there a way to change "Correct/Incorrect" into something like "Your answer has been saved"?

Summary of attempt

Question Status

1 Correct

2 Incorrect

In reply to Joseph Tonien

Re: Change status (Correct/Incorrect) of CodeRunner question in Summary of attempt

by Richard Lobb -

CodeRunner questions were intended as programming questions to run in Adaptive Mode. In an Adaptive Mode quiz it makes sense for questions to display as Correct/Incorrect, although Tim Hunt also added the state Prechecked for cases where you have enabled a Precheck button. Even in a quiz running in, say, Deferred Feedback mode I still think it's appropriate to display Correct/Incorrect/Prechecked, since students should be given the opportunity to check their code (and should do so).

However, a problem does arise when you start using CodeRunner for non-programming questions such as with the TableUI, HTML-UI or even Gapfiller-UI, particularly if you have no Precheck button and you also hide the Check button (a feature only added at the start of this year). Is that the situation that's causing you concern?

I think it should be possible for the CodeRunner question-behaviour module to set a state of saved if the user enters or changes an answer and navigates away or clicks submit. Perhaps Tim Hunt can confirm that this is suitable solution? If so, I'll put this on my todo list for the coming summer break, when I do most of my development (I live in the Southern Hemisphere - so think November/December).

One idea in the meantime: this year, when using HTML UI questions in an exam we made a point of giving students a Precheck button, which did sanity checks on their answers and set the state to Prechecked. It can also be used to provide reassuring comments like "Your non-empty answer has been saved and will be marked when the quiz is submitted." Would that help you deal with your situation?

In reply to Richard Lobb

Re: Change status (Correct/Incorrect) of CodeRunner question in Summary of attempt

by Joseph Tonien -

Thanks Richard,

Is there a way to just show Precheck button with status "precheck" in the summary, and then hide the "check" button.

I have some questions where I put a few test cases and some code passes these test cases, but when I mark, I add some more test cases, and then the code has bug so it fails additional tests. So i want to display message "prechecked" only, and warning that it may fail during marking with additiona test.

In reply to Joseph Tonien

Re: Change status (Correct/Incorrect) of CodeRunner question in Summary of attempt

by Richard Lobb -

Giving students some of the test cases up-front with a pre-check but then deferring final marking to the end of the assessment is an interesting way to mark. We've never tried it. I assume you'd move to a partial marking system, rather than all-or-nothing, for such questions?

To answer your original question: since CodeRunner 4.0.1 (available at moodle.org since March 2021, earlier on github) there's a Hide check checkbox in the author-edit form. So I'm guessing you're running an earlier version, in which case you'd have to use the JavaScript hack described in this thread.

With that in place, you can safely set the Precheck mode to Examples or Selected to run a subset of the testcases on Precheck. If you're using the JavaScript hack, it's still possible for a suitably smart student to enable the check button and submit anyway, but such a student is probably also sufficiently smart to realise that their submission history will show exactly what they did and to infer the likely consequences.

I was perhaps a little rash to suggest the Precheck message could also display a warning that final testing may fail. We can do that with our in-house question types because we use combinator template graders and can customise messages that come before or after the result table. Unless you're doing something similar, the best you'll be able to do is write a special Precheck test case that explicitly prints that message, which will appear in both the Expected and Got columns of the result table. Not pretty, but workable? Or (easier) just explain to everyone in the class how Prechecks work and what a Status of Precheck results means when they're making their final submission.