| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Program Generation Language |
2 | # WeBWorK Program Generation Language |
| 3 | # Copyright 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: pg/macros/PGbasicmacros.pl,v 1.62 2009/07/18 02:50:50 gage Exp $ |
4 | # $CVSHeader: pg/macros/PGbasicmacros.pl,v 1.63 2010/01/07 18:02:53 jj Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 351 | $tcol = $tcol < 40 ? $tcol : 40; ## get min |
351 | $tcol = $tcol < 40 ? $tcol : 40; ## get min |
| 352 | |
352 | |
| 353 | MODES( |
353 | MODES( |
| 354 | TeX => "\\mbox{\\parbox[t]{${tcol}ex}{\\hrulefill}}", |
354 | TeX => "\\mbox{\\parbox[t]{${tcol}ex}{\\hrulefill}}", |
| 355 | Latex2HTML => qq!\\begin{rawhtml}<INPUT TYPE=TEXT SIZE=$col NAME=\"$name\" VALUE = \"\">\\end{rawhtml}!, |
355 | Latex2HTML => qq!\\begin{rawhtml}<INPUT TYPE=TEXT SIZE=$col NAME=\"$name\" VALUE = \"\">\\end{rawhtml}!, |
| 356 | HTML => qq!<INPUT TYPE=HIDDEN SIZE=$col NAME="$name" VALUE="$answer_value">!. |
356 | HTML => qq!<INPUT TYPE=HIDDEN SIZE=$col NAME="$name" id ="$name" VALUE="$answer_value">!. |
| 357 | qq!<INPUT TYPE=HIDDEN NAME="previous_$name" VALUE="$answer_value">! |
357 | qq!<INPUT TYPE=HIDDEN NAME="previous_$name" id = "previous_$name" VALUE="$answer_value">! |
| 358 | ); |
358 | ); |
| 359 | } |
359 | } |
| 360 | sub NAMED_ANS_RULE_OPTION { # deprecated |
360 | sub NAMED_ANS_RULE_OPTION { # deprecated |
| 361 | &NAMED_ANS_RULE_EXTENSION; |
361 | &NAMED_ANS_RULE_EXTENSION; |
| 362 | } |
362 | } |
| … | |
… | |
| 375 | $tcol = $tcol < 40 ? $tcol : 40; ## get min |
375 | $tcol = $tcol < 40 ? $tcol : 40; ## get min |
| 376 | MODES( |
376 | MODES( |
| 377 | TeX => "\\mbox{\\parbox[t]{${tcol}ex}{\\hrulefill}}", |
377 | TeX => "\\mbox{\\parbox[t]{${tcol}ex}{\\hrulefill}}", |
| 378 | Latex2HTML => qq!\\begin{rawhtml}\n<INPUT TYPE=TEXT SIZE=$col NAME="$name" id="$name" VALUE = " ">\n\\end{rawhtml}\n!, |
378 | Latex2HTML => qq!\\begin{rawhtml}\n<INPUT TYPE=TEXT SIZE=$col NAME="$name" id="$name" VALUE = " ">\n\\end{rawhtml}\n!, |
| 379 | HTML => qq!<INPUT TYPE=TEXT SIZE=$col NAME = "$name" id="$name" VALUE = "$answer_value">!. |
379 | HTML => qq!<INPUT TYPE=TEXT SIZE=$col NAME = "$name" id="$name" VALUE = "$answer_value">!. |
| 380 | qq!<INPUT TYPE=HIDDEN NAME="previous_$name" VALUE = "$answer_value">! |
380 | qq!<INPUT TYPE=HIDDEN NAME="previous_$name" id="previous_$name" VALUE = "$answer_value">! |
| 381 | ); |
381 | ); |
| 382 | } |
382 | } |
| 383 | |
383 | |
| 384 | sub ANS_RULE { #deprecated |
384 | sub ANS_RULE { #deprecated |
| 385 | my($number,$col) = @_; |
385 | my($number,$col) = @_; |