--- loncom/interface/lonfeedback.pm 2017/11/16 16:02:58 1.370.2.1.2.1
+++ loncom/interface/lonfeedback.pm 2017/12/18 22:36:52 1.377
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.370.2.1.2.1 2017/11/16 16:02:58 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.377 2017/12/18 22:36:52 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -674,7 +674,7 @@ END
$newpostsflag,$group,
$prevread,$markondisp,$seehidden);
$discussion .= "\n";
- }
+ }
if ($outputtarget eq 'export') {
if ($manifestok) {
while ($currdepth > 0) {
@@ -960,9 +960,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
@@ -1950,6 +1955,7 @@ END
$anonscript
//-->
+
END
my ($textareaheader,$textareaclass);
@@ -2057,7 +2063,8 @@ END
} else {
$r->print(<
-$lt{'atta'} $attachmaxtext:
+$lt{'atta'} $attachmaxtext:
+
END
}
@@ -2068,7 +2075,7 @@ END
$r->print('');
}
$r->print(<
+
END
@@ -2943,12 +2950,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);
@@ -3506,6 +3517,7 @@ sub modify_attachments {
document.modattachments.submit();
}
+
END
# Breadcrumbs
@@ -3547,7 +3559,10 @@ END
$r->print(''.$subject.'');
$r->print(&Apache::lonhtmlcommon::row_closure());
$r->print(&Apache::lonhtmlcommon::row_title($lt{'adda'}));
- $r->print(' '.$attachmaxtext);
+ $r->print(''
+ .''
+ .' '.$attachmaxtext);
if(($idx)||(ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)){
$r->print(&Apache::lonhtmlcommon::row_closure());
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Attachments')));
@@ -4638,7 +4653,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++;