From: jj v. a. <we...@ma...> - 2005-08-21 18:11:10
|
Log Message: ----------- Should fix bug 696 by replacing consecutive whitespace with a single space for answers in an individual ans_rule. Modified Files: -------------- pg/macros: PGbasicmacros.pl Revision Data ------------- Index: PGbasicmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v retrieving revision 1.39 retrieving revision 1.40 diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.39 -r1.40 --- macros/PGbasicmacros.pl +++ macros/PGbasicmacros.pl @@ -286,6 +286,7 @@ } $answer_value =~ tr/\\$@`//d; ## make sure student answers can not be interpolated by e.g. EV3 + $answer_value =~ s/\s+/ /g; ## remove excessive whitespace from student answer $name = RECORD_ANS_NAME($name); my $tcol = $col/2 > 3 ? $col/2 : 3; ## get max @@ -312,6 +313,7 @@ $answer_value = '' unless defined($answer_value); } $answer_value =~ tr/\\$@`//d; ## make sure student answers can not be interpolated by e.g. EV3 + $answer_value =~ s/\s+/ /g; ## remove excessive whitespace from student answer my $tcol = $col/2 > 3 ? $col/2 : 3; ## get max $tcol = $tcol < 40 ? $tcol : 40; ## get min MODES( @@ -1621,6 +1623,8 @@ "($problemValue $points) " ) if ($problemValue ne ""); } + $out .= '<BLOCKQUOTE> + <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#AAAAAA><TR><TD><TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>'; $out; } |