--- loncom/homework/grades.pm 2013/08/14 03:33:54 1.596.2.12.2.18
+++ 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.18 2013/08/14 03:33:54 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
#
@@ -2061,7 +2061,7 @@ sub submission {
$request->print(&show_problem($request,$symb,$uname,$udom,0,1,$mode));
}
- # kwclr is the only variable that is guaranteed to be non blank
+ # kwclr is the only variable that is guaranteed not to be blank
# if this subroutine has been called once.
my %keyhash = ();
if ($env{'form.kwclr'} eq '' && $env{'form.handgrade'} eq 'yes') {
@@ -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.='