WeBWorK Problems

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?

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.

Re: Error messages when an interval DNE

by Sean Fitzpatrick -
Thank you!

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.