--- loncom/interface/lonfeedback.pm 2010/08/20 04:49:11 1.273.4.9
+++ loncom/interface/lonfeedback.pm 2010/08/14 18:14:29 1.290.2.2
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.273.4.9 2010/08/20 04:49:11 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.290.2.2 2010/08/14 18:14:29 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;
@@ -59,13 +60,13 @@ sub discussion_open {
# 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;
+ !($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;
}
@@ -100,7 +101,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 +113,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 +184,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 = ();
@@ -323,6 +326,7 @@ sub list_discussion {
'dpwn' => 'Deleted posts will no longer be visible to you and other students',
'bwco' => 'but will continue to be visible to your instructor',
'depo' => 'Deleted posts will no longer be visible to you or anyone else.',
+ 'discussions' => 'DISCUSSIONS'
);
my $currdisp = $lt{'allposts'};
@@ -374,8 +378,7 @@ sub list_discussion {
# Print the discusssion
if ($outputtarget eq 'tex') {
$discussion.='{\tiny \vskip 0 mm\noindent\makebox[2 cm][b]{\hrulefill}'.
- '\textbf{DISCUSSIONS}\makebox[2 cm][b]{\hrulefill}'.
- '\vskip 0 mm\noindent\textbf{'.$lt{'cuse'}.'}:\vskip 0 mm'.
+ '\textbf{'.$lt{'discussions'}.'}\makebox[2 cm][b]{\hrulefill}\vskip 0 mm'.
'\noindent\textbf{'.$lt{'disa'}.'}: \textit{'.$currdisp.'}\vskip 0 mm'.
'\noindent\textbf{'.$lt{'npce'}.'}: \textit{'.$currmark.'}}';
} elsif ($outputtarget eq 'export') {
@@ -410,7 +413,6 @@ sub list_discussion {
if ($manifestfile = Apache::File->new('>'.$manifestfilename)) {
$manifestok=1;
print $manifestfile qq|
-
- |;
+ |);
$discussion.='