--- loncom/homework/optionresponse.pm 2004/01/06 20:37:29 1.97
+++ loncom/homework/optionresponse.pm 2004/02/19 21:55:54 1.102
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.97 2004/01/06 20:37:29 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.102 2004/02/19 21:55:54 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -43,7 +43,8 @@ sub start_optionresponse {
%Apache::hint::option=();
if ($target eq 'edit') {
$result.=&Apache::edit::start_table($token).
- "
Multiple Option Response Question ".
+ &Apache::loncommon::help_open_topic('Option_Response_Problems')." | Delete:".
&Apache::edit::deletelist($target,$token)
." | ".
&Apache::edit::end_row().
@@ -288,7 +289,7 @@ sub displayfoils {
my @falselist;
my $result;
my $name;
- my $displayoptionintex=0;
+ my $displayoptionintex=1;
my @alphabet = ('A'..'Z');
my @whichopt = &whichfoils($max,$randomize);
my $part=$Apache::inputtags::part;
@@ -302,13 +303,7 @@ sub displayfoils {
my $text=$Apache::response::foilgroup{$name.'.text'};
my %lastresponse=&Apache::lonnet::str2hash($Apache::lonhomework::history{"resource.$part.$id.submission"});
my $lastopt=$lastresponse{$name};
- if ($text!~/^\s*$/) {
- if ($target eq 'tex') {
- $break='\vskip 0 mm ';
- } elsif ($target eq 'web') {
- $break=' ';
- }
- }
+ if ($text!~/^\s*$/) { $break=' '; }
$result.=$break;
if ($target eq 'web') {
my $value=$Apache::response::foilgroup{$name.'.value'};
@@ -322,18 +317,9 @@ sub displayfoils {
$text=''.$text;
}
$result.=$text."\n";
- } elsif ($target eq 'tex') {
- $Apache::response::foilgroup{$name.'.text'}=~s/\\item//;
- if ($max>1) {$result .='\item ';}
- $result .=' \textit{'.$Apache::response::foilgroup{$name.'.value'}.'}'.
- ":".$Apache::response::foilgroup{$name.'.text'}."\n";
}
if ($Apache::lonhomework::type eq 'exam') {
- if ($target ne 'tex') {
$result.=&webbubbles(\@opt,\@alphabet,$temp,$lastopt);
- } else {
- $result.=&bubbles(\@alphabet,\@opt);
- }
}
$temp++;
}
@@ -362,66 +348,55 @@ sub displayfoils {
}
if ($target ne 'tex') {
if ($Apache::lonhomework::type ne 'exam') {
- $optionlist=' |