--- loncom/homework/matchresponse.pm 2003/03/19 19:20:44 1.9 +++ loncom/homework/matchresponse.pm 2003/03/25 22:21:20 1.13 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Full matching style response # -# $Id: matchresponse.pm,v 1.9 2003/03/19 19:20:44 sakharuk Exp $ +# $Id: matchresponse.pm,v 1.13 2003/03/25 22:21:20 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -148,6 +148,7 @@ sub end_itemgroup { my $table=' \\\\\\\\ \begin{tabular}{ll} '; my $i=0; foreach my $name (@names) { + $Apache::response::itemgroup{$name.'.text'}=~s/\$\$/\$/g; $table.=' '.$alphabet[$i].' & '. $Apache::response::itemgroup{$name.'.text'}. ' \\\\ '; @@ -395,8 +396,6 @@ sub displayfoils { } else { if ($Apache::lonhomework::type ne 'exam') { $optionlist='\framebox[5 mm][s]{\tiny\strut}'; - } else { - $optionlist='\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]'; } } my $option; @@ -411,8 +410,6 @@ sub displayfoils { $optionlist='\n"; - } else { - $optionlist=$optionlist; } my $text=$Apache::response::foilgroup{$name.'.text'}; if ($target ne 'tex') { @@ -423,8 +420,9 @@ sub displayfoils { } else { if ($Apache::lonhomework::type eq 'exam') { $question.=' '.$optionlist.$text."\n"; - $question.=&Apache::optionresponse::bubbles(\@Items_letter,\@Items).'\end{enumerate} \vskip -7 mm \strut '; - &Apache::lonxml::increment_counter(); + my @emptyItems = (); + for (my $i=0;$i<=$#Items;$i++) {push @emptyItems, ' ';} + $question.='\vskip -2 mm\parbox{\textwidth}{\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\parbox{\textwidth - 5 mm}{'.&Apache::optionresponse::bubbles(\@Items_letter,\@emptyItems).'}\end{enumerate}} \vskip -3 mm \strut '; } else { $question.=' \\\\ '.$optionlist.$text."\n"; }