--- loncom/interface/Attic/londropadd.pm 2003/11/07 21:04:37 1.90 +++ loncom/interface/Attic/londropadd.pm 2004/01/21 00:29:56 1.91.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # -# $Id: londropadd.pm,v 1.90 2003/11/07 21:04:37 matthew Exp $ +# $Id: londropadd.pm,v 1.91.2.2 2004/01/21 00:29:56 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -43,6 +43,7 @@ use Apache::lonhtmlcommon(); use Apache::Constants qw(:common :http REDIRECT); use Spreadsheet::WriteExcel; use Apache::lonlocal; +use localenroll(); ############################################################### ############################################################### @@ -146,7 +147,8 @@ sub print_main_menu { 'enrollone' => 'Enroll a single student', 'modify' => 'Modify student data', 'view' => 'View Class List', - 'drop' => 'Drop Students'); + 'drop' => 'Drop Students', + 'populate' => 'Automated Enrollment Manager'); $r->print(< @@ -169,8 +171,15 @@ sub print_main_menu { $Text{'drop'} -

+

+END + if (&localenroll::run() ) { + $r->print(< + $Text{'populate'} + END + } } ############################################################### @@ -231,13 +240,26 @@ sub print_upload_manager_header { ############################################################### ############################################################### sub javascript_validations { - my ($mode,$krbdefdom)=@_; + my ($mode,$krbdefdom,$curr_authtype,$curr_authfield)=@_; my $authheader; if ($mode eq 'auth') { my %param = ( formname => 'studentform', kerb_def_dom => $krbdefdom ); $authheader = &Apache::loncommon::authform_header(%param); + } elsif ($mode eq 'createcourse') { + my %param = ( formname => 'ccrs', + kerb_def_dom => $krbdefdom ); + $authheader = &Apache::loncommon::authform_header(%param); + } elsif ($mode eq 'modifycourse') { + my %param = ( formname => 'cmod', + kerb_def_dom => $krbdefdom, + mode => 'modifycourse', + curr_authtype => $curr_authtype, + curr_autharg => $curr_authfield ); + $authheader = &Apache::loncommon::authform_header(%param); } + + my %alert = &Apache::lonlocal::texthash (username => 'You need to specify the username field.', authen => 'You must choose an authentication type.', @@ -254,7 +276,18 @@ sub javascript_validations { my $function_name =(<'. ' make these dates the default for future enrollment'; + if ($mode eq 'createcourse') { + $dateDefault = ' '; + } my $perpetual = '