--- loncom/interface/lonquickgrades.pm 2008/08/17 23:25:40 1.42 +++ loncom/interface/lonquickgrades.pm 2008/10/16 16:35:53 1.43 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Quick Student Grades Display # -# $Id: lonquickgrades.pm,v 1.42 2008/08/17 23:25:40 raeburn Exp $ +# $Id: lonquickgrades.pm,v 1.43 2008/10/16 16:35:53 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -85,14 +85,15 @@ sub real_handler { $r->print(&Apache::loncommon::start_page($title)); if (!$showPoints && !$notshowSPRSlink ) { - $r->print(<<HEADER); -<p>This screen shows how many problems (or problem parts) you have completed, and -how many you have not yet done. You can also look at <a href="/adm/studentcalc">a detailed -score sheet</a>.</p> -HEADER + $r->print('<p>' + .&mt('This screen shows how many problems (or problem parts) you have completed' + .', and how many you have not yet done.' + .' You can also look at [_1]a detailed score sheet[_2].' + ,'<a href="/adm/studentcalc">','</a>') + .'</p>'); } - $r->print(&mt('This may take a few moments to display.')); + $r->print('<p class="LC_info">'.&mt('This may take a few moments to display.').'</p>'); $r->rflush(); @@ -223,14 +224,15 @@ HEADER my $indentString = ' '; # Second pass: Print the maps. - $r->print('<table cellspacing="3" border="2"><tr><td align="center"><b>' . - &mt('Folder') . '</b></td>'); + $r->print(&Apache::loncommon::start_data_table() + .&Apache::loncommon::start_data_table_header_row() + .'<th>'.&mt('Folder').'</th>'); $title = &mt($showPoints ? "Points Scored" : "Done"); if ($totalAttempted) { $title .= " / " . &mt("Attempted"); } - $r->print("<td align='center'>$title / " - . &mt('Total') . "</td><tr>\n\n"); + $r->print("<th>$title / ".&mt('Total').'</td>' + .&Apache::loncommon::end_data_table_header_row()); while ($depth > 0) { if ($curRes == $iterator->BEGIN_MAP()) {$depth++;} if ($curRes == $iterator->END_MAP()) { $depth--; } @@ -246,16 +248,19 @@ HEADER my $ratio; $ratio = $correct / $total; my $color = mixColors(\@start, \@end, $ratio); - $r->print("<tr><td bgcolor='$color'>"); + $r->print(&Apache::loncommon::start_data_table_row() + .'<td style="background-color:'.$color.';">'); my $thisIndent = ''; for (my $i = 1; $i < $depth; $i++) { $thisIndent .= $indentString; } $r->print("$thisIndent$title</td>"); if ($totalAttempted) { - $r->print("<td valign='top'>$thisIndent<nobr>$correct / $attempted / $total</nobr></td></tr>\n"); + $r->print("<td valign='top'>$thisIndent<nobr>$correct / $attempted / $total</nobr></td>" + .&Apache::loncommon::end_data_table_row()); } else { - $r->print("<td valign='top'>$thisIndent<nobr>$correct / $total</nobr></td></tr>\n"); + $r->print("<td valign='top'>$thisIndent<nobr>$correct / $total</nobr></td>" + .&Apache::loncommon::end_data_table_row()); } } } @@ -267,9 +272,11 @@ HEADER if ($topLevelParts > 0) { my $ratio = $topLevelRight / $topLevelParts; my $color = mixColors(\@start, \@end, $ratio); - $r->print("<tr><td bgcolor='$color'>"); + $r->print(&Apache::loncommon::start_data_table_row() + .'<td style="background-color:'.$color.';">'); $r->print(&mt("Problems Not Contained In A Folder")."</td><td>"); - $r->print("$topLevelRight / $topLevelParts</td></tr>"); + $r->print("$topLevelRight / $topLevelParts</td>" + .&Apache::loncommon::end_data_table_row()); } if ($showPoints) { @@ -277,13 +284,16 @@ HEADER $title = $showPoints ? "Points" : "Parts Done"; 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(&Apache::loncommon::start_data_table_row() + .'<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(&mt("Total $title In Course").': <b>'.$totalParts.'</b></td>' + .&Apache::loncommon::end_data_table_row()); } - $r->print("</table>".&Apache::loncommon::end_page()); + $r->print(&Apache::loncommon::end_data_table() + .&Apache::loncommon::end_page()); return OK; }