--- loncom/interface/lonfeedback.pm 2010/08/27 16:37:23 1.290.2.5
+++ loncom/interface/lonfeedback.pm 2010/08/26 03:59:16 1.301
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.290.2.5 2010/08/27 16:37:23 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.301 2010/08/26 03:59:16 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -58,15 +58,15 @@ sub discussion_open {
return 1;
}
# It was not explicitly open, check if the problem is available.
-# If the problem is not available, close the discussion
+# If the problem is not available, close the discussion
if (defined($status) &&
- !($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
- || $status eq 'OPEN')) {
- return 0;
+ !($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
+ || $status eq 'OPEN')) {
+ return 0;
}
# The problem is available, but check if the instructor explictly closed discussion
if (defined($close) && $close ne '' && $close < time) {
- return 0;
+ return 0;
}
return 1;
}
@@ -282,10 +282,6 @@ sub list_discussion {
my %anonhash=();
my $anoncnt=0;
my $target='';
- unless ($env{'browser.interface'} eq 'textual' ||
- $env{'environment.remote'} eq 'off' ) {
- $target='target="LONcom"';
- }
my $now = time;
$discinfo{$visitkey} = $visit;
@@ -425,7 +421,6 @@ imscp_v1p1.xsd http://www.imsglobal.org/
}
} else {
my $colspan=$maxdepth+1;
-#JW
$discussion.= &Apache::lonhtmlcommon::scripttag(qq|
function verifydelete (caller,symb,idx,newflag,previous,groupparm) {
var symbparm = symb+':::'+idx
@@ -727,7 +722,7 @@ END
$attachnum += @{$currnewattach};
}
}
- if (&discussion_open($status) && ($outputtarget ne 'tex')) {
+ if ((&discussion_open($status)) && ($outputtarget ne 'tex')) {
if (($group ne '') && ($mode eq 'board')) {
if (&check_group_priv($group,'pgd') eq 'ok') {
$discussion .=
@@ -749,7 +744,7 @@ END
&Apache::lonnet::allowed('pch',
$env{'request.course.id'}.
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
- $discussion.= &send_feedback_link($ressymb,$target);
+ $discussion.= &send_feedback_link($ressymb,$target);
if ($env{'request.role.adv'}) {
my $close = &Apache::lonnet::EXT('resource.0.discussend',$ressymb);
if (defined($close) && $close ne '' && $close < time) {
@@ -757,11 +752,10 @@ END
&Apache::lonnet::plaintext('st',$crstype));
}
}
- } else {
+ } else {
$discussion.= ''.&mt('This discussion is closed.').'';
}
- $discussion.= &send_message_link($ressymb).
- '';
+ $discussion.= &send_message_link($ressymb).'';
}
return $discussion;
}
@@ -893,22 +887,22 @@ ENDDISCUSS
}
$postingform .= "\n";
$postingform .= &generate_attachments_button('',$attachnum,$ressymb,
- $now,$currnewattach,
- $currdelold,'',$mode,
- $blockblog);
+ $now,$currnewattach,
+ $currdelold,'',$mode,
+ $blockblog);
if ((ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)) {
$newattachmsg = '
'.$lt{'newa'}.'
';
if (@{$currnewattach} > 1) {
- $newattachmsg .= '
$lt{'title'}:
-
END if ( ($env{'form.editdisc'}) || ($env{'form.replydisc'}) ) { @@ -2565,10 +2559,6 @@ sub redirect_back { &Apache::lonenc::check_encrypt(\$feedurl); my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); 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('Feedback sent',undef, {'redirect' => [0,$feedurl], @@ -2602,10 +2592,6 @@ sub no_redirect_back { 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', @@ -2735,8 +2721,8 @@ sub clear_out_html { #
#
%html=(B=>1, I=>1, P=>1, A=>1, LI=>1, OL=>1, UL=>1, EM=>1, - BR=>1, TT=>1, STRONG=>1, BLOCKQUOTE=>1, PRE=>1, DIV=>1, IMG=>1, - M=>1, CHEM=>1, ALGEBRA=>1, SUB=>1, SUP=>1, SPAN=>1, + BR=>1, TT=>1, STRONG=>1, BLOCKQUOTE=>1, PRE=>1, DIV=>1, IMG=>1, + M=>1, CHEM=>1, ALGEBRA=>1, SUB=>1, SUP=>1, SPAN=>1, H1=>1, H2=>1, H3=>1, H4=>1, H5=>1, H6=>1, TABLE=>1, TR=>1, TD=>1, TH=>1, TBODY=>1); } @@ -3612,10 +3598,6 @@ sub handler { $r->send_http_header; my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); 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, @@ -3942,7 +3924,7 @@ ENDREDIR if ($env{'form.discuss'} =~ /^(?:author|question|course|policy)$/) { $override = 1; } - my $message=&clear_out_html($env{'form.comment'},1); + my $message=&clear_out_html($env{'form.comment'},$override); # Assemble email my ($email,$citations)=&assemble_email($message,$prevattempts,