[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 27 Nov 2003 09:20:39 -0000
albertel Thu Nov 27 04:20:39 2003 EDT
Modified files:
/loncom/interface lonfeedback.pm
Log:
- Fixup html
- send headers for threadon/off switch
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.71 loncom/interface/lonfeedback.pm:1.72
--- loncom/interface/lonfeedback.pm:1.71 Mon Nov 24 11:46:15 2003
+++ loncom/interface/lonfeedback.pm Thu Nov 27 04:20:39 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.71 2003/11/24 16:46:15 www Exp $
+# $Id: lonfeedback.pm,v 1.72 2003/11/27 09:20:39 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -329,11 +329,11 @@
my ($r,$feedurl) = @_;
if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' };
$r->print (<<ENDFAILREDIR);
+<html>
<head><title>Feedback not sent</title>
<meta http-equiv="pragma" content="no-cache" />
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" />
</head>
-<html>
<body bgcolor="#FFFFFF">
<img align="right" src="/adm/lonIcons/lonlogos.gif" />
<b>Sorry, no recipients ...</b>
@@ -346,12 +346,12 @@
my ($r,$feedurl,$typestyle,$sendsomething,$sendposts,$status) = @_;
if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' };
$r->print (<<ENDREDIR);
+<html>
<head>
<title>Feedback sent</title>
<meta http-equiv="pragma" content="no-cache" />
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl">
</head>
-<html>
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.close(); }'>
<img align="right" src="/adm/lonIcons/lonlogos.gif" />
$typestyle
@@ -367,6 +367,7 @@
sub no_redirect_back {
my ($r,$feedurl) = @_;
$r->print (<<ENDNOREDIR);
+<html>
<head><title>Feedback not sent</title>
<meta http-equiv="pragma" content="no-cache" />
ENDNOREDIR
@@ -377,7 +378,6 @@
$r->print (<<ENDNOREDIRTWO);
</head>
-<html>
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.close(); }'>
<img align="right" src="/adm/lonIcons/lonlogos.gif" />
<b>Sorry, no feedback possible on this resource ...</b>
@@ -695,13 +695,15 @@
&redirect_back($r,&Apache::lonnet::clutter($url),
&mt('Changed discussion status').'<br />','0','0');
} elsif (($ENV{'form.threadedon'}) || ($ENV{'form.threadedoff'})) {
+ &Apache::loncommon::content_type($r,'text/html');
+ $r->send_http_header;
if ($ENV{'form.threadedon'}) {
&Apache::lonnet::put('environment',{'threadeddiscussion' => 'on'});
&Apache::lonnet::appenv('environment.threadeddiscussion' => 'on');
} else {
&Apache::lonnet::del('environment',['threadeddiscussion']);
&Apache::lonnet::delenv('environment\.threadeddiscussion');
- }
+ }
my $symb=$ENV{'form.threadedon'}?$ENV{'form.threadedon'}:$ENV{'form.threadedoff'};
my ($map,$ind,$url)=&Apache::lonnet::decode_symb($symb);
&redirect_back($r,&Apache::lonnet::clutter($url),