[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 26 Oct 2007 00:39:14 -0000
albertel Thu Oct 25 20:39:14 2007 EDT
Modified files:
/loncom/homework grades.pm
Log:
- data table the previous submissions
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.466 loncom/homework/grades.pm:1.467
--- loncom/homework/grades.pm:1.466 Thu Oct 25 20:32:06 2007
+++ loncom/homework/grades.pm Thu Oct 25 20:39:09 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.466 2007/10/26 00:32:06 albertel Exp $
+# $Id: grades.pm,v 1.467 2007/10/26 00:39:09 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4273,30 +4273,33 @@
my $isCODE=0;
my $isTask = ($symb =~/\.task$/);
if (exists($record->{'resource.CODE'})) { $isCODE=1; }
- my $studentTable='<table border="0" width="100%"><tr><td bgcolor="#777777">'.
- '<table border="0" width="100%"><tr bgcolor="#e6ffff">'.
- '<td><b>Date/Time</b></td>'.
- ($isCODE?'<td><b>CODE</b></td>':'').
- '<td><b>Submission</b></td>'.
- '<td><b>Status </b></td></tr>';
+ my $studentTable=&Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ '<th>'.&mt('Date/Time').'</th>'.
+ ($isCODE?'<th>'.&mt('CODE').'</th>':'').
+ '<th>'.&mt('Submission').'</th>'.
+ '<th>'.&mt('Status').'</th>'.
+ &Apache::loncommon::end_data_table_header_row();
my ($version);
my %mark;
my %orders;
$mark{'correct_by_student'} = $checkIcon;
if (!exists($$record{'1:timestamp'})) {
- return '<br /> <span class="LC_warning">Nothing submitted - no attempts</span><br />';
+ return '<br /> <span class="LC_warning">'.&mt('Nothing submitted - no attempts').'</span><br />';
}
my $interaction;
for ($version=1;$version<=$$record{'version'};$version++) {
- my $timestamp = scalar(localtime($$record{$version.':timestamp'}));
+ my $timestamp =
+ &Apache::lonlocal::locallocaltime($$record{$version.':timestamp'});
if (exists($$record{$version.':resource.0.version'})) {
$interaction = $$record{$version.':resource.0.version'};
}
my $where = ($isTask ? "$version:resource.$interaction"
: "$version:resource");
- $studentTable.='<tr bgcolor="#ffffff" valign="top"><td>'.$timestamp.'</td>';
+ $studentTable.=&Apache::loncommon::start_data_table_row().
+ '<td>'.$timestamp.'</td>';
if ($isCODE) {
$studentTable.='<td>'.$record->{$version.':resource.CODE'}.'</td>';
}
@@ -4315,14 +4318,14 @@
my ($responseId)= ($isTask ? ($matchKey=~ /^resource\.(.*?)\.\Q$partid\E\.award$/)
: ($matchKey=~ /^resource\.\Q$partid\E\.(.*?)\.submission$/));
- $displaySub[0].='<b>Part:</b> '.$display_part.' ';
- $displaySub[0].='<span class="LC_internal_info">(ID '.
+ $displaySub[0].='<b>'.&mt('Part:').'</b> '.$display_part.' ';
+ $displaySub[0].='<span class="LC_internal_info">('.&mt('ID').' '.
$responseId.')</span> <b>';
if ($$record{"$where.$partid.tries"} eq '') {
- $displaySub[0].='Trial not counted';
+ $displaySub[0].=&mt('Trial not counted');
} else {
- $displaySub[0].='Trial '.
- $$record{"$where.$partid.tries"};
+ $displaySub[0].=&mt('Trial [_1]',
+ $$record{"$where.$partid.tries"});
}
my $responseType=($isTask ? 'Task'
: $responseType->{$partid}->{$responseId});
@@ -4362,12 +4365,12 @@
}
$studentTable.='<td>'.$displaySub[0].' </td><td>'.$displaySub[1];
if ($displaySub[2]) {
- $studentTable.='Manually graded by '.$displaySub[2];
+ $studentTable.=&mt('Manually graded by [_1]',$displaySub[2]);
}
- $studentTable.=' </td></tr>';
-
+ $studentTable.=' </td>'.
+ &Apache::loncommon::end_data_table_row();
}
- $studentTable.='</table></td></tr></table>';
+ $studentTable.=&Apache::loncommon::end_data_table();
return $studentTable;
}