version 1.130, 2005/06/03 16:27:26
|
version 1.142, 2006/05/11 20:09:47
|
Line 43 use Apache::lonlocal;
|
Line 43 use Apache::lonlocal;
|
############################################################### |
############################################################### |
############################################################### |
############################################################### |
sub header { |
sub header { |
my $html=&Apache::lonxml::xmlbegin(); |
my $start_page=&Apache::loncommon::start_page('Enrollment Manager'); |
my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager'); |
|
my $title = &mt('LON-CAPA Enrollment Manager'); |
|
return(<<ENDHEAD); |
return(<<ENDHEAD); |
$html |
$start_page |
<head> |
|
<title>$title</title> |
|
</head> |
|
$bodytag |
|
<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 137 sub domain_form {
|
Line 131 sub domain_form {
|
############################################################### |
############################################################### |
# Menu Phase One |
# Menu Phase One |
sub print_main_menu { |
sub print_main_menu { |
my ($r,$enrl_permission,$view_permission)=@_; |
my ($r,$enrl_permission,$view_permission,$grp_manage_permission, |
|
$grp_view_permission)=@_; |
# |
# |
my ($cdom,$cnum) = split/_/,$env{'request.course.id'}; |
my ($cdom,$cnum) = split/_/,$env{'request.course.id'}; |
my @menu = |
my @menu = |
Line 171 sub print_main_menu {
|
Line 166 sub print_main_menu {
|
permission => &Apache::lonnet::auto_run($cnum,$cdom), |
permission => &Apache::lonnet::auto_run($cnum,$cdom), |
url => '/adm/populate', |
url => '/adm/populate', |
}, |
}, |
|
{ text => 'Create a new group', |
|
help => 'Course_Create_Group', |
|
permission => $grp_manage_permission, |
|
url => '/adm/coursegroups?refpage=enrl&action=create', |
|
}, |
|
{ text => 'Modify an existing group', |
|
help => 'Course_Modify_Group', |
|
permission => $grp_manage_permission, |
|
url => '/adm/coursegroups?refpage=enrl&action=modify', |
|
}, |
|
{ text => 'Delete an existing group', |
|
help => 'Course_Delete_Group', |
|
permission => $grp_manage_permission, |
|
url => '/adm/coursegroups?refpage=enrl&action=delete', |
|
}, |
|
{ text => 'Enter an existing group', |
|
help => 'Course_Display_Group', |
|
permission => $grp_view_permission, |
|
url => '/adm/coursegroups?refpage=enrl&action=view', |
|
}, |
); |
); |
my $menu_html = ''; |
my $menu_html = ''; |
foreach my $menu_item (@menu) { |
foreach my $menu_item (@menu) { |
Line 253 sub print_upload_manager_header {
|
Line 268 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('<input type="checkbox" name="noFirstLine" $checked />'. |
$r->print('<label><input type="checkbox" name="noFirstLine" $checked />'. |
&mt('Ignore First Line')); |
&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". |
$javascript."\n".$javascript_validations.'</script>'); |
$javascript."\n".$javascript_validations.'</script>'); |
Line 292 sub javascript_validations {
|
Line 307 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 378 END
|
Line 393 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 385 END
|
Line 401 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 425 END
|
Line 442 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 436 END
|
Line 453 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 529 ENDPICK
|
Line 546 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 617 sub print_upload_manager_footer {
|
Line 634 sub print_upload_manager_footer {
|
$Str .= "<h3>".&mt('Starting and Ending Dates')."</h3>\n"; |
$Str .= "<h3>".&mt('Starting and Ending Dates')."</h3>\n"; |
$Str .= "<p>\n".$date_table."</p>\n"; |
$Str .= "<p>\n".$date_table."</p>\n"; |
$Str .= "<h3>".&mt('Full Update')."</h3>\n"; |
$Str .= "<h3>".&mt('Full Update')."</h3>\n"; |
$Str .= '<input type="checkbox" name="fullup" value="yes">'. |
$Str .= '<label><input type="checkbox" name="fullup" value="yes">'. |
' '.&mt('Full update (also print list of users not enrolled anymore)'). |
' '.&mt('Full update (also print list of users not enrolled anymore)'). |
"</p>\n"; |
"</label></p>\n"; |
$Str .= "<h3>".&mt('Student Number')."</h3>\n"; |
$Str .= "<h3>".&mt('Student Number')."</h3>\n"; |
$Str .= "<p>\n".'<input type="checkbox" name="forceid" value="yes">'; |
$Str .= "<p>\n".'<label><input type="checkbox" name="forceid" value="yes">'; |
$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)'). |
"\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 686 sub print_upload_manager_form {
|
Line 704 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 853 sub date_setting_table {
|
Line 871 sub date_setting_table {
|
my ($starttime,$endtime,$mode) = @_; |
my ($starttime,$endtime,$mode) = @_; |
my ($startform,$endform)=&setup_date_selectors($starttime,$endtime,$mode); |
my ($startform,$endform)=&setup_date_selectors($starttime,$endtime,$mode); |
my $dateDefault = '<nobr>'. |
my $dateDefault = '<nobr>'. |
'<input type="checkbox" name="makedatesdefault" /> '. |
'<label><input type="checkbox" name="makedatesdefault" /> '. |
&mt('make these dates the default for future enrollment'); |
&mt('make these dates the default for future enrollment').'</label>'; |
if ($mode eq 'create_enrolldates' || $mode eq 'create_defaultdates') { |
if ($mode eq 'create_enrolldates' || $mode eq 'create_defaultdates') { |
$dateDefault = ' '; |
$dateDefault = ' '; |
} |
} |
my $perpetual = '<nobr><input type="checkbox" name="no_end_date"'; |
my $perpetual = '<nobr><label><input type="checkbox" name="no_end_date"'; |
if (defined($endtime) && $endtime == 0) { |
if (defined($endtime) && $endtime == 0) { |
$perpetual .= ' checked'; |
$perpetual .= ' checked'; |
} |
} |
$perpetual.= ' /> '.&mt('no ending date').'</nobr>'; |
$perpetual.= ' /> '.&mt('no ending date').'</label></nobr>'; |
if ($mode eq 'create_enrolldates') { |
if ($mode eq 'create_enrolldates') { |
$perpetual = ' '; |
$perpetual = ' '; |
} |
} |
Line 890 sub make_dates_default {
|
Line 908 sub make_dates_default {
|
$result .= "Set default start and end dates for course<br />"; |
$result .= "Set default start and end dates for course<br />"; |
# |
# |
# Refresh the course environment |
# Refresh the course environment |
&Apache::lonnet::coursedescription($env{'request.course.id'}); |
&Apache::lonnet::coursedescription($env{'request.course.id'}, |
|
{'freshen_cache' => 1}); |
} else { |
} else { |
$result .= &mt('Unable to set default dates for course').":".$put_result. |
$result .= &mt('Unable to set default dates for course').":".$put_result. |
'<br />'; |
'<br />'; |
Line 1058 END
|
Line 1077 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 1069 END
|
Line 1088 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 1086 function verify(vf) {
|
Line 1105 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 1117 $date_table
|
Line 1139 $date_table
|
<p> |
<p> |
$lt{'idsn'}: <input type="text" name="cstid" size="10"> |
$lt{'idsn'}: <input type="text" name="cstid" size="10"> |
</p><p> |
</p><p> |
|
<label> |
<input type="checkbox" name="forceid" value="yes"> |
<input type="checkbox" name="forceid" value="yes"> |
$lt{'disn'} |
$lt{'disn'} |
|
</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 1164 sub print_html_classlist {
|
Line 1188 sub print_html_classlist {
|
$env{'form.output'} = 'html'; |
$env{'form.output'} = 'html'; |
} |
} |
# |
# |
$r->print('<br /><table border="2">'); |
$r->print('<br />'.&Apache::loncommon::start_data_table()); |
foreach my $role (sort keys %coursepersonnel) { |
foreach my $role (sort keys %coursepersonnel) { |
next if ($role =~ /^\s*$/); |
next if ($role =~ /^\s*$/); |
$r->print('<tr><td>'.$role.'</td><td>'); |
$r->print(&Apache::loncommon::start_data_table_row(). |
|
'<td>'.$role.'</td><td>'); |
foreach my $user (split(',',$coursepersonnel{$role})) { |
foreach my $user (split(',',$coursepersonnel{$role})) { |
my ($puname,$pudom)=split(':',$user); |
my ($puname,$pudom)=split(':',$user); |
$r->print(' '.&Apache::loncommon::aboutmewrapper( |
$r->print(' '.&Apache::loncommon::aboutmewrapper( |
Line 1175 sub print_html_classlist {
|
Line 1200 sub print_html_classlist {
|
$pudom), |
$pudom), |
$puname,$pudom)); |
$puname,$pudom)); |
} |
} |
$r->print('</td></tr>'); |
$r->print('</td>'.&Apache::loncommon::end_data_table_row()); |
} |
} |
$r->print('</table>'); |
$r->print(&Apache::loncommon::end_data_table()); |
# |
# |
# Interface output |
# Interface output |
$r->print('<input type="hidden" name="action" value="'. |
$r->print('<input type="hidden" name="action" value="'. |
Line 1224 sub print_html_classlist {
|
Line 1249 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 1232 sub show_class_list {
|
Line 1261 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'})) { |
|
$env{'form.displayphotos'} = 'off'; |
|
} |
|
my $displayphotos = $env{'form.displayphotos'}; |
|
|
# Print out header |
# Print out header |
unless ($mode eq 'autoenroll') { |
unless ($mode eq 'autoenroll') { |
$r->print(<<END); |
$r->print(<<END); |
Line 1243 END
|
Line 1277 END
|
} |
} |
$r->print(<<END); |
$r->print(<<END); |
<input type="hidden" name="sortby" value="$sortby" /> |
<input type="hidden" name="sortby" value="$sortby" /> |
|
<input type="hidden" name="displayphotos" value="$displayphotos" /> |
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", |
|
'photo' => "photo", |
); |
); |
unless ($mode eq 'autoenroll') { |
unless ($mode eq 'autoenroll') { |
$r->print(<<END); |
$r->print(<<END); |
Line 1265 END
|
Line 1302 END
|
<input type="hidden" name="sdom" value="" /> |
<input type="hidden" name="sdom" value="" /> |
END |
END |
} |
} |
|
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) { |
|
$r->print(' |
|
<script type="text/javascript"> |
|
function photowindow(photolink) { |
|
var title = "Photo_Viewer"; |
|
var options = "scrollbars=1,resizable=1,menubar=0"; |
|
options += ",width=240,height=240"; |
|
stdeditbrowser = open(photolink,title,options,"1"); |
|
stdeditbrowser.focus(); |
|
} |
|
</script> |
|
'); |
|
} |
$r->print(" |
$r->print(" |
<p> |
<p> |
<table border=2> |
".&Apache::loncommon::start_data_table()." |
<tr> |
<tr> |
"); |
"); |
if ($mode eq 'autoenroll') { |
if ($mode eq 'autoenroll') { |
Line 1294 END
|
Line 1344 END
|
<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> |
</tr> |
|
END |
END |
|
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) { |
|
my %photo_options = &Apache::lonlocal::texthash( |
|
'on' => 'Show', |
|
'off' => 'Hide', |
|
); |
|
my $photochg = 'on'; |
|
if ($displayphotos eq 'on') { |
|
$photochg = 'off'; |
|
} |
|
$r->print(' <th>'."\n".' '. |
|
'<a href="javascript:document.studentform.displayphotos.value='. |
|
"'".$photochg."'".';document.studentform.submit();">'. |
|
$photo_options{$photochg}.'</a> '.$lt{'photo'}."\n". |
|
' </th>'."\n"); |
|
} |
|
$r->print(" </tr>\n"); |
} elsif ($mode eq 'csv') { |
} elsif ($mode eq 'csv') { |
# |
# |
# Open a file |
# Open a file |
Line 1319 END
|
Line 1386 END
|
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 1339 END
|
Line 1407 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 1349 END
|
Line 1418 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 1366 END
|
Line 1436 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 1387 END
|
Line 1462 END
|
} else { |
} else { |
$end = &Apache::lonlocal::locallocaltime($end); |
$end = &Apache::lonlocal::locallocaltime($end); |
} |
} |
$r->print("<tr>\n "); |
$r->print(&Apache::loncommon::start_data_table_row()); |
if ($mode eq 'autoenroll') { |
if ($mode eq 'autoenroll') { |
my $lockedtype = $sdata->[$index{'lockedtype'}]; |
my $lockedtype = $sdata->[$index{'lockedtype'}]; |
$studentcount++; |
$studentcount++; |
my $cellentry; |
my $cellentry; |
if ($type eq 'auto') { |
if ($type eq 'auto') { |
$cellentry = '<b>'.&mt('auto').'</b> <input type="checkbox" name="chgauto" value="'.$username.':'.$domain.'" /> Change'; |
$cellentry = '<b>'.&mt('auto').'</b> <label><input type="checkbox" name="chgauto" value="'.$username.':'.$domain.'" /> Change</label>'; |
$autocount ++; |
$autocount ++; |
} else { |
} else { |
$cellentry = '<table border="0" cellspacing="0"><tr><td rowspan="2"><b>'.&mt('manual').'</b></td><td><nobr><input type="checkbox" name="chgmanual" value="'.$username.':'.$domain.'" /> Change</nobr></td></tr><tr><td><nobr>'; |
$cellentry = '<table border="0" cellspacing="0"><tr><td rowspan="2"><b>'.&mt('manual').'</b></td><td><nobr><label><input type="checkbox" name="chgmanual" value="'.$username.':'.$domain.'" /> Change</label></nobr></td></tr><tr><td><nobr>'; |
$manualcount ++; |
$manualcount ++; |
if ($lockedtype) { |
if ($lockedtype) { |
$cellentry .= '<input type="checkbox" name="unlockchg" value="'.$username.':'.$domain.'" /> '.&mt('Unlock'); |
$cellentry .= '<label><input type="checkbox" name="unlockchg" value="'.$username.':'.$domain.'" /> '.&mt('Unlock').'</label>'; |
$unlockcount ++; |
$unlockcount ++; |
} else { |
} else { |
$cellentry .= '<input type="checkbox" name="lockchg" value="'.$username.':'.$domain.'" /> '.&mt('Lock'); |
$cellentry .= '<label><input type="checkbox" name="lockchg" value="'.$username.':'.$domain.'" /> '.&mt('Lock').'</label>'; |
$lockcount ++; |
$lockcount ++; |
} |
} |
$cellentry .= '</nobr></td></tr></table>'; |
$cellentry .= '</nobr></td></tr></table>'; |
Line 1434 END
|
Line 1509 END
|
<td>$section</td> |
<td>$section</td> |
<td>$start</td> |
<td>$start</td> |
<td>$end</td> |
<td>$end</td> |
</tr> |
<td>$active_groups</td> |
END |
END |
|
if ($env{'course.'.$env{'request.course.id'}. |
|
'.internal.showphoto'}) { |
|
if ($displayphotos eq 'on') { |
|
my $imgurl = |
|
&Apache::lonnet::retrievestudentphoto($domain, |
|
$username,'gif', |
|
'thumbnail'); |
|
|
|
$r->print(' <td align="right"><a href="javascript:photowindow('."'".&Apache::lonnet::studentphoto($domain,$username,'jpg')."'".')"><img src="'.$imgurl.'" border="1"></a></td>'); |
|
} else { |
|
$r->print(' <td> </td> '); |
|
} |
|
} |
|
$r->print(&Apache::loncommon::end_data_table_row()); |
} elsif ($mode eq 'csv') { |
} elsif ($mode eq 'csv') { |
next if (! defined($CSVfile)); |
next if (! defined($CSVfile)); |
# no need to bother with $linkto |
# no need to bother with $linkto |
Line 1456 END
|
Line 1545 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 1471 END
|
Line 1561 END
|
} |
} |
} |
} |
$excel_sheet->write($row,$col++,$status); |
$excel_sheet->write($row,$col++,$status); |
|
$excel_sheet->write($row,$col++,$active_groups); |
$row++; |
$row++; |
} |
} |
} |
} |
if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') { |
if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') { |
$r->print('</table><br>'); |
$r->print(&Apache::loncommon::end_data_table().'<br />'); |
} elsif ($mode eq 'excel') { |
} elsif ($mode eq 'excel') { |
$excel_workbook->close(); |
$excel_workbook->close(); |
$r->print('<p><a href="'.$excel_filename.'">'. |
$r->print('<p><a href="'.$excel_filename.'">'. |
Line 1515 sub print_modify_student_form {
|
Line 1606 sub print_modify_student_form {
|
'<p>'. |
'<p>'. |
&mt('Unable to retrieve environment data for').' '.$sname. |
&mt('Unable to retrieve environment data for').' '.$sname. |
&mt('in domain').' '.$sdom.'</p><p>'. |
&mt('in domain').' '.$sdom.'</p><p>'. |
&mt('Please contact your LON-CAPA administrator regarding this situation.').'</p></body></html>'); |
&mt('Please contact your LON-CAPA administrator regarding this situation.').'</p>'.&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
# determine the students starting and ending times and section |
# determine the students starting and ending times and section |
Line 1567 sub print_modify_student_form {
|
Line 1658 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 1594 $info{'lastname'} $info{'generation'}, $
|
Line 1697 $info{'lastname'} $info{'generation'}, $
|
</p><p> |
</p><p> |
<b>$lt{'sid'}</b>: <input type="text" name="id" value="$info{'id'}" size="12"/> |
<b>$lt{'sid'}</b>: <input type="text" name="id" value="$info{'id'}" size="12"/> |
</p><p> |
</p><p> |
|
<label> |
<input type="checkbox" name="forceid" > |
<input type="checkbox" name="forceid" > |
$lt{'disn'} |
$lt{'disn'} |
|
</label> |
</p><p> |
</p><p> |
<b>$lt{'sec'}</b>: <input type="text" name="section" value="$section" size="14"/> |
<b>$lt{'sec'}</b>: <input type="text" name="section" value="$section" size="14"/> |
</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)" /> |
</body></html> |
|
END |
END |
|
$r->print(&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
|
|
Line 1611 END
|
Line 1716 END
|
# modify a single students section |
# modify a single students section |
# |
# |
sub modify_single_student { |
sub modify_single_student { |
my $r = shift; |
my ($r) = @_; |
# |
# |
# Remove non alphanumeric values from the section |
# Remove non alphanumeric values from the section |
$env{'form.section'} =~ s/\W//g; |
$env{'form.section'} =~ s/\W//g; |
Line 1753 END
|
Line 1858 END
|
<input type="hidden" name="sortby" value="$sortby" /> |
<input type="hidden" name="sortby" value="$sortby" /> |
<input type="hidden" name="Status" value="$status" /> |
<input type="hidden" name="Status" value="$status" /> |
<a href="javascript:document.studentform.submit();">$Masd</a> |
<a href="javascript:document.studentform.submit();">$Masd</a> |
</body></html> |
|
END |
END |
|
$r->print(&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
|
|
Line 1825 sub show_drop_list {
|
Line 1930 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,$cdom,$cnum); |
# |
# |
my $action = "drop"; |
my $action = "drop"; |
$r->print(<<END); |
$r->print(<<END); |
Line 1855 my %lt=&Apache::lonlocal::texthash('usrn
|
Line 1964 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(<<END); |
$r->print(<<END); |
<table border=2> |
|
<tr> |
<tr> |
<th> </th> |
<th> </th> |
<th>$lt{'usrn'}</th> |
<th>$lt{'usrn'}</th> |
Line 1868 my %lt=&Apache::lonlocal::texthash('usrn
|
Line 1978 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 |
|
|
} else { |
} else { |
|
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(<<END); |
$r->print(<<END); |
<table border=2> |
|
<tr><th> </th> |
<tr><th> </th> |
<th> |
<th> |
<a href="/adm/dropadd?action=$action&sortby=username">$lt{'usrn'}</a> |
<a href="/adm/dropadd?action=$action&sortby=username">$lt{'usrn'}</a> |
Line 1889 END
|
Line 2000 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 1900 END
|
Line 2013 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 1920 END
|
Line 2034 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 1933 END
|
Line 2052 END
|
my $status = $sdata->[$index{'status'}]; |
my $status = $sdata->[$index{'status'}]; |
next if ($status ne 'Active'); |
next if ($status ne 'Active'); |
# |
# |
|
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print(<<"END"); |
$r->print(<<"END"); |
<tr> |
|
<td><input type="checkbox" name="droplist" value="$student"></td> |
<td><input type="checkbox" name="droplist" value="$student"></td> |
<td>$username</td> |
<td>$username</td> |
<td>$domain</td> |
<td>$domain</td> |
Line 1943 END
|
Line 2062 END
|
<td>$section</td> |
<td>$section</td> |
<td>$start</td> |
<td>$start</td> |
<td>$end</td> |
<td>$end</td> |
</tr> |
<td>$active_groups</td> |
END |
END |
|
$r->print(&Apache::loncommon::end_data_table_row()); |
} |
} |
$r->print('</table><br>'); |
$r->print(&Apache::loncommon::end_data_table().'<br />'); |
%lt=&Apache::lonlocal::texthash( |
%lt=&Apache::lonlocal::texthash( |
'dp' => "Drop Students", |
'dp' => "Drop Students", |
'ca' => "check all", |
'ca' => "check all", |
Line 1975 sub print_first_courselist_upload_form {
|
Line 2095 sub print_first_courselist_upload_form {
|
$str .= "<p>\n"; |
$str .= "<p>\n"; |
$str .= '<input type="submit" name="fileupload" value="'. |
$str .= '<input type="submit" name="fileupload" value="'. |
&mt('Upload class list').'">'."\n"; |
&mt('Upload class list').'">'."\n"; |
$str .= '<input type="checkbox" name="noFirstLine" /> '. |
$str .= '<label><input type="checkbox" name="noFirstLine" /> '. |
&mt('Ignore First Line')."</p>\n"; |
&mt('Ignore First Line')."</label></p>\n"; |
$str .= &Apache::loncommon::help_open_topic("Course_Create_Class_List", |
$str .= &Apache::loncommon::help_open_topic("Course_Create_Class_List", |
&mt("How do I create a class list from a spreadsheet")). |
&mt("How do I create a class list from a spreadsheet")). |
"<br />\n"; |
"<br />\n"; |
$str .= &Apache::loncommon::help_open_topic("Course_Convert_To_CSV", |
$str .= &Apache::loncommon::help_open_topic("Course_Convert_To_CSV", |
&mt("How do I create a CSV file from a spreadsheet")). |
&mt("How do I create a CSV file from a spreadsheet")). |
"<br />\n"; |
"<br />\n"; |
$str .= "</body>\n</html>\n"; |
$str .= &Apache::loncommon::end_page(); |
$r->print($str); |
$r->print($str); |
return; |
return; |
} |
} |
Line 2039 sub upfile_drop_add {
|
Line 2159 sub upfile_drop_add {
|
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')); |
$r->print("</body>\n</html>\n"); |
$r->print(&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
} |
} |
Line 2077 sub upfile_drop_add {
|
Line 2197 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::loncommon::coursegroups(); |
# Get new classlist |
# Get new classlist |
foreach (@studentdata) { |
foreach (@studentdata) { |
my %entries=&Apache::loncommon::record_sep($_); |
my %entries=&Apache::loncommon::record_sep($_); |
Line 2117 sub upfile_drop_add {
|
Line 2239 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 2232 sub drop_student_list {
|
Line 2365 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::loncommon::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 2285 sub handler {
|
Line 2445 sub handler {
|
if (! ($env{'request.course.fn'})) { |
if (! ($env{'request.course.fn'})) { |
# Not in a course |
# Not in a course |
$env{'user.error.msg'}= |
$env{'user.error.msg'}= |
"/adm/dropadd:cst:0:0:Cannot drop or add students"; |
"/adm/dropadd:cst:0:0:Cannot manage or view course groups, ". |
|
"or drop or add students"; |
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |
# |
# |
Line 2293 sub handler {
|
Line 2454 sub handler {
|
&Apache::lonnet::allowed('vcl',$env{'request.course.id'}); |
&Apache::lonnet::allowed('vcl',$env{'request.course.id'}); |
my $enrl_permission = |
my $enrl_permission = |
&Apache::lonnet::allowed('cst',$env{'request.course.id'}); |
&Apache::lonnet::allowed('cst',$env{'request.course.id'}); |
if (! $view_permission && ! $enrl_permission) { |
|
|
my $grp_view_permission = |
|
&Apache::lonnet::allowed('vcg',$env{'request.course.id'}); |
|
my $grp_manage_permission = |
|
&Apache::lonnet::allowed('mdg',$env{'request.course.id'}); |
|
|
|
|
|
if (! $grp_view_permission && ! $grp_manage_permission && |
|
! $view_permission && ! $enrl_permission) { |
$env{'user.error.msg'}= |
$env{'user.error.msg'}= |
"/adm/dropadd:cst:0:0:Cannot drop or add students"; |
"/adm/coursegroups:cst:0:0:Cannot manage or view course groups, ". |
return HTTP_NOT_ACCEPTABLE; |
"or drop or add students"; |
|
return HTTP_NOT_ACCEPTABLE; |
} |
} |
|
|
# |
# |
# Only output the header information if they did not request csv format |
# Only output the header information if they did not request csv format |
# |
# |
Line 2308 sub handler {
|
Line 2479 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_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 2334 sub handler {
|
Line 2505 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 2347 sub handler {
|
Line 2518 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 2362 sub handler {
|
Line 2533 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 2377 sub handler {
|
Line 2548 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 2393 sub handler {
|
Line 2564 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); |
} |
} |
# |
# |
# Finish up |
# Finish up |
$r->print('</form></body></html>'); |
$r->print('</form>'.&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |
|
|