[LON-CAPA-cvs] cvs: loncom /interface/statistics longradinganalysis.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 14 Feb 2006 16:34:46 -0000


albertel		Tue Feb 14 11:34:46 2006 EDT

  Modified files:              
    /loncom/interface/statistics	longradinganalysis.pm 
  Log:
  - only count the last grading event for a particular bridge task 'event'
  
  
Index: loncom/interface/statistics/longradinganalysis.pm
diff -u loncom/interface/statistics/longradinganalysis.pm:1.1 loncom/interface/statistics/longradinganalysis.pm:1.2
--- loncom/interface/statistics/longradinganalysis.pm:1.1	Tue Feb 14 11:05:46 2006
+++ loncom/interface/statistics/longradinganalysis.pm	Tue Feb 14 11:34:46 2006
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: longradinganalysis.pm,v 1.1 2006/02/14 16:05:46 albertel Exp $
+# $Id: longradinganalysis.pm,v 1.2 2006/02/14 16:34:46 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -158,12 +158,21 @@
 	my %data =  &Apache::lonnet::restore($problem->symb(),
 					     $env{'request.course.id'},
 					     $sdom,$sname);
+	my $last_grader;
 	foreach my $ver (0..$data{'version'}) {
 	    if (exists($data{"$ver:resource.0.regrader"})
 		&& $data{"$ver:resource.0.regrader"} =~ /\S/) {
-		$graders{$data{"$ver:resource.0.regrader"}}++;
+		$last_grader=$data{"$ver:resource.0.regrader"};
 	    }
+	    if (exists($data{"$ver:resource.0.version"})
+		&& $last_grader =~ /\S/) {
+		$graders{$last_grader}++;
+	    }
+	}
+	if ($last_grader =~ /\S/) {
+	    $graders{$last_grader}++;
 	}
+
 	&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,
                                                  &mt('last student'));