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

www lon-capa-cvs@mail.lon-capa.org
Thu, 28 Mar 2002 21:38:54 -0000


www		Thu Mar 28 16:38:54 2002 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonevaluate.pm 
  Log:
  Evaluate accepts postdata, and get_unprocessed_cgi does not paste over existing
  post values (important when doing no-target post submit on URL with query 
  string - get array reference otherwise).
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.28 loncom/interface/loncommon.pm:1.29
--- loncom/interface/loncommon.pm:1.28	Sat Mar 23 09:54:16 2002
+++ loncom/interface/loncommon.pm	Thu Mar 28 16:38:53 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.28 2002/03/23 14:54:16 albertel Exp $
+# $Id: loncommon.pm,v 1.29 2002/03/28 21:38:53 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -367,7 +367,7 @@
       $value =~ tr/+/ /;
       $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
       &Apache::lonxml::debug("Seting :$name: to :$value:");
-      &add_to_env('form.'.$name,$value);
+      unless ($ENV{'form.'.$name}) { &add_to_env('form.'.$name,$value) };
     }
   }
 }
Index: loncom/interface/lonevaluate.pm
diff -u loncom/interface/lonevaluate.pm:1.6 loncom/interface/lonevaluate.pm:1.7
--- loncom/interface/lonevaluate.pm:1.6	Sat Dec 22 16:46:02 2001
+++ loncom/interface/lonevaluate.pm	Thu Mar 28 16:38:53 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Evaluate
 #
-# $Id: lonevaluate.pm,v 1.6 2001/12/22 21:46:02 www Exp $
+# $Id: lonevaluate.pm,v 1.7 2002/03/28 21:38:53 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -47,6 +47,7 @@
     $r->send_http_header;
     return OK if $r->header_only;
 
+    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['postdata']);
   my $feedurl=$ENV{'form.postdata'};
   $feedurl=~s/^http\:\/\///;
   $feedurl=~s/^$ENV{'SERVER_NAME'}//;