[system] / trunk / pg / macros / problemPreserveAnswers.pl Repository:
ViewVC logotype

Log of /trunk/pg/macros/problemPreserveAnswers.pl

Parent Directory Parent Directory

Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 5342 - (view) (download) (as text) (annotate) - [select for diffs]
Added Fri Aug 17 01:59:33 2007 UTC (12 years, 5 months ago) by dpvc
File length: 2129 byte(s)
This is a temporary hack that allows sticky answers to preserve all
the characters the student typed.  PGbasicmacros.pl currently removes
several characters, including $, which is needed for monitary
answers.  Eventually, PGbasicmacros.pl should be fixed, but for now
this will work, and it should not cause trouble after PGbasicmacros.pl
is fixed.  In the end, this file can be emptied, then it should issue
a warning message, and finally it can be removed.

The hack is to copy the inputs_ref and modify the answers so that the
PGbasicmacros.pl macros will not remove those characters (the key is
to convert them to HTML entities instead).  Then after the problem has
been processed, we put the original answers back so that the answer
checkers will work properly on them.  This is accomplished by
replacing ENDDOCUMENT with a new routine that first puts back the
answers and then calls the old ENDDOCUMENT.  This has the unwanted
side effect of putting error messages into the error log, but I can't
seem to work around that.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9