1: # The LearningOnline Network with CAPA
2: # Handler to drop and add students in courses
3: #
4: # (Handler to set parameters for assessments
5: #
6: # (Handler to resolve ambiguous file locations
7: #
8: # (TeX Content Handler
9: #
10: # 05/29/00,05/30,10/11 Gerd Kortemeyer)
11: #
12: # 10/11,10/12,10/16 Gerd Kortemeyer)
13: #
14: # 11/20,11/21,11/22,11/23,11/24,11/25,11/27,11/28,
15: # 12/08,12/12 Gerd Kortemeyer)
16: #
17: # 12/26 Gerd Kortemeyer
18:
19: package Apache::londropadd;
20:
21: use strict;
22: use Apache::lonnet;
23: use Apache::Constants qw(:common :http REDIRECT);
24:
25:
26: # ================================================================ Main Handler
27:
28: sub handler {
29: my $r=shift;
30:
31: if ($r->header_only) {
32: $r->content_type('text/html');
33: $r->send_http_header;
34: return OK;
35: }
36:
37: # ----------------------------------------------------- Needs to be in a course
38:
39: if (($ENV{'request.course.fn'}) &&
40: (&Apache::lonnet::allowed('cst',$ENV{'request.course.id'}))) {
41:
42: # ------------------------------------------------------------------ Start page
43: $r->content_type('text/html');
44: $r->send_http_header;
45: $r->print(<<ENDHEAD);
46: <html>
47: <head>
48: <title>LON-CAPA Student Drop/Add</title>
49: </head>
50: <body bgcolor="#FFFFFF">
51: <img align=right src=/adm/lonIcons/lonlogos.gif>
52: <h1>Drop/Add Students</h1>
53: <form method="post" enctype="multipart/form-data"
54: action="/adm/dropadd" name="studentform">
55: <h2>Course: $ENV{'course.'.$ENV{'request.course.id'}.'.description'}</h2>
56: ENDHEAD
57:
58: $r->print('</form></body></html>');
59: } else {
60: # ----------------------------- Not in a course, or not allowed to modify parms
61: $ENV{'user.error.msg'}=
62: "/adm/dropadd:cst:0:0:Cannot drop or add students";
63: return HTTP_NOT_ACCEPTABLE;
64: }
65: return OK;
66: }
67:
68: 1;
69: __END__
70:
71:
72:
73:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>