version 1.101, 2004/02/11 15:30:36
|
version 1.102, 2004/02/20 19:44:59
|
Line 42 use Apache::lonlocal;
|
Line 42 use Apache::lonlocal;
|
############################################################### |
############################################################### |
############################################################### |
############################################################### |
sub header { |
sub header { |
my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager'). |
my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager'); |
&Apache::loncommon::help_open_faq(9). |
|
&Apache::loncommon::help_open_bug('Instructor Interface'); |
|
my $title = &mt('LON-CAPA Enrollment Manager'); |
my $title = &mt('LON-CAPA Enrollment Manager'); |
return(<<ENDHEAD); |
return(<<ENDHEAD); |
<html> |
<html> |
Line 2104 sub handler {
|
Line 2102 sub handler {
|
} |
} |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['action','state']); |
['action','state']); |
|
|
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>"/adm/dropadd", |
|
text=>"Enrollment Manager", |
|
faq=>9,bug=>'Instructor Interface',}); |
# Needs to be in a course |
# Needs to be in a course |
if (! (($ENV{'request.course.fn'}) && |
if (! (($ENV{'request.course.fn'}) && |
(&Apache::lonnet::allowed('cst',$ENV{'request.course.id'})))) { |
(&Apache::lonnet::allowed('cst',$ENV{'request.course.id'})))) { |
Line 2115 sub handler {
|
Line 2119 sub handler {
|
# |
# |
# Only output the header information if they did not request csv format |
# Only output the header information if they did not request csv format |
# |
# |
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
|
['state','action']); |
if (exists($ENV{'form.state'}) && ($ENV{'form.state'} eq 'csv')) { |
if (exists($ENV{'form.state'}) && ($ENV{'form.state'} eq 'csv')) { |
$r->content_type('text/csv'); |
$r->content_type('text/csv'); |
} else { |
} else { |
Line 2126 sub handler {
|
Line 2132 sub handler {
|
# |
# |
# Main switch on form.action and form.state, as appropriate |
# Main switch on form.action and form.state, as appropriate |
if (! exists($ENV{'form.action'})) { |
if (! exists($ENV{'form.action'})) { |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Enrollment Manager')); |
&print_main_menu($r); |
&print_main_menu($r); |
} elsif ($ENV{'form.action'} eq 'upload') { |
} elsif ($ENV{'form.action'} eq 'upload') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=upload&state=', |
|
text=>"Upload Classlist", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Upload Classlist')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_first_courselist_upload_form($r); |
&print_first_courselist_upload_form($r); |
} elsif ($ENV{'form.state'} eq 'got_file') { |
} elsif ($ENV{'form.state'} eq 'got_file') { |
Line 2142 sub handler {
|
Line 2156 sub handler {
|
&print_first_courselist_upload_form($r); |
&print_first_courselist_upload_form($r); |
} |
} |
} elsif ($ENV{'form.action'} eq 'drop') { |
} elsif ($ENV{'form.action'} eq 'drop') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=drop', |
|
text=>"Drop Students", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Drop Students')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_drop_menu($r); |
&print_drop_menu($r); |
} elsif ($ENV{'form.state'} eq 'done') { |
} elsif ($ENV{'form.state'} eq 'done') { |
Line 2150 sub handler {
|
Line 2170 sub handler {
|
&print_drop_menu($r); |
&print_drop_menu($r); |
} |
} |
} elsif ($ENV{'form.action'} eq 'enrollstudent') { |
} elsif ($ENV{'form.action'} eq 'enrollstudent') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=enrollstudent', |
|
text=>"Enroll Student", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Enroll Student')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&get_student_username_domain_form($r); |
&get_student_username_domain_form($r); |
} elsif ($ENV{'form.state'} eq 'gotusername') { |
} elsif ($ENV{'form.state'} eq 'gotusername') { |
Line 2160 sub handler {
|
Line 2186 sub handler {
|
&get_student_username_domain_form($r); |
&get_student_username_domain_form($r); |
} |
} |
} elsif ($ENV{'form.action'} eq 'classlist') { |
} elsif ($ENV{'form.action'} eq 'classlist') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=classlist', |
|
text=>"View Classlist", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'View Classlist')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_html_classlist($r); |
&print_html_classlist($r); |
} elsif ($ENV{'form.state'} eq 'csv') { |
} elsif ($ENV{'form.state'} eq 'csv') { |
Line 2170 sub handler {
|
Line 2202 sub handler {
|
&print_html_classlist($r); |
&print_html_classlist($r); |
} |
} |
} elsif ($ENV{'form.action'} eq 'modifystudent') { |
} elsif ($ENV{'form.action'} eq 'modifystudent') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/dropadd?action=modifystudent', |
|
text=>"Modify Student Data", |
|
faq=>9,bug=>'Instructor Interface',}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Modify Student Data')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_html_classlist($r); |
&print_html_classlist($r); |
} elsif ($ENV{'form.state'} eq 'selected') { |
} elsif ($ENV{'form.state'} eq 'selected') { |
Line 2184 sub handler {
|
Line 2222 sub handler {
|
&Apache::lonnet::logthis("Undetermined state in londropadd.pm. ". |
&Apache::lonnet::logthis("Undetermined state in londropadd.pm. ". |
"form.action = ".$ENV{'form.action'}. |
"form.action = ".$ENV{'form.action'}. |
"Someone should fix this."); |
"Someone should fix this."); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
(undef,'Enrollment Manager')); |
&print_main_menu($r); |
&print_main_menu($r); |
} |
} |
# |
# |