[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Thu, 08 Nov 2007 19:57:35 -0000
albertel Thu Nov 8 14:57:35 2007 EDT
Modified files:
/loncom/homework grades.pm
Log:
- data table the receipt verification screen
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.485 loncom/homework/grades.pm:1.486
--- loncom/homework/grades.pm:1.485 Wed Nov 7 20:48:18 2007
+++ loncom/homework/grades.pm Thu Nov 8 14:57:30 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.485 2007/11/08 01:48:18 albertel Exp $
+# $Id: grades.pm,v 1.486 2007/11/08 19:57:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -745,6 +745,19 @@
$env{"course.$courseid.receiptalg"} eq 'receipt3') { $receiptparts=1; }
my $parts=['0'];
if ($receiptparts) { ($parts)=&response_type($symb); }
+
+ my $header =
+ &Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ '<th> Fullname </th>'."\n".
+ '<th> Username </th>'."\n".
+ '<th> Domain </th>';
+ if ($receiptparts) {
+ $header.='<th> Problem Part </th>';
+ }
+ $header.=
+ &Apache::loncommon::end_data_table_header_row();
+
foreach (sort
{
if (lc($$fullname{$a}) ne lc($$fullname{$b})) {
@@ -755,7 +768,9 @@
my ($uname,$udom)=split(/\:/);
foreach my $part (@$parts) {
if ($receipt eq &Apache::lonnet::ireceipt($uname,$udom,$courseid,$symb,$part)) {
- $contents.='<tr bgcolor="#ffffe6"><td> '."\n".
+ $contents.=
+ &Apache::loncommon::start_data_table_row().
+ '<td> '."\n".
'<a href="javascript:viewOneStudent(\''.$uname.'\',\''.$udom.
'\');" target="_self">'.$$fullname{$_}.'</a> </td>'."\n".
'<td> '.$uname.' </td>'.
@@ -763,7 +778,8 @@
if ($receiptparts) {
$contents.='<td> '.$part.' </td>';
}
- $contents.='</tr>'."\n";
+ $contents.=
+ &Apache::loncommon::end_data_table_row()."\n";
$matches++;
}
@@ -775,16 +791,9 @@
$string = &jscriptNform($symb).$title.
'The above receipt matches the following student'.
($matches <= 1 ? '.' : 's.')."\n".
- '<table border="0"><tr><td bgcolor="#777777">'."\n".
- '<table border="0"><tr bgcolor="#e6ffff">'."\n".
- '<td><b> Fullname </b></td>'."\n".
- '<td><b> Username </b></td>'."\n".
- '<td><b> Domain </b></td>';
- if ($receiptparts) {
- $string.='<td> Problem Part </td>';
- }
- $string.='</tr>'."\n".$contents.
- '</table></td></tr></table>'."\n";
+ $header.
+ $contents.
+ &Apache::loncommon::end_data_table()."\n";
}
return $string.&show_grading_menu_form($symb);
}