--- rat/lonratparms.pm	2001/03/03 16:51:38	1.1
+++ rat/lonratparms.pm	2001/06/15 14:37:03	1.2
@@ -13,7 +13,7 @@
 #
 # 3/1 Gerd Kortemeyer)
 #
-# 03/03/01 Gerd Kortemeyer
+# 03/03/01,06/15 Gerd Kortemeyer
 #
 package Apache::lonratparms;
 
@@ -26,6 +26,30 @@ sub handler {
     $r->send_http_header;
     return OK if $r->header_only;
 
+# Get query string for limited number of parameters
+
+    map {
+       my ($name, $value) = split(/=/,$_);
+       $value =~ tr/+/ /;
+       $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
+       if (($name eq 'url') || ($name eq 'parms') || 
+           ($name eq 'resid')) {
+           unless ($ENV{'form.'.$name}) {
+              $ENV{'form.'.$name}=$value;
+	   }
+       }
+    } (split(/&/,$ENV{'QUERY_STRING'}));
+
+
+# ------------------------------------------------------------------- Read file
+
+  my $uri=$ENV{'form.url'}.'.meta';
+    my %content;
+  map {
+      $content{$_}=&Apache::lonnet::metadata($uri,$_);
+  } split(/\,/,&Apache::lonnet::metadata($uri,'keys'));
+
+
 # --------------------------------------------------- Print login screen header
     $r->print(<<ENDDOCUMENT);
 <html>
@@ -33,11 +57,13 @@ sub handler {
 <title>The LearningOnline Network with CAPA</title>
 </head>
 <body bgcolor="#FFFFFF">
-<h1>Search Catalog</h1>
+<h1>Set Resource Parameters in Map</h1>
 <img src="/adm/lonKaputt/lonconstruct.gif">
-</body>
-</html>
 ENDDOCUMENT
+    map {
+        $r->print($_.' - '.$content{$_}.'<br>');
+    } keys %content;
+    $r->print('</body></html>');
     return OK;
 }