version 1.34, 2006/02/07 05:08:32
|
version 1.40, 2006/02/10 02:59:02
|
Line 353 ENDONE
|
Line 353 ENDONE
|
ENDTWO |
ENDTWO |
if ($enrollvar{autoadds}) { |
if ($enrollvar{autoadds}) { |
$r->print(" |
$r->print(" |
<input type=\"radio\" name=\"autoadds\" value=\"1\" checked=\"true\" /> Enable |
<label><input type=\"radio\" name=\"autoadds\" value=\"1\" checked=\"true\" /> Enable </label> |
<input type=\"radio\" name=\"autoadds\" value=\"0\" /> Disable |
<label><input type=\"radio\" name=\"autoadds\" value=\"0\" /> Disable</label> |
"); |
"); |
} else { |
} else { |
$r->print(" |
$r->print(" |
<input type=\"radio\" name=\"autoadds\" value=\"1\" /> Enable |
<label><input type=\"radio\" name=\"autoadds\" value=\"1\" /> Enable </label> |
<input type=\"radio\" name=\"autoadds\" value=\"0\" checked=\"true\" /> Disable |
<label><input type=\"radio\" name=\"autoadds\" value=\"0\" checked=\"true\" /> Disable</label> |
"); |
"); |
} |
} |
$r->print(" |
$r->print(" |
Line 370 ENDTWO
|
Line 370 ENDTWO
|
Removals based on classlist changes: "); |
Removals based on classlist changes: "); |
if ($enrollvar{autodrops}) { |
if ($enrollvar{autodrops}) { |
$r->print(" |
$r->print(" |
<input type=\"radio\" name=\"autodrops\" value=\"1\" checked=\"true\" /> Enable |
<label><input type=\"radio\" name=\"autodrops\" value=\"1\" checked=\"true\" /> Enable </label> |
<input type=\"radio\" name=\"autodrops\" value=\"0\" /> Disable"); |
<label><input type=\"radio\" name=\"autodrops\" value=\"0\" /> Disable</label>"); |
} else { |
} else { |
$r->print(" |
$r->print(" |
<input type=\"radio\" name=\"autodrops\" value=\"1\" /> Enable |
<label><input type=\"radio\" name=\"autodrops\" value=\"1\" /> Enable </label> |
<input type=\"radio\" name=\"autodrops\" value=\"0\" checked=\"true\" /> Disable"); |
<label><input type=\"radio\" name=\"autodrops\" value=\"0\" checked=\"true\" /> Disable</label>"); |
} |
} |
$r->print(" |
$r->print(" |
</td> |
</td> |
Line 389 Note: Any students added manually by cou
|
Line 389 Note: Any students added manually by cou
|
</tr> |
</tr> |
<tr> |
<tr> |
<td align=\"right\"> |
<td align=\"right\"> |
<input type=\"button\" name=\"chgsettings\" value=\"Go\" onClick=\"process('chgsettings')\" /> |
<input type=\"button\" name=\"chgsettings\" value=\"Go\" onclick=\"process('chgsettings')\" /> |
</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\" /> |
</form> |
</form> |
"); |
"); |
} elsif ($action eq "setdates") { |
} elsif ($action eq "setdates") { |
Line 466 Note: Any students added manually by cou
|
Line 466 Note: Any students added manually by cou
|
<table width="100%"> |
<table width="100%"> |
<tr> |
<tr> |
<td align="right"> |
<td align="right"> |
<input type="button" name="setdates" value="Go" onClick="process('setdates')" /> |
<input type="button" name="setdates" value="Go" onclick="process('setdates')" /> |
</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" /> |
</form> |
</form> |
ENDTWO |
ENDTWO |
} elsif ($action eq "setaccess") { |
} elsif ($action eq "setaccess") { |
Line 480 ENDTWO
|
Line 480 ENDTWO
|
<table width="100%"> |
<table width="100%"> |
<tr> |
<tr> |
<td align="right"> |
<td align="right"> |
<input type="button" name="$action" value="Go" onClick="process('$action')" /> |
<input type="button" name="$action" value="Go" onclick="process('$action')" /> |
</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" /> |
</form> |
</form> |
ENDTWO |
ENDTWO |
} elsif ($action eq "notify") { |
} elsif ($action eq "notify") { |
Line 517 ENDTWO
|
Line 517 ENDTWO
|
"); |
"); |
if ($notifycount) { |
if ($notifycount) { |
$r->print(" |
$r->print(" |
<input type=\"radio\" name=\"notify\" value=\"1\" checked=\"true\" /> Yes |
<label><input type=\"radio\" name=\"notify\" value=\"1\" checked=\"true\" /> Yes </label> |
<input type=\"radio\" name=\"notify\" value=\"0\" /> No |
<label><input type=\"radio\" name=\"notify\" value=\"0\" /> No</label> |
"); |
"); |
} else { |
} else { |
$r->print(" |
$r->print(" |
<input type=\"radio\" name=\"notify\" value=\"1\" /> Yes |
<label><input type=\"radio\" name=\"notify\" value=\"1\" /> Yes </label> |
<input type=\"radio\" name=\"notify\" value=\"0\" checked=\"true\" /> No |
<label><input type=\"radio\" name=\"notify\" value=\"0\" checked=\"true\" /> No</label> |
"); |
"); |
} |
} |
$r->print(" |
$r->print(" |
Line 614 ENDTWO
|
Line 614 ENDTWO
|
<table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\"> |
<table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\"> |
<tr> |
<tr> |
<td align=\"right\"> |
<td align=\"right\"> |
<input type=\"button\" name=\"notifyset\" value=\"Go\" onClick=\"process('notify')\" /> |
<input type=\"button\" name=\"notifyset\" value=\"Go\" onclick=\"process('notify')\" /> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
Line 631 ENDTWO
|
Line 631 ENDTWO
|
} |
} |
$r->print(" |
$r->print(" |
</table> |
</table> |
<input type=\"hidden\" name=\"notifyshow\" value=\"$notifyshow\"> |
<input type=\"hidden\" name=\"notifyshow\" value=\"$notifyshow\" /> |
<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> |
"); |
"); |
} elsif ($action eq "crosslist") { |
} elsif ($action eq "crosslist") { |
Line 675 ENDTWO
|
Line 675 ENDTWO
|
my $colflag = $i%2; |
my $colflag = $i%2; |
$r->print(" |
$r->print(" |
<tr bgcolor=\"$bgcolors[$colflag]\" align=\"left\"> |
<tr bgcolor=\"$bgcolors[$colflag]\" align=\"left\"> |
<td><input type=\"checkbox\" name=\"cross_$i\" checked=\"true\"/></td> |
<td><input type=\"checkbox\" name=\"cross_$i\" checked=\"true\" /></td> |
<td>$xl</td> |
<td>$xl</td> |
<td><input type =\"text\" size=\"10\" name=\"gp_$i\" value=\"$gp\"></td> |
<td><input type =\"text\" size=\"10\" name=\"gp_$i\" value=\"$gp\" /></td> |
</tr> |
</tr> |
"); |
"); |
} |
} |
Line 709 ENDTWO
|
Line 709 ENDTWO
|
<table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\"> |
<table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\"> |
<tr> |
<tr> |
<td align=\"right\"> |
<td align=\"right\"> |
<input type=\"button\" name=\"crosslist\" value=\"Go\" onClick=\"process('crosslist')\" /> |
<input type=\"button\" name=\"crosslist\" value=\"Go\" onclick=\"process('crosslist')\" /> |
</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\" /> |
</form> |
</form> |
"); |
"); |
} elsif ($action eq "sections") { |
} elsif ($action eq "sections") { |
Line 770 your changes.</td>
|
Line 770 your changes.</td>
|
if ($shrflag) { |
if ($shrflag) { |
$r->print("</td><td><input type=\"text\" size=\"10\" name=\"loncapasec_$i\" value=\"$sec_id{$sections[$i]}\"></td><td><input type=\"checkbox\" name=\"sec_$i\" checked=\"true\" /></td></tr>"); |
$r->print("</td><td><input type=\"text\" size=\"10\" name=\"loncapasec_$i\" value=\"$sec_id{$sections[$i]}\"></td><td><input type=\"checkbox\" name=\"sec_$i\" checked=\"true\" /></td></tr>"); |
} else { |
} else { |
$r->print("</td><td><input type=\"text\" size=\"10\" name=\"loncapasec_$i\" value=\"\"><td><input type=\"checkbox\" name=\"sec_$i\" /></td></tr>"); |
$r->print("</td><td><input type=\"text\" size=\"10\" name=\"loncapasec_$i\" value=\"\" /></td><td><input type=\"checkbox\" name=\"sec_$i\" /></td></tr>"); |
} |
} |
} |
} |
$r->print(" |
$r->print(" |
Line 780 your changes.</td>
|
Line 780 your changes.</td>
|
<tr> |
<tr> |
<td align=\"right\"> |
<td align=\"right\"> |
<input type=\"hidden\" name=\"secshow\" value=\"$secshow\" /> |
<input type=\"hidden\" name=\"secshow\" value=\"$secshow\" /> |
<input type=\"button\" name=\"sections\" value=\"Go\" onClick=\"process('sections')\" /> |
<input type=\"button\" name=\"sections\" value=\"Go\" onclick=\"process('sections')\" /> |
</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\" /> |
</form> |
</form> |
"); |
"); |
} else { |
} else { |
Line 817 your changes.</td>
|
Line 817 your changes.</td>
|
my $colflag = $j%2; |
my $colflag = $j%2; |
$r->print(" |
$r->print(" |
<tr bgcolor=\"$bgcolors[$colflag]\" align=\"left\"> |
<tr bgcolor=\"$bgcolors[$colflag]\" align=\"left\"> |
<td><input type=\"checkbox\" name=\"sec_$j\" checked=\"true\"/></td> |
<td><input type=\"checkbox\" name=\"sec_$j\" checked=\"true\" /></td> |
<td>$currsections[$j]</td> |
<td>$currsections[$j]</td> |
<td><input type=\"text\" name=\"secgp_$j\" size=\"10\" value=\"$sec_id{$currsections[$j]}\"></td> |
<td><input type=\"text\" name=\"secgp_$j\" size=\"10\" value=\"$sec_id{$currsections[$j]}\" /></td> |
</tr> |
</tr> |
"); |
"); |
} |
} |
Line 850 your changes.</td>
|
Line 850 your changes.</td>
|
<table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\"> |
<table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\"> |
<tr> |
<tr> |
<td align=\"right\"> |
<td align=\"right\"> |
<input type=\"button\" name=\"sections\" value=\"Go\" onClick=\"process('sections')\" /> |
<input type=\"button\" name=\"sections\" value=\"Go\" onclick=\"process('sections')\" /> |
</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\" /> |
</form> |
</form> |
"); |
"); |
} |
} |
Line 866 your changes.</td>
|
Line 866 your changes.</td>
|
<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\"> |
<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\"> |
<tr> |
<tr> |
<td align=\"left\"><b>$$tasktitleref{$action}</b><br/> |
<td align=\"left\"><b>$$tasktitleref{$action}</b><br/> |
Currently: Student photo import: <i>$photosets[$enrollvar{showphotos}]</i> |
Currently: Student photo import: <i>$photosets[$enrollvar{showphoto}]</i> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
Line 876 your changes.</td>
|
Line 876 your changes.</td>
|
Automatic import of student photos from institutional data repository: |
Automatic import of student photos from institutional data repository: |
|
|
"); |
"); |
if ($enrollvar{showphotos}) { |
if ($enrollvar{showphoto}) { |
$r->print(" |
$r->print(" |
<input type=\"radio\" name=\"showphotos\" value=\"1\" checked=\"true\" /> Yes |
<label><input type=\"radio\" name=\"showphotos\" value=\"1\" checked=\"true\" /> Yes </label> |
<input type=\"radio\" name=\"showphotos\" value=\"0\" /> No |
<label><input type=\"radio\" name=\"showphotos\" value=\"0\" /> No</label> |
"); |
"); |
} else { |
} else { |
$r->print(" |
$r->print(" |
<input type=\"radio\" name=\"showphotos\" value=\"1\" /> Yes |
<label><input type=\"radio\" name=\"showphotos\" value=\"1\" /> Yes </label> |
<input type=\"radio\" name=\"showphotos\" value=\"0\" checked=\"true\" /> No |
<label><input type=\"radio\" name=\"showphotos\" value=\"0\" checked=\"true\" /> No</label> |
"); |
"); |
} |
} |
$r->print(' |
$r->print(' |
Line 914 your changes.</td>
|
Line 914 your changes.</td>
|
$r->print(' |
$r->print(' |
<tr> |
<tr> |
<td>'. |
<td>'. |
&mt('There was a problem determining whether course owner permission is required in order for a course coordinator to have access to student photos in this domain.').' '.&mt('As a result you will not be able to configure access to student photos at this time').'<br /><br /><input type="button" name=mainmenu" value="Go back" onclick="javascript:history.go(-1);" /> |
&mt('There was a problem determining whether course owner permission is required in order for a course coordinator to have access to student photos in this domain.').' '.&mt('As a result you will not be able to configure access to student photos at this time').'<br /><br /><input type="button" name="mainmenu" value="Go back" onclick="javascript:history.go(-1);" /> |
</td> |
</td> |
</tr> |
</tr> |
</form> |
</form> |
Line 943 your changes.</td>
|
Line 943 your changes.</td>
|
} else { |
} else { |
my ($ownername,$owneremail) = &get_ownerinfo($dom, |
my ($ownername,$owneremail) = &get_ownerinfo($dom, |
$enrollvar{'courseowner'}); |
$enrollvar{'courseowner'}); |
|
my $emailstr; |
|
if ($owneremail) { |
|
$emailstr = "(e-mail: $owneremail)"; |
|
} |
$r->print(' |
$r->print(' |
<tr> |
<tr> |
<td>'. |
<td>'. |
&mt('The policies of your institution [_1] require that the course owner [_2] must indicate acceptance of the conditions of use of digital photos of registered students, before they may be made available for use in a course.',$institution,$ownername).'<br /><br />'.&mt('Please direct the course owner (e-mail: [_1]) to visit the "Student photos" page in the Automated Enrollment Manager to indicate acceptance of these conditions of use',$owneremail).'<br /><br /><input type="button" name=mainmenu" value="Go back" onclick="javascript:history.go(-1);" /> |
&mt('The policies of your institution [_1] require that the course owner [_2] must indicate acceptance of the conditions of use of digital photos of registered students, before they may be made available for use in a course.',$institution,$ownername).'<br /><br />'.&mt('Please direct the course owner [_1] to visit the "Student photos" page in the Automated Enrollment Manager to indicate acceptance of these conditions of use.',$emailstr).'<br /><br /><input type="button" name="mainmenu" value="Go back" onclick="javascript:history.go(-1);" /> |
</td> |
</td> |
</tr> |
</tr> |
</form> |
</form> |
Line 960 your changes.</td>
|
Line 964 your changes.</td>
|
</tr> |
</tr> |
<tr> |
<tr> |
<td align="right"> |
<td align="right"> |
<input type="button" name="showphotos" value="Go" onClick="process('."'photos'".')"> |
<input type="button" name="showphotos" value="Go" onclick="process('."'photos'".')" /> |
</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" /> |
</form> |
</form> |
'); |
'); |
} elsif ($action eq "updatenow") { |
} elsif ($action eq "updatenow") { |
Line 981 your changes.</td>
|
Line 985 your changes.</td>
|
<tr> |
<tr> |
<td> |
<td> |
Add any students currently included in institutional classlist(s) but not enrolled in your LON-CAPA course.<br /> |
Add any students currently included in institutional classlist(s) but not enrolled in your LON-CAPA course.<br /> |
<input type=\"radio\" name=\"updateadds\" value=\"1\"> Yes <input type=\"radio\" name=\"updateadds\" value=\"0\"> No |
<label><input type=\"radio\" name=\"updateadds\" value=\"1\" /> Yes </label> |
|
<label><input type=\"radio\" name=\"updateadds\" value=\"0\" /> No </label> |
</td> |
</td> |
</tr> |
</tr> |
<tr> |
<tr> |
<td> |
<td> |
Expire students previously added by nightly enrollment process, but no longer listed in institutional classlist(s).<br /> |
Expire students previously added by nightly enrollment process, but no longer listed in institutional classlist(s).<br /> |
<input type=\"radio\" name=\"updatedrops\" value=\"1\"> Yes |
<label><input type=\"radio\" name=\"updatedrops\" value=\"1\" /> Yes </label> |
<input type=\"radio\" name=\"updatedrops\" value=\"0\"> No <br/> |
<label><input type=\"radio\" name=\"updatedrops\" value=\"0\" /> No </label><br /> |
</td> |
</td> |
</tr> |
</tr> |
<tr> |
<tr> |
Line 1006 Note: Any students previously added manu
|
Line 1011 Note: Any students previously added manu
|
</tr> |
</tr> |
<tr> |
<tr> |
<td align=\"right\"> |
<td align=\"right\"> |
<input type=\"button\" name=\"updatenow\" value=\"Go\" onClick=\"process('updatenow')\" /> |
<input type=\"button\" name=\"updatenow\" value=\"Go\" onclick=\"process('updatenow')\" /> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
Line 1021 Note: Any students previously added manu
|
Line 1026 Note: Any students previously added manu
|
<td align=\"left\"><b>$$tasktitleref{$action}</b> |
<td align=\"left\"><b>$$tasktitleref{$action}</b> |
</td> |
</td> |
</tr><tr><td>"); |
</tr><tr><td>"); |
if ($enrollvar{'showphotos'}) { |
if ($enrollvar{'showphoto'}) { |
my ($update,$commentary) = &Apache::lonnet::auto_photochoice( |
my ($update,$commentary) = &Apache::lonnet::auto_photochoice($crs, |
$crs,$dom); |
$dom); |
$r->print('<br />'.$commentary.'<br /><br /> |
if ($update) { |
|
$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 { |
|
$r->print(&mt('Update of photos via the Automated Enrollment Manager is unavailable in this domain.').'<br /><br /><input type="button" name=mainmenu" value="Go back" onclick="javascript:history.go(-1);" />'); |
|
} |
} else { |
} else { |
$r->print('Update of photos is unavailable, as import of student photos is currently disabled.<br />Enable this first via: <a href="/adm/populate?action=photos">'.$$tasktitleref{'photos'}.'</a>'); |
$r->print('Update of photos is unavailable, as import of student photos is currently disabled.<br />Enable this first via: <a href="/adm/populate?action=photos">'.$$tasktitleref{'photos'}.'</a>'); |
} |
} |
Line 1122 END
|
Line 1131 END
|
</tr> |
</tr> |
<tr> |
<tr> |
<td align=\"right\"> |
<td align=\"right\"> |
<input type=\"button\" name=\"viewclass\" value=\"Go\" onClick=\"process('viewclass','$autocount','$manualcount','$lockcount','$unlockcount')\" /> |
<input type=\"button\" name=\"viewclass\" value=\"Go\" onclick=\"process('viewclass','$autocount','$manualcount','$lockcount','$unlockcount')\" /> |
</td> |
</td> |
</tr> |
</tr> |
"); |
"); |
Line 1333 sub print_chgsettings_response {
|
Line 1342 sub print_chgsettings_response {
|
} |
} |
if ($autodrops) { |
if ($autodrops) { |
if ($currdrops) { |
if ($currdrops) { |
$response .= "Nightly removals based on classlist changes still <b>enabled</b><br>"; |
$response .= "Nightly removals based on classlist changes still <b>enabled</b><br />"; |
} else { |
} else { |
$response .= "Nightly removals based on classlist changes now <b>enabled</b><br/>"; |
$response .= "Nightly removals based on classlist changes now <b>enabled</b><br/>"; |
} |
} |
} else { |
} else { |
if ($currdrops) { |
if ($currdrops) { |
$response .= "Nightly removals based on classlist changes now <b>disabled</b><br>"; |
$response .= "Nightly removals based on classlist changes now <b>disabled</b><br />"; |
} else { |
} else { |
$response .= "Nightly removals based on classlist changes still <b>disabled</b>"; |
$response .= "Nightly removals based on classlist changes still <b>disabled</b>"; |
} |
} |
Line 1440 sub print_setdates_response {
|
Line 1449 sub print_setdates_response {
|
$firstaccess = "a date prior to today"; |
$firstaccess = "a date prior to today"; |
} |
} |
if (($nowstamp >= $autostart) && ($rosterupdated == 0)) { |
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>|; |
$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); |
$warning = &warning_message($dom,$crs,$action); |
Line 1540 $showend.<br/>";
|
Line 1549 $showend.<br/>";
|
$firstaccess = "a date prior to today"; |
$firstaccess = "a date prior to today"; |
} |
} |
if (($nowstamp >= $startaccess) && ($accessgiven == 0)) { |
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>|; |
$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); |
$warning = &warning_message($dom,$crs,$action); |
Line 1714 sub print_crosslistings_menu () {
|
Line 1723 sub print_crosslistings_menu () {
|
</tr> |
</tr> |
<tr> |
<tr> |
<td align="right"> |
<td align="right"> |
<input type="button" name="newcross" value="Go" onClick="process('newcross')" /> |
<input type="button" name="newcross" value="Go" onclick="process('newcross')" /> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
<input type=\"hidden\" name=\"numcross\" value=\"$numcross\"> |
<input type=\"hidden\" name=\"numcross\" value=\"$numcross\" /> |
<input type=\"hidden\" name=\"action\" value=\"newcross\"> |
<input type=\"hidden\" name=\"action\" value=\"newcross\" /> |
<input type=\"hidden\" name=\"state\" value=\"process\"> |
<input type=\"hidden\" name=\"state\" value=\"process\" /> |
</form> |
</form> |
); |
); |
} |
} |
Line 1997 sections which contribute to enrollment
|
Line 2006 sections which contribute to enrollment
|
</tr> |
</tr> |
<tr> |
<tr> |
<td align="right"> |
<td align="right"> |
<input type="button" name="newsections" value="Go" onClick="process('newsections')" /> |
<input type="button" name="newsections" value="Go" onclick="process('newsections')" /> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
<input type=\"hidden\" name=\"numsec\" value=\"$numsec\"> |
<input type=\"hidden\" name=\"numsec\" value=\"$numsec\" /> |
<input type=\"hidden\" name=\"action\" value=\"newsections\"> |
<input type=\"hidden\" name=\"action\" value=\"newsections\" /> |
<input type=\"hidden\" name=\"state\" value=\"process\"> |
<input type=\"hidden\" name=\"state\" value=\"process\" /> |
</form> |
</form> |
); |
); |
} |
} |
Line 2111 sub print_sections_response () {
|
Line 2120 sub print_sections_response () {
|
|
|
sub photo_permission { |
sub photo_permission { |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my %settings = &Apache::lonnet::get('environment',['internal.courseowner', |
my %settings = &Apache::lonnet::get('environment', |
'internal.photopermission','internal.showphotos'],$dom,$crs); |
['internal.courseowner', |
|
'internal.photopermission', |
|
'internal.showphoto'], |
|
$dom,$crs); |
my ($showphotos,$response); |
my ($showphotos,$response); |
if (exists($env{'form.cancel_agreement'})) { |
if (exists($env{'form.cancel_agreement'})) { |
if ($env{'user.name'} eq $settings{'internal.courseowner'}) { |
if ($env{'user.name'} eq $settings{'internal.courseowner'}) { |
Line 2143 sub photo_permission {
|
Line 2155 sub photo_permission {
|
$response = &mt('There was a problem processing the record of your agreement to the conditions of use. Settings for this course have been left unchanged.').'<br/>'."\n"; |
$response = &mt('There was a problem processing the record of your agreement to the conditions of use. Settings for this course have been left unchanged.').'<br/>'."\n"; |
} else { |
} else { |
&print_photos_response($r,$realm,$dom,$crs,$action, |
&print_photos_response($r,$realm,$dom,$crs,$action, |
$tasktitleref,$showphotos,$env{'form.photopermission'},\%cenv); |
$tasktitleref,$showphotos, |
|
$env{'form.photopermission'},\%cenv); |
} |
} |
} else { |
} else { |
my ($result,$perm_reqd,$conditions) = |
my ($result,$perm_reqd,$conditions) = |
&Apache::lonnet::auto_photo_permission($crs,$dom); |
&Apache::lonnet::auto_photo_permission($crs,$dom); |
my $permcheck; |
my $permcheck; |
if ($result eq 'ok') { |
if ($result eq 'ok') { |
if ($perm_reqd eq 'yes') { |
if ($perm_reqd eq 'yes') { |
if ($settings{'internal.photopermission'} eq 'yes') { |
if ($settings{'internal.photopermission'} eq 'yes') { |
&print_photos_response($r,$realm,$dom,$crs,$action, |
&print_photos_response($r,$realm,$dom,$crs,$action, |
$tasktitleref,$showphotos); |
$tasktitleref,$showphotos); |
} else { |
} else { |
return(&print_photo_agreement($r,$realm,$dom,$crs, |
return(&print_photo_agreement($r,$realm,$dom,$crs, |
$action,$tasktitleref,$conditions, |
$action,$tasktitleref, |
$settings{'internal.courseowner'})); |
$conditions, |
|
$settings{'internal.courseowner'})); |
} |
} |
} elsif ($perm_reqd eq 'no') { |
} elsif ($perm_reqd eq 'no') { |
&print_photos_response($r,$realm,$dom,$crs,$action, |
&print_photos_response($r,$realm,$dom,$crs,$action, |
$tasktitleref,$showphotos); |
$tasktitleref,$showphotos); |
} else { |
} else { |
$permcheck = 'fail'; |
$permcheck = 'fail'; |
} |
} |
Line 2233 function agreement_result(caller) {
|
Line 2247 function agreement_result(caller) {
|
|
|
sub print_photos_response { |
sub print_photos_response { |
my ($r,$realm,$dom,$crs,$action,$tasktitleref,$showphotos,$photopermission, |
my ($r,$realm,$dom,$crs,$action,$tasktitleref,$showphotos,$photopermission, |
$permissionenv)=@_; |
$permissionenv)=@_; |
my %newenv; |
my %newenv; |
if (defined($permissionenv)) { |
if (defined($permissionenv)) { |
foreach my $key (keys(%{$permissionenv})) { |
foreach my $key (keys(%{$permissionenv})) { |
if (exists($env{'request.course.id'})) { |
if (exists($env{'request.course.id'})) { |
$newenv{$env{'request.course.id'}.'.'.$key} = |
$newenv{$env{'request.course.id'}.'.'.$key} = |
$$permissionenv{$key}; |
$$permissionenv{$key}; |
} |
} |
} |
} |
} |
} |
my %settings = &Apache::lonnet::get('environment',['internal.showphotos'], |
my %settings = &Apache::lonnet::get('environment',['internal.showphoto'], |
$dom,$crs); |
$dom,$crs); |
my $currphotos = $settings{'internal.showphotos'}; |
my $currphotos = $settings{'internal.showphoto'}; |
my $response = ""; |
my $response = ""; |
if (defined($photopermission)) { |
if (defined($photopermission)) { |
if ($photopermission eq 'yes') { |
if ($photopermission eq 'yes') { |
Line 2255 sub print_photos_response {
|
Line 2269 sub print_photos_response {
|
$showphotos = 0; |
$showphotos = 0; |
} |
} |
} |
} |
my %cenv = ('internal.showphotos' => $showphotos); |
my %cenv = ('internal.showphoto' => $showphotos); |
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 change. The student photo retrieval setting for this course has been left unchanged.<br/>"; |
$response .= "There was a problem processing your requested change. The student photo retrieval setting for this course has been left unchanged.<br/>"; |
Line 2265 sub print_photos_response {
|
Line 2279 sub print_photos_response {
|
$response .= "Retrieval of student photos is still <b>enabled</b>.<br/>"; |
$response .= "Retrieval of student photos is still <b>enabled</b>.<br/>"; |
} else { |
} else { |
$response .= "Retrieval of student photos in now <b>enabled</b>.<br/>"; |
$response .= "Retrieval of student photos in now <b>enabled</b>.<br/>"; |
my ($update,$commentary) = &Apache::lonnet::auto_photochoice( |
my ($update,$commentary) = |
$crs,$dom); |
&Apache::lonnet::auto_photochoice($crs,$dom); |
if ($update) { |
if ($update) { |
$response .= '<br />'.$commentary.'<br /><br /> |
$response .= '<br />'.$commentary.'<br /><br /> |
<form name="photoupdate" method="post"> |
<form name="photoupdate" method="post"> |
Line 2287 onclick="javascript:document.photoupdate
|
Line 2301 onclick="javascript:document.photoupdate
|
foreach my $key (keys(%cenv)) { |
foreach my $key (keys(%cenv)) { |
if (exists($env{'request.course.id'})) { |
if (exists($env{'request.course.id'})) { |
$newenv{'course.'.$env{'request.course.id'}.'.'.$key} = |
$newenv{'course.'.$env{'request.course.id'}.'.'.$key} = |
$cenv{$key}; |
$cenv{$key}; |
} |
} |
} |
} |
} |
} |
Line 2303 sub print_photoupdate_response {
|
Line 2317 sub print_photoupdate_response {
|
my $response; |
my $response; |
my %changes; |
my %changes; |
my %lt = &LONCAPA::Enrollment::photo_response_types(); |
my %lt = &LONCAPA::Enrollment::photo_response_types(); |
my %settings = &Apache::lonnet::get('environment',['internal.coursecode', |
my %settings = &Apache::lonnet::get('environment', |
'internal.sectionnums','internal.crosslistings'],$dom,$crs); |
['internal.coursecode', |
|
'internal.sectionnums', |
|
'internal.crosslistings'], |
|
$dom,$crs); |
my @allcourses = (); |
my @allcourses = (); |
my %LC_code; |
my %LC_code; |
my %affiliates; |
my %affiliates; |
Line 2315 sub print_photoupdate_response {
|
Line 2332 sub print_photoupdate_response {
|
$outcome = &Apache::lonnet::auto_photoupdate(\%affiliates,$dom,$crs,\%changes); |
$outcome = &Apache::lonnet::auto_photoupdate(\%affiliates,$dom,$crs,\%changes); |
unless ($outcome eq 'ok') { |
unless ($outcome eq 'ok') { |
&Apache::lonnet::logthis("lonpopulate::print_photoupdate_response". |
&Apache::lonnet::logthis("lonpopulate::print_photoupdate_response". |
"failed to update student photos". |
"failed to update student photos". |
" for ".$crs."\@".$dom." by ". |
" for ".$crs."\@".$dom." by ". |
$env{'user.name'}." \@ ".$env{'user.domain'}. |
$env{'user.name'}." \@ ".$env{'user.domain'}. |
": ".$outcome); |
": ".$outcome); |
} |
} |
if ($outcome eq 'ok') { |
if ($outcome eq 'ok') { |
if (keys(%changes) > 0) { |
if (keys(%changes) > 0) { |
Line 2336 function photowindow(photolink) {
|
Line 2353 function photowindow(photolink) {
|
my @usernames = sort(split(/\&/,$changes{$type})); |
my @usernames = sort(split(/\&/,$changes{$type})); |
my $count = @usernames; |
my $count = @usernames; |
$response .= '<b>'.&mt('For [_1] students, photos ', |
$response .= '<b>'.&mt('For [_1] students, photos ', |
$count).$lt{$type}.'</b><ul>'; |
$count).$lt{$type}.'</b><ul>'; |
foreach my $username (@usernames) { |
foreach my $username (@usernames) { |
$response .= '<li>'.$username; |
$response .= '<li>'.$username; |
if (($type eq 'new') || ($type eq 'same') || ($type eq 'update')) { |
if (($type eq 'new') || ($type eq 'same') || ($type eq 'update')) { |
Line 2364 sub get_ownerinfo {
|
Line 2381 sub get_ownerinfo {
|
my ($ownername,$owneremail); |
my ($ownername,$owneremail); |
if ($owner) { |
if ($owner) { |
$ownername=&Apache::loncommon::plainname($owner,$dom,'firstname'); |
$ownername=&Apache::loncommon::plainname($owner,$dom,'firstname'); |
my %ownerinfo = &Apache::lonnet::get('environment','permanentemail', |
my %ownerinfo = &Apache::lonnet::get('environment',['permanentemail'], |
$dom,$owner); |
$dom,$owner); |
$owneremail = $ownerinfo{'permanentemail'}; |
$owneremail = $ownerinfo{'permanentemail'}; |
} |
} |
return ($ownername,$owneremail); |
return ($ownername,$owneremail); |
Line 2384 sub print_update_result () {
|
Line 2401 sub print_update_result () {
|
my $logmsg = ''; |
my $logmsg = ''; |
my $newusermsg = ''; |
my $newusermsg = ''; |
my %phototypes = (); |
my %phototypes = (); |
my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.sectionnums','internal.crosslistings','internal.authtype','internal.autharg','internal.showphotos'],$dom,$crs); |
my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.sectionnums','internal.crosslistings','internal.authtype','internal.autharg','internal.showphoto'],$dom,$crs); |
my $coursecode = $settings{'internal.coursecode'}; |
my $coursecode = $settings{'internal.coursecode'}; |
my $authtype = $settings{'internal.authtype'}; |
my $authtype = $settings{'internal.authtype'}; |
my $autharg = $settings{'internal.autharg'}; |
my $autharg = $settings{'internal.autharg'}; |
my $showphotos = $settings{'internal.showphotos'}; |
my $showphotos = $settings{'internal.showphoto'}; |
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'}; |
Line 2445 sub get_institutional_codes {
|
Line 2462 sub get_institutional_codes {
|
my @currsections = (); |
my @currsections = (); |
my @currxlists = (); |
my @currxlists = (); |
my $coursecode = $$settings{'internal.coursecode'}; |
my $coursecode = $$settings{'internal.coursecode'}; |
|
|
if ($$settings{'internal.sectionnums'} ne '') { |
if ($$settings{'internal.sectionnums'} ne '') { |
@currsections = split(/,/,$$settings{'internal.sectionnums'}); |
@currsections = split(/,/,$$settings{'internal.sectionnums'}); |
} |
} |
|
|
if ($$settings{'internal.crosslistings'} ne '') { |
if ($$settings{'internal.crosslistings'} ne '') { |
@currxlists = split(/,/,$$settings{'internal.crosslistings'}); |
@currxlists = split(/,/,$$settings{'internal.crosslistings'}); |
} |
} |
|
|
if (@currxlists > 0) { |
if (@currxlists > 0) { |
foreach (@currxlists) { |
foreach (@currxlists) { |
if (m/^([^:]+):(\w*)$/) { |
if (m/^([^:]+):(\w*)$/) { |
Line 2767 sub get_dates_from_form {
|
Line 2784 sub get_dates_from_form {
|
sub date_setting_table { |
sub date_setting_table { |
my ($starttime,$endtime,$action) = @_; |
my ($starttime,$endtime,$action) = @_; |
my ($startform,$endform) = &setup_date_selectors($starttime,$endtime,$action); |
my ($startform,$endform) = &setup_date_selectors($starttime,$endtime,$action); |
my $perpetual = '<nobr><input type="checkbox" name="no_end_date"'; |
my $perpetual = '<nobr><label><input type="checkbox" name="no_end_date"'; |
if (($action eq 'setdates' && defined($endtime) && $endtime == 0) || (($action eq 'setaccess' || $action eq 'updatenow') && ($endtime eq '' || $endtime == 0)) ) { |
if (($action eq 'setdates' && defined($endtime) && $endtime == 0) || (($action eq 'setaccess' || $action eq 'updatenow') && ($endtime eq '' || $endtime == 0)) ) { |
$perpetual .= ' checked'; |
$perpetual .= ' checked'; |
} |
} |
$perpetual.= ' />'.' no ending date</nobr>'; |
$perpetual.= ' />'.' no ending date</label></nobr>'; |
my $start_table = ''; |
my $start_table = ''; |
$start_table .= "<table>\n"; |
$start_table .= "<table>\n"; |
$start_table .= '<tr><td align="right">Starting Date</td>'. |
$start_table .= '<tr><td align="right">Starting Date</td>'. |