--- loncom/interface/lonfeedback.pm 2004/11/17 16:42:39 1.139
+++ loncom/interface/lonfeedback.pm 2004/11/19 19:11:33 1.141
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.139 2004/11/17 16:42:39 albertel Exp $
+# $Id: lonfeedback.pm,v 1.141 2004/11/19 19:11:33 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -74,7 +74,7 @@ sub list_discussion {
if($ENV{'form.export'}) {
$outputtarget = 'export';
}
- }
+ }
if (not &discussion_visible($status)) { return ''; }
my @bgcols = ("#cccccc","#eeeeee");
my $discussiononly=0;
@@ -638,38 +638,38 @@ to course faculty
Title:
ENDDISCUSS
- if ($ENV{'form.origpage'}) {
- $discussion.=''."\n";
- foreach (@currnewattach) {
- $discussion.=''."\n";
- }
- }
- $discussion.="\n";
- if ($outputtarget ne 'tex') {
- $discussion.=&generate_attachments_button('',$attachnum,$ressymb,$now,\@currnewattach,\@currdelold,'',$mode);
- if (@currnewattach > 0) {
- $newattachmsg .= 'New attachments
';
- if (@currnewattach > 1) {
- $newattachmsg .= '
';
- foreach my $item (@currnewattach) {
- $item =~ m#.*/([^/]+)$#;
- $newattachmsg .= '- '.$1.'
'."\n";
+ if ($ENV{'form.origpage'}) {
+ $discussion.=''."\n";
+ foreach (@currnewattach) {
+ $discussion.=''."\n";
+ }
+ }
+ $discussion.="\n";
+ if ($outputtarget ne 'tex') {
+ $discussion.=&generate_attachments_button('',$attachnum,$ressymb,$now,\@currnewattach,\@currdelold,'',$mode);
+ if (@currnewattach > 0) {
+ $newattachmsg .= 'New attachments
';
+ if (@currnewattach > 1) {
+ $newattachmsg .= '';
+ foreach my $item (@currnewattach) {
+ $item =~ m#.*/([^/]+)$#;
+ $newattachmsg .= '- '.$1.'
'."\n";
+ }
+ $newattachmsg .= '
'."\n";
+ } else {
+ $currnewattach[0] =~ m#.*/([^/]+)$#;
+ $newattachmsg .= ''.$1.'
'."\n";
}
- $newattachmsg .= '
'."\n";
- } else {
- $currnewattach[0] =~ m#.*/([^/]+)$#;
- $newattachmsg .= ''.$1.'
'."\n";
}
- }
- $discussion.=$newattachmsg;
- $discussion.=&generate_preview_button();
- }
+ $discussion.=$newattachmsg;
+ $discussion.=&generate_preview_button();
+ }
}
- } else {
- if (&discussion_open($status) &&
- &Apache::lonnet::allowed('pch',
- $ENV{'request.course.id'}.
- ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
+ } else {
+ if (&discussion_open($status) &&
+ &Apache::lonnet::allowed('pch',
+ $ENV{'request.course.id'}.
+ ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
if ($outputtarget ne 'tex') {
$discussion.=''.
@@ -965,7 +965,6 @@ sub build_posting_display {
} else {
$rolematch .= ':'.$sectionpick;
$skiptest = 0;
- }
}
if ($statusfilter) {
if ($statusfilter eq 'all') {
@@ -2089,7 +2088,7 @@ ENDNOREDIRTWO
}
sub screen_header {
- my ($feedurl) = @_;
+ my ($feedurl,$symb) = @_;
my $msgoptions='';
my $discussoptions='';
unless (($ENV{'form.replydisc'}) || ($ENV{'form.editdisc'})) {
@@ -2115,7 +2114,7 @@ sub screen_header {
}
}
if ($ENV{'request.course.id'}) {
- if (&discussion_open() &&
+ if (&discussion_open(undef,$symb) &&
&Apache::lonnet::allowed('pch',
$ENV{'request.course.id'}.
($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
@@ -2125,7 +2124,7 @@ sub screen_header {
$discussoptions.=' '.
&mt('Anonymous contribution to course discussion of resource').
' ('.&mt('name only visible to course faculty').')';
- }
+ }
}
if ($msgoptions) { $msgoptions=' '.&mt('Sending Messages').''.$msgoptions; }
if ($discussoptions) {
@@ -3102,7 +3101,7 @@ ENDREDIR
unless ($ENV{'form.sendit'}) {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
- my $options=&screen_header($feedurl);
+ my $options=&screen_header($feedurl,$symb);
if ($options) {
&mail_screen($r,$feedurl,$options);
} else {
|