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

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 28 Jul 2003 15:30:47 -0000


matthew		Mon Jul 28 11:30:47 2003 EDT

  Modified files:              
    /loncom/interface/statistics	lonproblemstatistics.pm 
  Log:
  Bug 1663 - brief explainatory notes about the statistics fields are now 
  included in Excel output.  Ought to go in to 1.0.
  
  
Index: loncom/interface/statistics/lonproblemstatistics.pm
diff -u loncom/interface/statistics/lonproblemstatistics.pm:1.54 loncom/interface/statistics/lonproblemstatistics.pm:1.55
--- loncom/interface/statistics/lonproblemstatistics.pm:1.54	Mon Jun 16 11:54:58 2003
+++ loncom/interface/statistics/lonproblemstatistics.pm	Mon Jul 28 11:30:46 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemstatistics.pm,v 1.54 2003/06/16 15:54:58 matthew Exp $
+# $Id: lonproblemstatistics.pm,v 1.55 2003/07/28 15:30:46 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -75,7 +75,8 @@
            { name   => 'part', 
              title  => 'Part',
              align  => 'left',
-             color  => '#FFFFE6' },
+             color  => '#FFFFE6',
+             },
            { name   => 'num_students',
              title  => '#Stdnts',
              align  => 'right',
@@ -131,7 +132,8 @@
              format => '%5.2f',
              sortable  => 'yes',
              graphable => 'yes',
-             long_title => 'Degree of Difficulty' },
+             long_title => 'Degree of Difficulty'.
+                           '[ 1 - ((#YES+#yes) / Tries) ]'},
            { name   => 'num_solved',
              title  => '#YES',
              align  => 'right',
@@ -155,7 +157,7 @@
              format => '%4.1f',
              sortable  => 'yes',
              graphable => 'yes',
-             long_title => 'Percent Wrong' },
+             long_title => 'Percent of students whose final answer is wrong' },
 );
 
 ###############################################
@@ -645,7 +647,19 @@
     $rows_output++; 
     $cols_output=0;
     #
-    # Add the headers
+    # Long Headersheaders
+    foreach my $field (@Fields) {
+        next if ($field->{'name'} eq 'problem_num');
+        if (exists($field->{'long_title'})) {
+            $excel_sheet->write($rows_output,$cols_output++,
+                                $field->{'long_title'});
+        } else {
+            $excel_sheet->write($rows_output,$cols_output++,'');
+        }
+    }
+    $rows_output++;
+    $cols_output=0;
+    # Brief headers
     foreach my $field (@Fields) {
         next if ($field->{'name'} eq 'problem_num');
         $excel_sheet->write($rows_output,$cols_output++,$field->{'title'});