--- loncom/interface/lonquickgrades.pm 2011/06/01 20:32:30 1.96 +++ loncom/interface/lonquickgrades.pm 2011/06/01 21:32:50 1.97 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Quick Student Grades Display # -# $Id: lonquickgrades.pm,v 1.96 2011/06/01 20:32:30 www Exp $ +# $Id: lonquickgrades.pm,v 1.97 2011/06/01 21:32:50 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -244,7 +244,9 @@ sub getData { for my $part (@{$parts}) { my $completionStatus = $curRes->getCompletionStatus($part); my $dateStatus = $curRes->getDateStatus($part); - + my $weight = $curRes->weight($part); + my $problemstatus = $curRes->problemstatus($part); + if ($completionStatus == $curRes->EXCUSED()) { next; } @@ -252,29 +254,29 @@ sub getData { my $score = 0; # If we're not telling status and the answer date isn't passed yet, # it's an "attempted" point - if ((($curRes->problemstatus($part) eq 'no') || - ($curRes->problemstatus($part) eq 'no_feedback_ever')) && + if ((($problemstatus eq 'no') || + ($problemstatus eq 'no_feedback_ever')) && ($dateStatus != $curRes->ANSWER_OPEN)) { my $status = $curRes->simpleStatus($part); if ($status == $curRes->ATTEMPTED) { - $partsAttempted += $curRes->weight($part); + $partsAttempted += $weight; $totalAttempted += $partsAttempted; } } else { - $score = &Apache::grades::compute_points($curRes->weight($part), $curRes->awarded($part)); + $score = &Apache::grades::compute_points($weight, $curRes->awarded($part)); } $partsRight += $score; $totalRight += $score; - $partsCount += $curRes->weight($part); + $partsCount += $weight; $curRes->{DATA}->{PROB_SCORE} += $score; - $curRes->{DATA}->{PROB_WEIGHT} += $curRes->weight($part); + $curRes->{DATA}->{PROB_WEIGHT} += $weight; if ($curRes->opendate($part) < $now) { - $totalPossible += $curRes->weight($part); - $curRes->{DATA}->{PROB_POSSIBLE} += $curRes->weight($part); + $totalPossible += $weight; + $curRes->{DATA}->{PROB_POSSIBLE} += $weight; } - $totalParts += $curRes->weight($part); + $totalParts += $weight; } else { my $status = $curRes->simpleStatus($part); my $thisright = 0; @@ -291,7 +293,6 @@ sub getData { $totalAttempted++; } - my $dateStatus = $curRes->getDateStatus($part); $totalParts++; if ($curRes->opendate($part) < $now) { $totalPossible++;