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

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 01 Apr 2004 21:35:52 -0000


matthew		Thu Apr  1 16:35:52 2004 EDT

  Modified files:              
    /loncom/interface/statistics	lonproblemstatistics.pm 
  Log:
  degrees and tries statistics plots: Change title based on width of plot,
  changed names of plot that appear in selection box, now appear at the top
  of the drop-down list instead of the bottom, added y-axis label to 
  the tries statistics plot.
  
  
Index: loncom/interface/statistics/lonproblemstatistics.pm
diff -u loncom/interface/statistics/lonproblemstatistics.pm:1.80 loncom/interface/statistics/lonproblemstatistics.pm:1.81
--- loncom/interface/statistics/lonproblemstatistics.pm:1.80	Thu Apr  1 16:14:32 2004
+++ loncom/interface/statistics/lonproblemstatistics.pm	Thu Apr  1 16:35:52 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemstatistics.pm,v 1.80 2004/04/01 21:14:32 matthew Exp $
+# $Id: lonproblemstatistics.pm,v 1.81 2004/04/01 21:35:52 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -970,6 +970,11 @@
     my $diffdata .= '<data>'.join(',',@Labels).'</data>'.$/.
                     '<data>'.join(',',@Diff).'</data>'.$/;
     #
+    my $title = 'Degree of Discrimination\nand Degree of Difficulty';
+    if ($xmax > 50) {
+        $title = 'Degree of Discrimination and Degree of Difficulty';
+    }
+    #
     $plot=<<"END";
 <gnuplot 
     texfont="10"
@@ -980,7 +985,7 @@
     align="center"
     border="on"
     transparent="on"
-    alttag="Sample Plot"
+    alttag="Degree of Discrimination and Degree of Difficulty Plot"
     samples="100"
     bgcolor="xffffff"
     height="$height"
@@ -989,7 +994,7 @@
         pos="top right"
         title=""
         box="off" />
-    <title>Degree of Discrmination and Degree of Difficulty</title>
+    <title>$title</title>
     <axis xmin="0" ymin="$ymin" xmax="$xmax" ymax="$ymax" color="x000000" />
     <xlabel>Problem Number</xlabel>
     <curve 
@@ -1053,6 +1058,11 @@
                           '<data>'.join(',',@Mean).'</data>'.$/.
                           '<data>'.join(',',@STD).'</data>'.$/;
     #
+    my $title = 'Mean and S.D. of Tries';
+    if ($xmax > 25) {
+        $title = 'Mean and Standard Deviation of Tries';
+    }
+    #
     $plot=<<"END";
 <gnuplot 
     texfont="10"
@@ -1063,14 +1073,15 @@
     align="center"
     border="on"
     transparent="on"
-    alttag="Sample Plot"
+    alttag="Mean and S.D of Tries Plot"
     samples="100"
     bgcolor="xffffff"
     height="$height"
     width="$width">
-    <title>Mean and S.D. of Tries</title>
+    <title>$title</title>
     <axis xmin="0" ymin="0" xmax="$xmax" ymax="$ymax" color="x000000" />
     <xlabel>Problem Number</xlabel>
+    <ylabel>Number of Tries</ylabel>
     <curve 
         linestyle="yerrorbars"
         name="S.D. Tries" 
@@ -1103,15 +1114,15 @@
     my @Additional_Plots = (
                             { graphable=>'yes',
                               name => 'degrees',
-                              title => 'DoDisc and DoDiff' },
+                              title => 'Difficulty Indexes' },
                             { graphable=>'yes',
                               name => 'tries statistics',
-                              title => 'Mean and S.D. of Tries' });
+                              title => 'Tries Statistics' });
     #
     my $Str= "\n".'<select name="plot" size="1">';
     $Str .= '<option name="none"></option>'."\n";
     $Str .= '<option name="none2">none</option>'."\n";
-    foreach my $field (@Fields,@Additional_Plots) {
+    foreach my $field (@Additional_Plots,@Fields) {
         if (! exists($field->{'graphable'}) ||
             $field->{'graphable'} ne 'yes') {
             next;