[LON-CAPA-cvs] cvs: loncom /homework optionresponse.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 06 Feb 2006 21:59:23 -0000
albertel Mon Feb 6 16:59:23 2006 EDT
Modified files:
/loncom/homework optionresponse.pm
Log:
- add texoptions 'nochoice' to Edit interface
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.131 loncom/homework/optionresponse.pm:1.132
--- loncom/homework/optionresponse.pm:1.131 Thu Feb 2 15:36:07 2006
+++ loncom/homework/optionresponse.pm Mon Feb 6 16:59:23 2006
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.131 2006/02/02 20:36:07 albertel Exp $
+# $Id: optionresponse.pm,v 1.132 2006/02/06 21:59:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -114,6 +114,9 @@
<td>Delete an Option:
<select name="$Apache::lonxml::curdepth.deleteopt">$optionlist</select>
ENDTABLE
+ $result.= &Apache::edit::checked_arg('Print options:','texoptions',
+ [ ['nochoice','Don\'t show option list'] ]
+ ,$token);
$result.= &Apache::edit::end_row();
$result.= &Apache::edit::start_spanning_row();
$result.= $insertlist.'<br />';
@@ -137,7 +140,9 @@
}
$optchanged=1;
}
- if ($optchanged) {
+ my $rebuildtag = &Apache::edit::get_new_args($token,$parstack,$safeeval,
+ ('texoptions'));
+ if ($optchanged || $rebuildtag ) {
$result = "<foilgroup options=\"(";
foreach my $option (@options) {
$option=~s/\'/\\\'/g;
@@ -145,7 +150,9 @@
$result .="'".$option."',";
}
chop $result;
- $result.=')">';
+ $result.=')" ';
+ $result .= 'texoptions="'.$token->[2]{'texoptions'}.'" ';
+ $result .= '>';
} # else nothing changed so just use the default mechanism
}
if ($target eq 'tex' and $Apache::lonhomework::type ne 'exam') {