[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 28 Jun 2005 15:26:08 -0000
albertel Tue Jun 28 11:26:08 2005 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
- sorts the part list a bit better (0 on top, but 2 and 2_* comes before 11)
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.233 loncom/interface/lonparmset.pm:1.234
--- loncom/interface/lonparmset.pm:1.233 Tue Jun 28 11:21:22 2005
+++ loncom/interface/lonparmset.pm Tue Jun 28 11:26:06 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.233 2005/06/28 15:21:22 albertel Exp $
+# $Id: lonparmset.pm,v 1.234 2005/06/28 15:26:06 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -941,7 +941,9 @@
$r->print('>'.&mt('All Parts').'</option>');
my %temphash=();
foreach (@{$psprt}) { $temphash{$_}=1; }
- foreach my $tempkey (sort keys %{$allparts}) {
+ foreach my $tempkey (sort {
+ if ($a==$b) { return ($a cmp $b) } else { return ($a <=> $b); }
+ } keys(%{$allparts})) {
unless ($tempkey =~ /\./) {
$r->print('<option value="'.$tempkey.'"');
if ($$psprt[0] eq "all" || $temphash{$tempkey}) {