--- loncom/homework/optionresponse.pm 2002/11/07 16:45:55 1.58
+++ loncom/homework/optionresponse.pm 2002/11/10 15:51:31 1.59
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.58 2002/11/07 16:45:55 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.59 2002/11/10 15:51:31 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -327,8 +327,12 @@ sub displayfoils {
$result.='\vskip 0 mm ';
}
if ($target ne 'tex') {
- $result .=$Apache::response::foilgroup{$name.'.value'}.
- ":".$Apache::response::foilgroup{$name.'.text'}."\n";
+ my $text=$Apache::response::foilgroup{$name.'.text'};
+ my $value=$Apache::response::foilgroup{$name.'.value'};
+ if (!($text=~s||$value|)) {
+ $text=$value.': '.$text;
+ }
+ $result.=$text."\n";
} else {
$Apache::response::foilgroup{$name.'.text'}=~s/\\item//;
$result .='\item \textit{'.$Apache::response::foilgroup{$name.'.value'}.'}'.
@@ -358,9 +362,14 @@ sub displayfoils {
}
}
if ($target ne 'tex') {
- $result.="
\n".$Apache::response::foilgroup{$name.'.text'}."\n";
+ $optionlist='\n";
+ my $text=$Apache::response::foilgroup{$name.'.text'};
+ if (!($text=~s||$optionlist|)) {
+ $text=$optionlist.$text;
+ }
+ $result.="
".$text."\n";
if ($Apache::lonhomework::type eq 'exam') {
$result.=&webbubbles(\@opt,\@alphabet);
}