--- 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('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);