--- loncom/homework/grades.pm 2007/11/08 01:48:18 1.485
+++ loncom/homework/grades.pm 2007/11/08 20:47:56 1.487
@@ -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.487 2007/11/08 20:47:56 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -733,9 +733,12 @@ sub verifyreceipt {
$receipt =~ s/[^\-\d]//g;
my ($symb) = &get_symb($request);
- my $title.='
Verifying Submission Receipt '.
- $receipt.'
'."\n".
- 'Resource: '.$env{'form.probTitle'}.'
'."\n";
+ my $title.=
+ ''.
+ &mt('Verifying Submission Receipt [_1]',$receipt).
+ '
'."\n".
+ ''.&mt('Resource: [_1]',$env{'form.probTitle'}).
+ '
'."\n";
my ($string,$contents,$matches) = ('','',0);
my (undef,undef,$fullname) = &getclasslist('all','0');
@@ -745,6 +748,19 @@ sub verifyreceipt {
$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().
+ ' '.&mt('Fullname').' | '."\n".
+ ' '.&mt('Username').' | '."\n".
+ ' '.&mt('Domain').' | ';
+ if ($receiptparts) {
+ $header.=' '.&mt('Problem Part').' | ';
+ }
+ $header.=
+ &Apache::loncommon::end_data_table_header_row();
+
foreach (sort
{
if (lc($$fullname{$a}) ne lc($$fullname{$b})) {
@@ -755,7 +771,9 @@ sub verifyreceipt {
my ($uname,$udom)=split(/\:/);
foreach my $part (@$parts) {
if ($receipt eq &Apache::lonnet::ireceipt($uname,$udom,$courseid,$symb,$part)) {
- $contents.=' '."\n".
+ $contents.=
+ &Apache::loncommon::start_data_table_row().
+ ' | '."\n".
''.$$fullname{$_}.' | '."\n".
' '.$uname.' | '.
@@ -763,28 +781,23 @@ sub verifyreceipt {
if ($receiptparts) {
$contents.=' '.$part.' | ';
}
- $contents.='
'."\n";
+ $contents.=
+ &Apache::loncommon::end_data_table_row()."\n";
$matches++;
}
}
}
if ($matches == 0) {
- $string = $title.'No match found for the above receipt.';
+ $string = $title.&mt('No match found for the above receipt.');
} else {
$string = &jscriptNform($symb).$title.
- 'The above receipt matches the following student'.
- ($matches <= 1 ? '.' : 's.')."\n".
- ''."\n".
- ''."\n".
- ' Fullname | '."\n".
- ' Username | '."\n".
- ' Domain | ';
- if ($receiptparts) {
- $string.=' Problem Part | ';
- }
- $string.=' '."\n".$contents.
- '
|
'."\n";
+ ''.
+ &mt('The above receipt matches the following [numerate,_1,student].',$matches).
+ '
'.
+ $header.
+ $contents.
+ &Apache::loncommon::end_data_table()."\n";
}
return $string.&show_grading_menu_form($symb);
}