version 1.25, 2001/12/18 22:22:13
|
version 1.26, 2001/12/20 20:47:53
|
Line 44
|
Line 44
|
# 10/18/01, 10/19/01 Behrouz Minaei |
# 10/18/01, 10/19/01 Behrouz Minaei |
# 11/17/01, 11/22/01, 11/24/01, 11/28/01 Behrouz Minaei |
# 11/17/01, 11/22/01, 11/24/01, 11/28/01 Behrouz Minaei |
# 12/18/01 Behrouz Minaei |
# 12/18/01 Behrouz Minaei |
|
# |
|
### |
|
|
package Apache::lonchart; |
package Apache::lonchart; |
|
|
Line 74 sub ExtractStudentData {
|
Line 76 sub ExtractStudentData {
|
my %TempHash; |
my %TempHash; |
my $Version; |
my $Version; |
my $ProbNo; |
my $ProbNo; |
my $PrTotal; |
my $ProbSolved; |
|
my $ProbTotal; |
my $LatestVersion; |
my $LatestVersion; |
my $Str=substr($students[$index]. |
my $Str=substr($students[$index]. |
' ',0,14).' ! '. |
' ',0,14).' ! '. |
Line 86 sub ExtractStudentData {
|
Line 89 sub ExtractStudentData {
|
$result{$name}=$value; |
$result{$name}=$value; |
} split(/\&/,$reply); |
} split(/\&/,$reply); |
$ProbNo = 0; |
$ProbNo = 0; |
$PrTotal = 0; |
$ProbTotal = 0; |
|
$ProbSolved = 0; |
my $IterationNo = 0; |
my $IterationNo = 0; |
foreach $ResId (@cols) { |
foreach $ResId (@cols) { |
if ($IterationNo == 0) {$IterationNo++; next;} |
if ($IterationNo == 0) {$IterationNo++; next;} |
if (!$ResId) { |
if (!$ResId) { |
my $PrNo = sprintf( "%3d", $ProbNo ); |
my $PrNo = sprintf( "%3d", $ProbNo ); |
$Str .= ' '.'<font color="#007700">'.$PrNo.'</font> '; |
$Str .= ' '.'<font color="#007700">'.$PrNo.'</font> '; |
$PrTotal += $ProbNo; |
$ProbSolved += $ProbNo; |
$ProbNo=0; |
$ProbNo=0; |
next; |
next; |
} |
} |
Line 154 sub ExtractStudentData {
|
Line 158 sub ExtractStudentData {
|
} |
} |
elsif ( $Code eq '+' ) {$ProbNo++;} |
elsif ( $Code eq '+' ) {$ProbNo++;} |
$Str .= $TempHash{"$part.Code"}; |
$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 ); |
my $PrTot = sprintf( "%5d", $ProbTotal ); |
$Str .= ' '.'<font color="#000088">'.$PrTot.'</font> '; |
my $PrSvd = sprintf( "%5d", $ProbSolved ); |
|
$Str .= ' '.'<font color="#000088">'.$PrSvd.' /'.$PrTot.'</font> '; |
|
|
return $Str ; |
return $Str ; |
} |
} |