Diff for /loncom/interface/statistics/lonproblemstatistics.pm between versions 1.59 and 1.60

version 1.59, 2003/09/29 16:20:18 version 1.60, 2003/10/24 13:36:16
Line 751  sub plot_statistics { Line 751  sub plot_statistics {
         }          }
     }      }
           
     $r->print("<p>".&DrawGraph(\@Data,$title,'Problem Number',$yaxis,      $r->print("<p>".&Apache::loncommon::DrawBarGraph($title,
                                $Max)."</p>\n");                                                       'Problem Number',
                                                        $yaxis,
                                                        $Max,
                                                        undef,
                                                        \@Data)."</p>\n");
     #      #
     # Print out the data      # Print out the data
     $ENV{'form.sortby'} = 'Contents';      $ENV{'form.sortby'} = 'Contents';
Line 760  sub plot_statistics { Line 764  sub plot_statistics {
     return;      return;
 }  }
   
 ###############################################  
 ###############################################  
   
 =pod   
   
 =item &DrawGraph()  
   
 =cut  
   
 ###############################################  
 ###############################################  
 sub DrawGraph {  
     my ($values,$title,$xaxis,$yaxis,$Max)=@_;  
     $title = '' if (! defined($title));  
     $xaxis = '' if (! defined($xaxis));  
     $yaxis = '' if (! defined($yaxis));  
     $title = &Apache::lonnet::escape($title);  
     $xaxis = &Apache::lonnet::escape($xaxis);  
     $yaxis = &Apache::lonnet::escape($yaxis);  
     #  
     my $sendValues = join(',', @$values);  
     my $sendCount = scalar(@$values);  
     $Max =1 if ($Max < 1);  
     if ( int($Max) < $Max ) {  
         $Max++;  
         $Max = int($Max);  
     }  
     my @GData = ($title,$xaxis,$yaxis,$Max,$sendCount,$sendValues);  
     return '<IMG src="/cgi-bin/graph.png?'.  
         (join('&', @GData)).'" border="1" />';  
 }  
   
 sub get_statistics {  sub get_statistics {
     my ($sequence,$resource,$part,$problem_num) = @_;      my ($sequence,$resource,$part,$problem_num) = @_;
     #      #

Removed from v.1.59  
changed lines
  Added in v.1.60


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>