--- loncom/interface/lonfeedback.pm 2006/05/09 15:09:27 1.197
+++ loncom/interface/lonfeedback.pm 2006/05/09 20:44:15 1.200
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.197 2006/05/09 15:09:27 albertel Exp $
+# $Id: lonfeedback.pm,v 1.200 2006/05/09 20:44:15 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -726,7 +726,7 @@ ENDDISCUSS
if ($outputtarget ne 'tex') {
$discussion.=&generate_attachments_button('',$attachnum,$ressymb,$now,\@currnewattach,\@currdelold,'',$mode);
if (@currnewattach > 0) {
- $newattachmsg .= 'New attachments
';
+ $newattachmsg .= '
New attachments
';
if (@currnewattach > 1) {
$newattachmsg .= '
';
foreach my $item (@currnewattach) {
@@ -1328,12 +1328,15 @@ sub mail_screen {
my $attachnum = 0;
my $anonchk = (<print(&generate_attachments_button($postidx,$attachnum,$ressymb,$now,\@currnewattach,\@currdelold,$numoldver));
if ($attachnum > 0) {
if (@currnewattach > 0) {
- $newattachmsg .= 'New attachments
';
+ $newattachmsg .= '
New attachments
';
if (@currnewattach > 1) {
$newattachmsg .= '';
foreach my $item (@currnewattach) {
@@ -2204,7 +2204,11 @@ sub redirect_back {
}
$feedurl=&Apache::lonenc::check_encrypt($feedurl);
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
- my %onload = ('onload' => "if (window.name!='loncapaclient') { this.document.reldt.submit(); self.window.close(); }");
+ my %onload;
+ if ($env{'environment.remote'} ne 'off') {
+ $onload{'onload'} =
+ "if (window.name!='loncapaclient') { this.document.reldt.submit(); self.window.close(); }";
+ }
my $start_page=
&Apache::loncommon::start_page('New posts marked as read',undef,
{'redirect' => [2,$feedurl],
@@ -2235,9 +2239,15 @@ sub no_redirect_back {
my ($r,$feedurl) = @_;
my $nofeed=&mt('Sorry, no feedback possible on this resource ...');
+ my %onload;
+ if ($env{'environment.remote'} ne 'off') {
+ $onload{'onload'} =
+ "if (window.name!='loncapaclient') { self.window.close(); }";
+ }
+
my %body_options = ('only_body' => 1,
'bgcolor' => '#FFFFFF',
- 'add_entries' => {'onload' => "if (window.name!='loncapaclient') { self.window.close(); }"});
+ 'add_entries' => \%onload,);
if ($feedurl !~ m{^/adm/feedback}) {
$body_options{'rediect'} = [2,$feedurl];
@@ -2292,10 +2302,9 @@ sub screen_header {
&Apache::lonnet::allowed('pch',
$env{'request.course.id'}.
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
- $discussoptions='