version 1.140, 2006/04/26 14:52:22
|
version 1.158, 2007/04/17 15:45:03
|
Line 39 use Apache::Constants qw(:common :http R
|
Line 39 use Apache::Constants qw(:common :http R
|
use Spreadsheet::WriteExcel; |
use Spreadsheet::WriteExcel; |
use Apache::lonstathelpers(); |
use Apache::lonstathelpers(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::longroup; |
|
use LONCAPA(); |
|
|
############################################################### |
############################################################### |
############################################################### |
############################################################### |
Line 59 sub modifystudent {
|
Line 61 sub modifystudent {
|
# if $csec is undefined, drop the student from all the courses matching |
# if $csec is undefined, drop the student from all the courses matching |
# this one. If $csec is defined, drop them from all other sections of |
# this one. If $csec is defined, drop them from all other sections of |
# this course and add them to section $csec |
# this course and add them to section $csec |
$courseid=~s/\_/\//g; |
my $cdom = $env{'course.'.$courseid.'.domain'}; |
$courseid=~s/^(\w)/\/$1/; |
my $cnum = $env{'course.'.$courseid.'.num'}; |
my %roles = &Apache::lonnet::dump('roles',$udom,$unam); |
my %roles = &Apache::lonnet::dump('roles',$udom,$unam); |
my ($tmp) = keys(%roles); |
my ($tmp) = keys(%roles); |
# Bail out if we were unable to get the students roles |
# Bail out if we were unable to get the students roles |
Line 68 sub modifystudent {
|
Line 70 sub modifystudent {
|
# Go through the roles looking for enrollment in this course |
# Go through the roles looking for enrollment in this course |
my $result = ''; |
my $result = ''; |
foreach my $course (keys(%roles)) { |
foreach my $course (keys(%roles)) { |
if ($course=~/^$courseid(?:\/)*(?:\s+)*(\w+)*\_st$/) { |
if ($course=~m{^/\Q$cdom\E/\Q$cnum\E(?:\/)*(?:\s+)*(\w+)*\_st$}) { |
# We are in this course |
# We are in this course |
my $section=$1; |
my $section=$1; |
$section='' if ($course eq $courseid.'_st'); |
$section='' if ($course eq "/$cdom/$cnum".'_st'); |
if (defined($csec) && $section eq $csec) { |
if (defined($csec) && $section eq $csec) { |
$result .= 'ok:'; |
$result .= 'ok:'; |
} elsif ( ((!$section) && (!$csec)) || ($section ne $csec) ) { |
} elsif ( ((!$section) && (!$csec)) || ($section ne $csec) ) { |
my (undef,$end,$start)=split(/\_/,$roles{$course}); |
my (undef,$end,$start)=split(/\_/,$roles{$course}); |
my $now=time; |
my $now=time; |
# if this is an active role |
# if this is an active role |
if (!($start && ($now<$start)) || !($end && ($now>$end))) { |
if (!($start && ($now<$start)) || !($end && ($now>$end))) { |
my $reply=&Apache::lonnet::modifystudent |
my $reply=&Apache::lonnet::modifystudent |
# dom name id mode pass f m l g |
# dom name id mode pass f m l g |
Line 104 sub domain_form {
|
Line 106 sub domain_form {
|
# Set up domain and server selection forms |
# Set up domain and server selection forms |
# |
# |
# Get the domains |
# Get the domains |
my @domains = &Apache::loncommon::get_domains(); |
my @domains = &Apache::lonnet::all_domains(); |
# build up the menu information to be passed to |
# build up the menu information to be passed to |
# &Apache::loncommon::linked_select_forms |
# &Apache::loncommon::linked_select_forms |
my %select_menus; |
my %select_menus; |
Line 115 sub domain_form {
|
Line 117 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_library_servers($dom); |
my %servers = &Apache::lonnet::get_servers($dom,'library'); |
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 134 sub print_main_menu {
|
Line 136 sub print_main_menu {
|
my ($r,$enrl_permission,$view_permission,$grp_manage_permission, |
my ($r,$enrl_permission,$view_permission,$grp_manage_permission, |
$grp_view_permission)=@_; |
$grp_view_permission)=@_; |
# |
# |
my ($cdom,$cnum) = split/_/,$env{'request.course.id'}; |
my $cid =$env{'request.course.id'}; |
|
my $cdom=$env{'course.'.$cid.'.domain'}; |
|
my $cnum=$env{'course.'.$cid.'.num'}; |
my @menu = |
my @menu = |
( |
( |
{ text => 'Upload a class list', |
{ text => 'Upload a class list', |
Line 181 sub print_main_menu {
|
Line 185 sub print_main_menu {
|
permission => $grp_manage_permission, |
permission => $grp_manage_permission, |
url => '/adm/coursegroups?refpage=enrl&action=delete', |
url => '/adm/coursegroups?refpage=enrl&action=delete', |
}, |
}, |
|
{ text => 'Re-enable a deleted group', |
|
help => 'Course_Reenable_Group', |
|
permission => $grp_manage_permission, |
|
url => '/adm/coursegroups?refpage=enrl&action=reenable', |
|
}, |
{ text => 'Enter an existing group', |
{ text => 'Enter an existing group', |
help => 'Course_Display_Group', |
help => 'Course_Display_Group', |
permission => $grp_view_permission, |
permission => $grp_view_permission, |
Line 249 sub print_upload_manager_header {
|
Line 258 sub print_upload_manager_header {
|
# |
# |
my $javascript_validations=&javascript_validations('auth',$krbdefdom, |
my $javascript_validations=&javascript_validations('auth',$krbdefdom, |
$password_choice); |
$password_choice); |
my $checked=(($env{'form.noFirstLine'})?' checked="1"':''); |
my $checked=(($env{'form.noFirstLine'})?' checked="checked" ':''); |
$r->print('<h3>'.&mt('Uploading Class List')."</h3>\n". |
$r->print('<h3>'.&mt('Uploading Class List')."</h3>\n". |
"<hr>\n". |
"<hr>\n". |
'<h3>'.&mt('Identify fields')."</h3>\n"); |
'<h3>'.&mt('Identify fields')."</h3>\n"); |
Line 268 sub print_upload_manager_header {
|
Line 277 sub print_upload_manager_header {
|
$r->print('<input type="button" value="Reverse Association" '. |
$r->print('<input type="button" value="Reverse Association" '. |
'name="'.&mt('Reverse Association').'" '. |
'name="'.&mt('Reverse Association').'" '. |
'onClick="javascript:this.form.associate.value=\'Reverse Association\';submit(this.form);" />'); |
'onClick="javascript:this.form.associate.value=\'Reverse Association\';submit(this.form);" />'); |
$r->print('<label><input type="checkbox" name="noFirstLine" $checked />'. |
$r->print('<label><input type="checkbox" name="noFirstLine"'.$checked.'/>'. |
&mt('Ignore First Line').'</label>'); |
&mt('Ignore First Line').'</label>'); |
$r->print("<hr />\n". |
$r->print("<hr />\n". |
'<script type="text/javascript" language="Javascript">'."\n". |
'<script type="text/javascript" language="Javascript">'."\n". |
Line 307 sub javascript_validations {
|
Line 316 sub javascript_validations {
|
ipass => 'You need to specify the initial password.', |
ipass => 'You need to specify the initial password.', |
name => 'The optional name field was not specified.', |
name => 'The optional name field was not specified.', |
snum => 'The optional student number field was not specified.', |
snum => 'The optional student number field was not specified.', |
section => 'The optional section or group field was not specified.', |
section => 'The optional section field was not specified.', |
email => 'The optional email address field was not specified.', |
email => 'The optional email address field was not specified.', |
continue => 'Continue enrollment?', |
continue => 'Continue enrollment?', |
); |
); |
Line 393 END
|
Line 402 END
|
} |
} |
END |
END |
} |
} |
|
my $section_checks; |
my $optional_checks = ''; |
my $optional_checks = ''; |
if ( ($mode eq 'createcourse') || ($mode eq 'modifycourse') ) { |
if ( ($mode eq 'createcourse') || ($mode eq 'modifycourse') ) { |
$optional_checks = (<<END); |
$optional_checks = (<<END); |
Line 400 END
|
Line 410 END
|
} |
} |
END |
END |
} else { |
} else { |
|
$section_checks = §ion_check_js(); |
$optional_checks = (<<END); |
$optional_checks = (<<END); |
var message=''; |
var message=''; |
if (foundname==0) { |
if (foundname==0) { |
Line 440 END
|
Line 451 END
|
if ( ($mode eq 'auth') || ($mode eq 'createcourse') || ($mode eq 'modifycourse') ) { |
if ( ($mode eq 'auth') || ($mode eq 'createcourse') || ($mode eq 'modifycourse') ) { |
$result .= $auth_checks; |
$result .= $auth_checks; |
} |
} |
$result .= $optional_checks; |
$result .= $optional_checks."\n".$section_checks; |
if ( ($mode eq 'auth') || ($mode eq 'createcourse') || ($mode eq 'modifycourse') ) { |
if ( ($mode eq 'auth') || ($mode eq 'createcourse') || ($mode eq 'modifycourse') ) { |
$result .= $authheader; |
$result .= $authheader; |
} |
} |
Line 451 END
|
Line 462 END
|
############################################################### |
############################################################### |
sub upload_manager_javascript_forward_associate { |
sub upload_manager_javascript_forward_associate { |
return(<<ENDPICK); |
return(<<ENDPICK); |
function verify(vf) { |
function verify(vf,sec_caller) { |
var founduname=0; |
var founduname=0; |
var foundpwd=0; |
var foundpwd=0; |
var foundname=0; |
var foundname=0; |
Line 544 ENDPICK
|
Line 555 ENDPICK
|
############################################################### |
############################################################### |
sub upload_manager_javascript_reverse_associate { |
sub upload_manager_javascript_reverse_associate { |
return(<<ENDPICK); |
return(<<ENDPICK); |
function verify(vf) { |
function verify(vf,sec_caller) { |
var founduname=0; |
var founduname=0; |
var foundpwd=0; |
var foundpwd=0; |
var foundname=0; |
var foundname=0; |
Line 640 sub print_upload_manager_footer {
|
Line 651 sub print_upload_manager_footer {
|
$Str .= &mt('Disable ID/Student Number Safeguard and Force Change '. |
$Str .= &mt('Disable ID/Student Number Safeguard and Force Change '. |
'of Conflicting IDs (only do if you know what you are doing)'). |
'of Conflicting IDs (only do if you know what you are doing)'). |
"</label>\n</p><p>\n"; |
"</label>\n</p><p>\n"; |
$Str .= '<input type="button" onClick="javascript:verify(this.form)" '. |
$Str .= '<input type="button"'. |
|
'onClick="javascript:verify(this.form,this.form.csec)" '. |
'value="Update Class List" />'."<br />\n"; |
'value="Update Class List" />'."<br />\n"; |
$Str .= &mt('Note: for large courses, this operation may be time '. |
$Str .= &mt('Note: for large courses, this operation may be time '. |
'consuming'); |
'consuming'); |
Line 701 sub print_upload_manager_form {
|
Line 713 sub print_upload_manager_form {
|
['lname',&mt('Last Name'), $env{'form.lname_choice'}], |
['lname',&mt('Last Name'), $env{'form.lname_choice'}], |
['gen', &mt('Generation'), $env{'form.gen_choice'}], |
['gen', &mt('Generation'), $env{'form.gen_choice'}], |
['id', &mt('ID/Student Number'),$env{'form.id_choice'}], |
['id', &mt('ID/Student Number'),$env{'form.id_choice'}], |
['sec', &mt('Group/Section'), $env{'form.sec_choice'}], |
['sec', &mt('Section'), $env{'form.sec_choice'}], |
['ipwd', &mt('Initial Password'),$env{'form.ipwd_choice'}], |
['ipwd', &mt('Initial Password'),$env{'form.ipwd_choice'}], |
['email',&mt('EMail Address'), $env{'form.email_choice'}]); |
['email',&mt('EMail Address'), $env{'form.email_choice'}]); |
if ($env{'form.upfile_associate'} eq 'reverse') { |
if ($env{'form.upfile_associate'} eq 'reverse') { |
Line 742 sub enroll_single_student {
|
Line 754 sub enroll_single_student {
|
$r->print('<h3>'.&mt('Enrolling Student').'</h3>'); |
$r->print('<h3>'.&mt('Enrolling Student').'</h3>'); |
$r->print('<p>'.&mt('Enrolling').' '.$env{'form.cuname'}." \@ ". |
$r->print('<p>'.&mt('Enrolling').' '.$env{'form.cuname'}." \@ ". |
$env{'form.lcdomain'}.'</p>'); |
$env{'form.lcdomain'}.'</p>'); |
if (($env{'form.cuname'})&&($env{'form.cuname'}!~/\W/)&& |
if (($env{'form.cuname'}) |
($env{'form.lcdomain'})&&($env{'form.lcdomain'}!~/\W/)) { |
&& ($env{'form.cuname'} |
|
eq &LONCAPA::clean_username($env{'form.cuname'})) |
|
&& ($env{'form.lcdomain'}) |
|
&& ($env{'form.lcdomain'} |
|
eq &LONCAPA::clean_domain($env{'form.lcdomain'}))) { |
# Deal with home server selection |
# Deal with home server selection |
my $domain=$env{'form.lcdomain'}; |
my $domain=$env{'form.lcdomain'}; |
my $desiredhost = $env{'form.lcserver'}; |
my $desiredhost = $env{'form.lcserver'}; |
if (lc($desiredhost) eq 'default') { |
if (lc($desiredhost) eq 'default') { |
$desiredhost = undef; |
$desiredhost = undef; |
} else { |
} else { |
my %home_servers =&Apache::loncommon::get_library_servers($domain); |
my %home_servers =&Apache::lonnet::get_servers($domain,'library'); |
if (! exists($home_servers{$desiredhost})) { |
if (! exists($home_servers{$desiredhost})) { |
$r->print('<font color="#ff0000">'.&mt('Error').':</font>'. |
$r->print('<font color="#ff0000">'.&mt('Error').':</font>'. |
&mt('Invalid home server specified')); |
&mt('Invalid home server specified')); |
Line 806 sub enroll_single_student {
|
Line 822 sub enroll_single_student {
|
} else { |
} else { |
$r->print(&mt('Invalid username or domain')); |
$r->print(&mt('Invalid username or domain')); |
} |
} |
|
$r->print("<p><a href='/adm/dropadd?action=enrollstudent'>".&mt("Enroll another student")."</a></p>"); |
} |
} |
|
|
sub setup_date_selectors { |
sub setup_date_selectors { |
Line 932 sub get_student_username_domain_form {
|
Line 949 sub get_student_username_domain_form {
|
<input type="hidden" name="state" value="gotusername" /> |
<input type="hidden" name="state" value="gotusername" /> |
<h3>$lt{'eos'}</h3> |
<h3>$lt{'eos'}</h3> |
<table> |
<table> |
<tr><th>$lt{'usr'}:</th> |
<tr><th><label for="cuname">$lt{'usr'}</label>:</th> |
<td><input type="text" name="cuname" size="15" /></td></tr> |
<td><input type="text" name="cuname" size="15" /></td></tr> |
<tr><th>$lt{'dom'}:</th> |
<tr><th><label for="cudomain">$lt{'dom'}</label>:</th> |
<td>$domform</td></tr> |
<td>$domform</td></tr> |
<tr><th> </th> |
<tr><th> </th> |
<td> |
<td> |
Line 953 sub print_enroll_single_student_form {
|
Line 970 sub print_enroll_single_student_form {
|
my $r=shift; |
my $r=shift; |
$r->print("<h3>".&mt('Enroll One Student')."</h3>"); |
$r->print("<h3>".&mt('Enroll One Student')."</h3>"); |
# |
# |
my $username = $env{'form.cuname'}; |
my $username = &LONCAPA::clean_username($env{'form.cuname'}); |
my $domain = $env{'form.cudomain'}; |
my $domain = &LONCAPA::clean_domain($env{'form.cudomain'}); |
$username=~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 982 sub print_enroll_single_student_form {
|
Line 997 sub print_enroll_single_student_form {
|
# |
# |
# Set up domain selection form |
# Set up domain selection form |
my $homeserver_form = ''; |
my $homeserver_form = ''; |
my %servers = &Apache::loncommon::get_library_servers($domain); |
my %servers = &Apache::lonnet::get_servers($domain,'library'); |
$homeserver_form = '<select name="lcserver" size="1">'."\n". |
$homeserver_form = '<select name="lcserver" size="1">'."\n". |
'<option value="default" selected>default</option>'."\n"; |
'<option value="default" selected>default</option>'."\n"; |
while (my ($servername,$serverdescription) = each (%servers)) { |
while (my ($servername,$serverdescription) = each (%servers)) { |
Line 1007 sub print_enroll_single_student_form {
|
Line 1022 sub print_enroll_single_student_form {
|
$user_data_html = <<END; |
$user_data_html = <<END; |
<h3>$lt{'udf'} $username\@$domain</h3> |
<h3>$lt{'udf'} $username\@$domain</h3> |
<table> |
<table> |
<tr><th>$lt{'fn'}:</th> |
<tr><th><label for="cfirst">$lt{'fn'}</label>:</th> |
<td><input type="text" name="cfirst" size="15"></td></tr> |
<td><input type="text" name="cfirst" size="15"></td></tr> |
<tr><th>$lt{'mn'}:</th> |
<tr><th><label for="cmiddle">$lt{'mn'}</label>:</th> |
<td><input type="text" name="cmiddle" size="15"></td></tr> |
<td><input type="text" name="cmiddle" size="15"></td></tr> |
<tr><th>$lt{'ln'}:</th> |
<tr><th><label for="clast">$lt{'ln'}</label>:</th> |
<td><input type="text" name="clast" size="15"></td></tr> |
<td><input type="text" name="clast" size="15"></td></tr> |
<tr><th>$lt{'gen'}:</th> |
<tr><th><label for="cgen">$lt{'gen'}</label>:</th> |
<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><label for="lcserver">$lt{'hs'}</label>:</th> |
<td>$homeserver_form</td></tr> |
<td>$homeserver_form</td></tr> |
<tr><th>$lt{'mail'}:</th> |
<tr><th><label for="emailaddress">$lt{'mail'}</label>:</th> |
<td><input type="text" name="emailaddress" size="20" /></td></tr> |
<td><input type="text" name="emailaddress" size="20" /></td></tr> |
</table> |
</table> |
<h3>$lt{'pswd'}</h3> |
<h3>$lt{'pswd'}</h3> |
Line 1047 END
|
Line 1062 END
|
<h3>$lt{'udf'} $username\@$domain</h3> |
<h3>$lt{'udf'} $username\@$domain</h3> |
<input type="hidden" name="lcserver" value="default" /> |
<input type="hidden" name="lcserver" value="default" /> |
<table> |
<table> |
<tr><th>$lt{'fn'}:</th> |
<tr><th><label for="cfirst">$lt{'fn'}</label>:</th> |
<td> |
<td> |
<input type="text" name="cfirst" value="$uenv{'firstname'}" size="15" /> |
<input type="text" name="cfirst" value="$uenv{'firstname'}" size="15" /> |
</td></tr> |
</td></tr> |
<tr><th>$lt{'mn'}:</th> |
<tr><th><label for="cmiddle">$lt{'mn'}</label>:</th> |
<td> |
<td> |
<input type="text" name="cmiddle" value="$uenv{'middlename'}" size="15" /> |
<input type="text" name="cmiddle" value="$uenv{'middlename'}" size="15" /> |
</td></tr> |
</td></tr> |
<tr><th>$lt{'ln'}:</th> |
<tr><th><label for="clast">$lt{'ln'}</label>:</th> |
<td> |
<td> |
<input type="text" name="clast"value="$uenv{'lastname'}" size="15" /> |
<input type="text" name="clast"value="$uenv{'lastname'}" size="15" /> |
</td></tr> |
</td></tr> |
<tr><th>$lt{'gen'}:</th> |
<tr><th><label for="cgen">$lt{'gen'}</label>:</th> |
<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> |
<tr><th><label for="emailaddress">$lt{'mail'}</label>:</th> |
<td> |
<td> |
<input type="text" name="emailaddress" value="$uenv{'permanentemail'}" size="20" /> |
<input type="text" name="emailaddress" value="$uenv{'permanentemail'}" size="20" /> |
</td></tr> |
</td></tr> |
Line 1074 END
|
Line 1089 END
|
# Print it all out |
# Print it all out |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'cd' => "Course Data", |
'cd' => "Course Data", |
'gs' => "Group/Section", |
'gs' => "Section", |
'idsn' => "ID/Student Number", |
'idsn' => "ID/Student Number", |
'disn' => "Disable ID/Student Number Safeguard and Force Change of Conflicting IDs (only do if you know what you are doing)", |
'disn' => "Disable ID/Student Number Safeguard and Force Change of Conflicting IDs (only do if you know what you are doing)", |
'eas' => "Enroll as student", |
'eas' => "Enroll as student", |
Line 1085 END
|
Line 1100 END
|
<input type="hidden" name="cuname" value="$username" /> |
<input type="hidden" name="cuname" value="$username" /> |
<input type="hidden" name="lcdomain" value="$domain" /> |
<input type="hidden" name="lcdomain" value="$domain" /> |
<script type="text/javascript" language="Javascript"> |
<script type="text/javascript" language="Javascript"> |
function verify(vf) { |
function verify(vf,sec_caller) { |
var founduname=0; |
var founduname=0; |
var foundpwd=0; |
var foundpwd=0; |
var foundname=0; |
var foundname=0; |
Line 1102 function verify(vf) {
|
Line 1117 function verify(vf) {
|
} |
} |
if ((typeof(vf.csec.value)!="undefined") && (vf.csec.value!='')) { |
if ((typeof(vf.csec.value)!="undefined") && (vf.csec.value!='')) { |
foundsec=1; |
foundsec=1; |
|
if (validate(sec_caller) == "error") { |
|
return; |
|
} |
} |
} |
if ((typeof(vf.cstid.value)!="undefined") && (vf.cstid.value!='')) { |
if ((typeof(vf.cstid.value)!="undefined") && (vf.cstid.value!='')) { |
foundid=1; |
foundid=1; |
Line 1138 $lt{'idsn'}: <input type="text" name="cs
|
Line 1156 $lt{'idsn'}: <input type="text" name="cs
|
$lt{'disn'} |
$lt{'disn'} |
</label> |
</label> |
</p><p> |
</p><p> |
<input type="button" onClick="verify(this.form)" value="$lt{'eas'}"> |
<input type="button" onClick="verify(this.form,this.form.csec)" value="$lt{'eas'}"> |
</p> |
</p> |
END |
END |
return; |
return; |
Line 1165 sub print_html_classlist {
|
Line 1183 sub print_html_classlist {
|
if (! exists($env{'form.sortby'})) { |
if (! exists($env{'form.sortby'})) { |
$env{'form.sortby'} = 'username'; |
$env{'form.sortby'} = 'username'; |
} |
} |
if ($env{'form.Status'} !~ /^(Any|Expired|Active)$/) { |
if ($env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) { |
$env{'form.Status'} = 'Active'; |
$env{'form.Status'} = 'Active'; |
} |
} |
my $status_select = &Apache::lonhtmlcommon::StatusOptions |
my $status_select = &Apache::lonhtmlcommon::StatusOptions |
($env{'form.Status'}); |
($env{'form.Status'}); |
my $cid=$env{'request.course.id'}; |
my $cid =$env{'request.course.id'}; |
my $cdom=$env{'course.'.$cid.'.domain'}; |
my $cdom=$env{'course.'.$cid.'.domain'}; |
my $cnum=$env{'course.'.$cid.'.num'}; |
my $cnum=$env{'course.'.$cid.'.num'}; |
# |
# |
Line 1243 sub print_html_classlist {
|
Line 1261 sub print_html_classlist {
|
sub show_class_list { |
sub show_class_list { |
my ($r,$mode,$linkto,$statusmode,$classlist,$keylist)=@_; |
my ($r,$mode,$linkto,$statusmode,$classlist,$keylist)=@_; |
my $cid=$env{'request.course.id'}; |
my $cid=$env{'request.course.id'}; |
|
my $cdom = $env{'course.'.$cid.'.domain'}; |
|
my $cnum = $env{'course.'.$cid.'.num'}; |
|
my ($classgroups) = &Apache::loncoursedata::get_group_memberships( |
|
$classlist,$keylist,$cdom,$cnum); |
# |
# |
# Variables for excel output |
# Variables for excel output |
my ($excel_workbook, $excel_sheet, $excel_filename,$row,$format); |
my ($excel_workbook, $excel_sheet, $excel_filename,$row,$format); |
Line 1251 sub show_class_list {
|
Line 1273 sub show_class_list {
|
my ($CSVfile,$CSVfilename); |
my ($CSVfile,$CSVfilename); |
# |
# |
my $sortby = $env{'form.sortby'}; |
my $sortby = $env{'form.sortby'}; |
if ($sortby !~ /^(username|domain|section|fullname|id|start|end|type)$/) { |
if ($sortby !~ /^(username|domain|section|groups|fullname|id|start|end|type)$/) { |
$sortby = 'username'; |
$sortby = 'username'; |
} |
} |
if (! exists($env{'form.displayphotos'})) { |
if (! exists($env{'form.displayphotos'})) { |
Line 1271 END
|
Line 1293 END
|
END |
END |
if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll') { |
if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll') { |
if ($linkto eq 'aboutme') { |
if ($linkto eq 'aboutme') { |
$r->print(&mt('Select a user name to view the users personal page.')); |
$r->print(&mt("Select a user name to view the user's personal page.")); |
} elsif ($linkto eq 'modify') { |
} elsif ($linkto eq 'modify') { |
$r->print(&mt('Select a user name to modify the students information')); |
$r->print(&mt("Select a user name to modify the student's information")); |
} |
} |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'usrn' => "username", |
'usrn' => "username", |
'dom' => "domain", |
'dom' => "domain", |
'sn' => "student name", |
'sn' => "student name", |
'sec' => "section", |
'sec' => "section", |
|
'grp' => "active groups", |
'start' => "start date", |
'start' => "start date", |
'end' => "end date", |
'end' => "end date", |
'type' => "enroll type/action", |
'type' => "enroll type/action", |
Line 1333 function photowindow(photolink) {
|
Line 1356 function photowindow(photolink) {
|
<a href="javascript:document.studentform.sortby.value='start';document.studentform.submit();">$lt{'start'}</a> |
<a href="javascript:document.studentform.sortby.value='start';document.studentform.submit();">$lt{'start'}</a> |
</th><th> |
</th><th> |
<a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a> |
<a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a> |
|
</th><th> |
|
<a href="javascript:document.studentform.sortby.value='groups';document.studentform.submit();">$lt{'grp'}</a> |
</th> |
</th> |
END |
END |
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) { |
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) { |
Line 1369 END
|
Line 1394 END
|
if($statusmode eq 'Expired') { |
if($statusmode eq 'Expired') { |
print $CSVfile '"'.&mt('Students with expired roles').'"'."\n"; |
print $CSVfile '"'.&mt('Students with expired roles').'"'."\n"; |
} |
} |
|
if($statusmode eq 'Future') { |
|
print $CSVfile '"'.&mt('Students with future roles').'"'."\n"; |
|
} |
if ($statusmode eq 'Any') { |
if ($statusmode eq 'Any') { |
print $CSVfile '"'.join('","',map { |
print $CSVfile '"'.join('","',map { |
&Apache::loncommon::csv_translate(&mt($_)) |
&Apache::loncommon::csv_translate(&mt($_)) |
} ("username","domain","ID","student name", |
} ("username","domain","ID","student name", |
"section","start date","end date","status")).'"'."\n"; |
"section","start date","end date","status","active groups")) |
|
.'"'."\n"; |
} else { |
} else { |
print $CSVfile '"'.join('","',map { |
print $CSVfile '"'.join('","',map { |
&Apache::loncommon::csv_translate(&mt($_)) |
&Apache::loncommon::csv_translate(&mt($_)) |
} ("username","domain","ID","student name", |
} ("username","domain","ID","student name", |
"section","start date","end date")).'"'."\n"; |
"section","start date","end date","active groups")).'"'."\n"; |
} |
} |
} elsif ($mode eq 'excel') { |
} elsif ($mode eq 'excel') { |
# Create the excel spreadsheet |
# Create the excel spreadsheet |
Line 1393 END
|
Line 1422 END
|
# |
# |
$excel_sheet->write($row++,0,["username","domain","ID", |
$excel_sheet->write($row++,0,["username","domain","ID", |
"student name","section", |
"student name","section", |
"start date","end date","status"], |
"start date","end date","status", |
|
"active groups"], |
$format->{'bold'}); |
$format->{'bold'}); |
} |
} |
# |
# |
Line 1403 END
|
Line 1433 END
|
foreach (@$keylist) { |
foreach (@$keylist) { |
$index{$_} = $i++; |
$index{$_} = $i++; |
} |
} |
|
$index{'groups'} = scalar(@{$keylist}); |
my $index = $index{$sortby}; |
my $index = $index{$sortby}; |
my $second = $index{'username'}; |
my $second = $index{'username'}; |
my $third = $index{'domain'}; |
my $third = $index{'domain'}; |
Line 1420 END
|
Line 1451 END
|
my $lockcount = 0; |
my $lockcount = 0; |
foreach my $student (@Sorted_Students) { |
foreach my $student (@Sorted_Students) { |
my $sdata = $classlist->{$student}; |
my $sdata = $classlist->{$student}; |
|
my $groups = $classgroups->{$student}; |
my $username = $sdata->[$index{'username'}]; |
my $username = $sdata->[$index{'username'}]; |
my $domain = $sdata->[$index{'domain'}]; |
my $domain = $sdata->[$index{'domain'}]; |
my $section = $sdata->[$index{'section'}]; |
my $section = $sdata->[$index{'section'}]; |
|
my $active_groups; |
|
if (ref($groups->{active}) eq 'HASH') { |
|
$active_groups = join(', ',keys(%{$groups->{'active'}})); |
|
} |
my $name = $sdata->[$index{'fullname'}]; |
my $name = $sdata->[$index{'fullname'}]; |
my $id = $sdata->[$index{'id'}]; |
my $id = $sdata->[$index{'id'}]; |
my $status = $sdata->[$index{'status'}]; |
my $status = $sdata->[$index{'status'}]; |
Line 1488 END
|
Line 1524 END
|
<td>$section</td> |
<td>$section</td> |
<td>$start</td> |
<td>$start</td> |
<td>$end</td> |
<td>$end</td> |
|
<td>$active_groups</td> |
END |
END |
if ($env{'course.'.$env{'request.course.id'}. |
if ($env{'course.'.$env{'request.course.id'}. |
'.internal.showphoto'}) { |
'.internal.showphoto'}) { |
Line 1523 END
|
Line 1560 END
|
if ($statusmode eq 'Any') { |
if ($statusmode eq 'Any') { |
push @line,&Apache::loncommon::csv_translate($status); |
push @line,&Apache::loncommon::csv_translate($status); |
} |
} |
|
push @line,&Apache::loncommon::csv_translate($active_groups); |
print $CSVfile '"'.join('","',@line).'"'."\n"; |
print $CSVfile '"'.join('","',@line).'"'."\n"; |
} elsif ($mode eq 'excel') { |
} elsif ($mode eq 'excel') { |
$excel_sheet->write($row,0,[$username,$domain,$id, |
$excel_sheet->write($row,0,[$username,$domain,$id, |
Line 1538 END
|
Line 1576 END
|
} |
} |
} |
} |
$excel_sheet->write($row,$col++,$status); |
$excel_sheet->write($row,$col++,$status); |
|
$excel_sheet->write($row,$col++,$active_groups); |
$row++; |
$row++; |
} |
} |
} |
} |
Line 1617 sub print_modify_student_form {
|
Line 1656 sub print_modify_student_form {
|
my $date_table = &date_setting_table($starttime,$endtime); |
my $date_table = &date_setting_table($starttime,$endtime); |
# |
# |
if (! exists($env{'form.Status'}) || |
if (! exists($env{'form.Status'}) || |
$env{'form.Status'} !~ /^(Any|Expired|Active)$/) { |
$env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) { |
$env{'form.Status'} = 'crap'; |
$env{'form.Status'} = 'crap'; |
} |
} |
# Make sure student is enrolled in course |
# Make sure student is enrolled in course |
Line 1634 sub print_modify_student_form {
|
Line 1673 sub print_modify_student_form {
|
'sec' => "Section", |
'sec' => "Section", |
'sm' => "Submit Modifications", |
'sm' => "Submit Modifications", |
); |
); |
$r->print(<<END); |
# Check if section name is valid |
|
my $section_check = §ion_check_js(); |
|
$r->print(<<"END"); |
|
<script type="text/javascript"> |
|
$section_check |
|
function secverify(formname,caller) { |
|
if (validate(caller) == "error") { |
|
return; |
|
} else { |
|
formname.submit(); |
|
} |
|
} |
|
</script> |
<p> |
<p> |
<font size="+1"> |
<font size="+1"> |
$lt{'odcc'} |
$lt{'odcc'} |
Line 1670 $lt{'disn'}
|
Line 1721 $lt{'disn'}
|
</p> |
</p> |
<p>$current_date_description</p> |
<p>$current_date_description</p> |
<p>$date_table</p> |
<p>$date_table</p> |
<input type="submit" value="$lt{'sm'}" /> |
<input type="button" value="$lt{'sm'}" onClick="secverify(this.form,this.form.section)" /> |
END |
END |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return; |
return; |
Line 1830 END
|
Line 1881 END
|
sub get_enrollment_data { |
sub get_enrollment_data { |
my ($sname,$sdomain) = @_; |
my ($sname,$sdomain) = @_; |
my $courseid = $env{'request.course.id'}; |
my $courseid = $env{'request.course.id'}; |
$courseid =~ s:_:/:g; |
my $cdom = $env{'course.'.$courseid.'.domain'}; |
|
my $cnum = $env{'course.'.$courseid.'.num'}; |
my %roles = &Apache::lonnet::dump('roles',$sdomain,$sname); |
my %roles = &Apache::lonnet::dump('roles',$sdomain,$sname); |
my ($tmp) = keys(%roles); |
my ($tmp) = keys(%roles); |
# Bail out if we were unable to get the students roles |
# Bail out if we were unable to get the students roles |
Line 1840 sub get_enrollment_data {
|
Line 1892 sub get_enrollment_data {
|
my $section = ''; |
my $section = ''; |
my $count = scalar(keys(%roles)); |
my $count = scalar(keys(%roles)); |
while (my ($course,$role) = each(%roles)) { |
while (my ($course,$role) = each(%roles)) { |
if ($course=~ /^\/$courseid\/*\s*(\w+)*_st$/ ) { |
if ($course=~m{^/\Q$cdom\E/\Q$cnum\E/*\s*(\w+)*_st$} ) { |
# |
# |
# Get active role |
# Get active role |
$section=$1; |
$section=$1; |
Line 1894 sub show_drop_list {
|
Line 1946 sub show_drop_list {
|
['sortby']); |
['sortby']); |
} |
} |
my $sortby = $env{'form.sortby'}; |
my $sortby = $env{'form.sortby'}; |
if ($sortby !~ /^(username|domain|section|fullname|id|start|end)$/) { |
if ($sortby !~ /^(username|domain|section|groups|fullname|id|start|end)$/) { |
$sortby = 'username'; |
$sortby = 'username'; |
} |
} |
|
my $cdom = $env{'course.'.$cid.'.domain'}; |
|
my $cnum = $env{'course.'.$cid,'.num'}; |
|
my ($classgroups) = &Apache::loncoursedata::get_group_memberships( |
|
$classlist,$keylist,$cdom,$cnum); |
# |
# |
my $action = "drop"; |
my $action = "drop"; |
$r->print(<<END); |
$r->print(<<END); |
Line 1924 my %lt=&Apache::lonlocal::texthash('usrn
|
Line 1980 my %lt=&Apache::lonlocal::texthash('usrn
|
'sec' => "section", |
'sec' => "section", |
'start' => "start date", |
'start' => "start date", |
'end' => "end date", |
'end' => "end date", |
|
'groups' => "active groups", |
); |
); |
if ($nosort) { |
if ($nosort) { |
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table()); |
Line 1937 my %lt=&Apache::lonlocal::texthash('usrn
|
Line 1994 my %lt=&Apache::lonlocal::texthash('usrn
|
<th>$lt{'sec'}</th> |
<th>$lt{'sec'}</th> |
<th>$lt{'start'}</th> |
<th>$lt{'start'}</th> |
<th>$lt{'end'}</th> |
<th>$lt{'end'}</th> |
|
<th>$lt{'groups'}</th> |
</tr> |
</tr> |
END |
END |
|
|
Line 1958 END
|
Line 2016 END
|
<a href="/adm/dropadd?action=$action&sortby=start">$lt{'start'}</a> |
<a href="/adm/dropadd?action=$action&sortby=start">$lt{'start'}</a> |
</th><th> |
</th><th> |
<a href="/adm/dropadd?action=$action&sortby=end">$lt{'end'}</a> |
<a href="/adm/dropadd?action=$action&sortby=end">$lt{'end'}</a> |
|
</th><th> |
|
<a href="/adm/dropadd?action=$action&sortby=groups">$lt{'groups'}</a> |
</th> |
</th> |
</tr> |
</tr> |
END |
END |
Line 1969 END
|
Line 2029 END
|
foreach (@$keylist) { |
foreach (@$keylist) { |
$index{$_} = $i++; |
$index{$_} = $i++; |
} |
} |
|
$index{'groups'} = scalar(@$keylist); |
my $index = $index{$sortby}; |
my $index = $index{$sortby}; |
my $second = $index{'username'}; |
my $second = $index{'username'}; |
my $third = $index{'domain'}; |
my $third = $index{'domain'}; |
Line 1989 END
|
Line 2050 END
|
my $id = $sdata->[$index{'id'}]; |
my $id = $sdata->[$index{'id'}]; |
my $start = $sdata->[$index{'start'}]; |
my $start = $sdata->[$index{'start'}]; |
my $end = $sdata->[$index{'end'}]; |
my $end = $sdata->[$index{'end'}]; |
|
my $groups = $classgroups->{$student}; |
|
my $active_groups; |
|
if (ref($groups->{active}) eq 'HASH') { |
|
$active_groups = join(', ',keys(%{$groups->{'active'}})); |
|
} |
if (! defined($start) || $start == 0) { |
if (! defined($start) || $start == 0) { |
$start = &mt('none'); |
$start = &mt('none'); |
} else { |
} else { |
Line 2012 END
|
Line 2078 END
|
<td>$section</td> |
<td>$section</td> |
<td>$start</td> |
<td>$start</td> |
<td>$end</td> |
<td>$end</td> |
|
<td>$active_groups</td> |
END |
END |
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
} |
} |
Line 2104 sub upfile_drop_add {
|
Line 2171 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_library_servers($domain); |
my %home_servers = &Apache::lonnet::get_servers($domain,'library'); |
if (! exists($home_servers{$desiredhost})) { |
if (! exists($home_servers{$desiredhost})) { |
$r->print('<font color="#ff0000">'.&mt('Error').'</font>'. |
$r->print('<font color="#ff0000">'.&mt('Error').'</font>'. |
&mt('Invalid home server specified')); |
&mt('Invalid home server specified')); |
Line 2138 sub upfile_drop_add {
|
Line 2205 sub upfile_drop_add {
|
$amode = ''; # This causes the loop below to be skipped |
$amode = ''; # This causes the loop below to be skipped |
} |
} |
} |
} |
unless (($domain=~/\W/) || ($amode eq '')) { |
if ( $domain eq &LONCAPA::clean_domain($domain) |
|
&& ($amode ne '')) { |
####################################### |
####################################### |
## Enroll Students ## |
## Enroll Students ## |
####################################### |
####################################### |
Line 2146 sub upfile_drop_add {
|
Line 2214 sub upfile_drop_add {
|
my $count=0; |
my $count=0; |
my $flushc=0; |
my $flushc=0; |
my %student=(); |
my %student=(); |
|
# Get information about course groups |
|
my %curr_groups = &Apache::longroup::coursegroups(); |
# Get new classlist |
# Get new classlist |
foreach (@studentdata) { |
foreach (@studentdata) { |
my %entries=&Apache::loncommon::record_sep($_); |
my %entries=&Apache::loncommon::record_sep($_); |
Line 2170 sub upfile_drop_add {
|
Line 2240 sub upfile_drop_add {
|
$gen=$entries{$fields{'gen'}}; |
$gen=$entries{$fields{'gen'}}; |
} |
} |
} |
} |
if ($entries{$fields{'username'}}=~/\W/) { |
if ($entries{$fields{'username'}} |
|
ne &LONCAPA::clean_username($entries{$fields{'username'}})) { |
$r->print('<br />'. |
$r->print('<br />'. |
&mt('<b>[_1]</b>: Unacceptable username for user [_2] [_3] [_4] [_5]', |
&mt('<b>[_1]</b>: Unacceptable username for user [_2] [_3] [_4] [_5]', |
$entries{$fields{'username'}},$fname,$mname,$lname,$gen). |
$entries{$fields{'username'}},$fname,$mname,$lname,$gen). |
Line 2186 sub upfile_drop_add {
|
Line 2257 sub upfile_drop_add {
|
} |
} |
# remove non alphanumeric values from section |
# remove non alphanumeric values from section |
$sec =~ s/\W//g; |
$sec =~ s/\W//g; |
|
if ($sec eq "none" || $sec eq 'all') { |
|
$r->print('<br />'. |
|
&mt('<b>[_1]</b>: Unable to enroll: section name "[_2]" for user [_3] [_4] [_5] [_6] is a reserved word.', |
|
$username,$sec,$fname,$mname,$lname,$gen)); |
|
next; |
|
} elsif (($sec ne '') && (exists($curr_groups{$sec}))) { |
|
$r->print('<br />'. |
|
&mt('<b>[_1]</b>: Unable to enroll: section name "[_2]" for user [_3] [_4] [_5] [_6] is a course group. Section names and group names must be distinct.', |
|
$username,$sec,$fname,$mname,$lname,$gen)); |
|
next; |
|
} |
# determine student id number |
# determine student id number |
my $id=''; |
my $id=''; |
if (defined($fields{'id'})) { |
if (defined($fields{'id'})) { |
Line 2301 sub drop_student_list {
|
Line 2383 sub drop_student_list {
|
$r->print('<p>'.&mt('Re-enrollment will re-activate data.')) if ($count); |
$r->print('<p>'.&mt('Re-enrollment will re-activate data.')) if ($count); |
} |
} |
|
|
|
sub section_check_js { |
|
my $groupslist; |
|
my %curr_groups = &Apache::longroup::coursegroups(); |
|
if (%curr_groups) { |
|
$groupslist = join('","',sort(keys(%curr_groups))); |
|
} |
|
return <<"END"; |
|
function validate(caller) { |
|
var groups = new Array("$groupslist"); |
|
var secname = caller.value; |
|
if ((secname == 'all') || (secname == 'none')) { |
|
alert("'"+secname+"' may not be used as the name for a section, as it is a reserved word.\\nPlease choose a different section name."); |
|
return 'error'; |
|
} |
|
if (secname != '') { |
|
for (var k=0; k<groups.length; k++) { |
|
if (secname == groups[k]) { |
|
alert("'"+secname+"' may not be used as the name for a section, as it is the name of a course group.\\nSection names and group names must be distinct. Please choose a different section name."); |
|
return 'error'; |
|
} |
|
} |
|
} |
|
return 'ok'; |
|
} |
|
END |
|
} |
|
|
################################################################### |
################################################################### |
################################################################### |
################################################################### |
|
|
Line 2388 sub handler {
|
Line 2497 sub handler {
|
# |
# |
# Main switch on form.action and form.state, as appropriate |
# Main switch on form.action and form.state, as appropriate |
if (! exists($env{'form.action'})) { |
if (! exists($env{'form.action'})) { |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Enrollment Manager')); |
(undef,'Enrollment Manager')); |
|
&print_main_menu($r,$enrl_permission,$view_permission,$grp_manage_permission, |
&print_main_menu($r,$enrl_permission,$view_permission,$grp_manage_permission, |
$grp_view_permission); |
$grp_view_permission); |
} elsif ($env{'form.action'} eq 'upload' && $enrl_permission) { |
} elsif ($env{'form.action'} eq 'upload' && $enrl_permission) { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=upload&state=', |
({href=>'/adm/dropadd?action=upload&state=', |
text=>"Upload Classlist"}); |
text=>"Upload Classlist"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Upload Classlist', |
(undef,'Upload Classlist','Course_Create_Class_List')); |
'Course_Create_Class_List')); |
if (! exists($env{'form.state'})) { |
if (! exists($env{'form.state'})) { |
&print_first_courselist_upload_form($r); |
&print_first_courselist_upload_form($r); |
} elsif ($env{'form.state'} eq 'got_file') { |
} elsif ($env{'form.state'} eq 'got_file') { |
Line 2415 sub handler {
|
Line 2523 sub handler {
|
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=drop', |
({href=>'/adm/dropadd?action=drop', |
text=>"Drop Students"}); |
text=>"Drop Students"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Drop Students', |
(undef,'Drop Students','Course_Drop_Student')); |
'Course_Drop_Student')); |
if (! exists($env{'form.state'})) { |
if (! exists($env{'form.state'})) { |
&print_drop_menu($r); |
&print_drop_menu($r); |
} elsif ($env{'form.state'} eq 'done') { |
} elsif ($env{'form.state'} eq 'done') { |
Line 2428 sub handler {
|
Line 2536 sub handler {
|
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=enrollstudent', |
({href=>'/adm/dropadd?action=enrollstudent', |
text=>"Enroll Student"}); |
text=>"Enroll Student"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Enroll Student', |
(undef,'Enroll Student','Course_Add_Student')); |
'Course_Add_Student')); |
if (! exists($env{'form.state'})) { |
if (! exists($env{'form.state'})) { |
&get_student_username_domain_form($r); |
&get_student_username_domain_form($r); |
} elsif ($env{'form.state'} eq 'gotusername') { |
} elsif ($env{'form.state'} eq 'gotusername') { |
Line 2443 sub handler {
|
Line 2551 sub handler {
|
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=classlist', |
({href=>'/adm/dropadd?action=classlist', |
text=>"View Classlist"}); |
text=>"View Classlist"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('View Classlist', |
(undef,'View Classlist','Course_View_Class_List')); |
'Course_View_Class_List')); |
if (! exists($env{'form.state'})) { |
if (! exists($env{'form.state'})) { |
&print_html_classlist($r,undef); |
&print_html_classlist($r,undef); |
} elsif ($env{'form.state'} eq 'csv') { |
} elsif ($env{'form.state'} eq 'csv') { |
Line 2458 sub handler {
|
Line 2566 sub handler {
|
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/dropadd?action=modifystudent', |
({href=>'/adm/dropadd?action=modifystudent', |
text=>"Modify Student Data"}); |
text=>"Modify Student Data"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Modify Student Data', |
(undef,'Modify Student Data','Course_Modify_Student_Data')); |
'Course_Modify_Student_Data')); |
if (! exists($env{'form.state'})) { |
if (! exists($env{'form.state'})) { |
&print_html_classlist($r); |
&print_html_classlist($r); |
} elsif ($env{'form.state'} eq 'selected') { |
} elsif ($env{'form.state'} eq 'selected') { |
Line 2474 sub handler {
|
Line 2582 sub handler {
|
&Apache::lonnet::logthis("Undetermined state in londropadd.pm. ". |
&Apache::lonnet::logthis("Undetermined state in londropadd.pm. ". |
"form.action = ".$env{'form.action'}. |
"form.action = ".$env{'form.action'}. |
"Someone should fix this."); |
"Someone should fix this."); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Enrollment Manager')); |
(undef,'Enrollment Manager')); |
|
&print_main_menu($r,$enrl_permission,$view_permission); |
&print_main_menu($r,$enrl_permission,$view_permission); |
} |
} |
# |
# |