Diff for /loncom/interface/loncommon.pm between versions 1.616 and 1.618

version 1.616, 2007/11/18 21:19:16 version 1.618, 2007/12/03 22:58:46
Line 5861  sub get_course_users { Line 5861  sub get_course_users {
         my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist($cdom,$cnum);          my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist($cdom,$cnum);
         my $now = time;          my $now = time;
         foreach my $student (keys(%{$classlist})) {          foreach my $student (keys(%{$classlist})) {
             my $status;  
             my $match = 0;              my $match = 0;
             my $secmatch = 0;              my $secmatch = 0;
             my $section = $$classlist{$student}[$idx{section}];              my $section = $$classlist{$student}[$idx{section}];
Line 7637  sub restore_settings { Line 7636  sub restore_settings {
     }      }
 }  }
   
   #######################################################
   #######################################################
   
   =pod
   
   =head1 Domain E-mail Routines  
   
   =over 4
   
   =item &build_recipient_list
   
   Build recipient lists for three types of e-mail:
   (a) Error Reports, (b) Package Updates, (c) Help requests, generated by
   lonerrorhandler.pm, CHECKRPMS and lonhelpdesk.pm respectively.
   
   Inputs:
   Request object, defmail (scalar - email address of default recipient), 
   mailing type (scalar - errormail, packagesmail, or helpdeskmail), 
   defdom (domain for which to retrieve configuration settings).
   
   Returns: comma separated list of addresses to which to send e-mail.   
   
   =cut
   
   ############################################################
   ############################################################
   sub build_recipient_list {
       my ($r,$defmail,$mailing,$defdom) = @_;
       my @recipients;
       my $otheremails;
       my $defdom = $r->dir_config('lonDefDomain');
       my %domconfig =
            &Apache::lonnet::get_dom('configuration',['contacts'],$defdom);
       if (ref($domconfig{'contacts'}) eq 'HASH') {
           if (ref($domconfig{'contacts'}{$mailing}) eq 'HASH') {
               my @contacts = ('adminemail','supportemail');
               foreach my $item (@contacts) {
                   if ($domconfig{'contacts'}{$mailing}{$item}) {
                       push(@recipients,$domconfig{'contacts'}{$item});
                   }
                   $otheremails = $domconfig{'contacts'}{$mailing}{'others'};
               }
           } else {
               push(@recipients,$r->dir_config('lonAdmEMail'));
           }
       }
       if ($defmail ne '') {
           push(@recipients,$defmail);
       }
       my $recipientlist = join(',',@recipients);
       if ($otheremails) {
           if ($recipientlist ne '') {
               $recipientlist .= ','.$otheremails;
           } else {
               $recipientlist = $otheremails;
           }
       }
       return $recipientlist;
   }
   
 ############################################################  ############################################################
 ############################################################  ############################################################
   

Removed from v.1.616  
changed lines
  Added in v.1.618


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