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

Diff of /trunk/pg/macros/PGbasicmacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3520 Revision 3543
284 # it must be evaluated at run time 284 # it must be evaluated at run time
285 $answer_value= '' unless defined($answer_value); 285 $answer_value= '' unless defined($answer_value);
286 } 286 }
287 287
288 $answer_value =~ tr/\\$@`//d; ## make sure student answers can not be interpolated by e.g. EV3 288 $answer_value =~ tr/\\$@`//d; ## make sure student answers can not be interpolated by e.g. EV3
289 $answer_value =~ s/\s+/ /g; ## remove excessive whitespace from student answer
289 $name = RECORD_ANS_NAME($name); 290 $name = RECORD_ANS_NAME($name);
290 291
291 my $tcol = $col/2 > 3 ? $col/2 : 3; ## get max 292 my $tcol = $col/2 > 3 ? $col/2 : 3; ## get max
292 $tcol = $tcol < 40 ? $tcol : 40; ## get min 293 $tcol = $tcol < 40 ? $tcol : 40; ## get min
293 294
310 if ( defined( $rh_sticky_answers->{$name} ) ) { 311 if ( defined( $rh_sticky_answers->{$name} ) ) {
311 $answer_value = shift( @{ $rh_sticky_answers->{$name} }); 312 $answer_value = shift( @{ $rh_sticky_answers->{$name} });
312 $answer_value = '' unless defined($answer_value); 313 $answer_value = '' unless defined($answer_value);
313 } 314 }
314 $answer_value =~ tr/\\$@`//d; ## make sure student answers can not be interpolated by e.g. EV3 315 $answer_value =~ tr/\\$@`//d; ## make sure student answers can not be interpolated by e.g. EV3
316 $answer_value =~ s/\s+/ /g; ## remove excessive whitespace from student answer
315 my $tcol = $col/2 > 3 ? $col/2 : 3; ## get max 317 my $tcol = $col/2 > 3 ? $col/2 : 3; ## get max
316 $tcol = $tcol < 40 ? $tcol : 40; ## get min 318 $tcol = $tcol < 40 ? $tcol : 40; ## get min
317 MODES( 319 MODES(
318 TeX => "\\mbox{\\parbox[t]{${tcol}ex}{\\hrulefill}}", 320 TeX => "\\mbox{\\parbox[t]{${tcol}ex}{\\hrulefill}}",
319 Latex2HTML => qq!\\begin{rawhtml}\n<INPUT TYPE=TEXT SIZE=$col NAME=\"$name\" VALUE = \"\">\n\\end{rawhtml}\n!, 321 Latex2HTML => qq!\\begin{rawhtml}\n<INPUT TYPE=TEXT SIZE=$col NAME=\"$name\" VALUE = \"\">\n\\end{rawhtml}\n!,
1619 $out = &M3("{\\bf ${probNum}.} ($problemValue $points) ", 1621 $out = &M3("{\\bf ${probNum}.} ($problemValue $points) ",
1620 "($problemValue $points) ", 1622 "($problemValue $points) ",
1621 "($problemValue $points) " 1623 "($problemValue $points) "
1622 ) if ($problemValue ne ""); 1624 ) if ($problemValue ne "");
1623 } 1625 }
1626 $out .= '<BLOCKQUOTE>
1627 <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#AAAAAA><TR><TD><TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>';
1624 $out; 1628 $out;
1625 1629
1626} 1630}
1627 1631
1628sub nicestring { 1632sub nicestring {

Legend:
Removed from v.3520  
changed lines
  Added in v.3543

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9