Diff for /loncom/interface/lonmsg.pm between versions 1.3 and 1.4

version 1.3, 2000/10/20 14:40:26 version 1.4, 2000/10/20 18:06:08
Line 100  sub user_crit_msg { Line 100  sub user_crit_msg {
     if ($homeserver ne 'no_host') {      if ($homeserver ne 'no_host') {
        my $msgid;         my $msgid;
        ($msgid,$message)=&packagemsg($subject,$message);         ($msgid,$message)=&packagemsg($subject,$message);
        $status=&Apache::lonnet::cput('critical',$msgid => $message);         $status=&Apache::lonnet::critical(
              'put:'.$domain.':'.$user.':critical:'.
              &Apache::lonnet::escape($msgid).'='.
              &Apache::lonnet::escape($message),$homeserver);
     } else {      } else {
        $status='no_host';         $status='no_host';
     }      }
     &Apache::lonnet::logthis(      &Apache::lonnet::logthis(
       '<font color=yellow>INFO: Sending critical email '.$msgid.        'Sending critical email '.$msgid.
       ', log status: '.        ', log status: '.
       &Apache::lonnet::log($ENV{'user.domain'},$ENV{'user.name'},        &Apache::lonnet::log($ENV{'user.domain'},$ENV{'user.name'},
                          $ENV{'user.home'},                           $ENV{'user.home'},
       'Sending critical '.$msgid.' to '.$user.' at '.$domain.' with status: '        'Sending critical '.$msgid.' to '.$user.' at '.$domain.' with status: '
       .$status).'</font>');        .$status));
     return $status;      return $status;
 }  }
   
Line 118  sub user_crit_msg { Line 121  sub user_crit_msg {
   
 sub user_crit_received {  sub user_crit_received {
     my $message=shift;      my $message=shift;
       my %contents=&unpackagemsg($message);
       &Apache::lonnet::log('Received critical message '.$contents{'msgid'});
       &user_normal_msg($contents{'sendername'},$contents{'senderdomain'},
                        'Receipt: '.$ENV{'user.name'}.' at '.$ENV{'user.domain'},
                        'User '.$ENV{'user.name'}.' at '.$ENV{'user.domain'}.
                        ' acknowledged receipt of message "'.
                        $contents{'subject'}.'" dated '.$contents{'time'}.".\n\n"
                        .'Message ID: '.$contents{'msgid'});
       &Apache::lonnet::put('nohist_email',$contents{'msgid'} => $message);
       &Apache::lonnet::del('critical',$contents{'msgid'});
 }  }
   
 # ======================================================== Normal communication  # ======================================================== Normal communication
Line 133  sub user_normal_msg { Line 145  sub user_normal_msg {
     if ($homeserver ne 'no_host') {      if ($homeserver ne 'no_host') {
        my $msgid;         my $msgid;
        ($msgid,$message)=&packagemsg($subject,$message);         ($msgid,$message)=&packagemsg($subject,$message);
        $status=&Apache::lonnet::cput('nohist_email',$msgid => $message);         $status=&Apache::lonnet::critical(
              'put:'.$domain.':'.$user.':nohist_email:'.
              &Apache::lonnet::escape($msgid).'='.
              &Apache::lonnet::escape($message),$homeserver);
     } else {      } else {
        $status='no_host';         $status='no_host';
     }      }

Removed from v.1.3  
changed lines
  Added in v.1.4


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