Diff for /loncom/interface/lonquickgrades.pm between versions 1.29 and 1.35

version 1.29, 2003/11/21 18:18:04 version 1.35, 2005/01/03 14:46:41
Line 84  sub real_handler { Line 84  sub real_handler {
     my $res = $navmap->firstResource(); # temp resource to access constants      my $res = $navmap->firstResource(); # temp resource to access constants
     
     # Header      # 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, '', ''));      $r->print(&Apache::loncommon::bodytag($title, '', ''));
   
     if (!$showPoints && !$notshowSPRSlink ) {      if (!$showPoints && !$notshowSPRSlink ) {
Line 150  HEADER Line 150  HEADER
     # it's an "attempted" point      # it's an "attempted" point
     if ($curRes->problemstatus($part) eq 'no' &&      if ($curRes->problemstatus($part) eq 'no' &&
  ($dateStatus != $curRes->ANSWER_OPEN)) {   ($dateStatus != $curRes->ANSWER_OPEN)) {
  $partsAttempted += $curRes->weight($part);   my $status = $curRes->simpleStatus($part);
  $totalAttempted += $partsAttempted;   if ($status == $curRes->ATTEMPTED) {
       $partsAttempted += $curRes->weight($part);
       $totalAttempted += $partsAttempted;
    }
     } else {      } else {
  $score = $curRes->weight($part) * $curRes->awarded($part);   $score = $curRes->weight($part) * $curRes->awarded($part);
     }      }
Line 167  HEADER Line 170  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->INCORRECT ) {  
  $partsRight++;   $partsRight++;
  $totalRight++;   $totalRight++;
  $thisright = 1;   $thisright = 1;
Line 271  HEADER Line 273  HEADER
         $r->print("$topLevelRight / $topLevelParts</td></tr>");          $r->print("$topLevelRight / $topLevelParts</td></tr>");
     }      }
   
     my $maxHelpLink = Apache::loncommon::help_open_topic("Quick_Grades_Possibly_Correct");      if ($showPoints) {
    my $maxHelpLink = Apache::loncommon::help_open_topic("Quick_Grades_Possibly_Correct");
     $title = $showPoints ? "Points" : "Parts Done";  
   
     $r->print("<tr><td colspan='2' align='right'>Total $title: <b>$totalRight</b><br>");  
     $r->print(&mt("Max Possible To Date")." $maxHelpLink: <b>$totalPossible</b><br>");  
     $title = $showPoints ? "Points" : "Parts";  
     $r->print(&mt("Total $title In Course").": <b>$totalParts</b></td></tr>\n\n");  
   
    $title = $showPoints ? "Points" : "Parts Done";
   
    $r->print("<tr><td colspan='2' align='right'>Total $title: <b>$totalRight</b><br>");
    $r->print(&mt("Max Possible To Date")." $maxHelpLink: <b>$totalPossible</b><br>");
    $title = $showPoints ? "Points" : "Parts";
    $r->print(&mt("Total $title In Course").": <b>$totalParts</b></td></tr>\n\n");
       }
   
     $r->print("</table></body></html>");      $r->print("</table></body></html>");
   
     $navmap->untieHashes();  
   
     return OK;      return OK;
 }  }
   

Removed from v.1.29  
changed lines
  Added in v.1.35


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>