--- loncom/interface/lonfeedback.pm 2010/08/14 18:14:29 1.290.2.2
+++ loncom/interface/lonfeedback.pm 2010/09/21 05:40:59 1.290.2.6
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.290.2.2 2010/08/14 18:14:29 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.290.2.6 2010/09/21 05:40:59 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -793,7 +793,7 @@ sub action_links_bar {
'
'.
'';
my $escsymb=&escape($ressymb);
- if ($visible>2) {
+ if ($visible) {
$discussion .= '
@@ -865,7 +870,7 @@ sub postingform_display {
$lt{'note'}
$lt{'title'}:
-
+
ENDDISCUSS
if ($env{'form.origpage'}) {
$postingform .= ''.$message.'';
if ($studenthidden) {
$message .='
Deleted by poster (student).';
@@ -1087,7 +1105,7 @@ sub build_posting_display {
}
}
if ($seeid) {
- if ($hidden) {
+ if ($hiddens{$idx}) {
unless ($studenthidden) {
$sender.='
- '.&mt('NEW').' | ';
+ '.&mt('NEW').' | ';
} else {
$$newitem{$idx} = 0;
$$discussionitems[$idx] .= '
@@ -1692,6 +1710,11 @@ END
if (&Apache::lonhtmlcommon::htmlareabrowser()) {
$textareaheader = &Apache::lonhtmlcommon::htmlareaselectactive();
$textareaclass = 'class="LC_richDefaultOff"';
+ if ($env{'request.course.id'}) {
+ unless (($env{'course.'.$env{'request.course.id'}.'.allow_limited_html_in_feedback'} =~ /^\s*yes\s*$/i) || ($env{'form.sendmessageonly'})) {
+ undef($textareaclass);
+ }
+ }
}
# Breadcrumbs
@@ -2658,7 +2681,13 @@ sub screen_header {
}
if (($env{'request.course.id'}) && (!$env{'form.sendmessageonly'})) {
my ($blocked,$blocktext) = &Apache::loncommon::blocking_status('boards');
- if (!$blocked && &discussion_open(undef,$symb) &&
+ my $realsymb = $symb;
+ if ($symb=~/^bulletin___/) {
+ my $filename=(&Apache::lonnet::decode_symb($symb))[2];
+ $filename=~s|^adm/wrapper/||;
+ $realsymb=&Apache::lonnet::symbread($filename);
+ }
+ if (!$blocked && &discussion_open(undef,$realsymb) &&
&Apache::lonnet::allowed('pch',
$env{'request.course.id'}.
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
@@ -3915,7 +3944,11 @@ ENDREDIR
}
}
# Filter HTML out of message (could be nasty)
- my $message=&clear_out_html($env{'form.comment'});
+ my $override;
+ if ($env{'form.discuss'} =~ /^(?:author|question|course|policy)$/) {
+ $override = 1;
+ }
+ my $message=&clear_out_html($env{'form.comment'},1);
# Assemble email
my ($email,$citations)=&assemble_email($message,$prevattempts,
|