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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 17 Jun 2005 18:29:46 -0000


albertel		Fri Jun 17 14:29:46 2005 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  - I have to start locking the doors, the style police keep getting in
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.224 loncom/interface/lonparmset.pm:1.225
--- loncom/interface/lonparmset.pm:1.224	Fri Jun 17 14:11:42 2005
+++ loncom/interface/lonparmset.pm	Fri Jun 17 14:29:45 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.224 2005/06/17 18:11:42 www Exp $
+# $Id: lonparmset.pm,v 1.225 2005/06/17 18:29:45 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2590,11 +2590,11 @@
     if ($env{'form.storerules'}) {
 	my %newrules=();
 	my @delrules=();
-	foreach (keys %env) {
-            if ($_=~/^form\.(\w+)\_action$/) {
+	foreach my $key (keys(%env)) {
+            if ($key=~/^form\.(\w+)\_action$/) {
 		my $tempkey=$1;
-                if ($env{$_}) {
-		    $newrules{$tempkey.'_action'}=$env{$_};
+                if ($env{$key}) {
+		    $newrules{$tempkey.'_action'}=$env{$key};
 		    if (&isdateparm($defkeytype{$tempkey})) {
 			$newrules{$tempkey.'_hours'}=$env{'form.'.$tempkey.'_hours'};
 			$newrules{$tempkey.'_min'}=$env{'form.'.$tempkey.'_min'};
@@ -2603,11 +2603,11 @@
 			$newrules{$tempkey.'_value'}=$env{'form.'.$tempkey.'_value'};
 		    }
 		} else {
-		    push @delrules,$tempkey.'_action';
-		    push @delrules,$tempkey.'_hours';
-		    push @delrules,$tempkey.'_min';
-		    push @delrules,$tempkey.'_sec';
-		    push @delrules,$tempkey.'_value';
+		    push(@delrules,$tempkey.'_action');
+		    push(@delrules,$tempkey.'_hours');
+		    push(@delrules,$tempkey.'_min');
+		    push(@delrules,$tempkey.'_sec');
+		    push(@delrules,$tempkey.'_value');
 		}
 	    }
 	}