--- loncom/homework/grades.pm 2007/09/07 00:07:30 1.439 +++ loncom/homework/grades.pm 2007/09/27 19:44:51 1.441 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.439 2007/09/07 00:07:30 albertel Exp $ +# $Id: grades.pm,v 1.441 2007/09/27 19:44:51 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -349,7 +349,10 @@ sub cleanRecord { $result.=''; return $result; } - + } elsif ( $response =~ m/(?:numerical|formula)/) { + $answer = + &Apache::loncommon::format_previous_attempt_value('submission', + $answer); } return $answer; } @@ -1703,7 +1706,6 @@ sub submission { $udom = ($udom eq '' ? $env{'user.domain'} : $udom); #has form.userdom changed for a student? my $usec = &Apache::lonnet::getsection($udom,$uname,$env{'request.course.id'}); $env{'form.fullname'} = &Apache::loncommon::plainname($uname,$udom,'lastname') if $env{'form.fullname'} eq ''; - my $symb = &get_symb($request); if ($symb eq '') { $request->print("Unable to handle ambiguous references:."); return ''; } @@ -1756,7 +1758,7 @@ sub submission { &Apache::lonxml::clear_problem_counter(); $request->print(&show_problem($request,$symb,$uname,$udom,0,1,$mode)); } - + # kwclr is the only variable that is guaranteed to be non blank # if this subroutine has been called once. my %keyhash = (); @@ -1841,8 +1843,13 @@ KEYWORDS } } +# This is where output for one specific student would start + my $bgcolor='#DDEEDD'; + if (int($counter/2) eq $counter) { $bgcolor='#DDDDEE'; } + $request->print("\n\n". + '

'.$env{'form.fullname'}.'
'); + if ($env{'form.vProb'} eq 'all' or $env{'form.vAns'} eq 'all') { - $request->print('


') if ($counter > 0); my $mode; if ($env{'form.vProb'} eq 'all' && $env{'form.vAns'} eq 'all') { $mode='both'; @@ -2112,6 +2119,11 @@ KEYWORDS } $request->print($result.'
'."\n"); +# Done with printing info for one student + + $request->print('

'); + + # print end of form if ($counter == $total) { my $endform='
'."\n";