--- loncom/interface/lonmsgdisplay.pm 2008/02/22 13:32:49 1.84
+++ loncom/interface/lonmsgdisplay.pm 2008/06/06 05:24:28 1.86
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.84 2008/02/22 13:32:49 bisitz Exp $
+# $Id: lonmsgdisplay.pm,v 1.86 2008/06/06 05:24:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -555,7 +555,7 @@ sub disgroup {
'recipients to select.');
return $result;
} else {
- $result = &mt('Select message recipients from the group members listed below.
');
+ $result = &mt('Select message recipients from the group members listed below.').'
';
my %Sortby = (
active => {},
previous => {},
@@ -1194,8 +1194,9 @@ sub compout {
&printheader($r,'/adm/email?compose=multiforward',
'Forwarding Multiple Messages');
if ($multiforward > 1) {
- $r->print(&mt('Each of the [quant,_1,message] you checked
-will be forwarded to the recipient(s) you select below.',$multiforward).'
');
+ $r->print(&mt('Each of the [quant,_1,message] you checked'
+ .' will be forwarded to the recipient(s) you select below.',$multiforward)
+ .'
');
} else {
$r->print(&mt('The message you checked will be forwarded to the recipient(s) you select below.').'
');
}
@@ -1209,6 +1210,7 @@ will be forwarded to the recipient(s) yo
my $dissub='';
my $dismsg='';
my $disbase='';
+ my $attachrow;
my $func=&mt('Send New');
my %lt=&Apache::lonlocal::texthash('us' => 'Username',
'do' => 'Domain',
@@ -1223,7 +1225,15 @@ will be forwarded to the recipient(s) yo
'gmt' => 'General message text',
'tff' => 'The file format for the uploaded portion of the message is',
'uas' => 'Upload and Send',
+ 'atta' => 'Attachment',
);
+ my %attachmax = (
+ text => '(128 KB max size)',
+ num => 131072,
+ );
+ if (!$forwarding && !$multiforward) {
+ $attachrow = '
'.$lt{'atta'}.' '.$attachmax{'text'}.': ';
+ }
if (&Apache::lonnet::allowed('srm',$env{'request.course.id'})
|| &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
'/'.$env{'request.course.sec'})) {
@@ -1417,7 +1427,10 @@ $latexHelp.
$latexHelp
'.&mt('Attachment not included - exceeded permitted length').'
'.&mt('Could not deliver message').' '. - &mt('Please use the browser "Back" button and correct the recipient addresses '."($sendstatus)").'
'); + &mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).''); } } } @@ -2862,7 +2892,7 @@ sub handler { foreach my $item (@to_forward) { my $msgid=&unescape($item); my %message=&Apache::lonnet::get('nohist_email'.$suffix,[$msgid]); - my %content=&Apache::lonmsg::unpackagemsg($message{$msgid},1); + my %content=&Apache::lonmsg::unpackagemsg($message{$msgid},1,1); if ($env{'form.showorigsubj'}) { $env{'form.subject'} = $fixed_subj.$content{'subject'}; } else { @@ -2876,8 +2906,10 @@ sub handler { &Apache::loncommon::plainname($uname,$udom).' ('. $uname.':'.$udom.')'; } - $env{'form.message'} .= "\n\n-- Forwarded message --\n\n". - $content{'message'}; + $env{'form.message'}.="\n\n-- Forwarded message --\n\n". + $content{'message'}; + $env{'form.attachmenturl'} = $content{'attachmenturl'}; + $env{'form.multiforwid'} = $item; $fwdcount ++; $r->print($fwdcount.': '); $sendresult{$msgid} = &sendoffmail($r,$folder);