version 1.42, 2002/05/09 15:56:02
|
version 1.46, 2002/08/21 17:18:08
|
Line 59 use Apache::Constants qw(:common :http R
|
Line 59 use Apache::Constants qw(:common :http R
|
# ================================================================ Print header |
# ================================================================ Print header |
|
|
sub header { |
sub header { |
|
my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager'); |
return(<<ENDHEAD); |
return(<<ENDHEAD); |
<html> |
<html> |
<head> |
<head> |
<title>LON-CAPA Enrollment Manager</title> |
<title>LON-CAPA Enrollment Manager</title> |
</head> |
</head> |
<body bgcolor="#FFFFFF"> |
$bodytag |
<img align=right src=/adm/lonIcons/lonlogos.gif> |
|
<h1>$ENV{'course.'.$ENV{'request.course.id'}.'.description'}</h1> |
|
<h2>Enrollment Manager</h2> |
|
<form method="post" enctype="multipart/form-data" |
<form method="post" enctype="multipart/form-data" |
action="/adm/dropadd" name="studentform"> |
action="/adm/dropadd" name="studentform"> |
ENDHEAD |
ENDHEAD |
Line 129 sub domain_form {
|
Line 127 sub domain_form {
|
$select_menus{$dom}->{'default'}= 'default'; |
$select_menus{$dom}->{'default'}= 'default'; |
$select_menus{$dom}->{'select2'}->{'default'} = 'default'; |
$select_menus{$dom}->{'select2'}->{'default'} = 'default'; |
# Now build up the other items in the second menu |
# Now build up the other items in the second menu |
my %servers = &Apache::loncommon::get_home_servers($dom); |
my %servers = &Apache::loncommon::get_library_servers($dom); |
foreach my $server (keys(%servers)) { |
foreach my $server (keys(%servers)) { |
$select_menus{$dom}->{'select2'}->{$server} |
$select_menus{$dom}->{'select2'}->{$server} |
= "$server $servers{$server}"; |
= "$server $servers{$server}"; |
Line 145 sub domain_form {
|
Line 143 sub domain_form {
|
sub menu_phase_one { |
sub menu_phase_one { |
my $r=shift; |
my $r=shift; |
my $upfile_select=&Apache::loncommon::upfile_select_html(); |
my $upfile_select=&Apache::loncommon::upfile_select_html(); |
|
my $create_classlist_help = |
|
&Apache::loncommon::help_open_topic("Course_Create_Class_List", |
|
"How do I create a class list from a spreadsheet"); |
|
my $create_csv_help = |
|
&Apache::loncommon::help_open_topic("Course_Convert_To_CSV", |
|
"How do I create a CSV file from a spreadsheet"); |
$r->print(<<ENDUPFORM); |
$r->print(<<ENDUPFORM); |
<input type=hidden name=phase value=two> |
<input type=hidden name=phase value=two> |
<hr> |
<hr> |
<h3>Upload a courselist</h3> |
<h3>Upload a courselist</h3> |
$upfile_select |
$upfile_select |
<p><input type=submit name="fileupload" value="Upload Courselist"> |
<p><input type=submit name="fileupload" value="Upload Courselist"> |
|
<br /> |
|
$create_classlist_help <br /> |
|
$create_csv_help |
|
|
<hr /> |
<hr /> |
<h3>Enroll a single student</h3> |
<h3>Enroll a single student</h3> |
<p><input type=submit name="enroll" value="Enroll Student"></p> |
<p><input type=submit name="enroll" value="Enroll Student"></p> |
Line 526 sub enroll_single_student {
|
Line 534 sub enroll_single_student {
|
if (lc($desiredhost) eq 'default') { |
if (lc($desiredhost) eq 'default') { |
$desiredhost = undef; |
$desiredhost = undef; |
} else { |
} else { |
my %home_servers = &Apache::loncommon::get_home_servers($domain); |
my %home_servers =&Apache::loncommon::get_library_servers($domain); |
if (! exists($home_servers{$desiredhost})) { |
if (! exists($home_servers{$desiredhost})) { |
$r->print('<font color="#ff0000">Error:</font>'. |
$r->print('<font color="#ff0000">Error:</font>'. |
'Invalid home server specified'); |
'Invalid home server specified'); |
Line 909 sub upfile_drop_add {
|
Line 917 sub upfile_drop_add {
|
if (lc($desiredhost) eq 'default') { |
if (lc($desiredhost) eq 'default') { |
$desiredhost = undef; |
$desiredhost = undef; |
} else { |
} else { |
my %home_servers = &Apache::loncommon::get_home_servers($domain); |
my %home_servers = &Apache::loncommon::get_library_servers($domain); |
if (! exists($home_servers{$desiredhost})) { |
if (! exists($home_servers{$desiredhost})) { |
$r->print('<font color="#ff0000">Error:</font>'. |
$r->print('<font color="#ff0000">Error:</font>'. |
'Invalid home server specified'); |
'Invalid home server specified'); |