[system] Repository:
ViewVC logotype

Revision 2648

Jump to revision: Previous Next
Author: dpvc
Date: Thu Aug 19 12:38:47 2004 UTC (15 years, 2 months ago)
Log Message:
The answer checkers now work with subclasses of Formulas that are not
part of the Value:: package tree itself (we call Value::isFormula()
rather than checking the class directly).

I also removed the various cmp_* flags that stored method names as
they ended up not needing to be used (they were intended as a means of
overriding the default method names, but subclassing turned out to be
a better approach).

I moved some initialization of the answer checker out of the anonymous
subroutine that is installed in the checker and just have that
subroutine call the correct answer's main checker (which I renamed).

Finally, I changed the student_ans value to be an HTMLized version of
the student answer, since the student could include things like < in
his answer (e.g., for vectors), in which case his whole answer might
disappear.  I wonder if this couldn't be handled better at a higher
level, as it seems wrong to make the student_ans be HTML rather than
the parsed string.  I originally thought Problem.pm could do the
protecting of HTML special characters, but this won't work without
additional changes, since some answer checkers put HTML into
student_ans to mark sytanx errors in the student answer, and you DON'T
want to protect those HTML characters.  The student_ans field is
probably being misused in this, and there might want to be another
field that gets used by Problem.pm in place of student_ans (which can
be HTML protected) when it is non-empty; say student_HTML or something
like that.  The answer checkers could use that field if it wants to
add HTML to the student answer, and student_ans otherwise, with the
assurance that it's HTML characters will be protected.  That way, if a
second answer checker calls the first (like some list checkers do),
then the second checker doesn't have to worry about removing HTML from
the student ans, and doesn't ahve to wonder whether the student_ans
actually contains an error message or syntax markings rather than the
actual student answer.

Changed paths:

Path Details
Directorytrunk/pg/lib/Value/AnswerChecker.pm modified , text changed

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9