# The LearningOnline Network with CAPA # Handler to drop and add students in courses # # (Handler to set parameters for assessments # # (Handler to resolve ambiguous file locations # # (TeX Content Handler # # 05/29/00,05/30,10/11 Gerd Kortemeyer) # # 10/11,10/12,10/16 Gerd Kortemeyer) # # 11/20,11/21,11/22,11/23,11/24,11/25,11/27,11/28, # 12/08,12/12 Gerd Kortemeyer) # # 12/26 Gerd Kortemeyer package Apache::londropadd; use strict; use Apache::lonnet; use Apache::Constants qw(:common :http REDIRECT); # ================================================================ Main Handler sub handler { my $r=shift; if ($r->header_only) { $r->content_type('text/html'); $r->send_http_header; return OK; } # ----------------------------------------------------- Needs to be in a course if (($ENV{'request.course.fn'}) && (&Apache::lonnet::allowed('cst',$ENV{'request.course.id'}))) { # ------------------------------------------------------------------ Start page $r->content_type('text/html'); $r->send_http_header; $r->print(< LON-CAPA Student Drop/Add

Drop/Add Students

Course: $ENV{'course.'.$ENV{'request.course.id'}.'.description'}

ENDHEAD $r->print('
'); } else { # ----------------------------- Not in a course, or not allowed to modify parms $ENV{'user.error.msg'}= "/adm/dropadd:cst:0:0:Cannot drop or add students"; return HTTP_NOT_ACCEPTABLE; } return OK; } 1; __END__