--- loncom/homework/grades.pm 2013/08/28 04:26:45 1.596.2.12.2.20 +++ loncom/homework/grades.pm 2013/08/28 18:26:57 1.596.2.12.2.21 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.596.2.12.2.20 2013/08/28 04:26:45 raeburn Exp $ +# $Id: grades.pm,v 1.596.2.12.2.21 2013/08/28 18:26:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2230,7 +2230,7 @@ KEYWORDS # (for multi-response type part) # (3) Last submission plus the parts info # (4) The whole record for this student - if ($env{'form.lastSub'} =~ /^(lastonly|hdgrade)$/) { + my ($string,$timestamp)= &get_last_submission(\%record); my $lastsubonly; @@ -2285,7 +2285,7 @@ KEYWORDS $trial = $record{"resource.$partid.tries"}; $rndseed = $record{"resource.$partid.rndseed"}; } - if($env{'form.checkPlag'}){ + if ($env{'form.checkPlag'}) { my ($oname,$odom,$ocrsid,$oessay,$osim)= &most_similar($uname,$udom,$symb,$subval); if ($osim) { @@ -2313,9 +2313,8 @@ KEYWORDS } my $order=&get_order($partid,$respid,$symb,$uname,$udom, undef,$type,$trial,$rndseed); - if ($env{'form.lastSub'} eq 'lastonly' || - ($env{'form.lastSub'} eq 'hdgrade' && - $$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) { + if ($env{'form.lastSub'} eq 'lastonly' || $env{'form.lastSub'} eq 'datesub' || $env{'form.lastSub'} =~ /^(last|all)$/ || ($env{'form.lastSub'} eq 'hdgrade' && + $$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) { my $display_part=&get_display_part($partid,$symb); $lastsubonly.='
'. ''.&mt('Part: [_1]',$display_part).''. @@ -2358,10 +2357,11 @@ KEYWORDS $lastsubonly.='
'."\n"; # End: LC_grade_submissions_body } $request->print($lastsubonly); - } elsif ($env{'form.lastSub'} eq 'datesub') { + if ($env{'form.lastSub'} eq 'datesub') { my (undef,$responseType,undef,$parts) = &showResourceInfo($symb); $request->print(&displaySubByDates($symb,\%record,$parts,$responseType,$checkIcon,$uname,$udom)); - } elsif ($env{'form.lastSub'} =~ /^(last|all)$/) { + } + if ($env{'form.lastSub'} =~ /^(last|all)$/) { $request->print(&Apache::loncommon::get_previous_attempt($symb,$uname,$udom, $env{'request.course.id'}, $last,'.submission', @@ -6593,7 +6593,7 @@ sub scantron_process_corrections { '

' .&mt('Unable to accept last correction, an error occurred: [_1]', $errmsg) - .'

'; + .'

'); } else { &scantron_put_line($scanlines,$scan_data,$which,$line,$skip); &scantron_putfile($scanlines,$scan_data);