[LON-CAPA-cvs] cvs: loncom /homework grades.pm

raeburn raeburn at source.lon-capa.org
Mon Jul 1 18:29:01 EDT 2024


raeburn		Mon Jul  1 22:29:01 2024 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - Fewer calls to &Apache::lonlocal::locallocaltime().
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.794 loncom/homework/grades.pm:1.795
--- loncom/homework/grades.pm:1.794	Mon Jul  1 20:22:34 2024
+++ loncom/homework/grades.pm	Mon Jul  1 22:29:01 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.794 2024/07/01 20:22:34 raeburn Exp $
+# $Id: grades.pm,v 1.795 2024/07/01 22:29:01 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2963,9 +2963,14 @@
                     $prevsolved{$partid} = $solved{$partid};
                 }
 	    }
-            $timestamp =
-                &Apache::lonlocal::locallocaltime($$returnhash{$version.':timestamp'});
 	}
+#
+# Timestamp is for last transaction for this resource, which does not
+# necessarily correspond to the time of last submission for problem (or part).
+#
+        if ($lasthash{'timestamp'} ne '') {
+            $timestamp = &Apache::lonlocal::locallocaltime($lasthash{'timestamp'});
+        }
         my (%typeparts,%randombytry);
         my $showsurv = 
             &Apache::lonnet::allowed('vas',$env{'request.course.id'});




More information about the LON-CAPA-cvs mailing list