--- loncom/interface/lonmsg.pm 2001/08/09 14:57:33 1.17 +++ loncom/interface/lonmsg.pm 2001/08/09 15:29:37 1.18 @@ -508,21 +508,34 @@ sub handler { $ENV{'form.message'}.="\n\n-- Forwarded message --\n\n". $content{'message'}; } + my %toaddr=(); + undef %toaddr; + if ($ENV{'form.sendmode'} eq 'group') { + map { + if ($_=~/^form\.send\_to\_(.+)$/) { + $toaddr{$1}=1; + } + } keys %ENV; + } else { + $toaddr{$ENV{'form.recuname'}.':'.$ENV{'form.recdomain'}}=1; + } + map { + my ($recuname,$recdomain)=split(/\:/,$_); if (($ENV{'form.critmsg'}) && (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) { $r->print('Sending critical: '. - &user_crit_msg($ENV{'form.recuname'}, - $ENV{'form.recdomain'}, + &user_crit_msg($recuname,$recdomain, $ENV{'form.subject'}, $ENV{'form.message'}, $content{'citation'})); } else { - $r->print('Sending: '.&user_normal_msg($ENV{'form.recuname'}, - $ENV{'form.recdomain'}, + $r->print('Sending: '.&user_normal_msg($recuname,$recdomain, $ENV{'form.subject'}, $ENV{'form.message'}, $content{'citation'})); } + $r->print('
'); + } keys %toaddr; if ($ENV{'form.displayedcrit'}) { &discrit($r); } else {