[LON-CAPA-cvs] cvs: loncom /interface lonstatistics.pm /localize/localize newphrases.txt

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 24 Jun 2004 19:32:38 -0000


matthew		Thu Jun 24 15:32:38 2004 EDT

  Modified files:              
    /loncom/localize/localize	newphrases.txt 
    /loncom/interface	lonstatistics.pm 
  Log:
  Localized lonstatistics::DisplayClasslist 
  
  
Index: loncom/localize/localize/newphrases.txt
diff -u loncom/localize/localize/newphrases.txt:1.48 loncom/localize/localize/newphrases.txt:1.49
--- loncom/localize/localize/newphrases.txt:1.48	Wed Apr 21 14:04:55 2004
+++ loncom/localize/localize/newphrases.txt	Thu Jun 24 15:32:37 2004
@@ -105,3 +105,11 @@
 [_1]prev[_2]   [_3]reload[_4]   [_5]next[_6]
 prev   [_3]reload[_4]   [_5]next[_6]
 [_1]prev[_2]   [_3]reload[_4]   next
+
+There are no students in the course.
+There are no currently enrolled students in the course.
+There are no previously enrolled students in the course.
+There are no students in the selected sections.
+There are no currently enrolled students in the selected sections.
+There are no previously enrolled students in the selected sections.
+Click here to return to the chart.
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.105 loncom/interface/lonstatistics.pm:1.106
--- loncom/interface/lonstatistics.pm:1.105	Thu Jun 24 15:17:49 2004
+++ loncom/interface/lonstatistics.pm	Thu Jun 24 15:32:37 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstatistics.pm,v 1.105 2004/06/24 19:17:49 matthew Exp $
+# $Id: lonstatistics.pm,v 1.106 2004/06/24 19:32:37 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -970,36 +970,36 @@
     if (! @Students) {
         if ($SelectedSections[0] eq 'all') { 
             if (lc($ENV{'form.Status'}) eq 'any') {
-                $Str .= '<h2>There are no students in the course.</h2>';
+                $Str .= '<h2>'.
+                    &mt('There are no students in the course.').
+                    '</h2>';
             } elsif (lc($ENV{'form.Status'}) eq 'active') {
-                $Str .= '<h2>There are no currently enrolled students in '.
-                    'the course.</h2>';
+                $Str .= '<h2>'.
+                &mt('There are no currently enrolled students in the course.').
+                    '</h2>';
             } elsif (lc($ENV{'form.Status'}) eq 'expired') {
-                $Str .= '<h2>There are no previously enrolled '.
-                    'students in the course.</h2>';
+                $Str .= '<h2>'.
+                    &mt('There are no previously enrolled students in the course.').
+                        '</h2>';
             }
         } else { 
             my $sections;
-            if (@SelectedSections == 1) {
-                $sections = 'section '.$SelectedSections[0];
-            } elsif (@SelectedSections > 2) {
-                $sections = 'sections '.join(', ',@SelectedSections);
-                $sections =~ s/, ([^,])*$/, and $1/;
-            } else {
-                $sections = 'sections '.join(' and ',@SelectedSections);
-            }
             if (lc($ENV{'form.Status'}) eq 'any') {
-                $Str .= '<h2>There are no students in '.$sections.'.</h2>';
+                $Str .= '<h2>'.
+                    &mt('There are no students in the selected sections.').
+                    '</h2>';
             } elsif (lc($ENV{'form.Status'}) eq 'active') {
-                $Str .= '<h2>There are no currently enrolled students '.
-                    'in '.$sections.'.</h2>';
+                $Str .= '<h2>'.
+                    &mt('There are no currently enrolled students in the selected sections.').
+                    '</h2>';
             } elsif (lc($ENV{'form.Status'}) eq 'expired') {
-                $Str .= '<h2>There are no previously enrolled students '.
-                    'in '.$sections.'.</h2>';
+                $Str .= '<h2>'.
+                    &mt('There are no previously enrolled students in the selected sections.').
+                    '</h2>';
             }
         }
         $Str.= '<a href="/adm/statistics?reportSelected=student_assessment">'.
-            'Return to the chart.</a>';
+            &mt('Click here to return to the chart').'</a>';
         $r->print($Str);
         $r->rflush();
         return;
@@ -1013,7 +1013,7 @@
         $Str .= '<th><a href="/adm/statistics?'.
             'reportSelected=student_assessment&'.
             'selectstudent=1&'.
-            'sort='.$field.'">'.$field.
+            'sort='.$field.'">'.&mt($field).
             '</a></th>';
     }
     $Str .= '</tr>'."\n";
@@ -1038,6 +1038,8 @@
                 $Str .= &Apache::lonnet::escape($sname).'">';
                 $Str .= $student->{$field}.'&nbsp';
                 $Str .= '</a>';
+            } elsif ($field eq 'status') {
+                $Str .= &mt($student->{$field});
             } else {
                 $Str .= $student->{$field};
             }