WeBWorK Problems

modify parserFormulaUpToConstant.pl?

modify parserFormulaUpToConstant.pl?

by Chrissy Safranski -
Number of replies: 2
There were several old threads about this, but the only fixes seem to be problem by problem, and I have done it successfully on key introductory problems, but I really don't want to edit every integration problem in my course and add a post filter.

The problem: a student forgets the +C, gets marked incorrect with the message, "Your answer is not the most general solution." Student adds +C, gets marked correct, with the message, "This answer is equivalent to the one you just submitted." Except of course, that the two answers are not equivalent - one is wrong while one is right.

Can I modify parserFormulaUpToConstant.pl to suppress that message, or to not check the student's previous answer, and put it in my macros folder to fix this?
In reply to Chrissy Safranski

Re: modify parserFormulaUpToConstant.pl?

by Davide Cervone -
You can make a copy of parserFormulaUpToConstant.pl in your templates/macros folder, and add
sub cmp_postfilter {
  my $self = shift;
  return shift;
to the copy, say right after the sub cmp_defaults line. That will prevent the equivalence check from running.