--- loncom/interface/lonquickgrades.pm	2006/02/27 02:11:27	1.38
+++ loncom/interface/lonquickgrades.pm	2007/12/20 10:18:19	1.41
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Quick Student Grades Display
 #
-# $Id: lonquickgrades.pm,v 1.38 2006/02/27 02:11:27 bowersj2 Exp $
+# $Id: lonquickgrades.pm,v 1.41 2007/12/20 10:18:19 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -48,22 +48,17 @@ sub real_handler {
     &Apache::loncommon::get_unprocessed_cgi($ENV{QUERY_STRING});
 
     # Handle header-only request
+    if ($env{'browser.mathml'}) {
+	&Apache::loncommon::content_type($r,'text/xml');
+    } else {
+	&Apache::loncommon::content_type($r,'text/html');
+    }
     if ($r->header_only) {
-        if ($env{'browser.mathml'}) {
-            &Apache::loncommon::content_type($r,'text/xml');
-        } else {
-            &Apache::loncommon::content_type($r,'text/html');
-        }
-        $r->send_http_header;
+	$r->send_http_header;
         return OK;
     }
 
     # Send header, don't cache this page
-    if ($env{'browser.mathml'}) {
-        &Apache::loncommon::content_type($r, 'text/xml');
-    } else {
-        &Apache::loncommon::content_type($r, 'text/html');
-    }
     &Apache::loncommon::no_cache($r);
     $r->send_http_header;
 
@@ -87,7 +82,7 @@ sub real_handler {
  
     # Header
     my $title = $showPoints ? "Points Display" : "Completed Problems Display";
-    $r->print(&Apache::loncommon::bodytag($title, '', ''));
+    $r->print(&Apache::loncommon::start_page($title));
 
     if (!$showPoints && !$notshowSPRSlink ) {
         $r->print(<<HEADER); 
@@ -97,7 +92,7 @@ score sheet</a>.</p>
 HEADER
     }
 
-    $r->print("This may take a few moments to display.");
+    $r->print(&mt('This may take a few moments to display.'));
 
     $r->rflush();
 
@@ -158,7 +153,7 @@ HEADER
 			    $totalAttempted += $partsAttempted;
 			}
 		    } else {
-			$score = Apache::grades::compute_points($curRes->weight($part), $curRes->awarded($part));
+			$score = &Apache::grades::compute_points($curRes->weight($part), $curRes->awarded($part));
 		    }
 		    $partsRight += $score;
 		    $totalRight += $score;
@@ -280,14 +275,14 @@ HEADER
 	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>");
+	my $totaltitle = $showPoints ? &mt("Awarded Total Points") : &mt("Total Parts Done");
+	$r->print("<tr><td colspan='2' align='right'>$totaltitle: <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>".&Apache::loncommon::end_page());
 
     return OK;
 }