--- loncom/interface/lonmsgdisplay.pm 2006/04/23 07:13:21 1.11 +++ loncom/interface/lonmsgdisplay.pm 2006/04/25 19:45:50 1.12 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.11 2006/04/23 07:13:21 albertel Exp $ +# $Id: lonmsgdisplay.pm,v 1.12 2006/04/25 19:45:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1765,29 +1765,32 @@ sub sendoffmail { my ($recuname,$recdomain)=split(/\:/,$_); my $msgtxt = $savemsg; if ($toaddr{$_}) { $msgtxt.='
'.$toaddr{$_}; } - my $thismsg; + my @thismsg; if ((($env{'form.critmsg'}) || ($env{'form.sendbck'})) && (&Apache::lonnet::allowed('srm',$env{'request.course.id'}) || &Apache::lonnet::allowed('srm',$env{'request.course.id'}. '/'.$env{'request.course.sec'}))) { $r->print(&mt('Sending critical message').' '.$recuname.'@'.$recdomain.': '); - $thismsg=&Apache::lonmsg::user_crit_msg($recuname,$recdomain,$msgsubj,$msgtxt, + @thismsg=&Apache::lonmsg::user_crit_msg($recuname,$recdomain,$msgsubj,$msgtxt, $env{'form.sendbck'},$env{'form.permanent'}, \$sentmessage{$_}); } else { $r->print(&mt('Sending').' '.$recuname.'@'.$recdomain.': '); - $thismsg=&Apache::lonmsg::user_normal_msg($recuname,$recdomain,$msgsubj,$msgtxt, + @thismsg=&Apache::lonmsg::user_normal_msg($recuname,$recdomain,$msgsubj,$msgtxt, $content{'citation'},undef,undef,$env{'form.permanent'},\$sentmessage{$_}); } if (($env{'request.course.id'}) && (($msgtype eq 'critical') || ($env{'form.sendmode'} eq 'group'))) { - $specialmsg_status{$recuname.':'.$recdomain} = $thismsg; - if ($thismsg eq 'ok') { - $numspecial ++; - } + $specialmsg_status{$recuname.':'.$recdomain} = + join(' ',@thismsg); + foreach my $result (@thismsg) { + if ($result eq 'ok') { + $numspecial++; + } + } } - $r->print($thismsg.'
'); - $sendstatus.=' '.$thismsg; + $r->print(join(' ',@thismsg).'
'); + $sendstatus.=' '.join(' ',@thismsg); } if (($env{'request.course.id'}) && (($env{'form.sendmode'} eq 'group') || ($msgtype eq 'critical'))) {