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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 14 May 2004 20:26:22 -0000


albertel		Fri May 14 16:26:22 2004 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - looks better sorted
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.200 loncom/homework/grades.pm:1.201
--- loncom/homework/grades.pm:1.200	Fri May 14 15:15:49 2004
+++ loncom/homework/grades.pm	Fri May 14 16:26:22 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.200 2004/05/14 19:15:49 albertel Exp $
+# $Id: grades.pm,v 1.201 2004/05/14 20:26:22 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3428,7 +3428,7 @@
     my @files=&Apache::lonnet::dirlist('userfiles',$cdom,$cname,
 				    &Apache::loncommon::propath($cdom,$cname));
     $result.="<option></option>";
-    foreach my $filename (@files) {
+    foreach my $filename (sort(@files)) {
 	($filename)=split(/&/,$filename);
 	if ($filename!~/^scantron_orig_/) { next ; }
 	$filename=~s/^scantron_orig_//;
@@ -3457,7 +3457,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 (@names) {
+    foreach my $name (sort(@names)) {
 	if ($name =~ /^error: 2 /) { next; }
 	$namechoice.='<option value="'.$name.'">'.$name.'</option>';
     }