--- loncom/interface/lonmsg.pm 2001/08/03 18:47:18 1.15
+++ loncom/interface/lonmsg.pm 2001/08/06 11:41:11 1.16
@@ -13,7 +13,7 @@
# 10/19,10/20,10/30,
# 02/06/01 Gerd Kortemeyer
# 07/27 Guy Albertelli
-# 07/27,07/28,07/30,08/03 Gerd Kortemeyer
+# 07/27,07/28,07/30,08/03,08/06 Gerd Kortemeyer
package Apache::lonmsg;
@@ -223,7 +223,8 @@ sub discrit {
''.
'');
} sort keys %what;
- $r->print('');
+ $r->print(
+ '');
}
# =============================================================== Compose reply
@@ -437,6 +438,36 @@ sub handler {
} elsif ($ENV{'form.compose'}) {
&compout($r);
} elsif ($ENV{'form.sendmail'}) {
+ my %content=();
+ undef %content;
+ if ($ENV{'form.forwid'}) {
+ my $msgid=$ENV{'form.forwid'};
+ my %message=&Apache::lonnet::get('nohist_email',[$msgid]);
+ %content=&unpackagemsg($message{$msgid});
+ &statuschange($msgid,'forwarded');
+ $ENV{'form.message'}.="\n\n-- Forwarded message --\n\n".
+ $content{'message'};
+ }
+ 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'},
+ $ENV{'form.subject'},
+ $ENV{'form.message'},
+ $content{'citation'}));
+ } else {
+ $r->print('Sending: '.&user_normal_msg($ENV{'form.recuname'},
+ $ENV{'form.recdomain'},
+ $ENV{'form.subject'},
+ $ENV{'form.message'},
+ $content{'citation'}));
+ }
+ if ($ENV{'form.displayedcrit'}) {
+ &discrit($r);
+ } else {
+ &disall($r);
+ }
} else {
&disall($r);
}