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