--- loncom/interface/lonfeedback.pm 2010/09/21 04:18:50 1.302
+++ loncom/interface/lonfeedback.pm 2010/11/19 20:32:38 1.303
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.302 2010/09/21 04:18:50 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.303 2010/11/19 20:32:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -732,12 +732,23 @@ END
$group,$crstype);
}
} else {
- $discussion.=
- &postingform_display($mode,$ressymb,$now,$subject,
- $comment,$outputtarget,$attachnum,
- $currnewattach,$currdelold,'',$crstype);
+ if (&Apache::lonnet::allowed('pch',$env{'request.course.id'}.
+ ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
+
+ $discussion.=
+ &postingform_display($mode,$ressymb,$now,$subject,
+ $comment,$outputtarget,$attachnum,
+ $currnewattach,$currdelold,'',$crstype);
+ } else {
+ $discussion.= ''.
+ &mt('This discussion is closed.').'';
+ }
}
}
+ if (!(&discussion_open($status)) && ($outputtarget ne 'tex')) {
+ $discussion.= ''.
+ &mt('This discussion is closed.').'';
+ }
} elsif ($outputtarget ne 'tex') {
$discussion.='
';
if (&discussion_open($status) &&
@@ -2618,7 +2629,7 @@ ENDNOREDIRTWO
}
sub screen_header {
- my ($feedurl,$symb) = @_;
+ my ($feedurl,$symb,$group) = @_;
my $crscontent = &mt('Question/Comment/Feedback about course content');
my $crspolicy = &mt('Question/Comment/Feedback about course policy');
my $contribdisc = &mt('Contribution to course discussion of resource');
@@ -2674,9 +2685,9 @@ sub screen_header {
$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'}:''))) {
+ (&Apache::lonnet::allowed('pch',
+ $env{'request.course.id'}.
+ ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')) || (($group ne '') && (&check_group_priv($group,'pgd') eq 'ok')))) {
$discussoptions='