--- loncom/interface/lonmsgdisplay.pm 2006/06/27 21:32:24 1.34
+++ loncom/interface/lonmsgdisplay.pm 2006/07/17 16:26:09 1.37
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.34 2006/06/27 21:32:24 albertel Exp $
+# $Id: lonmsgdisplay.pm,v 1.37 2006/07/17 16:26:09 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -883,6 +883,9 @@ ENDUPLOAD
my $studentsel = &discourse();
$r->print($studentsel);
}
+ if ($env{'form.displayedcrit'}) {
+ $r->print('');
+ }
$r->print(''.
&Apache::lonfeedback::generate_preview_button('compemail','message').
&Apache::lonhtmlcommon::htmlareaselectactive('message'));
@@ -1641,12 +1644,13 @@ sub sendoffmail {
&statuschange($msgid,'replied',$folder);
}
- my $to = $env{'form.selectedusers.forminput'};
+ my @to =
+ &Apache::loncommon::get_env_multiple('form.selectedusers_forminput');
my $mode = $env{'form.sendmode'};
my %toaddr;
- if ($to) {
- foreach my $dest (@$to) {
+ if (@to) {
+ foreach my $dest (@to) {
my ($user,$domain) = split(/:/, $dest);
if (($user ne '') && ($domain ne '')) {
my $address = $user.":".$domain; # How the code below expects it.
@@ -1895,6 +1899,7 @@ sub handler {
&compout($r,'',$env{'form.replyto'},undef,undef,$folder,$dismode);
} elsif ($env{'form.confirm'}) {
&printheader($r,'','Confirmed Receipt');
+ my $replying = 0;
foreach (keys %env) {
if ($_=~/^form\.rec\_(.*)$/) {
$r->print(''.&mt('Confirming Receipt').': '.
@@ -1905,9 +1910,12 @@ sub handler {
$r->print(''.&mt('Confirming Receipt').': '.
&Apache::lonmsg::user_crit_received($msgid).'
');
&compout($r,'','','',$msgid);
+ $replying = 1;
}
}
- &discrit($r);
+ if (!$replying) {
+ &discrit($r);
+ }
} elsif ($env{'form.critical'}) {
&printheader($r,'','Displaying Critical Messages');
&discrit($r);
@@ -2001,7 +2009,9 @@ sub handler {
$env{'form.subject'},
$env{'form.message'},'/adm/communicate','public');
}
- &disall($r,($folder?$folder:$dismode));
+ if (!$env{'form.displayedcrit'}) {
+ &disall($r,($folder?$folder:$dismode));
+ }
} elsif ($env{'form.newfolder'}) {
&printheader($r,'','New Folder');
&makefolder($env{'form.newfolder'});