--- loncom/homework/optionresponse.pm 2003/07/01 20:12:55 1.79
+++ loncom/homework/optionresponse.pm 2003/07/25 20:56:08 1.82
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.79 2003/07/01 20:12:55 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.82 2003/07/25 20:56:08 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -152,9 +152,11 @@ sub end_foilgroup {
my $result;
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || $target eq 'tex' || $target eq 'analyze') {
+ my $tex_option_switch=&Apache::lonxml::get_param('texoptions',$parstack,$safeeval);
my $name;
my @opt;
eval '@opt ='.&Apache::lonxml::get_param('options',$parstack,$safeeval);
+ if ($target eq 'tex' && $tex_option_switch eq 'nochoice') {@opt=();}
&Apache::lonxml::debug("Options are $#opt");
my $max = &Apache::lonxml::get_param('max',$parstack,$safeeval,'-2');
my $randomize = &Apache::lonxml::get_param('randomize',$parstack,
@@ -326,7 +328,8 @@ sub displayfoils {
$result.=$text."\n";
} elsif ($target eq 'tex') {
$Apache::response::foilgroup{$name.'.text'}=~s/\\item//;
- $result .='\item \textit{'.$Apache::response::foilgroup{$name.'.value'}.'}'.
+ if ($max>1) {$result .='\item ';}
+ $result .=' \textit{'.$Apache::response::foilgroup{$name.'.value'}.'}'.
":".$Apache::response::foilgroup{$name.'.text'}."\n";
}
if ($Apache::lonhomework::type eq 'exam') {
@@ -434,15 +437,19 @@ sub displayfoils {
sub optionlist_correction {
my $texoptionlist = shift;
- $texoptionlist =~ s/