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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 04 Jan 2007 19:34:13 -0000


albertel		Thu Jan  4 14:34:13 2007 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  - order parameters that got stored at the samtime by the id number
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.355 loncom/interface/lonparmset.pm:1.356
--- loncom/interface/lonparmset.pm:1.355	Thu Dec 14 15:49:22 2006
+++ loncom/interface/lonparmset.pm	Thu Jan  4 14:34:13 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.355 2006/12/14 20:49:22 albertel Exp $
+# $Id: lonparmset.pm,v 1.356 2007/01/04 19:34:13 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3753,7 +3753,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 =