--- loncom/interface/lonfeedback.pm 2015/09/30 21:04:04 1.371 +++ loncom/interface/lonfeedback.pm 2016/03/23 02:19:09 1.372 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.371 2015/09/30 21:04:04 musolffc Exp $ +# $Id: lonfeedback.pm,v 1.372 2016/03/23 02:19:09 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -933,7 +933,7 @@ sub postingform_display { $currnewattach,$currdelold,$group,$crstype) = @_; my $newattachmsg; my %lt = &Apache::lonlocal::texthash( - 'note' => 'Note: in anonymous discussion, your name is visible only to course faculty', + 'note' => 'Note: in anonymous discussion, your name is visible only to course faculty', 'title' => 'Title', 'podi' => 'Post Discussion', 'poan' => 'Post Anonymous Discussion', @@ -952,9 +952,14 @@ sub postingform_display { } } } + my $postanon; + if (&Apache::lonnet::allowed('pac',$env{'request.course.id'}. + ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { + $postanon = ''; + } $postingform .= (< - +$postanon @@ -2062,7 +2067,7 @@ END $r->print(''); } $r->print(< +

END @@ -2937,12 +2942,16 @@ sub screen_header { $env{'request.course.id'}. ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')) || (($group ne '') && ($symb =~ m{^bulletin___\d+___adm/wrapper/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard$}) && (&check_group_priv($group,'pgd') eq 'ok')))) { - $discussoptions='
'. - ''.&mt('Change Screenname').''; + $discussoptions=''; + if (&Apache::lonnet::allowed('pac',$env{'request.course.id'}. + ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { + $discussoptions .= '
'. + ''.&mt('Change Screenname').''; + } my $blockblog = &Apache::loncommon::blocking_status('blogs'); if (!$blockblog) { $discussoptions.= &add_blog_checkbox($crstype); @@ -4636,7 +4645,11 @@ ENDREDIR && $env{'form.discuss'} !~ /^(?:author|question|course|policy)/) || $env{'form.anondiscuss'} ne '') { my $subject = &clear_out_html($env{'form.subject'}); - my $anonmode=($env{'form.discuss'} eq 'anon' || $env{'form.anondiscuss'} ); + my $anonmode; + if (&Apache::lonnet::allowed('pac',$env{'request.course.id'}. + ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { + $anonmode=($env{'form.discuss'} eq 'anon' || $env{'form.anondiscuss'} ); + } $typestyle.=&adddiscuss($symb,$message,$anonmode,$attachmenturl, $subject,$group); $numpost++;