--- loncom/interface/statistics/lonproblemstatistics.pm 2002/11/01 22:09:39 1.35
+++ loncom/interface/statistics/lonproblemstatistics.pm 2002/11/12 19:52:46 1.36
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonproblemstatistics.pm,v 1.35 2002/11/01 22:09:39 minaeibi Exp $
+# $Id: lonproblemstatistics.pm,v 1.36 2002/11/12 19:52:46 minaeibi Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -35,7 +35,7 @@
#
###
-package Apache::lonproblemstatistics;
+package Apache::lonproblemstatistics;
use strict;
use Apache::lonnet();
@@ -221,7 +221,7 @@ sub BuildProblemStatisticsPage {
sub BuildGraphicChart {
my ($graph,$cacheDB,$courseDescription,$students,$courseID,$r,$c)=@_;
my %cache;
- my $max = 0;
+ my $max;
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {
return 'Unable to tie database.7';
}
@@ -258,11 +258,12 @@ sub BuildGraphicChart {
&DrawGraph(\@values,$courseDescription,$title,$max,$r);
}
if($sortProblems eq 'Sort Within Sequence') {
- $r->print(''.$cache{$sequence.':title'}.'');
+ $r->print('
'.$cache{$sequence.':title'}.''."\n");
}
$currentSequence = $sequence;
@values = ();
+ $max=0;
}
my $data = 0;
if($graph eq 'DoDiffGraph') {
@@ -287,21 +288,27 @@ sub DrawGraph {
my ($values,$courseDescription,$title,$Max,$r)=@_;
my $sendValues = join(',', @$values);
my $sendCount = scalar(@$values);
-
+ $r->print("
The Maximum Value is: $Max");
if ( $Max > 1 ) {
if ($Max % 10) {
- $Max++;
+ if ( int($Max) < $Max ) {
+ $Max++;
+ $Max = int($Max);
+ }
}
- #(10 - $Max % 10);
- $Max = int($Max);
+ #(10 - $Max % 10);
} else { $Max = 1; }
- my @GData = ($courseDescription, 'Problem_number',
- $title, $Max, $sendCount, $sendValues);
- $r->print(''."\n");
+# my @GData = ($courseDescription, 'Problem_number',
+# $title, $Max, $sendCount, $sendValues);
+ my @GData = ('','Problem_number',$title,$Max,$sendCount,$sendValues);
+
+# $r->print(''."\n");
+ $r->print('
'."\n");
$r->print('');
- $r->print('