--- loncom/interface/lonparmset.pm 2005/06/18 18:51:50 1.230
+++ loncom/interface/lonparmset.pm 2005/11/17 20:04:05 1.267
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.230 2005/06/18 18:51:50 www Exp $
+# $Id: lonparmset.pm,v 1.267 2005/11/17 20:04:05 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -316,6 +316,8 @@ sub storeparm_by_symb {
# store parameter
&storeparm_by_symb_inner
($symb,$spnam,$snum,$nval,$ntype,$uname,$udom,$csec);
+# don't do anything if parameter was reset
+ unless ($nval) { return; }
my ($prefix,$parm)=($spnam=~/^(.*[\_\.])([^\_\.]+)$/);
# remember that this was set
$recstack{$parm}=1;
@@ -629,7 +631,10 @@ sub print_row {
} else {
$parm=~s|\[.*\]\s||g;
}
-
+ my $automatic=&rulescache(($which=~/\_([^\_]+)$/)[0].'_triggers');
+ if ($automatic) {
+ $parm.='
'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'';
+ }
$r->print('
'.$parm.' | ');
my $thismarker=$which;
@@ -901,12 +906,12 @@ ENDSCRIPT
$r->print("\n');
@@ -938,7 +943,9 @@ sub partmenu {
$r->print('>'.&mt('All Parts').'');
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('