version 1.195, 2006/12/28 19:43:24
|
version 1.196, 2007/02/09 15:30:48
|
Line 553 sub user_normal_msg_raw {
|
Line 553 sub user_normal_msg_raw {
|
unless (($env{'request.course.id'}) && |
unless (($env{'request.course.id'}) && |
(($env{'form.sendmode'} eq 'group') || |
(($env{'form.sendmode'} eq 'group') || |
(($env{'form.critmsg'}) || ($env{'form.sendbck'})) && |
(($env{'form.critmsg'}) || ($env{'form.sendbck'})) && |
(&Apache::lonnet::allowed('srm',$env{'request.course.id'}) |
(&Apache::lonnet::allowed('srm',$env{'request.course.id'}) |
|| &Apache::lonnet::allowed('srm',$env{'request.course.id'}. |
|| &Apache::lonnet::allowed('srm',$env{'request.course.id'}. |
'/'.$env{'request.course.sec'})))) { |
'/'.$env{'request.course.sec'})))) { |
(undef,my $packed_message_no_citation) = |
(undef,my $packed_message_no_citation) = |
&packagemsg($subject,$message,undef,$baseurl,$attachmenturl, |
&packagemsg($subject,$message,undef,$baseurl,$attachmenturl, |
$user,$domain,$currid,undef,$crsmsgid,$symb,$error); |
$user,$domain,$currid,undef,$crsmsgid,$symb,$error); |
Line 563 sub user_normal_msg_raw {
|
Line 563 sub user_normal_msg_raw {
|
&store_sent_mail($msgid,$packed_message_no_citation); |
&store_sent_mail($msgid,$packed_message_no_citation); |
} |
} |
} |
} |
} else { |
if (defined($newid)) { |
$status='no_host'; |
$$newid = $msgid; |
} |
} |
if (defined($newid)) { |
if (defined($sentmessage)) { |
$$newid = $msgid; |
$$sentmessage = $packed_message; |
} |
} |
if (defined($sentmessage)) { |
|
$$sentmessage = $packed_message; |
|
} |
|
|
|
# Notifications |
# Notifications |
my %userenv = &Apache::lonnet::get('environment',['notification', |
my %userenv = &Apache::lonnet::get('environment',['notification', |
'permanentemail'], |
'permanentemail'], |
$domain,$user); |
$domain,$user); |
if ($userenv{'notification'}) { |
if ($userenv{'notification'}) { |
&sendnotification($userenv{'notification'},$user,$domain,$subject,0, |
&sendnotification($userenv{'notification'},$user,$domain,$subject,0, |
$text,$msgid); |
$text,$msgid); |
} |
} |
if ($toperm && $userenv{'permanentemail'}) { |
if ($toperm && $userenv{'permanentemail'}) { |
&sendnotification($userenv{'permanentemail'},$user,$domain,$subject,0, |
&sendnotification($userenv{'permanentemail'},$user,$domain,$subject,0, |
$text,$msgid); |
$text,$msgid); |
} |
} |
&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 '.$msgid.' to '.$user.' at '.$domain.' with status: '.$status); |
'Sending '.$msgid.' to '.$user.' at '.$domain.' with status: '.$status); |
|
} else { |
|
$status='no_host'; |
|
} |
return $status; |
return $status; |
} |
} |
|
|