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

bisitz bisitz at source.lon-capa.org
Wed Feb 12 11:51:17 EST 2014


bisitz		Wed Feb 12 16:51:17 2014 EDT

  Modified files:              
    /loncom/interface/statistics	longradinganalysis.pm 
  Log:
  - Internationalization:
      - Added missing &mt() calls
      - locallocaltime
  - XHTML
  - Standard styles
  
  
  
Index: loncom/interface/statistics/longradinganalysis.pm
diff -u loncom/interface/statistics/longradinganalysis.pm:1.12 loncom/interface/statistics/longradinganalysis.pm:1.13
--- loncom/interface/statistics/longradinganalysis.pm:1.12	Mon Jul 22 18:06:58 2013
+++ loncom/interface/statistics/longradinganalysis.pm	Wed Feb 12 16:51:16 2014
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: longradinganalysis.pm,v 1.12 2013/07/22 18:06:58 bisitz Exp $
+# $Id: longradinganalysis.pm,v 1.13 2014/02/12 16:51:16 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -69,7 +69,10 @@
     my @students = @Apache::lonstatistics::Students;
     #
     if (@students < 1 && exists($env{'form.firstrun'})) {
-        $r->print('<h2>There are no students in the sections/groups selected</h2>');
+        $r->print(
+            '<p class="LC_info">'
+           .&mt('There are no students in the sections/groups selected.')
+           .'</h2>');
     }
     #
     #my @cache_button_HTML = 
@@ -120,7 +123,7 @@
                   $env{'form.problemchoice'}.'" />');
         #
 	if (! defined($current_problem->{'resource'})) {
-            $r->print('resource is undefined');
+            $r->print('<p class="LC_error">'.&mt('resource is undefined').'</p>');
         } else {
             my $resource = $current_problem->{'resource'};
             $r->print('<h1>'.$resource->compTitle.'</h1>');
@@ -130,7 +133,10 @@
             if ($resource->is_task()) {
 		&task_analysis($r,$resource,\@students);
             } else {
-                $r->print('<h2>Analysis of '.$resource->src().' is not supported</h2>');
+                $r->print(
+                    '<p class="LC_warning">'
+                   .&mt('Analysis of [_1] is not supported.',$resource->src())
+                   .'</p>');
             }
         }
         $r->print('<hr />');
@@ -271,10 +277,11 @@
 			$format->{'h3'});
     
     $excel_sheet->write($header_row,$cols_output++,
-			'Compiled on '.localtime(time),$format->{'h3'});
+			&mt('Compiled on [_1]',&Apache::lonlocal::locallocaltime(time)),
+                        $format->{'h3'});
     $cols_output = 0;
     foreach my $field ('Grader Name','Username','Grades Assigned') {
-	$excel_sheet->write($description_row,$cols_output++,$field,
+	$excel_sheet->write($description_row,$cols_output++,&mt($field),
 			    $format->{'bold'});
     }
     return ($excel_workbook,$excel_sheet,$filename,$format,$rows_output);
@@ -294,7 +301,7 @@
     foreach ('HTML','Excel','CSV') {
         $output_selector .= '    <option value="'.lc($_).'"';
         if ($env{'form.output'} eq lc($_)) {
-            $output_selector .= ' selected ';
+            $output_selector .= ' selected="selected"';
         }
         $output_selector .='>'.&mt($_).'</option>'.$/;
     } 




More information about the LON-CAPA-cvs mailing list