--- loncom/interface/Attic/londropadd.pm 2004/12/02 19:00:38 1.122 +++ loncom/interface/Attic/londropadd.pm 2005/03/10 17:33:57 1.126 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # -# $Id: londropadd.pm,v 1.122 2004/12/02 19:00:38 matthew Exp $ +# $Id: londropadd.pm,v 1.126 2005/03/10 17:33:57 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -43,10 +43,11 @@ use Apache::lonlocal; ############################################################### ############################################################### sub header { + my $html=&Apache::lonxml::xmlbegin(); my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager'); my $title = &mt('LON-CAPA Enrollment Manager'); return(< +$html $title @@ -770,7 +771,7 @@ sub enroll_single_student { $ENV{'form.clast'},$ENV{'form.cgen'}, $ENV{'form.csec'},$enddate, $startdate,$ENV{'form.forceid'}, - $desiredhost); + $desiredhost,$ENV{'form.emailaddress'}); if ($login_result =~ /^ok/) { $r->print($login_result); $r->print("

".&mt('If active, the new role will be available when the student next logs in to LON-CAPA.')."

"); @@ -937,8 +938,8 @@ sub print_enroll_single_student_form { # my $username = $ENV{'form.cuname'}; my $domain = $ENV{'form.cudomain'}; - $username=~s/[\W|_]//gs; - $domain=~s/[\W|_]//gs; + $username=~s/\W//gs; + $domain=~s/\W//gs; my $home = &Apache::lonnet::homeserver($username,$domain); # $new_user flags whether we are creating a new user or using an old one my $new_user = 1; @@ -983,6 +984,7 @@ sub print_enroll_single_student_form { 'hs' => "Home Server", 'pswd' => "Password", 'psam' => "Please select an authentication mechanism", + 'mail' => "Email Address" ); $user_data_html = <$lt{'udf'} $username\@$domain @@ -997,6 +999,8 @@ sub print_enroll_single_student_form { $lt{'hs'}: $homeserver_form +$lt{'mail'}: +

$lt{'pswd'}

$lt{'psam'} @@ -1019,6 +1023,7 @@ END 'mn' => "Middle Name", 'ln' => "Last Name", 'gen' => "Generation", + 'mail' => "Email Address", ); $user_data_html = <$lt{'udf'} $username\@$domain @@ -1040,6 +1045,10 @@ END +$lt{'mail'}: + + + END } @@ -1317,14 +1326,9 @@ END } } elsif ($mode eq 'excel') { # Create the excel spreadsheet - $excel_filename = '/prtspool/'. - $ENV{'user.name'}.'_'.$ENV{'user.domain'}.'_'. - time.'_'.rand(1000000000).'.xls'; - $excel_workbook = Spreadsheet::WriteExcel->new('/home/httpd'. - $excel_filename); - $excel_workbook->set_tempdir('/home/httpd/perl/tmp'); - # - $format = &Apache::loncommon::define_excel_formats($excel_workbook); + ($excel_workbook,$excel_filename,$format) = + &Apache::loncommon::create_workbook($r); + return if (! defined($excel_workbook)); $excel_sheet = $excel_workbook->addworksheet('classlist'); # my $description = 'Class List for '.