--- loncom/interface/lonquickgrades.pm 2003/11/21 18:18:04 1.29 +++ loncom/interface/lonquickgrades.pm 2005/01/01 18:54:52 1.34 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Quick Student Grades Display # -# $Id: lonquickgrades.pm,v 1.29 2003/11/21 18:18:04 albertel Exp $ +# $Id: lonquickgrades.pm,v 1.34 2005/01/01 18:54:52 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -84,7 +84,7 @@ sub real_handler { my $res = $navmap->firstResource(); # temp resource to access constants # Header - my $title = $showPoints ? "Quick Points Display" : "Quick Completed Problems Display"; + my $title = $showPoints ? "Points Display" : "Completed Problems Display"; $r->print(&Apache::loncommon::bodytag($title, '', '')); if (!$showPoints && !$notshowSPRSlink ) { @@ -150,8 +150,11 @@ HEADER # it's an "attempted" point if ($curRes->problemstatus($part) eq 'no' && ($dateStatus != $curRes->ANSWER_OPEN)) { - $partsAttempted += $curRes->weight($part); - $totalAttempted += $partsAttempted; + my $status = $curRes->simpleStatus($part); + if ($status == $curRes->ATTEMPTED) { + $partsAttempted += $curRes->weight($part); + $totalAttempted += $partsAttempted; + } } else { $score = $curRes->weight($part) * $curRes->awarded($part); } @@ -167,8 +170,7 @@ HEADER my $status = $curRes->simpleStatus($part); my $thisright = 0; $partsCount++; - if ($status == $curRes->CORRECT || - $status == $curRes->INCORRECT ) { + if ($status == $curRes->CORRECT ) { $partsRight++; $totalRight++; $thisright = 1; @@ -271,20 +273,19 @@ HEADER $r->print("$topLevelRight / $topLevelParts"); } - my $maxHelpLink = Apache::loncommon::help_open_topic("Quick_Grades_Possibly_Correct"); - - $title = $showPoints ? "Points" : "Parts Done"; - - $r->print("Total $title: $totalRight
"); - $r->print(&mt("Max Possible To Date")." $maxHelpLink: $totalPossible
"); - $title = $showPoints ? "Points" : "Parts"; - $r->print(&mt("Total $title In Course").": $totalParts\n\n"); + unless ($notshowSPRSlink) { + my $maxHelpLink = Apache::loncommon::help_open_topic("Quick_Grades_Possibly_Correct"); + $title = $showPoints ? "Points" : "Parts Done"; + + $r->print("Total $title: $totalRight
"); + $r->print(&mt("Max Possible To Date")." $maxHelpLink: $totalPossible
"); + $title = $showPoints ? "Points" : "Parts"; + $r->print(&mt("Total $title In Course").": $totalParts\n\n"); + } $r->print(""); - $navmap->untieHashes(); - return OK; }