1: # The LearningOnline Network
2: # Create a user
3: #
4: # (Create a course
5: # (My Desk
6: #
7: # (Internal Server Error Handler
8: #
9: # (Login Screen
10: # 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14,
11: # 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer)
12: #
13: # 3/1/1 Gerd Kortemeyer)
14: #
15: # 3/1 Gerd Kortemeyer)
16: #
17: # 2/14 Gerd Kortemeyer)
18: #
19: # 2/14 Gerd Kortemeyer
20: #
21: package Apache::loncreateuser;
22:
23: use strict;
24: use Apache::Constants qw(:common :http);
25: use Apache::lonnet;
26:
27: sub handler {
28: my $r = shift;
29:
30: if ($r->header_only) {
31: $r->content_type('text/html');
32: $r->send_http_header;
33: return OK;
34: }
35:
36: if (&Apache::lonnet::allowed('ccc',$ENV{'user.domain'})) {
37: $r->content_type('text/html');
38: $r->send_http_header;
39:
40:
41: $r->print(<<ENDDOCUMENT);
42: <html>
43: <head>
44: <title>The LearningOnline Network with CAPA</title>
45: </head>
46: <body bgcolor="#FFFFFF">
47: <h1>Create User, Change User Privileges</h1>
48: <img src="/adm/lonKaputt/lonconstruct.gif">
49: </body>
50: </html>
51: ENDDOCUMENT
52:
53: } else {
54: $ENV{'user.error.msg'}=
55: "/adm/createcourse:ccc:0:0:Cannot create courses";
56: return HTTP_NOT_ACCEPTABLE;
57: }
58: return OK;
59: }
60:
61: 1;
62: __END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>