version 1.36, 2005/04/07 06:56:23
|
version 1.38, 2006/02/27 02:11:27
|
Line 35 use POSIX;
|
Line 35 use POSIX;
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnet; |
use Apache::lonnet; |
|
use Apache::grades; |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 157 HEADER
|
Line 158 HEADER
|
$totalAttempted += $partsAttempted; |
$totalAttempted += $partsAttempted; |
} |
} |
} else { |
} else { |
$score = $curRes->weight($part) * $curRes->awarded($part); |
$score = Apache::grades::compute_points($curRes->weight($part), $curRes->awarded($part)); |
} |
} |
$partsRight += $score; |
$partsRight += $score; |
$totalRight += $score; |
$totalRight += $score; |
Line 171 HEADER
|
Line 172 HEADER
|
my $status = $curRes->simpleStatus($part); |
my $status = $curRes->simpleStatus($part); |
my $thisright = 0; |
my $thisright = 0; |
$partsCount++; |
$partsCount++; |
if ($status == $curRes->CORRECT ) { |
if ($status == $curRes->CORRECT || |
|
$status == $curRes->PARTIALLY_CORRECT ) { |
$partsRight++; |
$partsRight++; |
$totalRight++; |
$totalRight++; |
$thisright = 1; |
$thisright = 1; |