[LON-CAPA-cvs] cvs: loncom /interface lonmsgdisplay.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sun, 23 Apr 2006 03:00:34 -0000
albertel Sat Apr 22 23:00:34 2006 EDT
Modified files:
/loncom/interface lonmsgdisplay.pm
Log:
- BUG #4676, in the sent message screen show the username/domains of the recipents not the sender cause after all that's always the same
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.5 loncom/interface/lonmsgdisplay.pm:1.6
--- loncom/interface/lonmsgdisplay.pm:1.5 Sat Apr 22 13:17:49 2006
+++ loncom/interface/lonmsgdisplay.pm Sat Apr 22 23:00:34 2006
@@ -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.6 2006/04/23 03:00:34 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -624,6 +624,8 @@
$r->print('<a href = "?sortedby=revstatus'.$fsqs.'">'.&mt('Status').'</a></th>');
}
$r->print("</tr>\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 @@
} else {
$r->print('<tr class="LC_mail_other">');
}
+ 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('<br />',@{$content{'recuser'}});
+ $dis_domain = join('<br />',@{$content{'recdomain'}});
+ }
$r->print('<td><input type="checkbox" name="delmark_'.$origID.'" /></td><td><a href="/adm/email?display='.$origID.$sqs.
'">'.&mt('Open').'</a></td><td>'.
($folder ne 'trash'?'<a href="/adm/email?markdel='.$origID.$sqs.
'">'.&mt('Delete'):' ').'</a></td>'.
'<td>'.&Apache::lonlocal::locallocaltime($sendtime).'</td><td>'.
- $fromname.'</td><td>'.$fromdomain.'</td><td>'.
+ $dis_name.'</td><td>'.$dis_domain.'</td><td>'.
&Apache::lonnet::unescape($shortsubj).'</td><td>'.
$description.'</td><td>'.$status.'</td></tr>'."\n");
} elsif ($status eq 'deleted') {