--- loncom/interface/Attic/londropadd.pm 2004/02/10 22:15:53 1.100 +++ loncom/interface/Attic/londropadd.pm 2004/02/20 19:44:59 1.102 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # -# $Id: londropadd.pm,v 1.100 2004/02/10 22:15:53 www Exp $ +# $Id: londropadd.pm,v 1.102 2004/02/20 19:44:59 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,9 +42,7 @@ use Apache::lonlocal; ############################################################### ############################################################### sub header { - my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager'). - &Apache::loncommon::help_open_faq(9). - &Apache::loncommon::help_open_bug('Instructor Interface'); + my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager'); my $title = &mt('LON-CAPA Enrollment Manager'); return(< @@ -1365,7 +1363,28 @@ sub print_modify_student_form { $r->print('

'.$starttime.'

'); return; } + # # Deal with date forms + my $current_date_description = ''; + my $textdate = ''; + + if (! defined($starttime) || $starttime == 0) { + $current_date_description = &mt('Current Starting Date: not set'). + '
'; + } else { + $current_date_description = + &mt('Current Starting Date: [_1]', + &Apache::lonlocal::locallocaltime($starttime)).'
'; + } + if (! defined($endtime) || $endtime == 0) { + $current_date_description.= &mt('Current Ending Date: not set'). + '
'; + } else { + $current_date_description.= + &mt('Current Ending Date: [_1]', + &Apache::lonlocal::locallocaltime($endtime)).'
'; + + } my $date_table = &date_setting_table($starttime,$endtime); # if (! exists($ENV{'form.Status'}) || @@ -1398,7 +1417,6 @@ $lt{'odcc'} -

$lt{'mef'} $info{'firstname'} $info{'middlename'} $info{'lastname'} $info{'generation'}, $sname\@$sdom

@@ -1417,8 +1435,9 @@ $info{'lastname'} $info{'generation'}, $ $lt{'disn'}

-$lt{'sec'}: +$lt{'sec'}:

+

$current_date_description

$date_table

@@ -2083,6 +2102,12 @@ sub handler { } &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['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 if (! (($ENV{'request.course.fn'}) && (&Apache::lonnet::allowed('cst',$ENV{'request.course.id'})))) { @@ -2094,6 +2119,8 @@ sub handler { # # 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')) { $r->content_type('text/csv'); } else { @@ -2105,8 +2132,16 @@ sub handler { # # Main switch on form.action and form.state, as appropriate if (! exists($ENV{'form.action'})) { + $r->print(&Apache::lonhtmlcommon::breadcrumbs + (undef,'Enrollment Manager')); &print_main_menu($r); } 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'})) { &print_first_courselist_upload_form($r); } elsif ($ENV{'form.state'} eq 'got_file') { @@ -2121,6 +2156,12 @@ sub handler { &print_first_courselist_upload_form($r); } } 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'})) { &print_drop_menu($r); } elsif ($ENV{'form.state'} eq 'done') { @@ -2129,6 +2170,12 @@ sub handler { &print_drop_menu($r); } } 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'})) { &get_student_username_domain_form($r); } elsif ($ENV{'form.state'} eq 'gotusername') { @@ -2139,6 +2186,12 @@ sub handler { &get_student_username_domain_form($r); } } 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'})) { &print_html_classlist($r); } elsif ($ENV{'form.state'} eq 'csv') { @@ -2149,6 +2202,12 @@ sub handler { &print_html_classlist($r); } } 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'})) { &print_html_classlist($r); } elsif ($ENV{'form.state'} eq 'selected') { @@ -2163,6 +2222,8 @@ sub handler { &Apache::lonnet::logthis("Undetermined state in londropadd.pm. ". "form.action = ".$ENV{'form.action'}. "Someone should fix this."); + $r->print(&Apache::lonhtmlcommon::breadcrumbs + (undef,'Enrollment Manager')); &print_main_menu($r); } #