Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.68 and 1.69

version 1.68, 2007/03/01 09:30:58 version 1.69, 2007/04/22 02:25:36
Line 33  package Apache::lonmsgdisplay; Line 33  package Apache::lonmsgdisplay;
   
 =head1 NAME  =head1 NAME
   
 Apache::lonmsg: supports internal messaging  Apache::lonmsgdisplay: supports internal messaging
   
 =head1 SYNOPSIS  =head1 SYNOPSIS
   
 lonmsg provides routines for sending messages, receiving messages, and  lonmsgdisplay provides a handler to allow users to read, send, 
 a handler to allow users to read, send, and delete messages.  and delete messages, and to create and delete message folders,
   and to move messages between folders.
   
 =head1 OVERVIEW  =head1 OVERVIEW
   
Line 93  addresses on their B<PREF> screen, but g Line 94  addresses on their B<PREF> screen, but g
 are much more useful than traditional email can be made to be, even  are much more useful than traditional email can be made to be, even
 with HTML support.  with HTML support.
   
 Right now, this document will cover just how to send a message, since  
 it is likely you will not need to programmatically read messages,  
 since lonmsg already implements that functionality.  
   
 The routines used to package messages and unpackage messages are not  
 only used by lonmsg when creating/extracting messages for LON-CAPA's  
 internal messaging system, but also by lonnotify.pm which is available  
 for use by Domain Coordinators to broadcast standard e-mail to specified  
 users in their domain.  The XML packaging used in the two cases is very  
 similar.  The differences are the use of <recuser>$uname</recuser> and   
 <recdomain>$udom</recdomain> in stored internal messages, compared   
 with <recipient username="$uname:$udom">$email</recipient> in stored  
 Domain Coordinator e-mail for the storage of information about   
 recipients of the message/e-mail.  
   
 =head1 FUNCTIONS  
   
 =over 4  
   
 =cut  =cut
   
 use strict;  use strict;
Line 1055  ENDDISHEADER Line 1037  ENDDISHEADER
     }      }
     my ($dis_name,$dis_domain) = ($fromname,$fromdomain);      my ($dis_name,$dis_domain) = ($fromname,$fromdomain);
     if ($folder eq 'sent') {      if ($folder eq 'sent') {
  if (defined($recv_name) && !defined($recv_domain)) {                  if (defined($recv_name) && defined($recv_domain)) {
     $dis_name   = join('<br />',@{$recv_name});      if (ref($recv_name) eq 'ARRAY' && 
     $dis_domain = join('<br />',@{$recv_domain});                          ref($recv_domain) eq 'ARRAY') {
           $dis_name   = join('<br />',@{$recv_name});
           $dis_domain = join('<br />',@{$recv_domain});
                       }
  } else {   } else {
     my $msg_id  = &unescape($origID);      my $msg_id  = &unescape($origID);
     my %message = &Apache::lonnet::get('nohist_email'.$suffix,      my %message = &Apache::lonnet::get('nohist_email'.$suffix,
        [$msg_id]);         [$msg_id]);
     my %content = &Apache::lonmsg::unpackagemsg($message{$msg_id});      my %content = &Apache::lonmsg::unpackagemsg($message{$msg_id});
     $dis_name   = join('<br />',@{$content{'recuser'}});                      if (ref($content{'recuser'}) eq 'ARRAY') {
     $dis_domain = join('<br />',@{$content{'recdomain'}});          $dis_name   = join('<br />',@{$content{'recuser'}});
                       }
                       if (ref($content{'recdomain'}) eq 'ARRAY') {
           $dis_domain = join('<br />',@{$content{'recdomain'}});
                       }
  }   }
     }      }
             my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime);              my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime);
Line 2367  sub sendoffmail { Line 2356  sub sendoffmail {
     split(/\:/,&unescape($specialmsgid));      split(/\:/,&unescape($specialmsgid));
   
                 foreach my $recipient (sort(keys(%toaddr))) {                  foreach my $recipient (sort(keys(%toaddr))) {
                     if ($specialmsg_status{$recipient} eq 'ok') {                      if ($specialmsg_status{$recipient} =~ /\s*(ok|con_delayed)\s*/) {
                         my $usersubj = $subj_prefix.'['.$recipient.']';                          my $usersubj = $subj_prefix.'['.$recipient.']';
                         my $usermsgid =                           my $usermsgid = 
     &Apache::lonmsg::buildmsgid($stamp,$usersubj,      &Apache::lonmsg::buildmsgid($stamp,$usersubj,
Line 2760  sub handler { Line 2749  sub handler {
   
 =pod  =pod
   
 =back  
   
 =cut  =cut
   
 1;   1; 

Removed from v.1.68  
changed lines
  Added in v.1.69


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