--- loncom/interface/lonpopulate.pm 2006/07/28 01:04:45 1.45 +++ loncom/interface/lonpopulate.pm 2006/08/10 22:05:18 1.48 @@ -1,5 +1,5 @@ # automated enrollment configuration handler -# $Id: lonpopulate.pm,v 1.45 2006/07/28 01:04:45 raeburn Exp $ +# $Id: lonpopulate.pm,v 1.48 2006/08/10 22:05:18 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -113,30 +113,28 @@ function process(calling,numauto,nummanu } if (calling == "notify") { var totalnote = 0; - if (formName.notify[1].checked = true) { - for (var i=0; i 0) { - if (formName.notify[1].checked = true) { - if (confirm("You have indicated that you do not want notification of roster changes messages to be sent, but "+totalnote+" have been checked as recipients.\\nClick 'OK' to erase all recipients, or 'Cancel'.")) { - checker = 1; - } else { - checker = 0; - } - } - } else { - if (formName.notify[0].checked = true) { - alert("You have indicated that you want notification of roster changes messages to be sent, but you have not selected any recipients."); - checker = 0; - } - } + for (var i=0; i 0) { + if (formName.notify[1].checked == true) { + if (confirm("You have indicated that you do not want notification of roster changes messages to be sent, but "+totalnote+" have been checked as recipients.\\nClick 'OK' to erase all recipients, or 'Cancel'.")) { + checker = 1; + } else { + checker = 0; + } + } + } else { + if (formName.notify[0].checked == true) { + alert("You have indicated that you want notification of roster changes messages to be sent, but you have not selected any recipients."); + checker = 0; + } } } if (calling == "viewclass") { @@ -947,18 +945,12 @@ your changes. my ($result,$perm_reqd)=&Apache::lonnet::auto_photo_permission($crs,$dom); my $can_enable = 1; my $institution = $Apache::lonnet::domaindescription{$dom}; - my $user; - if ($enrollvar{'courseowner'} =~ /^[^:]+:[^:]+$/) { - $user = $env{'user.name'}.':'.$env{'user.domain'}; - } else { - $user = $env{'user.name'}; - } if ($result eq 'ok') { if ($perm_reqd eq 'yes') { if (!($enrollvar{'photopermission'} eq 'yes')) { $can_enable = 0; } else { - if ($user eq $enrollvar{'courseowner'}) { + if (&user_is_courseowner($enrollvar{'courseowner'})) { $r->print(' '. @@ -991,7 +983,7 @@ your changes. '); } else { - if ($user eq $enrollvar{'courseowner'}) { + if (&user_is_courseowner($enrollvar{'courseowner'})) { $r->print(' '. @@ -1125,7 +1117,7 @@ onclick="javascript:document.photoupdate if (! exists($env{'form.sortby'})) { $env{'form.sortby'} = 'username'; } - if ($env{'form.Status'} !~ /^(Any|Expired|Active)$/) { + if ($env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) { $env{'form.Status'} = 'Active'; } my $status_select = &Apache::lonhtmlcommon::StatusOptions($env{'form.Status'}); @@ -1795,7 +1787,7 @@ sub print_crosslistings_menu () { if ($numcross > 0) { my @bgcolors=("#eeeeee","#cccccc"); $response .= qq(You indicated that you wish to add an additional $numcross crosslisting(s). For each new crosslisting enter the insititutional course section code (e.g., fs03zol101001, for section 001 of zol101 for fs03 semester), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in the crosslisted course section. The LON-CAPA section ID can be left blank, if you do not wish to tie a section ID to this crosslisting. The institutional course section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course codes (and section numbers) to your institution's student information system.

-
); + ); #' stupid emacs $response .= &Apache::loncommon::start_data_table(); $response .= &Apache::loncommon::start_data_table_row(); $response .= qq( @@ -2285,7 +2277,7 @@ sub photo_permission { $dom,$crs); my ($showphotos,$response); if (exists($env{'form.cancel_agreement'})) { - if ($env{'user.name'} eq $settings{'internal.courseowner'}) { + if (&user_is_courseowner($settings{'internal.courseowner'})) { my %cenv = ( 'internal.photopermission' => 'no', ); @@ -2355,7 +2347,7 @@ sub print_photo_agreement { my ($r,$realm,$dom,$crs,$action,$tasktitleref,$conditions,$courseowner)=@_; my $response; my $institution = $Apache::lonnet::domaindescription{$dom}; - if ($env{'user.name'} eq $courseowner) { + if (&user_is_courseowner($courseowner)) { $response = '