version 1.66, 2009/10/30 20:35:34
|
version 1.68, 2011/01/11 22:09:50
|
Line 217 sub print_mainbox {
|
Line 217 sub print_mainbox {
|
} elsif ($action eq "newsections") { |
} elsif ($action eq "newsections") { |
$action = "sections"; |
$action = "sections"; |
} |
} |
$page .= "-> <a href=\"/adm/populate?action=$action\">".$$tasklongref{$action}."</a> -> <b>result</b>"; |
$page .= "» <a href=\"/adm/populate?action=$action\">".$$tasklongref{$action}."</a> » <b>result</b>"; |
} else { |
} else { |
$page .= " -> <b>".$$tasklongref{$action}."</b>"; |
$page .= " » <b>".$$tasklongref{$action}."</b>"; |
} |
} |
} |
} |
my $usrmang = &mt('User Management'); |
my $usrmang = &mt('User Management'); |
my $autenrl = &mt('Automated Enrollment Manager'); |
my $autenrl = &mt('Automated Enrollment Manager'); |
|
#LC_pick_box is used in the following. This is only a temporary solution to adapt the site to the design. |
$r->print(<<ENDTHIS); |
$r->print(<<ENDTHIS); |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
<tr> |
<tr> |
<td bgcolor="#CCCCFF"> |
<td bgcolor="#C5DB99"> |
<font size="2"><a href="/adm/menu">$realm</a> -> <a href="/adm/createuser">$usrmang</a> -> $page</font><br/> |
<a href="/adm/menu">$realm</a> » <a href="/adm/createuser">$usrmang</a> » $page<br/> |
</td> |
</td> |
<td align="right" bgcolor="#CCCCFF" valign="top"> |
<td align="right" bgcolor="#C5DB99" valign="top"> |
<font size="+1">$autenrl </font> |
$autenrl |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
<br/> |
<tr> |
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="LC_pick_box"> |
|
<tr class="LC_pick_box_row"> |
ENDTHIS |
ENDTHIS |
} |
} |
|
|
Line 247 sub print_navmenu {
|
Line 249 sub print_navmenu {
|
$action = $env{'form.action'}; |
$action = $env{'form.action'}; |
} |
} |
$r->print(<<ENDONE); |
$r->print(<<ENDONE); |
<td width="10" valign="top" bgcolor="#DDFFFF"> </td> |
<td valign="top" class="LC_pick_box_title"> |
<td width="20%" valign="top" bgcolor="#DDFFFF"> |
|
<br/> |
|
ENDONE |
ENDONE |
foreach my $task (@{$tasksref}) { |
foreach my $task (@{$tasksref}) { |
if ($task eq $action) { |
if ($task eq $action) { |
Line 272 ENDONE
|
Line 272 ENDONE
|
$r->print(" |
$r->print(" |
<p> </p> |
<p> </p> |
</td> |
</td> |
<td width=\"10\" valign=\"top\" bgcolor=\"#CCCCFF\"> </td> |
<td valign=\"top\" class=\"LC_pick_box_value\">"); |
<td width=\"10\" valign=\"top\" bgcolor=\"#FFFFFF\"> </td> |
|
<td bgcolor=\"#ffffff\" valign=\"top\">"); |
|
} |
} |
|
|
############################################################### |
############################################################### |
Line 429 Note: Any students added manually by cou
|
Line 427 Note: Any students added manually by cou
|
} |
} |
my $dateshow; |
my $dateshow; |
if ( ($oldendshow eq '') && ($oldstartshow eq '') ) { |
if ( ($oldendshow eq '') && ($oldstartshow eq '') ) { |
$dateshow = "<br/><font size='+1'>Warning</font>. Currently <b>NO</b> first enrollment or last enrollment dates are set. You <b>must</b> use this menu to set a start date and an end date if you plan to utilise automated adds and/or drops in this course.\n"; |
$dateshow = "<br/>Warning. Currently <b>NO</b> first enrollment or last enrollment dates are set. You <b>must</b> use this menu to set a start date and an end date if you plan to utilise automated adds and/or drops in this course.\n"; |
} else { |
} else { |
$dateshow = "Currently: First enrollment: <b><i>$oldstartshow</i></b>, Last enrollment: <b><i>$oldendshow</i></b>\n"; |
$dateshow = "Currently: First enrollment: <b><i>$oldstartshow</i></b>, Last enrollment: <b><i>$oldendshow</i></b>\n"; |
} |
} |
Line 1334 sub print_accessdate_table {
|
Line 1332 sub print_accessdate_table {
|
); |
); |
my $dateshow; |
my $dateshow; |
if ( ($oldendshow eq '') && ($oldstartshow eq '') ) { |
if ( ($oldendshow eq '') && ($oldstartshow eq '') ) { |
$dateshow = "<br/><font size='+1'>".&mt('Warning')."</font>. ".$lt{'cuno'}." "; |
$dateshow = "<br/>".&mt('Warning').". ".$lt{'cuno'}." "; |
if ($action eq 'setaccess') { |
if ($action eq 'setaccess') { |
$dateshow .= $lt{'ifyo'}."\n"; |
$dateshow .= $lt{'ifyo'}."\n"; |
} elsif ($action eq 'updatenow') { |
} elsif ($action eq 'updatenow') { |
Line 1514 sub print_chgsettings_response {
|
Line 1512 sub print_chgsettings_response {
|
} |
} |
if ($autoadds || $autodrops) { |
if ($autoadds || $autodrops) { |
$warning = &warning_message($dom,$crs,$action); |
$warning = &warning_message($dom,$crs,$action); |
$warn_prefix = "<br/><font size ='+1'><b>Warning</b></font>. Although you indicated that nightly "; |
$warn_prefix = "<br/><b>Warning</b>. Although you indicated that nightly "; |
$warn_suffix = " should be enabled, additional action is required.<br/>"; |
$warn_suffix = " should be enabled, additional action is required.<br/>"; |
} |
} |
if ($autoadds) { |
if ($autoadds) { |
Line 1612 sub print_setdates_response {
|
Line 1610 sub print_setdates_response {
|
} |
} |
} |
} |
$warning = &warning_message($dom,$crs,$action); |
$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/>"; |
$warn_prefix = "<br/><b>Warning</b>. Although you set a start and end date for auto-enrollment, additional action is required.<br/>"; |
unless ($warning eq '') { |
unless ($warning eq '') { |
$response .= $warn_prefix.$warning; |
$response .= $warn_prefix.$warning; |
} |
} |
Line 1711 start and end access dates for this cour
|
Line 1709 start and end access dates for this cour
|
} |
} |
} |
} |
$warning = &warning_message($dom,$crs,$action); |
$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/>"; |
$warn_prefix = "<br/><b>Warning</b>. 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 '') { |
unless ($warning eq '') { |
$response .= $warn_prefix.$warning; |
$response .= $warn_prefix.$warning; |
} |
} |
Line 1896 sub print_crosslistings_menu () {
|
Line 1894 sub print_crosslistings_menu () {
|
|
|
sub print_crosslistings_response () { |
sub print_crosslistings_response () { |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my %settings = &Apache::lonnet::get('environment',['internal.crosslistings','internal.coursecode','internal.courseowner'],$dom,$crs); |
my %settings = &Apache::lonnet::get('environment',['internal.crosslistings','internal.coursecode','internal.courseowner','internal.co-owners'],$dom,$crs); |
my @currxlists = (); |
my @currxlists = (); |
my @xlists = (); |
my @xlists = (); |
my @allxlists = (); |
my @allxlists = (); |
Line 1908 sub print_crosslistings_response () {
|
Line 1906 sub print_crosslistings_response () {
|
my $xliststr = $settings{'internal.crosslistings'}; |
my $xliststr = $settings{'internal.crosslistings'}; |
my $coursecode = $settings{'internal.coursecode'}; |
my $coursecode = $settings{'internal.coursecode'}; |
my $owner = $settings{'internal.courseowner'}; |
my $owner = $settings{'internal.courseowner'}; |
|
my $coowners = $settings{'internal.co-owners'}; |
my $response = ''; |
my $response = ''; |
my $warning = ''; |
my $warning = ''; |
my $warn_prefix = ''; |
my $warn_prefix = ''; |
Line 1941 sub print_crosslistings_response () {
|
Line 1940 sub print_crosslistings_response () {
|
$coursecheck = &Apache::lonnet::auto_validate_courseID($crs,$dom,$env{"form.$xl"}); |
$coursecheck = &Apache::lonnet::auto_validate_courseID($crs,$dom,$env{"form.$xl"}); |
if ($coursecheck eq 'ok') { |
if ($coursecheck eq 'ok') { |
my $addcheck = ''; |
my $addcheck = ''; |
$addcheck = &Apache::lonnet::auto_new_course($crs,$dom,$env{"form.$xl"},$owner); |
$addcheck = &Apache::lonnet::auto_new_course($crs,$dom,$env{"form.$xl"},$owner,$coowners); |
if ($addcheck eq 'ok') { |
if ($addcheck eq 'ok') { |
push @xlists,$env{"form.$xl"}.":".$env{"form.$lc_sec"}; |
push @xlists,$env{"form.$xl"}.":".$env{"form.$lc_sec"}; |
} else { |
} else { |
Line 2019 sub print_crosslistings_response () {
|
Line 2018 sub print_crosslistings_response () {
|
|
|
if (@allxlists > 0) { |
if (@allxlists > 0) { |
$warning = &warning_message($dom,$crs,$action); |
$warning = &warning_message($dom,$crs,$action); |
$warn_prefix = "<br/><font size ='+1'><b>Warning</b></font>. Although you have selected crosslisted courses to contribute enrollment to this course, additional action is required.<br/>"; |
$warn_prefix = "<br/><b>Warning</b>. Although you have selected crosslisted courses to contribute enrollment to this course, additional action is required.<br/>"; |
unless ($warning eq '') { |
unless ($warning eq '') { |
$response .= $warn_prefix.$warning; |
$response .= $warn_prefix.$warning; |
} |
} |
Line 2031 sub print_crosslistings_response () {
|
Line 2030 sub print_crosslistings_response () {
|
|
|
sub print_sections_menu () { |
sub print_sections_menu () { |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my %settings = &Apache::lonnet::get('environment',['internal.sectionnums','internal.coursecode','internal.courseowner'],$dom,$crs); |
my %settings = &Apache::lonnet::get('environment',['internal.sectionnums','internal.coursecode','internal.courseowner','internal.co-owners'],$dom,$crs); |
my @currsections = (); |
my @currsections = (); |
my @sections = (); |
my @sections = (); |
my @badowner = (); |
my @badowner = (); |
Line 2045 sub print_sections_menu () {
|
Line 2044 sub print_sections_menu () {
|
my $warn_prefix = ""; |
my $warn_prefix = ""; |
my $coursecode = $settings{'internal.coursecode'}; |
my $coursecode = $settings{'internal.coursecode'}; |
my $owner = $settings{'internal.courseowner'}; |
my $owner = $settings{'internal.courseowner'}; |
|
my $coowners = $settings{'internal.co-owners'}; |
if ($settings{'internal.sectionnums'} ne '') { |
if ($settings{'internal.sectionnums'} ne '') { |
@currsections = split(/,/,$settings{'internal.sectionnums'}); |
@currsections = split(/,/,$settings{'internal.sectionnums'}); |
} |
} |
Line 2069 sub print_sections_menu () {
|
Line 2069 sub print_sections_menu () {
|
my $newsec = $coursecode.$env{"form.$secnum"}; |
my $newsec = $coursecode.$env{"form.$secnum"}; |
my $coursecheck = &Apache::lonnet::auto_validate_courseID($crs,$dom,$newsec); |
my $coursecheck = &Apache::lonnet::auto_validate_courseID($crs,$dom,$newsec); |
if ($coursecheck eq 'ok') { |
if ($coursecheck eq 'ok') { |
my $addcheck = &Apache::lonnet::auto_new_course($crs,$dom,$newsec,$owner); |
my $addcheck = &Apache::lonnet::auto_new_course($crs,$dom,$newsec,$owner,$coowners); |
if ($addcheck eq 'ok') { |
if ($addcheck eq 'ok') { |
push @sections,$env{"form.$secnum"}.":".$env{"form.$lc_sec"}; |
push @sections,$env{"form.$secnum"}.":".$env{"form.$lc_sec"}; |
$seccount ++; |
$seccount ++; |
Line 2157 sections which contribute to enrollment
|
Line 2157 sections which contribute to enrollment
|
|
|
if ($seccount > 0) { |
if ($seccount > 0) { |
$warning = &warning_message($dom,$crs,$action); |
$warning = &warning_message($dom,$crs,$action); |
$warn_prefix = "<br/><font size ='+1'><b>Warning</b></font>. Although you have selected sections to contribute enrollment to this course, additional action is required.<br/>"; |
$warn_prefix = "<br/><b>Warning</b>. Although you have selected sections to contribute enrollment to this course, additional action is required.<br/>"; |
unless ($warning eq '') { |
unless ($warning eq '') { |
$response .= $warn_prefix.$warning; |
$response .= $warn_prefix.$warning; |
} |
} |
Line 2213 sections which contribute to enrollment
|
Line 2213 sections which contribute to enrollment
|
|
|
sub print_sections_response () { |
sub print_sections_response () { |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my %settings = &Apache::lonnet::get('environment',['internal.sectionnums','internal.coursecode','internal.courseowner'],$dom,$crs); |
my %settings = &Apache::lonnet::get('environment',['internal.sectionnums','internal.coursecode','internal.courseowner','internal.co-owners'],$dom,$crs); |
my @currsections = (); |
my @currsections = (); |
my @sections = (); |
my @sections = (); |
my @allsections = (); |
my @allsections = (); |
Line 2225 sub print_sections_response () {
|
Line 2225 sub print_sections_response () {
|
my $secstr = $settings{'internal.sectionnums'}; |
my $secstr = $settings{'internal.sectionnums'}; |
my $coursecode = $settings{'internal.coursecode'}; |
my $coursecode = $settings{'internal.coursecode'}; |
my $owner = $settings{'internal.courseowner'}; |
my $owner = $settings{'internal.courseowner'}; |
|
my $coowners = $settings{'internal.co-owners'}; |
my $response = ''; |
my $response = ''; |
my $putreply = ''; |
my $putreply = ''; |
my $warning = ''; |
my $warning = ''; |
Line 2255 sub print_sections_response () {
|
Line 2256 sub print_sections_response () {
|
my $newsec = $coursecode.$env{"form.$sec"}; |
my $newsec = $coursecode.$env{"form.$sec"}; |
my $coursecheck = &Apache::lonnet::auto_validate_courseID($crs,$dom,$newsec); |
my $coursecheck = &Apache::lonnet::auto_validate_courseID($crs,$dom,$newsec); |
if ($coursecheck eq 'ok') { |
if ($coursecheck eq 'ok') { |
my $addcheck = &Apache::lonnet::auto_new_course($crs,$dom,$newsec,$owner); |
my $addcheck = &Apache::lonnet::auto_new_course($crs,$dom,$newsec,$owner,$coowners); |
if ($addcheck eq 'ok') { |
if ($addcheck eq 'ok') { |
push @sections,$env{"form.$sec"}.":".$env{"form.$lc_sec"}; |
push @sections,$env{"form.$sec"}.":".$env{"form.$lc_sec"}; |
} else { |
} else { |
Line 2328 sub print_sections_response () {
|
Line 2329 sub print_sections_response () {
|
|
|
if (@allsections > 0) { |
if (@allsections > 0) { |
$warning = &warning_message($dom,$crs,$action); |
$warning = &warning_message($dom,$crs,$action); |
$warn_prefix = "<br/><font size ='+1'><b>Warning</b></font>. Although you have selected sections to contribute enrollment to this course, additional action is required.<br/>"; |
$warn_prefix = "<br/><b>Warning</b>. Although you have selected sections to contribute enrollment to this course, additional action is required.<br/>"; |
unless ($warning eq '') { |
unless ($warning eq '') { |
$response .= $warn_prefix.$warning; |
$response .= $warn_prefix.$warning; |
} |
} |