--- loncom/interface/Attic/lonchart.pm 2001/12/18 22:22:13 1.25
+++ loncom/interface/Attic/lonchart.pm 2001/12/20 20:47:53 1.26
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonchart.pm,v 1.25 2001/12/18 22:22:13 minaeibi Exp $
+# $Id: lonchart.pm,v 1.26 2001/12/20 20:47:53 minaeibi Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,6 +44,8 @@
# 10/18/01, 10/19/01 Behrouz Minaei
# 11/17/01, 11/22/01, 11/24/01, 11/28/01 Behrouz Minaei
# 12/18/01 Behrouz Minaei
+#
+###
package Apache::lonchart;
@@ -74,7 +76,8 @@ sub ExtractStudentData {
my %TempHash;
my $Version;
my $ProbNo;
- my $PrTotal;
+ my $ProbSolved;
+ my $ProbTotal;
my $LatestVersion;
my $Str=substr($students[$index].
' ',0,14).' ! '.
@@ -86,14 +89,15 @@ sub ExtractStudentData {
$result{$name}=$value;
} split(/\&/,$reply);
$ProbNo = 0;
- $PrTotal = 0;
+ $ProbTotal = 0;
+ $ProbSolved = 0;
my $IterationNo = 0;
foreach $ResId (@cols) {
if ($IterationNo == 0) {$IterationNo++; next;}
if (!$ResId) {
my $PrNo = sprintf( "%3d", $ProbNo );
$Str .= ' '.''.$PrNo.' ';
- $PrTotal += $ProbNo;
+ $ProbSolved += $ProbNo;
$ProbNo=0;
next;
}
@@ -154,13 +158,20 @@ sub ExtractStudentData {
}
elsif ( $Code eq '+' ) {$ProbNo++;}
$Str .= $TempHash{"$part.Code"};
+ if ( $Code ne 'x' ) {$ProbTotal++;}
}
}
- else {for(my $n=0; $n<$PartNo; $n++) {$Str.=' ';}}
+ else {
+ for(my $n=0; $n<$PartNo; $n++) {
+ $Str.=' ';
+ $ProbTotal++;
+ }
+ }
}
}
- my $PrTot = sprintf( "%5d", $PrTotal );
- $Str .= ' '.''.$PrTot.' ';
+ my $PrTot = sprintf( "%5d", $ProbTotal );
+ my $PrSvd = sprintf( "%5d", $ProbSolved );
+ $Str .= ' '.''.$PrSvd.' /'.$PrTot.' ';
return $Str ;
}