--- 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 } - $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("Total $title: $totalRight
"); + my $totaltitle = $showPoints ? &mt("Awarded Total Points") : &mt("Total Parts Done"); + $r->print("$totaltitle: $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(""); + $r->print("".&Apache::loncommon::end_page()); return OK; }