version 1.61, 2009/04/22 17:13:38
|
version 1.72, 2013/01/23 15:53:28
|
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 508 ENDTWO
|
Line 506 ENDTWO
|
} elsif ($action eq "notify") { |
} elsif ($action eq "notify") { |
my $notifycount = 0; |
my $notifycount = 0; |
my @notified = split(/,/,$enrollvar{notifylist}); |
my @notified = split(/,/,$enrollvar{notifylist}); |
my @domcoord; |
my (@domcoord,@showdom,@olddomcoord,@futuredomcoord); |
my @showdom; |
|
for (my $i=0; $i<@notified; $i++) { |
for (my $i=0; $i<@notified; $i++) { |
if ($notified[$i] !~ /:/) { |
if ($notified[$i] !~ /:/) { |
$notified[$i] =~ s/\@/:/; |
$notified[$i] =~ s/\@/:/; |
Line 522 ENDTWO
|
Line 519 ENDTWO
|
} else { |
} else { |
$noteset = "OFF"; |
$noteset = "OFF"; |
} |
} |
|
my $now = time; |
my %dompersonnel = &Apache::lonnet::get_domain_roles($dom,['dc']); |
my %dompersonnel = &Apache::lonnet::get_domain_roles($dom,['dc']); |
foreach my $server (keys(%dompersonnel)) { |
foreach my $server (keys(%dompersonnel)) { |
foreach my $user (sort(keys(%{$dompersonnel{$server}}))) { |
foreach my $user (sort(keys(%{$dompersonnel{$server}}))) { |
my ($trole,$uname,$udom,$runame,$rudom,$rsec) = split(/:/,$user); |
my ($trole,$uname,$udom,$runame,$rudom,$rsec) = split(/:/,$user); |
if (!grep(/^$uname:$udom$/,@domcoord)) { |
my ($end,$start) = split(':',$dompersonnel{$server}{$user}); |
push(@domcoord,$uname.':'.$udom); |
if (($end eq '') || ($end == 0) || ($end > $now)) { |
|
if ($start > $now) { |
|
if (!grep(/^\Q$uname\E:\Q$udom\E$/,@futuredomcoord)) { |
|
push(@futuredomcoord,$uname.':'.$udom); |
|
} |
|
} else { |
|
if (!grep(/^\Q$uname\E:\Q$udom\E$/,@domcoord)) { |
|
push(@domcoord,$uname.':'.$udom); |
|
} |
|
} |
|
} else { |
|
if (!grep(/^\Q$uname\E:\Q$udom\E$/,@olddomcoord)) { |
|
push(@olddomcoord,$uname.':'.$udom); |
|
} |
} |
} |
} |
} |
} |
} |
Line 565 ENDTWO
|
Line 576 ENDTWO
|
my %pname; |
my %pname; |
my %notifystate; |
my %notifystate; |
my %status; |
my %status; |
my $now = time; |
|
foreach my $person (sort(keys(%coursepersonnel))) { |
foreach my $person (sort(keys(%coursepersonnel))) { |
my $match = 0; |
my $match = 0; |
my ($role,$user,$usec) = ($person =~ /^([^:]+):([^:]+:[^:]+):([^:]*)/); |
my ($role,$user,$usec) = ($person =~ /^([^:]+):([^:]+:[^:]+):([^:]*)/); |
Line 601 ENDTWO
|
Line 611 ENDTWO
|
usnm => 'username:domain', |
usnm => 'username:domain', |
coac => 'Course Access', |
coac => 'Course Access', |
curn => 'Current notification status', |
curn => 'Current notification status', |
|
doms => 'Domain Coordinator status', |
notf => 'Notification?', |
notf => 'Notification?', |
ntac => 'Notification active', |
ntac => 'Notification active', |
ntin => 'Notification inactive', |
ntin => 'Notification inactive', |
Line 630 ENDTWO
|
Line 641 ENDTWO
|
if (grep(/^$viewer$/,@domcoord)) { |
if (grep(/^$viewer$/,@domcoord)) { |
$showalldc = 1; |
$showalldc = 1; |
} |
} |
foreach my $dc (@domcoord) { |
foreach my $dc (@domcoord,@futuredomcoord) { |
if (!grep(/^$dc$/,@ccs)) { |
if (!grep(/^$dc$/,@ccs)) { |
if (grep(/^$dc$/,@notified)) { |
if (grep(/^$dc$/,@notified)) { |
$notifystate{$dc} = 1; |
$notifystate{$dc} = 1; |
Line 645 ENDTWO
|
Line 656 ENDTWO
|
push(@showdom,$dc); |
push(@showdom,$dc); |
} |
} |
} |
} |
|
foreach my $olddc (@olddomcoord) { |
|
if (grep(/^$olddc$/,@notified)) { |
|
if (!grep(/^\Q$olddc\E$/,@ccs)) { |
|
$notifystate{$olddc} = 1; |
|
my ($dcname,$dcdom) = split(/:/,$olddc); |
|
$pname{$olddc} = &Apache::loncommon::plainname($dcname,$dcdom); |
|
push(@showdom,$olddc); |
|
} |
|
} |
|
} |
my $showdomnum = scalar(@showdom); |
my $showdomnum = scalar(@showdom); |
if ($showdomnum) { |
if ($showdomnum) { |
$r->print(" |
$r->print(" |
Line 662 ENDTWO
|
Line 683 ENDTWO
|
</tr> |
</tr> |
<tr> |
<tr> |
<td>"); |
<td>"); |
$r->print(¬ifier_tables('dc',\%lt,\@showdom,\%status,\%notifystate, |
$r->print(¬ifier_tables('dc',\%lt,\@showdom,\%status,\%notifystate,\%pname, |
\%pname,\$notifyshow)); |
\$notifyshow,\@olddomcoord,\@futuredomcoord)); |
$r->print(" |
$r->print(" |
</td> |
</td> |
</tr>"); |
</tr>"); |
Line 671 ENDTWO
|
Line 692 ENDTWO
|
if (@ccs > 0 || @showdom > 0) { |
if (@ccs > 0 || @showdom > 0) { |
$r->print("<tr><td> </td></tr><tr><td>"); |
$r->print("<tr><td> </td></tr><tr><td>"); |
if ($notifycount) { |
if ($notifycount) { |
$r->print(&mt("Uncheck the checkbox(es) to terminate notification for people currently informed of roster changes from the nightly enrollment update.<br />")); |
$r->print(&mt('Uncheck the checkbox(es) to terminate notification for people currently informed of roster changes from the nightly enrollment update.').'<br />'); |
} |
} |
if ((@ccs + @showdom) > $notifycount) { |
if ((@ccs + @showdom) > $notifycount) { |
$r->print(&mt("Check the checkbox(es) to initiate notification for people not currently informed of roster changes from the nightly enrollment update.<br />")); |
$r->print(&mt('Check the checkbox(es) to initiate notification for people not currently informed of roster changes from the nightly enrollment update.').'<br />'); |
} |
} |
$r->print(&mt("Click 'Go' to save your changes.")." |
$r->print(&mt("Click 'Go' to save your changes.")." |
<br/> |
<br/> |
Line 736 ENDTWO
|
Line 757 ENDTWO
|
$r->print(" |
$r->print(" |
<td><input type=\"checkbox\" name=\"cross_$i\" checked=\"checked\" /></td> |
<td><input type=\"checkbox\" name=\"cross_$i\" checked=\"checked\" /></td> |
<td>$xl</td> |
<td>$xl</td> |
<td><input type =\"text\" size=\"10\" name=\"lcsec_$i\" value=\"$lc_sec\" /></td> |
<td><input type=\"text\" size=\"10\" name=\"lcsec_$i\" value=\"$lc_sec\" /></td> |
"); |
"); |
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
} |
} |
Line 1088 Note: Any students previously added manu
|
Line 1109 Note: Any students previously added manu
|
if ($update) { |
if ($update) { |
$r->print('<br />'.$commentary.'<br /><br /> |
$r->print('<br />'.$commentary.'<br /><br /> |
<form name="photoupdate" method="post"> |
<form name="photoupdate" method="post"> |
<input type ="button" name="retrieve" value="'.&mt('Update photo repository').'" |
<input type="button" name="retrieve" value="'.&mt('Update photo repository').'" |
onclick="javascript:document.photoupdate.submit()" /> |
onclick="javascript:document.photoupdate.submit()" /> |
<input type ="hidden" name="action" value="'.$action.'" /> |
<input type="hidden" name="action" value="'.$action.'" /> |
<input type ="hidden" name="state" value="process" /> |
<input type="hidden" name="state" value="process" /> |
</form>'); |
</form>'); |
} else { |
} else { |
$r->print(&mt('Update of photos via the Automated Enrollment Manager is unavailable in this domain.') |
$r->print(&mt('Update of photos via the Automated Enrollment Manager is unavailable in this domain.') |
Line 1132 onclick="javascript:document.photoupdate
|
Line 1153 onclick="javascript:document.photoupdate
|
my ($indexhash,$keylist) = &Apache::lonuserutils::make_keylist_array(); |
my ($indexhash,$keylist) = &Apache::lonuserutils::make_keylist_array(); |
my $classlist = &Apache::loncoursedata::get_classlist(); |
my $classlist = &Apache::loncoursedata::get_classlist(); |
my $secidx = &Apache::loncoursedata::CL_SECTION(); |
my $secidx = &Apache::loncoursedata::CL_SECTION(); |
my ($permission,$allowed) = &Apache::lonuserutils::get_permission(); |
my $crstype =&Apache::loncommon::course_type(); |
|
my ($permission,$allowed) = &Apache::lonuserutils::get_permission('course',$crstype); |
foreach my $student (keys(%{$classlist})) { |
foreach my $student (keys(%{$classlist})) { |
if (exists($permission->{'view_section'})) { |
if (exists($permission->{'view_section'})) { |
if ($classlist->{$student}[$secidx] ne $permission->{'view_section'}) { |
if ($classlist->{$student}[$secidx] ne $permission->{'view_section'}) { |
Line 1168 onclick="javascript:document.photoupdate
|
Line 1190 onclick="javascript:document.photoupdate
|
if ($autocount > 0) { |
if ($autocount > 0) { |
$cellcount ++; |
$cellcount ++; |
$r->print(<<END); |
$r->print(<<END); |
<td><fieldset><legend> <b>Change auto</b></legend><input type="button" value="check all" onclick="javascript:checkAll(document.studentform.chgauto)" /> |
<td><fieldset><legend>Change auto</legend><input type="button" value="check all" onclick="javascript:checkAll(document.studentform.chgauto)" /> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.studentform.chgauto)" /></fieldset></td> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.studentform.chgauto)" /></fieldset></td> |
END |
END |
} |
} |
if ($manualcount > 0) { |
if ($manualcount > 0) { |
$cellcount ++; |
$cellcount ++; |
$r->print(<<END); |
$r->print(<<END); |
<td><fieldset><legend> <b>Change manual</b></legend><input type="button" value="check all" onclick="javascript:checkAll(document.studentform.chgmanual)" /> |
<td><fieldset><legend>Change manual</legend><input type="button" value="check all" onclick="javascript:checkAll(document.studentform.chgmanual)" /> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.studentform.chgmanual)" /></fieldset></td> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.studentform.chgmanual)" /></fieldset></td> |
END |
END |
} |
} |
Line 1185 END
|
Line 1207 END
|
} |
} |
$cellcount ++; |
$cellcount ++; |
$r->print(<<END); |
$r->print(<<END); |
<td><fieldset><legend> <b>Lock manual</b></legend><input type="button" value="check all" onclick="javascript:checkAll(document.studentform.lockchg)" /> |
<td><fieldset><legend>Lock manual</legend><input type="button" value="check all" onclick="javascript:checkAll(document.studentform.lockchg)" /> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.studentform.lockchg)" /></fieldset></td> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.studentform.lockchg)" /></fieldset></td> |
END |
END |
} |
} |
Line 1195 END
|
Line 1217 END
|
} |
} |
$cellcount ++; |
$cellcount ++; |
$r->print(<<END); |
$r->print(<<END); |
<td><fieldset><legend> <b>Unlock manual</b></legend><input type="button" value="check all" onclick="javascript:checkAll(document.studentform.unlockchg)" /> |
<td><fieldset><legend>Unlock manual</legend><input type="button" value="check all" onclick="javascript:checkAll(document.studentform.unlockchg)" /> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.studentform.unlockchg)" /></fieldset></td> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.studentform.unlockchg)" /></fieldset></td> |
END |
END |
} |
} |
Line 1230 END
|
Line 1252 END
|
} |
} |
|
|
sub notifier_tables { |
sub notifier_tables { |
my ($role,$lt,$users,$status,$notifystate,$pname,$notifyshow) = @_; |
my ($role,$lt,$users,$status,$notifystate,$pname,$notifyshow,$olddomcoord, |
|
$futuredomcoord) = @_; |
my $output = &Apache::loncommon::start_data_table(); |
my $output = &Apache::loncommon::start_data_table(); |
$output .= &Apache::loncommon::start_data_table_header_row(); |
$output .= &Apache::loncommon::start_data_table_header_row(); |
$output .= "<th>$$lt{name}</th> |
$output .= "<th>$$lt{name}</th> |
<th>$$lt{usnm}</th>"; |
<th>$$lt{usnm}</th>"; |
if ($role eq 'cc') { |
if ($role eq 'dc') { |
|
$output .= "<th>$$lt{doms}</th>"; |
|
} elsif ($role eq 'cc') { |
$output .= "<th>$$lt{coac}</th>"; |
$output .= "<th>$$lt{coac}</th>"; |
} |
} |
$output .= "<th>$$lt{curn}</th> |
$output .= "<th>$$lt{curn}</th> |
Line 1246 sub notifier_tables {
|
Line 1271 sub notifier_tables {
|
$output .= '<td>'.$$pname{$$users[$i]}.'</td>'. |
$output .= '<td>'.$$pname{$$users[$i]}.'</td>'. |
'<td><input type="hidden" name="notifyname_'.$$notifyshow. |
'<td><input type="hidden" name="notifyname_'.$$notifyshow. |
'" value="'.$$users[$i].'" />'.$$users[$i].'</td>'; |
'" value="'.$$users[$i].'" />'.$$users[$i].'</td>'; |
if ($role eq 'cc') { |
if ($role eq 'dc') { |
|
$output .= '<td>'; |
|
if ((ref($olddomcoord) eq 'ARRAY') && (ref($futuredomcoord) eq 'ARRAY')) { |
|
if (grep(/^\Q$users->[$i]\E$/,@{$olddomcoord})) { |
|
$output .= &mt('expired'); |
|
} elsif (grep(/^\Q$users->[$i]\E$/,@{$futuredomcoord})) { |
|
$output .= &mt('future'); |
|
} else { |
|
$output .= &mt('active'); |
|
} |
|
} |
|
$output .= '</td>'; |
|
} elsif ($role eq 'cc') { |
$output .= '<td>'.$$status{$$users[$i]}.'</td>'; |
$output .= '<td>'.$$status{$$users[$i]}.'</td>'; |
} |
} |
$output .= '<td>'; |
$output .= '<td>'; |
Line 1290 sub print_accessdate_table {
|
Line 1327 sub print_accessdate_table {
|
'freg' => 'for registered students added via automated enrollment', |
'freg' => 'for registered students added via automated enrollment', |
'fnew' => 'for new students added when you update the class roster', |
'fnew' => 'for new students added when you update the class roster', |
'ifad' => 'If automated adds are enabled, then when students are added their student roles will become active on the date set here for first access, and their roles will become inactive on the date set here for last access. These default access dates will be overridden for specific students if the institutional classlist data supplied to the automatic enrollment process includes entries for the startdate and enddate fields for those students.', |
'ifad' => 'If automated adds are enabled, then when students are added their student roles will become active on the date set here for first access, and their roles will become inactive on the date set here for last access. These default access dates will be overridden for specific students if the institutional classlist data supplied to the automatic enrollment process includes entries for the startdate and enddate fields for those students.', |
'ncds' => 'changing default start and end access dates will affect <b>future enrollments</b> and also <b>currently inactive</b> students (i.e., those for whom access will begin in the future).', |
); |
'tcha' => 'To change access dates for <b>currently active</b> students, use User Management -> "Display Class Lists and Manage Multiple Users" to display currently active students, then use the dropdown menu for "Action to take for selected users:" to choose "Change starting/ending dates", select the students to change, and click "Proceed".', |
$lt{'ncds'} = &mt('changing default start and end access dates will affect [_1]future enrollments[_2] and also [_1]currently inactive[_2] students (i.e., those for whom access will begin in the future).','<b>','</b>'); |
|
$lt{'tcha'} = 'To change access dates for [_1]currently active[_2] students, use User Management -> "Manage Course Users" to display currently active students, then use the dropdown menu for "Action to take for selected users:" to choose "Change starting/ending dates", select the students to change, and click "Proceed".','<b>','</b>'); |
); |
); |
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 1475 sub print_chgsettings_response {
|
Line 1513 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 1573 sub print_setdates_response {
|
Line 1611 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 1623 start and end access dates for this cour
|
Line 1661 start and end access dates for this cour
|
} else { |
} else { |
$response .= "The last access date for students being added via automated enrollment has been changed to $showend.<br/>"; |
$response .= "The last access date for students being added via automated enrollment has been changed to $showend.<br/>"; |
} |
} |
$response .= '<br />'.&mt('Any change in access dates will only apply to students who are not currently active, i.e., those who currently have access start dates in the future, and to those added by future automated enrollment.').'<br /><br />'.&mt('To change access dates for any currently active students, use User Management -> "Display Class Lists and Manage Multiple Users" to display currently active students, then use the dropdown menu for "Action to take for selected users:" to choose "Change starting/ending dates", select the students to change, and click "Proceed".').'<br />'; |
$response .= '<br />'.&mt('Any change in access dates will only apply to students who are not currently active, i.e., those who currently have access start dates in the future, and to those added by future automated enrollment.').'<br /><br />'.&mt('To change access dates for any currently active students, use User Management -> "Manage Users" to display currently active students, then use the dropdown menu for "Action to take for selected users:" to choose "Change starting/ending dates", select the students to change, and click "Proceed".').'<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. |
|
|
Line 1672 start and end access dates for this cour
|
Line 1710 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 1745 sub print_notify_response {
|
Line 1783 sub print_notify_response {
|
} |
} |
$response .= "</ul>\n"; |
$response .= "</ul>\n"; |
} else { |
} else { |
$response = &mt('Notification of enrollment changes was <b> not enabled</b> as no [_1]s were selected as recipients.<br/>',&Apache::lonnet::plaintext('cc')); |
$response = &mt('Notification of enrollment changes was [_1]not enabled[_2] as no [_3]s were selected as recipients.','<b>','</b>',&Apache::lonnet::plaintext('cc')).'<br />'; |
} |
} |
} else { |
} else { |
if ($currcount) { |
if ($currcount) { |
Line 1857 sub print_crosslistings_menu () {
|
Line 1895 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 1869 sub print_crosslistings_response () {
|
Line 1907 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 1902 sub print_crosslistings_response () {
|
Line 1941 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 1980 sub print_crosslistings_response () {
|
Line 2019 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 1992 sub print_crosslistings_response () {
|
Line 2031 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 2006 sub print_sections_menu () {
|
Line 2045 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 2030 sub print_sections_menu () {
|
Line 2070 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 2118 sections which contribute to enrollment
|
Line 2158 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 2174 sections which contribute to enrollment
|
Line 2214 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 2186 sub print_sections_response () {
|
Line 2226 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 2216 sub print_sections_response () {
|
Line 2257 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 2289 sub print_sections_response () {
|
Line 2330 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; |
} |
} |
Line 2413 function agreement_result(caller) {
|
Line 2454 function agreement_result(caller) {
|
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
<input type ="hidden" name="action" value="'.$action.'" /> |
<input type="hidden" name="action" value="'.$action.'" /> |
<input type ="hidden" name="state" value="process" /> |
<input type="hidden" name="state" value="process" /> |
<input type ="hidden" name="showphotos" value="1" /> |
<input type="hidden" name="showphotos" value="1" /> |
<input type= "hidden" name="photopermission" value="" /> |
<input type="hidden" name="photopermission" value="" /> |
</form> |
</form> |
'; |
'; |
} else { |
} else { |
Line 2471 sub print_photos_response {
|
Line 2512 sub print_photos_response {
|
if ($update) { |
if ($update) { |
$response .= '<br />'.$commentary.'<br /><br /> |
$response .= '<br />'.$commentary.'<br /><br /> |
<form name="photoupdate" method="post"> |
<form name="photoupdate" method="post"> |
<input type ="button" name="retrieve" value="'.&mt('Update photo repository').'" |
<input type="button" name="retrieve" value="'.&mt('Update photo repository').'" |
onclick="javascript:document.photoupdate.submit()" /> |
onclick="javascript:document.photoupdate.submit()" /> |
<input type ="hidden" name="action" value="'.$action.'" /> |
<input type="hidden" name="action" value="'.$action.'" /> |
<input type ="hidden" name="state" value="photoupdate" /> |
<input type="hidden" name="state" value="photoupdate" /> |
</form>'; |
</form>'; |
} |
} |
} |
} |