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

matthew lon-capa-cvs@mail.lon-capa.org
Fri, 10 Dec 2004 20:14:16 -0000


matthew		Fri Dec 10 15:14:16 2004 EDT

  Modified files:              
    /loncom/interface/statistics	loncorrectproblemplot.pm 
  Log:
  Show the maximum possible when computing for 'all' sequences.
  
  
Index: loncom/interface/statistics/loncorrectproblemplot.pm
diff -u loncom/interface/statistics/loncorrectproblemplot.pm:1.12 loncom/interface/statistics/loncorrectproblemplot.pm:1.13
--- loncom/interface/statistics/loncorrectproblemplot.pm:1.12	Wed Oct  6 10:21:57 2004
+++ loncom/interface/statistics/loncorrectproblemplot.pm	Fri Dec 10 15:14:16 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncorrectproblemplot.pm,v 1.12 2004/10/06 14:21:57 matthew Exp $
+# $Id: loncorrectproblemplot.pm,v 1.13 2004/12/10 20:14:16 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -110,6 +110,14 @@
                     }
                 }
             }
+        } else {
+            $title = "All Problems";
+            foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()){
+                foreach my $res (@{$seq->{'contents'}}) {
+                    next if ($res->{'type'} ne 'assessment');
+                    $total_parts += scalar(@{$res->{'parts'}});
+                }
+            }
         }
         my ($starttime,$endtime) = &Apache::lonstathelpers::get_time_limits();
         if (defined($starttime) || defined($endtime)) {
@@ -186,7 +194,7 @@
     $Str .= "</table><br />\n";
     $title = &HTML::Entities::decode($title);
     $Str = "\n<p>".&Apache::loncommon::DrawBarGraph($title.' N = '.$sum,
-                                 'Num Correct Problems (max:'.$total_parts.')',
+                                 'Correct Problems (max possible = '.$total_parts.')',
                                                        'Number of students',
                                                        $max,
                                                        undef, # colors