[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 1384 Revision 1385
284 } 284 }
285 285
286 $answer_value =~ tr/\\$@`//d; ## make sure student answers can not be interpolated by e.g. EV3 286 $answer_value =~ tr/\\$@`//d; ## make sure student answers can not be interpolated by e.g. EV3
287 $name = RECORD_ANS_NAME($name); 287 $name = RECORD_ANS_NAME($name);
288 288
289 # incorporated Davide Cervone's changes 289 # incorporated Davide Cervone's changes
290 # removed newlines from around <INPUT> tags 290 # removed newlines from around <INPUT> tags
291 # made TeX rule be based on specified width rather than varying size. 291 # made TeX rule be based on specified width rather than varying size.
292 292 my $tcol = $col/2 > 3 ? $col/2 : 3; ## get max
293 my $tcol = min(max($col/2,3),40); 293 $tcol = $tcol < 40 ? $tcol : 40; ## get min
294 294
295 MODES( 295 MODES(
296 TeX => "\\mbox{\\parbox[t]{${tcol}ex}{\\hrulefill}}", 296 TeX => "\\mbox{\\parbox[t]{${tcol}ex}{\\hrulefill}}",
297 Latex2HTML => qq!\\begin{rawhtml}<INPUT TYPE=TEXT SIZE=$col NAME=\"$name\" VALUE = \"\">\\end{rawhtml}!, 297 Latex2HTML => qq!\\begin{rawhtml}<INPUT TYPE=TEXT SIZE=$col NAME=\"$name\" VALUE = \"\">\\end{rawhtml}!,
298 HTML => "<INPUT TYPE=TEXT SIZE=$col NAME=\"$name\" VALUE = \"$answer_value\">" 298 HTML => "<INPUT TYPE=TEXT SIZE=$col NAME=\"$name\" VALUE = \"$answer_value\">"

Legend:
Removed from v.1384  
changed lines
  Added in v.1385

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9