[LON-CAPA-cvs] cvs: loncom /interface lonquickgrades.pm
www
www@source.lon-capa.org
Thu, 02 Jun 2011 01:34:34 -0000
www Thu Jun 2 01:34:34 2011 EDT
Modified files:
/loncom/interface lonquickgrades.pm
Log:
Another 30% time savings
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.97 loncom/interface/lonquickgrades.pm:1.98
--- loncom/interface/lonquickgrades.pm:1.97 Wed Jun 1 21:32:50 2011
+++ loncom/interface/lonquickgrades.pm Thu Jun 2 01:34:34 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Quick Student Grades Display
#
-# $Id: lonquickgrades.pm,v 1.97 2011/06/01 21:32:50 www Exp $
+# $Id: lonquickgrades.pm,v 1.98 2011/06/02 01:34:34 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -35,6 +35,17 @@
use Apache::lonlocal;
use Apache::lonnet;
use Apache::grades;
+use Time::HiRes;
+my $time=0;
+
+sub tim {
+ my ($label)=@_;
+ my $tt=&Time::HiRes::time();
+ my $dt=$tt-$time;
+ &Apache::lonnet::logthis("qg $label ".$dt);
+ $time=$tt;
+}
+
sub handler {
my $r = shift;
@@ -242,12 +253,11 @@
my $stack = $iterator->getStack();
for my $part (@{$parts}) {
- my $completionStatus = $curRes->getCompletionStatus($part);
my $dateStatus = $curRes->getDateStatus($part);
my $weight = $curRes->weight($part);
my $problemstatus = $curRes->problemstatus($part);
- if ($completionStatus == $curRes->EXCUSED()) {
+ if ($curRes->solved($part) eq 'excused') {
next;
}
if ($showPoints) {