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

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 18 Nov 2002 20:39:46 -0000


matthew		Mon Nov 18 15:39:46 2002 EDT

  Modified files:              
    /loncom/interface	lonstatistics.pm 
  Log:
  Bug 785 - name sorts should be independent of case.
  
  
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.53 loncom/interface/lonstatistics.pm:1.54
--- loncom/interface/lonstatistics.pm:1.53	Tue Oct 22 12:30:34 2002
+++ loncom/interface/lonstatistics.pm	Mon Nov 18 15:39:46 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # (Publication Handler
 #
-# $Id: lonstatistics.pm,v 1.53 2002/10/22 16:30:34 minaeibi Exp $
+# $Id: lonstatistics.pm,v 1.54 2002/11/18 20:39:46 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -245,9 +245,11 @@
     my $sortBy = '';
     if(defined($cache->{'sort'})) {
         $sortBy = ':'.$cache->{'sort'};
+    } else {
+        $sortBy = ':fullname';
     }
-    my @order = sort { $cache->{$a.$sortBy} cmp $cache->{$b.$sortBy} ||
-                       $cache->{$a.':fullname'} cmp $cache->{$b.':fullname'} } 
+    my @order = sort { lc($cache->{$a.$sortBy}) cmp lc($cache->{$b.$sortBy}) ||
+                       lc($cache->{$a.':fullname'}) cmp lc($cache->{$b.':fullname'}) } 
                 @sorted1Students;
 
     return \@order;