--- loncom/homework/rankresponse.pm 2003/05/16 20:16:18 1.13 +++ loncom/homework/rankresponse.pm 2003/07/16 13:14:12 1.16 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # rank style response # -# $Id: rankresponse.pm,v 1.13 2003/05/16 20:16:18 albertel Exp $ +# $Id: rankresponse.pm,v 1.16 2003/07/16 13:14:12 sakharuk Exp $ # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -104,6 +104,9 @@ sub end_foilgroup { } elsif ( $target eq 'grade') { &grade_response($max,$randomize,$tol); } + &Apache::lonxml::increment_counter(&getfoilcounts($max)); + } elsif ($target eq 'edit') { + $result=&Apache::edit::end_table(); } return $result; } @@ -252,6 +255,7 @@ sub displayfoils { my $lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"}; my %lastresponse=&Apache::lonnet::str2hash($lastresponse); my @alp = splice @alphabet, 0, $#whichopt + 1; + my $internal_counter=$Apache::lonxml::counter; foreach my $name (@whichfoils) { my $lastopt=$lastresponse{$name}; my $optionlist=''; @@ -284,9 +288,10 @@ sub displayfoils { } else { if ($Apache::lonhomework::type eq 'exam') { $result.='\vskip 0 mm '.$text.' \vskip -3 mm '."\n"; - $result.='\vskip -5 mm\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\parbox{\textwidth - 5 mm}{'.&Apache::optionresponse::bubbles(\@alp,\@whichopt).'}\end{enumerate} \vskip -5 mm \strut '; + $result.='\vskip -5 mm\begin{enumerate}\item[\textbf{'.$internal_counter.'}.]\parbox{\textwidth - 5 mm}{'.&Apache::optionresponse::bubbles(\@alp,\@whichopt).'}\end{enumerate} \vskip -5 mm \strut '; + $internal_counter++; } else { - $result.=' \\\\ \framebox[5 mm][s]{\tiny\strut} '.$text."\n"; + $result.=' \vskip 0mm \framebox[5 mm][s]{\tiny\strut} '.$text."\n"; } } $temp++;