[LON-CAPA-cvs] cvs: loncom(version_2_3_X) /interface lonparmset.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 06 Jan 2007 14:52:30 -0000


albertel		Sat Jan  6 09:52:30 2007 EDT

  Modified files:              (Branch: version_2_3_X)
    /loncom/interface	lonparmset.pm 
  Log:
  - backport 1.356
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.350.2.3 loncom/interface/lonparmset.pm:1.350.2.4
--- loncom/interface/lonparmset.pm:1.350.2.3	Thu Dec 14 15:50:25 2006
+++ loncom/interface/lonparmset.pm	Sat Jan  6 09:52:30 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.350.2.3 2006/12/14 20:50:25 albertel Exp $
+# $Id: lonparmset.pm,v 1.350.2.4 2007/01/06 14:52:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3728,7 +3728,15 @@
 	}
 	if ($last) { ($folder) = &Apache::lonnet::decode_symb($last); }
     }
-    foreach my $id (sort { $parmlog{$b}{'exe_time'}<=>$parmlog{$a}{'exe_time'} } (keys(%parmlog))) {
+    foreach my $id (sort 
+		    {
+			if ($parmlog{$b}{'exe_time'} ne $parmlog{$a}{'exe_time'}) {
+			    return $parmlog{$b}{'exe_time'} <=>$parmlog{$a}{'exe_time'}
+			}
+			my $aid = (split('00000',$a))[-1];
+			my $bid = (split('00000',$b))[-1];
+			return $bid<=>$aid;
+		    } (keys(%parmlog))) {
         my @changes=keys(%{$parmlog{$id}{'logentry'}});
 	my $count = 0;
 	my $time =