[LON-CAPA-cvs] cvs: rat / lonratparms.pm

www lon-capa-cvs@mail.lon-capa.org
Sat, 24 Apr 2004 14:23:27 -0000


www		Sat Apr 24 10:23:27 2004 EDT

  Modified files:              
    /rat	lonratparms.pm 
  Log:
  Inside-RAT parameters need to override stored parameters.
  
  
Index: rat/lonratparms.pm
diff -u rat/lonratparms.pm:1.21 rat/lonratparms.pm:1.22
--- rat/lonratparms.pm:1.21	Fri Apr 23 20:41:51 2004
+++ rat/lonratparms.pm	Sat Apr 24 10:23:27 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Set parameters inside of the RAT
 #
-# $Id: lonratparms.pm,v 1.21 2004/04/24 00:41:51 www Exp $
+# $Id: lonratparms.pm,v 1.22 2004/04/24 14:23:27 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -55,6 +55,14 @@
   
 # ---------------------------------------------------------- Current Parameters
 
+  foreach (split(/\,/,&Apache::lonnet::metadata($uri,'keys'))) {
+      if ($_=~/^parameter\_/) {
+         $content{$_}=&Apache::lonnet::metadata($uri,$_);
+         $type{$_}=&Apache::lonnet::metadata($uri,$_.'.type');
+         $display{$_}=&Apache::lonnet::metadata($uri,$_.'.display');
+      }
+  }
+
   foreach (split(/\:/,$ENV{'form.parms'})) {
       my ($ptype,$pname,$pvalue)=split(/\_\_\_/,$_);
       unless ($pname) { next; }
@@ -64,14 +72,6 @@
       $type{$pname}=$ptype;
       $display{$pname}=&mt('Custom Parameter');
   } 
-
-  foreach (split(/\,/,&Apache::lonnet::metadata($uri,'keys'))) {
-      if ($_=~/^parameter\_/) {
-         $content{$_}=&Apache::lonnet::metadata($uri,$_);
-         $type{$_}=&Apache::lonnet::metadata($uri,$_.'.type');
-         $display{$_}=&Apache::lonnet::metadata($uri,$_.'.display');
-      }
-  }
   
 # --------------------------------------------------- Print input screen header
     my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();