--- loncom/homework/inputtags.pm 2013/04/30 03:03:34 1.317
+++ loncom/homework/inputtags.pm 2013/06/07 20:31:50 1.318
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.317 2013/04/30 03:03:34 raeburn Exp $
+# $Id: inputtags.pm,v 1.318 2013/06/07 20:31:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1658,6 +1658,7 @@ sub previous_tries {
my $count;
my %count_lookup;
my $lastrndseed;
+ my $numstamps = 0;
foreach my $i (1..$Apache::lonhomework::history{'version'}) {
my $prefix = $i.":resource.$id";
@@ -1714,10 +1715,17 @@ sub previous_tries {
$message =~ s{(
)}{};
- $output.=' | ';
- $output.=''.$count.' | ';
- $output.=$message;
-
+ $output .= '
'.
+ ''.$count.' | '.$message;
+ if ((!$is_anon) && ($Apache::lonhomework::history{"$prefix.tries"}) &&
+ ($Apache::lonhomework::history{"$prefix.award"} ne 'ASSIGNED_SCORE') &&
+ ($Apache::lonhomework::history{$i.':timestamp'})) {
+ $output .= ''.&Apache::lonlocal::locallocaltime(
+ $Apache::lonhomework::history{$i.':timestamp'}).' | ';
+ $numstamps ++;
+ } else {
+ $output .= ' | ';
+ }
foreach my $resid (@Apache::inputtags::response) {
my $prefix = $prefix.".$resid";
if (exists($Apache::lonhomework::history{"$prefix.submission"})) {
@@ -1740,10 +1748,20 @@ sub previous_tries {
$lastrndseed = $curr_rndseed;
}
return if ($output eq '');
- my $headers =
- '
'.''.&mt('Submission #').' | '.&mt('Try').
- ' | '.
- &mt('Submitted Answer').' | ';
+ my $headers = '
'.
+ ''.&mt('Submission #').' | '.
+ ''.&mt('Try').' | ';
+ if ($numstamps) {
+ $headers .= &mt('When');
+ }
+ $headers .= ' | ';
+ my $colspan = scalar(@Apache::inputtags::response);
+ if ($colspan > 1) {
+ $headers .= '';
+ } else {
+ $headers .= ' | ';
+ }
+ $headers .= &mt('Submitted Answer').' |
';
$output ='';
my $tries_text = &get_tries_text('link');