[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Sat, 11 Dec 2004 14:09:47 -0000
raeburn Sat Dec 11 09:09:47 2004 EDT
Modified files:
/loncom/interface lonmsg.pm
Log:
Fix bug #3507. Might want make this more general - e.g., just check for &Apache::lonnet::allowed('srm',$ENV{'request.course.id'}), so that all messages (not just crit messages) sent within course context avoid translation of HTML tags to > etc., if user has srm privilege.
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.121 loncom/interface/lonmsg.pm:1.122
--- loncom/interface/lonmsg.pm:1.121 Wed Nov 17 16:31:37 2004
+++ loncom/interface/lonmsg.pm Sat Dec 11 09:09:46 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.121 2004/11/17 21:31:37 www Exp $
+# $Id: lonmsg.pm,v 1.122 2004/12/11 14:09:46 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1912,7 +1912,13 @@
foreach (keys %toaddr) {
my ($recuname,$recdomain)=split(/\:/,$_);
- my $msgtxt=&Apache::lonfeedback::clear_out_html($ENV{'form.message'});
+ my $msgtxt;
+ if ((($ENV{'form.critmsg'}) || ($ENV{'form.sendbck'})) &&
+ (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) {
+ $msgtxt=&Apache::lonfeedback::clear_out_html($ENV{'form.message'},1);
+ } else {
+ $msgtxt=&Apache::lonfeedback::clear_out_html($ENV{'form.message'});
+ }
if ($toaddr{$_}) { $msgtxt.='<hr />'.$toaddr{$_}; }
my $thismsg;
if ((($ENV{'form.critmsg'}) || ($ENV{'form.sendbck'})) &&