version 1.18, 2001/11/28 17:52:00
|
version 1.19, 2001/11/28 18:15:14
|
Line 106 sub ExtractStudentData {
|
Line 106 sub ExtractStudentData {
|
if (($Key=~/\.(\w+)\.solved$/) && ($Key!~/^\d+\:/)) { |
if (($Key=~/\.(\w+)\.solved$/) && ($Key!~/^\d+\:/)) { |
my $Part = $1; |
my $Part = $1; |
$Tries = $result{"$Version:$Prob:resource.$Part.tries"}; |
$Tries = $result{"$Version:$Prob:resource.$Part.tries"}; |
#if ($Tries) {$TempHash{"$Part.Tries"}=$Tries;} |
$TempHash{"$Part.Tries"}=($Tries) ? $Tries : 0; |
#my $Val = $result{"$Version:$Prob:$Key"}; |
|
my $Val = $result{"$Version:$Prob:resource.$Part.solved"}; |
my $Val = $result{"$Version:$Prob:resource.$Part.solved"}; |
if ($Val eq 'correct_by_student'){ |
if ($Val eq 'correct_by_student'){$Code='*';} |
$Code='*'; |
|
$TempHash{$Part.'.Tries'}=$Tries; |
|
} |
|
elsif ($Val eq 'correct_by_override'){$Code = '+';} |
elsif ($Val eq 'correct_by_override'){$Code = '+';} |
elsif ($Val eq 'incorrect_attempted'){$Code = '.';} |
elsif ($Val eq 'incorrect_attempted'){$Code = '.';} |
elsif ($Val eq 'incorrect_by_override'){$Code = '-';} |
elsif ($Val eq 'incorrect_by_override'){$Code = '-';} |
Line 128 sub ExtractStudentData {
|
Line 124 sub ExtractStudentData {
|
|
|
for ( my $n = 0; $n < $PartNo; $n++ ) { |
for ( my $n = 0; $n < $PartNo; $n++ ) { |
my $part = $TempHash{$n}; |
my $part = $TempHash{$n}; |
if ($TempHash{$part.'.Code'} eq '*') { |
if ($TempHash{"$part.Code"} eq '*') { |
$ProbNo++; |
$ProbNo++; |
if ($TempHash{$part.'.Tries'}<10) { |
if (($TempHash{"$part.Tries"}<10) || |
$TempHash{$part.'.Code'}=$Tries; |
($TempHash{"$part.Tries"} eq '' ) { |
|
$TempHash{"$part.Code"}=$TempHash{"$part.Tries"}; |
} |
} |
} |
} |
$Str .= $TempHash{$part.'.Code'}; |
$Str .= $TempHash{"$part.Code"}; |
$r->print($n.") Part=".$part." code=$TempHash{$part.'.Code'}<br>"); |
$r->print($n.") Part=".$part." code=$TempHash{$part.'.Code'}<br>"); |
} |
} |
} |
} |