Hi All,

I'm wondering if there's a way to give a custom error message when a student enters DNE as an answer. For example, we have a limit problem in our calc 1 course where students calculate both one-sided limits and then calculate the two-sided limit (or enter DNE).

In this particular problem, the limit does exist and I have this custom checker:

ANS( $ans1 -> cmp( checker => sub {

my ($correct,$student,$anshash) = @_;

### THIS LINE MAKES SURE THE ANSWER BOX ISN'T BLANK

return 0 unless $anshash->{original_student_ans} =~ /~~S/;

Value::Error("Hint: Are your answers to the previous two parts equal?")

if ($correct != $student);

return ($correct == $student);

})->withPreFilter('erase')->withPostFilter('erase'));

$ans1 has a numeric value. If the student enters any incorrect numeric value, the hint/message is displayed. But if the student enters "dne", the message is not displayed. Is there something I can do to display a message when a student enters "dne"? Thanks!

-- C