--- loncom/homework/optionresponse.pm 2002/11/10 15:51:31 1.59 +++ loncom/homework/optionresponse.pm 2002/11/11 20:13:47 1.61 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: optionresponse.pm,v 1.59 2002/11/10 15:51:31 albertel Exp $ +# $Id: optionresponse.pm,v 1.61 2002/11/11 20:13:47 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -375,14 +375,17 @@ sub displayfoils { } $temp++; } else { + my $texoptionlist = &optionlist_correction($optionlist); if ($displayoptionintex == 0) { - my $texoptionlist = &optionlist_correction($optionlist); - if ($Apache::lonhomework::type eq 'exam') {$texoptionlist='';} + if ($Apache::lonhomework::type eq 'exam') {$texoptionlist='';} #if exam we do not need to show optionlist if ($Apache::response::foilgroup{$name.'.text'}=~m/\\item /) { - if ($Apache::lonhomework::type eq 'exam') { - $Apache::response::foilgroup{$name.'.text'}=~s/\\item/\\item[\\textbf{$Apache::lonxml::counter}\.]/; - } - $result.= $texoptionlist.$Apache::response::foilgroup{$name.'.text'}; + if ($Apache::lonhomework::type eq 'exam') { + $Apache::response::foilgroup{$name.'.text'}=~s/\\item/\\item[\\textbf{$Apache::lonxml::counter}\.]/; + } + if ($Apache::response::foilgroup{$name.'.text'}=~//) { + $Apache::response::foilgroup{$name.'.text'}=~s|| \\makebox\[0\.3in\]\[b\]\{\\hrulefill\} |; + $result.= $texoptionlist.$Apache::response::foilgroup{$name.'.text'}; + } } else { if ($Apache::lonhomework::type eq 'exam') { $result.= $texoptionlist.'\vspace*{-2 mm}\item[\textbf{'.$Apache::lonxml::counter.'}.]'.$Apache::response::foilgroup{$name.'.text'}; @@ -399,7 +402,10 @@ sub displayfoils { if ($Apache::lonhomework::type eq 'exam') { $Apache::response::foilgroup{$name.'.text'}=~s/\\item/\\item[\\textbf{$Apache::lonxml::counter}\.]/; } - $result.= $Apache::response::foilgroup{$name.'.text'}; + if ($Apache::response::foilgroup{$name.'.text'}=~//) { + $Apache::response::foilgroup{$name.'.text'}=~s|| \\makebox\[0\.3in\]\[b\]\{\\hrulefill\} |; + } + $result.= $Apache::response::foilgroup{$name.'.text'}; } else { if ($Apache::lonhomework::type eq 'exam') { $result.= '\item[\textbf{'.$Apache::lonxml::counter.'}.]'.$Apache::response::foilgroup{$name.'.text'};