--- loncom/interface/lonfeedback.pm 2010/11/20 01:33:04 1.273.4.12
+++ loncom/interface/lonfeedback.pm 2010/01/24 15:30:04 1.285
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.273.4.12 2010/11/20 01:33:04 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.285 2010/01/24 15:30:04 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -41,6 +41,7 @@ use Apache::lonnavmaps;
use Apache::lonenc();
use Apache::lonrss();
use HTML::LCParser();
+#use HTML::Tidy::libXML;
use Apache::lonspeller();
use Apache::longroup;
use Cwd;
@@ -48,22 +49,13 @@ use LONCAPA;
sub discussion_open {
my ($status,$symb)=@_;
-# Advanced roles can always discuss
if ($env{'request.role.adv'}) { return 1; }
-# Get discussion closing date
- my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);
-# If it is defined and in the future, the instructor wants this discussion to be open
- if (defined($close) && $close ne '' && $close > time) {
- return 1;
- }
-# It was not explicitly open, check if the problem is available.
-# 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;
}
-# The problem is available, but check if the instructor explictly closed discussion
+ my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);
if (defined($close) && $close ne '' && $close < time) {
return 0;
}
@@ -100,7 +92,7 @@ sub list_discussion {
if (not &discussion_visible($status)) {
if ($mode ne 'board') {
&Apache::lonenc::check_encrypt(\$ressymb);
- return ' '.&send_message_link($ressymb);
+ return '
'.&send_message_link($ressymb)."
";
}
}
if ($group ne '' && $mode eq 'board') {
@@ -112,9 +104,12 @@ sub list_discussion {
my ($blocked,$blocktext) =
&Apache::loncommon::blocking_status('boards');
if ($blocked) {
+ $blocktext = '
'.$blocktext."";
&Apache::lonenc::check_encrypt(\$ressymb);
if ($mode ne 'board') {
- $blocktext.=' '.&send_message_link($ressymb);
+ $blocktext.=&send_message_link($ressymb).'
';
+ }else{
+ $blocktext.="";
}
return $blocktext;
}
@@ -180,7 +175,6 @@ sub list_discussion {
my $cnum = $env{'course.'.$cid.'.num'};
my $crstype = &Apache::loncommon::course_type();
-
# Get information about students and non-students in course for filtering display of posts
my %roleshash = ();
my %roleinfo = ();
@@ -410,7 +404,6 @@ sub list_discussion {
if ($manifestfile = Apache::File->new('>'.$manifestfilename)) {
$manifestok=1;
print $manifestfile qq|
-
- |;
+ |);
$discussion.='