version 1.17, 2004/08/05 21:57:07
|
version 1.22, 2005/02/17 08:50:20
|
Line 35 use Apache::loncoursedata;
|
Line 35 use Apache::loncoursedata;
|
use Apache::Constants qw(:common :http REDIRECT); |
use Apache::Constants qw(:common :http REDIRECT); |
use Time::Local; |
use Time::Local; |
use LONCAPA::Enrollment; |
use LONCAPA::Enrollment; |
use localenroll; |
|
|
|
############################################################### |
############################################################### |
sub header { |
sub header { |
|
my $html=&Apache::lonxml::xmlbegin(); |
my $bodytag=&Apache::loncommon::bodytag('Classlist Manager'); |
my $bodytag=&Apache::loncommon::bodytag('Classlist Manager'); |
return(<<ENDHEAD); |
return(<<ENDHEAD); |
<html> |
$html |
<head> |
<head> |
<title>LON-CAPA Classlist Manager</title> |
<title>LON-CAPA Classlist Manager</title> |
</head> |
</head> |
Line 119 function process(calling,numauto,nummanu
|
Line 119 function process(calling,numauto,nummanu
|
} |
} |
} |
} |
if (calling == "viewclass") { |
if (calling == "viewclass") { |
document.forms.studentform.state.value = "process"; |
|
var totcheck = 0 |
var totcheck = 0 |
|
var numchk = 0 |
if (numauto > 0) { |
if (numauto > 0) { |
for (var i=0; i<document.studentform.chgauto.length; i++) { |
numchk = countChecked(document.studentform.chgauto); |
if (document.studentform.chgauto[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (nummanual > 0) { |
if (nummanual > 0) { |
for (var i=0; i<document.studentform.chgmanual.length; i++) { |
numchk = countChecked(document.studentform.chgmanual); |
if (document.studentform.chgmanual[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (numlock > 0) { |
if (numlock > 0) { |
for (var i=0; i<document.studentform.lockchg.length; i++) { |
numchk = countChecked(document.studentform.lockchg); |
if (document.studentform.lockchg[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (numunlock > 0) { |
if (numunlock > 0) { |
for (var i=0; i<document.studentform.unlockchg.length; i++) { |
numchk = countChecked(document.studentform.unlockchg); |
if (document.studentform.unlockchg[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (totcheck > 0) { |
if (totcheck > 0) { |
checker = 1 |
document.forms.studentform.state.value = "process"; |
} else { |
} |
|
if (totcheck == 0) { |
alert("You must check at least one checkbox, before proceeding to the next page") |
alert("You must check at least one checkbox, before proceeding to the next page") |
checker = 0 |
checker = 0 |
} |
} |
Line 164 function process(calling,numauto,nummanu
|
Line 153 function process(calling,numauto,nummanu
|
if ($action eq 'viewclass') { |
if ($action eq 'viewclass') { |
$scripttag .= qq| |
$scripttag .= qq| |
function checkAll(field) { |
function checkAll(field) { |
for (i = 0; i < field.length; i++) |
if (field.length > 0) { |
field[i].checked = true ; |
for (i = 0; i < field.length; i++) { |
|
field[i].checked = true ; |
|
} |
|
} else { |
|
field.checked = true |
|
} |
} |
} |
|
|
function uncheckAll(field) { |
function uncheckAll(field) { |
for (i = 0; i < field.length; i++) |
if (field.length > 0) { |
field[i].checked = false ; |
for (i = 0; i < field.length; i++) { |
|
field[i].checked = false ; |
|
} |
|
} else { |
|
field.checked = false ; |
|
} |
|
} |
|
|
|
function countChecked(field) { |
|
var count = 0; |
|
if (field.length > 0) { |
|
for (var i=0; i<field.length; i++) { |
|
if (field[i].checked == true) { |
|
count ++ |
|
} |
|
} |
|
} else { |
|
if (field.checked == true) { |
|
count ++ |
|
} |
|
} |
|
return count |
} |
} |
|
|
|; |
|; |
} |
} |
$scripttag .= qq| |
$scripttag .= qq| |
// End hiding --> |
// End hiding --> |
</script> |
</script> |
|; |
|; |
|
my $html=&Apache::lonxml::xmlbegin(); |
return(<<ENDHEAD); |
return(<<ENDHEAD); |
<html> |
$html |
<head> |
<head> |
<title>LON-CAPA Classlist Manager</title> |
<title>LON-CAPA Classlist Manager</title> |
$scripttag |
$scripttag |
Line 1303 sub print_setdates_response {
|
Line 1320 sub print_setdates_response {
|
my $currstart = $settings{'internal.autostart'}; |
my $currstart = $settings{'internal.autostart'}; |
my $currend = $settings{'internal.autoend'}; |
my $currend = $settings{'internal.autoend'}; |
my $response = ''; |
my $response = ''; |
my ($autostart,$autoend) = &get_dates_from_form(); |
my $showstart = ''; |
my $showstart = &Apache::lonlocal::locallocaltime($autostart); |
|
my $showend = ''; |
my $showend = ''; |
my $warning = ''; |
my $warning = ''; |
my $warn_prefix = ''; |
my $warn_prefix = ''; |
if ($autoend) { |
my ($autostart,$autoend) = &get_dates_from_form(); |
$showend = &Apache::lonlocal::locallocaltime($autoend); |
if ( ($autostart eq '') || ($autoend eq '') ) { |
} else { |
$response = "There was a problem processing your requested changes. The automated enrollment settings for this course have been left unchanged.<br/>"; |
$showend = "'No end date'"; |
} elsif (($autoend > 0) && ($autoend <= $autostart)) { |
} |
$response = 'The date/time selected for starting auto-enrollment was the same or later than the date/time selected for ending auto-enrollment. As this means auto-enrollment will never be active, your requested changes have not been processed, and the existing values remain in effect. Please <a href="javascript:history.go(-1)">go back</a> to the previous page to try your changes again.'."\n"; |
|
} else { |
|
$showstart = &Apache::lonlocal::locallocaltime($autostart); |
|
if ($autoend) { |
|
$showend = &Apache::lonlocal::locallocaltime($autoend); |
|
} else { |
|
$showend = "'No end date'"; |
|
} |
|
|
my %cenv = ('internal.autostart' => $autostart, |
my %cenv = ('internal.autostart' => $autostart, |
'internal.autoend' => $autoend); |
'internal.autoend' => $autoend); |
my $reply = &Apache::lonnet::put('environment',\%cenv,$dom,$crs); |
my $reply = &Apache::lonnet::put('environment',\%cenv,$dom,$crs); |
if ($reply !~ /^ok$/) { |
if ($reply !~ /^ok$/) { |
$response = "There was a problem processing your requested changes. The automated enrollment settings for this course have been left unchanged.<br/>"; |
$response = "There was a problem processing your requested changes. The automated enrollment settings for this course have been left unchanged.<br/>"; |
} else { |
} else { |
if ($currstart == $autostart) { |
if ($currstart == $autostart) { |
$response = "The first date for automated enrollment has been left unchanged as $showstart.<br/>"; |
$response = "The first date for automated enrollment has been left unchanged as $showstart.<br/>"; |
} else { |
} else { |
$response = "The first date for automated enrollment has been changed to $showstart.<br/>"; |
$response = "The first date for automated enrollment has been changed to $showstart.<br/>"; |
} |
} |
if ($currend == $autoend) { |
if ($currend == $autoend) { |
$response .= "The last date for automated enrollment has been left unchanged as $showend.<br/>"; |
$response .= "The last date for automated enrollment has been left unchanged as $showend.<br/>"; |
} else { |
} else { |
$response .= "The last date for automated enrollment has been changed to $showend.<br/>"; |
$response .= "The last date for automated enrollment has been changed to $showend.<br/>"; |
} |
} |
|
|
# Generate message in case where old first enrollment date was later than today, but new first enrollment date is now today or earlier. |
# Generate message in case where old first enrollment date was later than today, but new first enrollment date is now today or earlier. |
|
|
my $rosterupdated = 0; |
my $rosterupdated = 0; |
my $firstaccess = ""; |
my $firstaccess = ""; |
my $nextupdate = ""; |
my $nextupdate = ""; |
my $lastupdate = ""; |
my $lastupdate = ""; |
|
|
my $nowstamp = time; |
my $nowstamp = time; |
my @date_list=localtime(time); |
my @date_list=localtime(time); |
my $cur_year = $date_list[5]; |
my $cur_year = $date_list[5]; |
my $curday = $date_list[3]; |
my $curday = $date_list[3]; |
my $curmonth = $date_list[4]; |
my $curmonth = $date_list[4]; |
my $lastmidnt = timelocal(0,0,0,$date_list[3],$date_list[4],$date_list[5]); |
my $lastmidnt = timelocal(0,0,0,$date_list[3],$date_list[4],$date_list[5]); |
my $nextmidnt = 86400 + $lastmidnt; |
my $nextmidnt = 86400 + $lastmidnt; |
|
|
my $todayupdate = timelocal(0,30,1,$date_list[3],$date_list[4],$date_list[5]); |
my $todayupdate = timelocal(0,30,1,$date_list[3],$date_list[4],$date_list[5]); |
my $lastupdate = $todayupdate - 86400; |
my $lastupdate = $todayupdate - 86400; |
if ($nowstamp < $todayupdate) { |
if ($nowstamp < $todayupdate) { |
$nextupdate = "today"; |
$nextupdate = "today"; |
} else { |
|
$nextupdate = "tomorrow"; |
|
} |
|
if ($currstart < $lastupdate) { |
|
$rosterupdated = 1; |
|
} |
|
if ($autostart < $nextmidnt ) { |
|
if ( $autostart >= $lastmidnt) { |
|
$firstaccess = "today"; |
|
} else { |
} else { |
$firstaccess = "a date prior to today"; |
$nextupdate = "tomorrow"; |
} |
} |
if (($nowstamp >= $autostart) && ($rosterupdated == 0)) { |
if ($currstart < $lastupdate) { |
$response .= qq|<br>Although you have now set the first enrollment date to $firstaccess, automatic enrollment will <b>not</b> occur until the next automatic enrollment update occurs for all LON-CAPA courses at 1.30 am $nextupdate. If you wish to immediately enroll registered students included in the institutional classlist for this class, please visit the <a href="/adm/populate?action=updatenow">roster update page</a>.<br>|; |
$rosterupdated = 1; |
} |
} |
} |
if ($autostart < $nextmidnt ) { |
$warning = &warning_message($dom,$crs,$action); |
if ( $autostart >= $lastmidnt) { |
$warn_prefix = "<br/><font size ='+1'><b>Warning</b></font>. Although you set a start and end date for auto-enrollment, additional action is required.<br/>"; |
$firstaccess = "today"; |
unless ($warning eq '') { |
} else { |
$response .= $warn_prefix.$warning; |
$firstaccess = "a date prior to today"; |
} |
} |
|
if (($nowstamp >= $autostart) && ($rosterupdated == 0)) { |
|
$response .= qq|<br>Although you have now set the first enrollment date to $firstaccess, automatic enrollment will <b>not</b> occur until the next automatic enrollment update occurs for all LON-CAPA courses at 1.30 am $nextupdate. If you wish to immediately enroll registered students included in the institutional classlist for this class, please visit the <a href="/adm/populate?action=updatenow">roster update page</a>.<br>|; |
|
} |
|
} |
|
$warning = &warning_message($dom,$crs,$action); |
|
$warn_prefix = "<br/><font size ='+1'><b>Warning</b></font>. Although you set a start and end date for auto-enrollment, additional action is required.<br/>"; |
|
unless ($warning eq '') { |
|
$response .= $warn_prefix.$warning; |
|
} |
|
} |
} |
} |
&print_reply($r,$response,$$tasktitleref{$action}); |
&print_reply($r,$response,$$tasktitleref{$action}); |
return; |
return; |
Line 1384 sub print_setaccess_response {
|
Line 1408 sub print_setaccess_response {
|
my $autostart = $settings{'internal.autostart'}; |
my $autostart = $settings{'internal.autostart'}; |
my $response = ''; |
my $response = ''; |
my ($startaccess,$endaccess) = &get_dates_from_form(); |
my ($startaccess,$endaccess) = &get_dates_from_form(); |
my $showstart = &Apache::lonlocal::locallocaltime($startaccess); |
if (($startaccess eq '') || ($endaccess eq '')) { |
my $showend = ''; |
$response = "There was a problem processing your requested changes. The default |
my $warning = ''; |
start and end access dates for this course have been left unchanged.<br/>"; |
my $warn_prefix = ''; |
} elsif (($endaccess > 0) && ($endaccess <= $startaccess)) { |
if ($endaccess) { |
$response = 'The default start access date/time you chose was the same or later than the default end access date/time. As this means that roles will never be active, your requested changes have not been processed, and the existing values remain in effect. Please <a href="javascript:history.go(-1)">go back</a> to the previous page to try your changes again.'."\n"; |
$showend = &Apache::lonlocal::locallocaltime($endaccess); |
|
} else { |
} else { |
$showend = "'No end date'"; |
my $showstart = &Apache::lonlocal::locallocaltime($startaccess); |
} |
my $showend = ''; |
|
my $warning = ''; |
|
my $warn_prefix = ''; |
|
if ($endaccess) { |
|
$showend = &Apache::lonlocal::locallocaltime($endaccess); |
|
} else { |
|
$showend = "'No end date'"; |
|
} |
|
|
my %cenv = ('default_enrollment_start_date' => $startaccess, |
my %cenv = ('default_enrollment_start_date' => $startaccess, |
'default_enrollment_end_date' => $endaccess); |
'default_enrollment_end_date' => $endaccess); |
my $reply = &Apache::lonnet::put('environment',\%cenv,$dom,$crs); |
my $reply = &Apache::lonnet::put('environment',\%cenv,$dom,$crs); |
if ($reply !~ /^ok$/) { |
if ($reply !~ /^ok$/) { |
$response = "There was a problem processing your requested changes. The automated enrollment settings for this course have been left unchanged.<br/>"; |
$response = "There was a problem processing your requested changes. The automated enrollment settings for this course have been left unchanged.<br/>"; |
} else { |
} else { |
if ($currstart == $startaccess) { |
if ($currstart == $startaccess) { |
$response = "The first access date for students added via automated enrollment has been left unchanged as $showstart.<br/>"; |
$response = "The first access date for students added via automated enrollment has been left unchanged as $showstart.<br/>"; |
} else { |
} else { |
$response = "The first access date for students added via automated enrollment has been changed to |
$response = "The first access date for students added via automated enrollment has been changed to |
$showstart.<br/>"; |
$showstart.<br/>"; |
} |
} |
if ($currend == $endaccess) { |
if ($currend == $endaccess) { |
$response .= "The last access date for students added via automated enrollment has been left unchanged as $showend.<br/>"; |
$response .= "The last access date for students added via automated enrollment has been left unchanged as $showend.<br/>"; |
} else { |
} else { |
$response .= "The last access date for students automated enrollment has been changed to |
$response .= "The last access date for students automated enrollment has been changed to |
$showend.<br/>"; |
$showend.<br/>"; |
} |
} |
|
|
# Generate message in case where old first access date was later than today, but new first access date is now today or earlier. |
# Generate message in case where old first access date was later than today, but new first access date is now today or earlier. |
|
|
my $accessgiven= 0; |
my $accessgiven= 0; |
my $firstaccess = ""; |
my $firstaccess = ""; |
my $nextupdate = ""; |
my $nextupdate = ""; |
my $lastupdate = ""; |
my $lastupdate = ""; |
|
|
my $nowstamp = time; |
my $nowstamp = time; |
my @date_list=localtime(time); |
my @date_list=localtime(time); |
my $cur_year = $date_list[5]; |
my $cur_year = $date_list[5]; |
my $curday = $date_list[3]; |
my $curday = $date_list[3]; |
my $curmonth = $date_list[4]; |
my $curmonth = $date_list[4]; |
my $lastmidnt = timelocal(0,0,0,$date_list[3],$date_list[4],$date_list[5]); |
my $lastmidnt = timelocal(0,0,0,$date_list[3],$date_list[4],$date_list[5]); |
my $nextmidnt = 86400 + $lastmidnt; |
my $nextmidnt = 86400 + $lastmidnt; |
|
|
my $todayupdate = timelocal(0,30,1,$date_list[3],$date_list[4],$date_list[5]); |
my $todayupdate = timelocal(0,30,1,$date_list[3],$date_list[4],$date_list[5]); |
my $tomorrowupdate = $todayupdate + 86400; |
my $tomorrowupdate = $todayupdate + 86400; |
my $lastupdate = $todayupdate - 86400; |
my $lastupdate = $todayupdate - 86400; |
|
|
if ($autostart < $nextmidnt) { |
if ($autostart < $nextmidnt) { |
if ($nowstamp < $todayupdate) { |
if ($nowstamp < $todayupdate) { |
$nextupdate = "at 1.30 am today"; |
$nextupdate = "at 1.30 am today"; |
|
} else { |
|
$nextupdate = "at 1.30 am tomorrow"; |
|
} |
} else { |
} else { |
$nextupdate = "at 1.30 am tomorrow"; |
my @enrollstart = localtime($autostart); |
|
$nextupdate = timelocal(0,30,1,$enrollstart[3],$enrollstart[4],$enrollstart[5]); |
|
unless (($enrollstart[2] < 1) || ($enrollstart[2] == 1 && $enrollstart[1] <=30)) { |
|
$nextupdate += 86400; |
|
} |
|
$nextupdate = &Apache::lonlocal::locallocaltime($nextupdate); |
|
} |
|
if (($currstart < $lastupdate) && ($autostart < $lastupdate)) { |
|
$accessgiven = 1; |
|
} |
|
if ($startaccess < $nextmidnt ) { |
|
if ( $startaccess >= $lastmidnt) { |
|
$firstaccess = "today"; |
|
} else { |
|
$firstaccess = "a date prior to today"; |
|
} |
|
if (($nowstamp >= $startaccess) && ($accessgiven == 0)) { |
|
$response .= qq|<br>Although you have now set the first access date to $firstaccess, automatic enrollment will <b>not</b> occur until the next automatic enrollment update occurs for all LON-CAPA courses $nextupdate. If you wish to grant immediate course access for registered students included in the institutional classlist for this class, please visit the <a href="/adm/populate?action=updatenow">roster update page</a>.<br>|; |
|
} |
} |
} |
} else { |
$warning = &warning_message($dom,$crs,$action); |
my @enrollstart = &Apache::lonlocal::locallocaltime($autostart); |
$warn_prefix = "<br/><font size ='+1'><b>Warning</b></font>. Although you have set default first and last access dates for students who are added via automatic enrollment, additional action is required.<br/>"; |
$nextupdate = timelocal(0,30,1,$enrollstart[3],$enrollstart[4],$enrollstart[5]); |
unless ($warning eq '') { |
unless (($enrollstart[2] < 1) || ($enrollstart[2] == 1 && $enrollstart[1] <=30)) { |
$response .= $warn_prefix.$warning; |
$nextupdate += 86400; |
|
} |
|
$nextupdate = &Apache::lonlocal::locallocaltime($nextupdate); |
|
} |
|
if (($currstart < $lastupdate) && ($autostart < $lastupdate)) { |
|
$accessgiven = 1; |
|
} |
|
if ($startaccess < $nextmidnt ) { |
|
if ( $startaccess >= $lastmidnt) { |
|
$firstaccess = "today"; |
|
} else { |
|
$firstaccess = "a date prior to today"; |
|
} |
|
if (($nowstamp >= $startaccess) && ($accessgiven == 0)) { |
|
$response .= qq|<br>Although you have now set the first access date to $firstaccess, automatic enrollment will <b>not</b> occur until the next automatic enrollment update occurs for all LON-CAPA courses $nextupdate. If you wish to grant immediate course access for registered students included in the institutional classlist for this class, please visit the <a href="/adm/populate?action=updatenow">roster update page</a>.<br>|; |
|
} |
} |
} |
} |
$warning = &warning_message($dom,$crs,$action); |
|
$warn_prefix = "<br/><font size ='+1'><b>Warning</b></font>. Although you have set default first and last access dates for students who are added via automatic enrollment, additional action is required.<br/>"; |
|
unless ($warning eq '') { |
|
$response .= $warn_prefix.$warning; |
|
} |
|
} |
} |
&print_reply($r,$response,$$tasktitleref{$action}); |
&print_reply($r,$response,$$tasktitleref{$action}); |
return; |
return; |
Line 2106 sub print_update_result () {
|
Line 2137 sub print_update_result () {
|
my $authtype = $settings{'internal.authtype'}; |
my $authtype = $settings{'internal.authtype'}; |
my $autharg = $settings{'internal.autharg'}; |
my $autharg = $settings{'internal.autharg'}; |
my ($startaccess,$endaccess) = &get_dates_from_form(); |
my ($startaccess,$endaccess) = &get_dates_from_form(); |
|
|
if ( exists($ENV{'form.updateadds'}) ) { |
if ( exists($ENV{'form.updateadds'}) ) { |
$updateadds = $ENV{'form.updateadds'}; |
$updateadds = $ENV{'form.updateadds'}; |
} |
} |
if ( exists($ENV{'form.updatedrops'}) ) { |
if ( exists($ENV{'form.updatedrops'}) ) { |
$updatedrops = $ENV{'form.updatedrops'}; |
$updatedrops = $ENV{'form.updatedrops'}; |
} |
} |
if (!$updateadds && !$updatedrops) { |
if (($startaccess eq '') || ($endaccess eq '')) { |
|
$response = "There was a problem processing your requested roster update because start and and access dates could not be determined. No changes have been made to the class roster.<br />"; |
|
} elsif ($updateadds && (($endaccess > 0) && ($endaccess <= $startaccess))) { |
|
$response = 'The start access date/time is the same or later than the end access date/time. As this means that new roles will never be active, your requested roster update has not been carried out, and the roster remains unchanged. Please <a href="javascript:history.go(-1)">go back</a> to the previous page to try your changes again.'."\n"; |
|
} elsif (!$updateadds && !$updatedrops) { |
$response = "An update of the class roster has not been carried out because you indicated that you wanted to neither add new students, nor expire dropped students based on a comparison between the institutional class lists for the course sections and crosslisted courses that contribure enrollment to this LON-CAPA course."; |
$response = "An update of the class roster has not been carried out because you indicated that you wanted to neither add new students, nor expire dropped students based on a comparison between the institutional class lists for the course sections and crosslisted courses that contribure enrollment to this LON-CAPA course."; |
} elsif ($coursecode eq '') { |
} elsif ($coursecode eq '') { |
$response = "There was a problem retrieving the course code for this LON-CAPA course. An update of the class roster has not been carried out, and enrollment remains unchanged"; |
$response = "There was a problem retrieving the course code for this LON-CAPA course. An update of the class roster has not been carried out, and enrollment remains unchanged"; |
Line 2161 sub print_update_result () {
|
Line 2195 sub print_update_result () {
|
if (@allcourses > 0) { |
if (@allcourses > 0) { |
@{$affiliates{$crs}} = @allcourses; |
@{$affiliates{$crs}} = @allcourses; |
my $outcome = &Apache::lonnet::fetch_enrollment_query('updatenow',\%affiliates,\%reply,$dom,$crs); |
my $outcome = &Apache::lonnet::fetch_enrollment_query('updatenow',\%affiliates,\%reply,$dom,$crs); |
|
unless ($outcome eq 'ok') { |
|
&Apache::lonnet::logthis("lonpopulate:update roster". |
|
"failed to retrieve classlist". |
|
" data for ".$crs."\@".$dom." by ". |
|
$ENV{'user.name'}." \@ ".$ENV{'user.domain'}. |
|
": ".$outcome); |
|
} |
if ($reply{$crs} > 0) { |
if ($reply{$crs} > 0) { |
($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$startaccess,$endaccess,$authtype,$autharg,\@allcourses,\%LC_code,\$logmsg,\$newusermsg,"updatenow"); |
($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$startaccess,$endaccess,$authtype,$autharg,\@allcourses,\%LC_code,\$logmsg,\$newusermsg,"updatenow"); |
} else { |
} else { |
Line 2177 sub print_update_result () {
|
Line 2218 sub print_update_result () {
|
} |
} |
unless ($newusermsg eq '') { |
unless ($newusermsg eq '') { |
$newusermsg = substr( $newusermsg,0,rindex($newusermsg,'<li>') ); |
$newusermsg = substr( $newusermsg,0,rindex($newusermsg,'<li>') ); |
$newusermsg = "<br/><br/>The following new system user(s) who was/were created will be using internal authentication with an initial randomly generated password. A valid e-mail address was not available for this/these user(s) so LON-CAPA account credentials could not be sent via e-mail.<br/><ul><li>".$newusermsg."</ul><br/>"; |
$newusermsg = "<br/><br/>The following new system user(s) who was/were created will be using local or internal authentication with an initial randomly generated password. A valid e-mail address was not available for this/these user(s) so LON-CAPA account credentials could not be sent via e-mail.<br/><ul><li>".$newusermsg."</ul><br/>"; |
} |
} |
$response .= $logmsg.$newusermsg; |
$response .= $logmsg.$newusermsg; |
&print_reply($r,$response,$$tasktitleref{$action}); |
&print_reply($r,$response,$$tasktitleref{$action}); |
Line 2519 sub date_setting_table {
|
Line 2560 sub date_setting_table {
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
if ($r->header_only) { |
if ($r->header_only) { |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK; |
return OK; |
} |
} |
Line 2531 sub handler {
|
Line 2572 sub handler {
|
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |
# Start page |
# Start page |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
|
|
my @tasks = ("information","chgsettings","setdates","setaccess","notify","crosslist","sections","photos","updatenow","viewclass"); |
my @tasks = ("information","chgsettings","setdates","setaccess","notify","crosslist","sections","photos","updatenow","viewclass"); |