[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm
www
lon-capa-cvs@mail.lon-capa.org
Thu, 02 Mar 2006 18:54:49 -0000
www Thu Mar 2 13:54:49 2006 EDT
Modified files:
/loncom/interface lonfeedback.pm
Log:
Don't throw away the subject of a FDBK message, but make sure that people
do not fake bombs.
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.180 loncom/interface/lonfeedback.pm:1.181
--- loncom/interface/lonfeedback.pm:1.180 Thu Feb 9 17:11:54 2006
+++ loncom/interface/lonfeedback.pm Thu Mar 2 13:54:49 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.180 2006/02/09 22:11:54 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.181 2006/03/02 18:54:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2478,14 +2478,16 @@
}
sub send_msg {
- my ($feedurl,$email,$citations,$attachmenturl,%to)=@_;
+ my ($title,$feedurl,$email,$citations,$attachmenturl,%to)=@_;
my $status='';
my $sendsomething=0;
+ if ($title=~/^Error/) { $title=&mt('Feedback').': '.$title; }
+ unless ($title=~/\w/) { $title=&mt('Feedback'); }
foreach (keys %to) {
if ($_) {
my $declutter=&Apache::lonnet::declutter($feedurl);
unless (&Apache::lonmsg::user_normal_msg(split(/\:/,$_),
- 'Feedback ['.$declutter.']',$email,$citations,$feedurl,
+ $title.' ['.$declutter.']',$email,$citations,$feedurl,
$attachmenturl)=~/ok/) {
$status.='<br />'.&mt('Error sending message to').' '.$_.'<br />';
} else {
@@ -3424,7 +3426,7 @@
my ($typestyle,%to) = &decide_receiver($feedurl);
# Actually send mail
- my ($status,$numsent)=&send_msg($feedurl,$email,$citations,
+ my ($status,$numsent)=&send_msg(&clear_out_html($env{'form.subject'}),$feedurl,$email,$citations,
$attachmenturl,%to);
# Discussion? Store that.