1: # The LearningOnline Network with CAPA
2: # Set parameters inside of the RAT
3: #
4: # (Search Catalog
5: #
6: # (Internal Server Error Handler
7: #
8: # (Login Screen
9: # 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14,
10: # 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer)
11: #
12: # 3/1/1 Gerd Kortemeyer)
13: #
14: # 3/1 Gerd Kortemeyer)
15: #
16: # 03/03/01,06/15 Gerd Kortemeyer
17: #
18: package Apache::lonratparms;
19:
20: use strict;
21: use Apache::Constants qw(:common);
22:
23: sub handler {
24: my $r = shift;
25: $r->content_type('text/html');
26: $r->send_http_header;
27: return OK if $r->header_only;
28:
29: # Get query string for limited number of parameters
30:
31: map {
32: my ($name, $value) = split(/=/,$_);
33: $value =~ tr/+/ /;
34: $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
35: if (($name eq 'url') || ($name eq 'parms') ||
36: ($name eq 'resid')) {
37: unless ($ENV{'form.'.$name}) {
38: $ENV{'form.'.$name}=$value;
39: }
40: }
41: } (split(/&/,$ENV{'QUERY_STRING'}));
42:
43:
44: # ------------------------------------------------------------------- Read file
45:
46: my $uri=$ENV{'form.url'}.'.meta';
47: my %content;
48: map {
49: $content{$_}=&Apache::lonnet::metadata($uri,$_);
50: } split(/\,/,&Apache::lonnet::metadata($uri,'keys'));
51:
52:
53: # --------------------------------------------------- Print login screen header
54: $r->print(<<ENDDOCUMENT);
55: <html>
56: <head>
57: <title>The LearningOnline Network with CAPA</title>
58: </head>
59: <body bgcolor="#FFFFFF">
60: <h1>Set Resource Parameters in Map</h1>
61: <img src="/adm/lonKaputt/lonconstruct.gif">
62: ENDDOCUMENT
63: map {
64: $r->print($_.' - '.$content{$_}.'<br>');
65: } keys %content;
66: $r->print('</body></html>');
67: return OK;
68: }
69:
70: 1;
71: __END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>