[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 16 Sep 2002 19:54:01 -0000
albertel Mon Sep 16 15:54:01 2002 EDT
Modified files:
/loncom/interface lonfeedback.pm
Log:
- now when posting something it doesn't scare the student with a
"Sent 0 message(s)"
It says
"Sent 0 message(s), and 1 post(s)
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.31 loncom/interface/lonfeedback.pm:1.32
--- loncom/interface/lonfeedback.pm:1.31 Wed Sep 11 09:36:50 2002
+++ loncom/interface/lonfeedback.pm Mon Sep 16 15:54:01 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.31 2002/09/11 13:36:50 www Exp $
+# $Id: lonfeedback.pm,v 1.32 2002/09/16 19:54:01 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -136,7 +136,7 @@
}
sub redirect_back {
- my ($r,$feedurl,$typestyle,$sendsomething,$status) = @_;
+ my ($r,$feedurl,$typestyle,$sendsomething,$sendposts,$status) = @_;
$r->print (<<ENDREDIR);
<head>
<title>Feedback sent</title>
@@ -147,7 +147,7 @@
<body bgcolor="#FFFFFF">
<img align=right src=/adm/lonIcons/lonlogos.gif>
$typestyle
-<b>Sent $sendsomething message(s).</b>
+<b>Sent $sendsomething message(s), and $sendposts post(s).</b>
<font color=red>$status</font>
</body>
</html>
@@ -400,7 +400,7 @@
$ENV{'course.'.$ENV{'request.course.id'}.'.num'});
&redirect_back($r,&Apache::lonnet::clutter($url),
- 'Changed discussion status<p>','0');
+ 'Changed discussion status<p>','0','0');
} else {
# ------------------------------------------------------------- Normal feedback
my $feedurl=$ENV{'form.postdata'};
@@ -468,17 +468,20 @@
# Discussion? Store that.
+ my $numpost=0;
if ($ENV{'form.discuss'}) {
$typestyle.=&adddiscuss($symb,$message);
+ $numpost++;
}
if ($ENV{'form.anondiscuss'}) {
$typestyle.=&adddiscuss($symb,$message,1);
+ $numpost++;
}
# Receipt screen and redirect back to where came from
- &redirect_back($r,$feedurl,$typestyle,$numsent,$status);
+ &redirect_back($r,$feedurl,$typestyle,$numsent,$numpost,$status);
}
} else {