Diff for /loncom/interface/lonpopulate.pm between versions 1.44 and 1.46

version 1.44, 2006/07/27 23:24:19 version 1.46, 2006/08/08 19:02:04
Line 46  sub header { Line 46  sub header {
   
 sub choose_header {  sub choose_header {
     my ($action) = @_;      my ($action) = @_;
       my $notify_check = '/^note_[0-9]+$/';
     my $scripttag = qq|      my $scripttag = qq|
 <script language='javascript' type='text/javascript'>  <script language='javascript' type='text/javascript'>
 <!--  <!--
Line 111  function process(calling,numauto,nummanu Line 111  function process(calling,numauto,nummanu
          checker = 0           checker = 0
      }       }
  }   }
    if (calling == "notify") {
        var totalnote = 0;
        if (formName.notify[1].checked = true) {
            for (var i=0; i<formName.elements.length; i++) {
                var elementname = formName.elements[i].name;
                var check_name = elementname.match($notify_check);
                if (check_name != null) {
                    if (formName.elements[i].checked) {
                        totalnote ++;
                    }
                } 
            }
            if (totalnote > 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") {   if (calling == "viewclass") {
      var totcheck = 0       var totcheck = 0
      var numchk = 0       var numchk = 0
Line 494  ENDTWO Line 522  ENDTWO
           $noteset = "OFF";            $noteset = "OFF";
       }        }
       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) {                if (!grep(/^$uname:$udom$/,@domcoord)) {
                   push(@domcoord,$uname.':'.$udom);                    push(@domcoord,$uname.':'.$udom);
               }                }
           }            }
Line 546  ENDTWO Line 574  ENDTWO
               next;                next;
           }            }
           if ($role eq 'cc')  {            if ($role eq 'cc')  {
               unless (grep/^$user$/,@ccs) {                unless (grep(/^$user$/,@ccs)) {
                   if ($end && $end < $now) {                    if ($end && $end < $now) {
                       $status{$user} = 'previous';                        $status{$user} = 'previous';
                   } elsif ($start > $now) {                    } elsif ($start > $now) {
Line 558  ENDTWO Line 586  ENDTWO
                   my ($uname,$udom) = split(/:/,$user);                    my ($uname,$udom) = split(/:/,$user);
                   $pname{$user} =                     $pname{$user} = 
                            &Apache::loncommon::plainname($uname,$udom);                             &Apache::loncommon::plainname($uname,$udom);
                   if (grep/^$user$/,@notified) {                    if (grep(/^$user$/,@notified)) {
                       $notifystate{$user} = 1;                        $notifystate{$user} = 1;
                   } else {                    } else {
                       $notifystate{$user} = 0;                        $notifystate{$user} = 0;
Line 566  ENDTWO Line 594  ENDTWO
               }                }
           }            }
       }        }
       my $notifyshow = @ccs;        my $notifyshow = 0; 
       my %lt = &Apache::lonlocal::texthash(        my %lt = &Apache::lonlocal::texthash(
                                   name => 'Name',                                    name => 'Name',
                                   usnm => 'username:domain',                                    usnm => 'username:domain',
Line 639  ENDTWO Line 667  ENDTWO
              </td>               </td>
           </tr>");            </tr>");
       }        }
       if ($notifycount || @showdom > 0) {        if (@ccs > 0 || @showdom > 0) {
           $r->print("<tr><td>&nbsp;</td></tr><tr><td>".            $r->print("<tr><td>&nbsp;</td></tr><tr><td>");
                 &mt("Uncheck the 'Notification?' checkbox for each person who is to be removed from the list of recipients who are currently informed of roster changes whenever any adds or drops occur during the nightly enrollment check.").' '.&mt("To include individuals who are not currently recipients, simply check the 'Notification?' checkbox. Click 'Go' to store your changes.")."            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 />"));
            }
            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("Click 'Go' to store your changes.")."
            <br/>             <br/>
            <table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\">             <table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\">
             <tr>              <tr>
Line 1091  onclick="javascript:document.photoupdate Line 1125  onclick="javascript:document.photoupdate
       if (! exists($env{'form.sortby'})) {        if (! exists($env{'form.sortby'})) {
           $env{'form.sortby'} = 'username';            $env{'form.sortby'} = 'username';
       }        }
       if ($env{'form.Status'} !~ /^(Any|Expired|Active)$/) {        if ($env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) {
           $env{'form.Status'} = 'Active';            $env{'form.Status'} = 'Active';
       }        }
       my $status_select = &Apache::lonhtmlcommon::StatusOptions($env{'form.Status'});        my $status_select = &Apache::lonhtmlcommon::StatusOptions($env{'form.Status'});
Line 1761  sub print_crosslistings_menu () { Line 1795  sub print_crosslistings_menu () {
  if ($numcross > 0) {   if ($numcross > 0) {
     my @bgcolors=("#eeeeee","#cccccc");      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.<br/><br/>      $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.<br/><br/>
            <form name="enter" method="post">);             <form name="enter" method="post">); #' stupid emacs
            $response .= &Apache::loncommon::start_data_table();             $response .= &Apache::loncommon::start_data_table();
            $response .= &Apache::loncommon::start_data_table_row();             $response .= &Apache::loncommon::start_data_table_row();
            $response .= qq(             $response .= qq(

Removed from v.1.44  
changed lines
  Added in v.1.46


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>