[LON-CAPA-cvs] cvs: loncom /homework grades.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 13 Nov 2004 09:32:49 -0000


albertel		Sat Nov 13 04:32:49 2004 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - sort case insensitive the saved Code sets
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.224 loncom/homework/grades.pm:1.225
--- loncom/homework/grades.pm:1.224	Fri Nov  5 20:11:38 2004
+++ loncom/homework/grades.pm	Sat Nov 13 04:32:49 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.224 2004/11/06 01:11:38 albertel Exp $
+# $Id: grades.pm,v 1.225 2004/11/13 09:32:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3474,7 +3474,7 @@
     my $cnum = $ENV{'course.'.$ENV{'request.course.id'}.'.num'};
     my @names=&Apache::lonnet::getkeys('CODEs',$cdom,$cnum);
     my $namechoice='<option></option>';
-    foreach my $name (sort(@names)) {
+    foreach my $name (sort {uc($a) cmp uc($b)} @names) {
 	if ($name =~ /^error: 2 /) { next; }
 	$namechoice.='<option value="'.$name.'">'.$name.'</option>';
     }