Diff for /loncom/interface/Attic/londropadd.pm between versions 1.122 and 1.126

version 1.122, 2004/12/02 19:00:38 version 1.126, 2005/03/10 17:33:57
Line 43  use Apache::lonlocal; Line 43  use Apache::lonlocal;
 ###############################################################  ###############################################################
 ###############################################################  ###############################################################
 sub header {  sub header {
       my $html=&Apache::lonxml::xmlbegin();
     my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager');      my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager');
     my $title = &mt('LON-CAPA Enrollment Manager');      my $title = &mt('LON-CAPA Enrollment Manager');
     return(<<ENDHEAD);      return(<<ENDHEAD);
 <html>  $html
 <head>  <head>
 <title>$title</title>  <title>$title</title>
 </head>  </head>
Line 770  sub enroll_single_student { Line 771  sub enroll_single_student {
                  $ENV{'form.clast'},$ENV{'form.cgen'},                   $ENV{'form.clast'},$ENV{'form.cgen'},
                  $ENV{'form.csec'},$enddate,                   $ENV{'form.csec'},$enddate,
                  $startdate,$ENV{'form.forceid'},                   $startdate,$ENV{'form.forceid'},
                  $desiredhost);                   $desiredhost,$ENV{'form.emailaddress'});
             if ($login_result =~ /^ok/) {              if ($login_result =~ /^ok/) {
                 $r->print($login_result);                  $r->print($login_result);
                 $r->print("<p> ".&mt('If active, the new role will be available when the student next logs in to LON-CAPA.')."</p>");                  $r->print("<p> ".&mt('If active, the new role will be available when the student next logs in to LON-CAPA.')."</p>");
Line 937  sub print_enroll_single_student_form { Line 938  sub print_enroll_single_student_form {
     #      #
     my $username = $ENV{'form.cuname'};      my $username = $ENV{'form.cuname'};
     my $domain   = $ENV{'form.cudomain'};      my $domain   = $ENV{'form.cudomain'};
     $username=~s/[\W|_]//gs;      $username=~s/\W//gs;
     $domain=~s/[\W|_]//gs;      $domain=~s/\W//gs;
     my $home = &Apache::lonnet::homeserver($username,$domain);      my $home = &Apache::lonnet::homeserver($username,$domain);
     # $new_user flags whether we are creating a new user or using an old one      # $new_user flags whether we are creating a new user or using an old one
     my $new_user = 1;      my $new_user = 1;
Line 983  sub print_enroll_single_student_form { Line 984  sub print_enroll_single_student_form {
                        'hs'   => "Home Server",                         'hs'   => "Home Server",
                        'pswd' => "Password",                         'pswd' => "Password",
        'psam' => "Please select an authentication mechanism",         'psam' => "Please select an authentication mechanism",
                          'mail' => "Email Address"
    );     );
         $user_data_html = <<END;          $user_data_html = <<END;
 <h3>$lt{'udf'} $username\@$domain</h3>  <h3>$lt{'udf'} $username\@$domain</h3>
Line 997  sub print_enroll_single_student_form { Line 999  sub print_enroll_single_student_form {
     <td><input type="text" name="cgen"    size="5"> </td></tr>      <td><input type="text" name="cgen"    size="5"> </td></tr>
 <tr><th>$lt{'hs'}:</th>  <tr><th>$lt{'hs'}:</th>
     <td>$homeserver_form</td></tr>      <td>$homeserver_form</td></tr>
   <tr><th>$lt{'mail'}:</th>
       <td><input type="text" name="emailaddress" size="20" /></td></tr>
 </table>  </table>
 <h3>$lt{'pswd'}</h3>  <h3>$lt{'pswd'}</h3>
 $lt{'psam'}  $lt{'psam'}
Line 1019  END Line 1023  END
                        'mn'   => "Middle Name",                         'mn'   => "Middle Name",
                        'ln'   => "Last Name",                         'ln'   => "Last Name",
                        'gen'  => "Generation",                         'gen'  => "Generation",
                          'mail' => "Email Address",
    );     );
         $user_data_html = <<END;          $user_data_html = <<END;
 <h3>$lt{'udf'} $username\@$domain</h3>  <h3>$lt{'udf'} $username\@$domain</h3>
Line 1040  END Line 1045  END
     <td>      <td>
     <input type="text" name="cgen" value="$uenv{'generation'}" size="5" />      <input type="text" name="cgen" value="$uenv{'generation'}" size="5" />
     </td></tr>      </td></tr>
   <tr><th>$lt{'mail'}:</th>
       <td>
       <input type="text" name="emailaddress" value="$uenv{'permanentemail'}" size="20" />
       </td></tr>
 </table>  </table>
 END  END
     }      }
Line 1317  END Line 1326  END
         }          }
     } elsif ($mode eq 'excel') {      } elsif ($mode eq 'excel') {
         # Create the excel spreadsheet          # Create the excel spreadsheet
         $excel_filename = '/prtspool/'.          ($excel_workbook,$excel_filename,$format) = 
             $ENV{'user.name'}.'_'.$ENV{'user.domain'}.'_'.              &Apache::loncommon::create_workbook($r);
                 time.'_'.rand(1000000000).'.xls';          return if (! defined($excel_workbook));
         $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_sheet = $excel_workbook->addworksheet('classlist');          $excel_sheet = $excel_workbook->addworksheet('classlist');
         #          #
         my $description = 'Class List for '.          my $description = 'Class List for '.

Removed from v.1.122  
changed lines
  Added in v.1.126


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>