--- loncom/interface/lonquickgrades.pm 2003/09/23 22:42:26 1.22.2.2 +++ loncom/interface/lonquickgrades.pm 2003/08/07 14:29:43 1.23 @@ -67,9 +67,7 @@ sub real_handler { $ENV{'course.'.$ENV{'request.course.id'}.'.grading'} eq 'standard'; # Create the nav map - my $navmap = Apache::lonnavmaps::navmap->new( - $ENV{"request.course.fn"}.".db", - $ENV{"request.course.fn"}."_parms.db", 1, 0, 1); + my $navmap = Apache::lonnavmaps::navmap->new(1, 0, 1); if (!defined($navmap)) { my $requrl = $r->uri; @@ -136,23 +134,11 @@ HEADER my $stack = $iterator->getStack(); for my $part (@{$parts}) { - my $completionStatus = $curRes->getCompletionStatus($part); - my $dateStatus = $curRes->getDateStatus($part); - if ($completionStatus == $curRes->EXCUSED()) { + if ($curRes->getCompletionStatus($part) == $curRes->EXCUSED()) { next; } if ($showPoints) { - my $score; - # If we're not telling status and the answer date isn't - # passed yet - if (($curRes->problemstatus($part) eq 'no') && - ($dateStatus != $curRes->ANSWER_OPEN)) { - $score = 0; - } else { - $score = $curRes->weight($part) * - $curRes->awarded($part); - } - + my $score = $curRes->weight($part) * $curRes->awarded($part); $partsRight += $score; $totalRight += $score; $partsCount += $curRes->weight($part); @@ -162,16 +148,18 @@ HEADER } $totalParts += $curRes->weight($part); } else { - my $status = $curRes->status($part); + my $status = $curRes->getCompletionStatus($part); my $thisright = 0; $partsCount++; if ($status == $curRes->CORRECT || - $status == $curRes->EXCUSED) { + $status == $curRes->CORRECT_BY_OVERRIDE || + $status == $curRes->ANSWER_SUBMITTED) { $partsRight++; $totalRight++; $thisright = 1; } + my $dateStatus = $curRes->getDateStatus($part); $totalParts++; if ($curRes->opendate($part) < $now) { $totalPossible++;