Thanks for the answer Glenn! Unfortunately, I copy-pasted your code into the relevant parts of my problem, and the grader seems to think there's no answer checker associated with the object. I am afraid that I am not knowledgeable enough about the underlying mechanics of filters and answer checking to troubleshoot this.
I will add that your code works when it's isolated in its own problem, but I cannot fathom what about my implementation represents a substantial deviation. I apologize for not being savvy enough to figure this out myself.
Here is the code I tried (I left out the $oddChecker and $neitherChecker subs because they're irrelevant and work as intended). I believe that the relevant portions are identical to your example, but I still get the "No answer evaluator for the question labeled: AnSwEr0003" error when viewing the problem. In case it matters, the server is running version 2.16, not 2.17.
DOCUMENT();
loadMacros(
"PGstandard.pl",
"PGML.pl",
"MathObjects.pl",
"PGcourse.pl",
"parserGraphTool.pl", # use custom answer checker to mark diff point choices
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
Context("Numeric");
$graph0 = GraphTool("{parabola,solid,vertical,(0,0),(1,1)}")->with(cmpOptions => { checker => $evenChecker });
$graph2 = GraphTool("{parabola,solid,vertical,(1,0),(2,1)}")->with(cmpOptions => { checker => $neitherChecker });
# Some shenanigans are required in order to allow a blank graph to be marked correct
$gt = GraphTool()->with(
bBox => [-20, 20, 20, -20],
ticksDistanceX => 4, ticksDistanceY => 4,
minorTicksX => 3, minorTicksY => 3,
ariaDescription => 'Graph a parabola that represents an odd function.',
cmpOptions => { list_checker => sub { return 0; } }
);
my $cmp = $gt->cmp->withPreFilter('erase')->withPostFilter(sub {
my $ans = shift;
$ans->{score} = 1 if $ans->{student_value} eq '';
return $ans;
});
######################################################################
BEGIN_PGML
If possible, draw parabolas (using a solid line) which satisfy each of the following conditions individually. If it is impossible to satisfy a condition, just leave the graph empty.
a. A parabola which is an even function
[_]{$graph0}
a. A parabola which is an odd function
[@ $gt->ans_rule @]*
a. A parabola which is neither even nor odd
[_]{$graph2}
END_PGML
LABELED_ANS($gt->ANS_NAME, $cmp);
######################################################################
ENDDOCUMENT();