[LON-CAPA-cvs] cvs: loncom /interface lonstatistics.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 13 Dec 2005 16:25:34 -0000
albertel Tue Dec 13 11:25:34 2005 EDT
Modified files:
/loncom/interface lonstatistics.pm
Log:
- bug#4498, need to sort name case-insenstively
- if no 'fullname' defalt to usernames
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.125 loncom/interface/lonstatistics.pm:1.126
--- loncom/interface/lonstatistics.pm:1.125 Tue Oct 4 14:27:32 2005
+++ loncom/interface/lonstatistics.pm Tue Dec 13 11:25:32 2005
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstatistics.pm,v 1.125 2005/10/04 18:27:32 albertel Exp $
+# $Id: lonstatistics.pm,v 1.126 2005/12/13 16:25:32 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -268,7 +268,8 @@
my $sortby = 'fullname';
$sortby = $env{'form.sort'} if (exists($env{'form.sort'}));
my @TmpStudents = sort { $a->{$sortby} cmp $b->{$sortby} ||
- $a->{'fullname'} cmp $b->{'fullname'} } @Students;
+ lc($a->{'fullname'}) cmp lc($b->{'fullname'}) ||
+ lc($a->{'username'}) cmp lc($b->{'username'}) } @Students;
@Students = @TmpStudents;
#
# Now deal with that current student thing....