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

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Wed, 15 Oct 2008 13:00:26 -0000


bisitz		Wed Oct 15 09:00:26 2008 EDT

  Modified files:              
    /loncom/interface	lonuserutils.pm 
  Log:
  - Added warning style to warning message
  - Added missing &mt() calls to user status display text
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.71 loncom/interface/lonuserutils.pm:1.72
--- loncom/interface/lonuserutils.pm:1.71	Tue Oct  7 15:40:39 2008
+++ loncom/interface/lonuserutils.pm	Wed Oct 15 09:00:24 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.71 2008/10/07 19:40:39 droeschl Exp $
+# $Id: lonuserutils.pm,v 1.72 2008/10/15 13:00:24 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1477,7 +1477,10 @@
                                $permission,$env{'form.Status'},\%userlist,$keylist);
         }
         if (!$usercount) {
-            $r->print('<br />'.&mt('There are no users matching the search criteria.')); 
+            $r->print('<br /><span class="LC_warning">'
+                     .&mt('There are no users matching the search criteria.')
+                     .'</span>'
+            ); 
         }
     }
     $r->print('<input type="hidden" name="phase" value="'.
@@ -1901,15 +1904,15 @@
 sub process_date_info {
     my ($userdata) = @_;
     my $now = time;
-    $userdata->{'status'} = 'Active';
+    $userdata->{'status'} = &mt('Active');
     if ($userdata->{'start'} > 0) {
         if ($now < $userdata->{'start'}) {
-            $userdata->{'status'} = 'Future';
+            $userdata->{'status'} = &mt('Future');
         }
     }
     if ($userdata->{'end'} > 0) {
         if ($now > $userdata->{'end'}) {
-            $userdata->{'status'} = 'Expired';
+            $userdata->{'status'} = &mt('Expired');
         }
     }
     return;