--- loncom/interface/lonmsgdisplay.pm 2006/04/22 17:17:49 1.5
+++ loncom/interface/lonmsgdisplay.pm 2006/04/23 03:50:54 1.7
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.5 2006/04/22 17:17:49 albertel Exp $
+# $Id: lonmsgdisplay.pm,v 1.7 2006/04/23 03:50:54 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -624,6 +624,8 @@ ENDDISHEADER
$r->print(''.&mt('Status').'');
}
$r->print("\n");
+
+ my $suffix = &Apache::lonmsg::foldersuffix($folder);
for (my $n=$firstdis;$n<=$lastdis;$n++) {
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID,$description)= @{$temp[$n]};
if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) {
@@ -636,12 +638,21 @@ ENDDISHEADER
} else {
$r->print('
');
}
+ my ($dis_name,$dis_domain) = ($fromname,$fromdomain);
+ if ($folder eq 'sent') {
+ my $msg_id = &Apache::lonnet::unescape($origID);
+ my %message=&Apache::lonnet::get('nohist_email'.$suffix,
+ [$msg_id]);
+ my %content=&Apache::lonmsg::unpackagemsg($message{$msg_id});
+ $dis_name = join('
',@{$content{'recuser'}});
+ $dis_domain = join('
',@{$content{'recdomain'}});
+ }
$r->print(' | '.&mt('Open').' | '.
($folder ne 'trash'?''.&mt('Delete'):' ').' | '.
''.&Apache::lonlocal::locallocaltime($sendtime).' | '.
- $fromname.' | '.$fromdomain.' | '.
+ $dis_name.' | '.$dis_domain.' | '.
&Apache::lonnet::unescape($shortsubj).' | '.
$description.' | '.$status.' |
'."\n");
} elsif ($status eq 'deleted') {
@@ -1665,7 +1676,8 @@ sub sendoffmail {
my $savemsg;
my $msgtype;
my %sentmessage;
- my $msgsubj=&Apache::lonfeedback::clear_out_html($env{'form.subject'});
+ my $msgsubj=&Apache::lonfeedback::clear_out_html($env{'form.subject'},
+ undef,1);
if ((($env{'form.critmsg'}) || ($env{'form.sendbck'})) &&
(&Apache::lonnet::allowed('srm',$env{'request.course.id'})
|| &Apache::lonnet::allowed('srm',$env{'request.course.id'}.