[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentsubmissions.pm

bisitz bisitz at source.lon-capa.org
Fri Oct 12 10:08:42 EDT 2012


bisitz		Fri Oct 12 14:08:42 2012 EDT

  Modified files:              
    /loncom/interface/statistics	lonstudentsubmissions.pm 
  Log:
  Internationalization of Time Column in Student Submission Reports for HTML and csv output
  
  
Index: loncom/interface/statistics/lonstudentsubmissions.pm
diff -u loncom/interface/statistics/lonstudentsubmissions.pm:1.68 loncom/interface/statistics/lonstudentsubmissions.pm:1.69
--- loncom/interface/statistics/lonstudentsubmissions.pm:1.68	Thu May  3 11:21:33 2012
+++ loncom/interface/statistics/lonstudentsubmissions.pm	Fri Oct 12 14:08:42 2012
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentsubmissions.pm,v 1.68 2012/05/03 11:21:33 goltermann Exp $
+# $Id: lonstudentsubmissions.pm,v 1.69 2012/10/12 14:08:42 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -732,7 +732,14 @@
             }
         }
     } else {
-        @values = map { $response->{$_}; } @$headers;
+        foreach my $original_header (@$headers) {
+            if ($original_header eq 'Time') {
+                push(@values,&Apache::lonlocal::locallocaltime($response->{$original_header}));
+            } else {
+                # A normal column
+                push(@values,$response->{$original_header});
+            }
+        }
     }
     my $td = '<td valign="top">';
     my $str = $td.join('</td>'.$td, at values).'</td>';
@@ -1238,7 +1245,7 @@
 sub csv_format_item {
     my ($item,$type) = @_;
     if ($type eq 'Time') {
-        $item = localtime($item);
+        $item = &Apache::lonlocal::locallocaltime($item);
     }
     $item =&Apache::loncommon::csv_translate($item); 
     return $item;




More information about the LON-CAPA-cvs mailing list