--- branches/rel-2-4-patches/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm 2009/06/26 00:36:15 6062 +++ branches/rel-2-4-patches/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm 2009/06/26 00:37:00 6063 @@ -1,7 +1,7 @@ ################################################################################ # WeBWorK Online Homework Delivery System # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ -# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm,v 1.34 2007/03/26 20:26:57 sh002i Exp $ +# $CVSHeader$ # # This program is free software; you can redistribute it and/or modify it under # the terms of either: (a) the GNU General Public License as published by the @@ -553,10 +553,12 @@ if ( defined($userSet) ) { $dateOfTest = localtime($userSet->version_creation_time()); if ( defined($userSet->version_last_attempt_time()) && $userSet->version_last_attempt_time() ) { - $testTime = ($userSet->version_last_attempt_time() - $userSet->version_creation_time() ) / 60; + $testTime = ($userSet->version_last_attempt_time() - $userSet->open_date() ) / 60; my $timeLimit = $userSet->version_time_limit()/60; $testTime = $timeLimit if ( $testTime > $timeLimit ); $testTime = sprintf("%3.1f min", $testTime); + } elsif ( time() - $userSet->open_date() < $userSet->version_time_limit() ) { + $testTime = 'still open'; } else { $testTime = 'time limit ' . 'exceeded';