--- loncom/interface/lonfeedback.pm 2010/09/21 04:58:17 1.273.4.11 +++ loncom/interface/lonfeedback.pm 2010/11/20 01:33:04 1.273.4.12 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.273.4.11 2010/09/21 04:58:17 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.273.4.12 2010/11/20 01:33:04 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -727,9 +727,10 @@ END $attachnum += @{$currnewattach}; } } - if (&discussion_open($status)) { + if ((&discussion_open($status)) && ($outputtarget ne 'tex')) { if (($group ne '') && ($mode eq 'board')) { - if (&check_group_priv($group,'pgd') eq 'ok') { + if ((&check_group_priv($group,'pgd') eq 'ok') && + ($ressymb =~ m{^bulletin___\d+___adm/wrapper/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard$})) { $discussion .= &postingform_display($mode,$ressymb,$now,$subject, $comment,$outputtarget,$attachnum, @@ -737,12 +738,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.').''; + } } else { $discussion.='