--- loncom/interface/lonmsgdisplay.pm 2010/01/25 21:08:48 1.124.4.7
+++ loncom/interface/lonmsgdisplay.pm 2010/08/20 19:12:22 1.124.4.11
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.124.4.7 2010/01/25 21:08:48 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.124.4.11 2010/08/20 19:12:22 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1838,7 +1838,9 @@ sub disfacetoface {
foreach my $key (sort(keys(%records))) {
my %content=&Apache::lonmsg::unpackagemsg($records{$key});
next if ($content{'senderdomain'} eq '');
- &Apache::lonfeedback::newline_to_br(\$content{'message'});
+ if (!&Apache::lonfeedback::contains_block_html($content{'message'})) {
+ &Apache::lonfeedback::newline_to_br(\$content{'message'});
+ }
if ($content{'subject'}=~/^Record/) {
$result.='
'.&mt('Record').'
';
} elsif ($content{'subject'}=~/^Broadcast/) {
@@ -1964,6 +1966,7 @@ sub facetoface {
.&Apache::lonhtmlcommon::end_pick_box()
.' '
.''
+ .''
);
if (($stage ne 'query') &&
@@ -2329,7 +2332,7 @@ sub displaymessage {
if ( $blocked{$msgid} eq 'ON' ) {
&printheader($r,'/adm/email',&mt('Display a Message'));
$r->print(&mt('You attempted to display a message that is currently blocked because you are enrolled in one or more courses for which there is an ongoing online exam.'));
- &build_block_table($r,$startblock,$endblock,\%setters);
+ $r->print(&Apache::loncommon::build_block_table($startblock,$endblock,\%setters));
return;
}
if ($msgstatus eq '') {
@@ -3147,7 +3150,7 @@ sub sendoffmail {
my ($recuname,$recdomain)=split(/\:/,$address);
my $msgtxt = $savemsg;
if ($toaddr{$address}) {
- $msgtxt.=''.$toaddr{$address};
+ $msgtxt.="\n".''."\n".$toaddr{$address};
}
my @thismsg;
if ($msgtype eq 'critical') {
@@ -3272,6 +3275,9 @@ sub sendoffmail {
$r->print($message);
}
}
+ } else {
+ &printheader($r,'','Messages cancelled.');
+ return 'cancelled';
}
return $sendstatus;
}