WeBWorK Main Forum

Gateway quiz and feedback messages

Gateway quiz and feedback messages

by Alex Jordan -
Number of replies: 0

Suppose you are using a Gateway Quiz where:

  • Students may "Grade Test" multiple times.
  • Scores are set to not be revealed until after the answer date.
You might have a question where certain incorrect answers normally generate feedback messages about the substance of the submitted answer (as opposed to the syntax). For example, the answer is the interval [0,1], and the student enters [0,2], and there could be a message that the right endpoint is incorrect.

Under the conditions listed in the bullets above, you do not want this message to get through to the student. If you wanted it to get through, I think you would not be blocking scores until the answer date.

So I edited a line (368) of Gateway.pm. I changed:
my $showMessages = $showAttemptAnswers && grep { $pg->{answers}->{$_}->{ans_message} } @answerNames;
my $showMessages = $showAttemptAnswers && grep { $pg->{answers}->{$_}->{ans_message} } @answerNames && $showAttemptResults;

This makes it so we don't show messages at all if we are not showing correct/incorrect status of a problem. It addresses the issue we identified. However, it overshoots. Because it also suppresses feedback messages from the pre-processor stage. Like if the answer were  the point (1,2) and the student typed "(1.2)" then I think you want them to see the message "your answer doesn't look like a point (it looks like a number)". You would also want this to come through if the student has clicked Preview.

Can we have a better solution to the issue than the one I am using? Is it possible to distinguish pre-processor messages from the answer checker messages?