--- loncom/homework/grades.pm 2023/04/02 03:16:28 1.793 +++ loncom/homework/grades.pm 2024/07/01 22:29:01 1.795 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.793 2023/04/02 03:16:28 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 @@ sub get_last_submission { $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'}); @@ -3848,8 +3853,8 @@ sub version_portfiles { $$record{$key} = join(',',@versioned_portfiles); push(@returned_keys,$key); } - } - return (@returned_keys); + } + return (@returned_keys); } #--------------------------------------------------------------------------------------