WeBWorK Problems

Error messages when an interval DNE

Error messages when an interval DNE

by Sean Fitzpatrick -
Number of replies: 4
I've noticed the following behaviour on some of our curve sketching problems:

We'll ask for intervals of increase/decrease (or concave up/down), and of course, there are cases where a function is never decreasing (for example), so the correct answer for that interval is "DNE".

The trouble is that DNE is understood as a numerical value, even when the context is set to interval. So if a student does not enter DNE for their answer, the feedback message they get warns them that their answer is not a number (and looks like an interval).

This mostly confuses students, except for a small fraction who have clued in that this is a sign that WeBWorK is looking for DNE as the answer, who then get more of a hint than we might have intended.

Short of writing custom feedback for all these problems, is there a way to produce a more useful feedback message?
In reply to Sean Fitzpatrick

Re: Error messages when an interval DNE

by Davide Cervone -
You need to use the matchType option for the answer checker to tell MathObejct what the expected type of the answer is when it is not a number. See the section of the AnswerChecker documentation on Answer Checkers for Lists for more information, and also the purple section of this example.

In reply to Davide Cervone

Re: Error messages when an interval DNE

by Danny Glin -
As a follow up I recommend using "None" as the answer instead of DNE since "None" is already an accepted answer when using lists. I haven't tried but you may have the opposite problem as well, namely when there are correct intervals and a student enters "DNE" WeBWorK will tell them that DNE is not defined in this context.
In reply to Danny Glin

Re: Error messages when an interval DNE

by Sean Fitzpatrick -
Thanks for the suggestion. I think the use of DNE here is because one of the common complaints we used to receive from students when we used problems from the OPL was the shifting syntax:
They found it frustrating to have to enter 'DNE' in one question, and then 'None' for the same response in the same context, in the very next question (and possibly other variations as well).
When we started building our own question bank we wanted to maintain consistent syntax so students could focus on figuring out the math rather than the interface.

Here I don't think we're taking lists as answers anyway: when there's more than one interval they're expected to use a union.