--- loncom/interface/lonfeedback.pm 2021/12/31 20:39:00 1.370.2.5.2.1 +++ loncom/interface/lonfeedback.pm 2021/10/18 22:29:20 1.385 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.370.2.5.2.1 2021/12/31 20:39:00 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.385 2021/10/18 22:29:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -136,27 +136,25 @@ sub list_discussion { } } - unless ($outputtarget eq 'export') { - ($nofooter,$nodisclink,$nofdbklink) = &check_menucoll(); - } - - unless ($nofooter) { - my ($blocked,$blocktext) = - &Apache::loncommon::blocking_status('boards'); - if ($blocked) { - my $footer = '
'; + }else{ + $blocktext.=""; } + return $blocktext; + } + + unless ($outputtarget eq 'export') { + ($nofooter,$nodisclink,$nofdbklink) = &check_menucoll(); } my @bgcols = ("LC_disc_old_item","LC_disc_new_item"); @@ -1003,9 +1001,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 @@ -2110,7 +2113,7 @@ END $r->print(''); } $r->print(< +

END @@ -2875,6 +2878,10 @@ sub redirect_back { my $start_page= &Apache::loncommon::start_page('Feedback sent',undef,\%parms); my $end_page = &Apache::loncommon::end_page(); + my $windowname = 'loncapaclient'; + if ($env{'request.lti.login'}) { + $windowname .= 'lti'; + } $r->print(< @@ -2883,7 +2890,7 @@ $typestyle $blog $toolarge $status -
+ $prevtag $sorttag $statustag @@ -2985,12 +2992,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); @@ -3547,7 +3558,7 @@ sub modify_attachments { document.modattachments.action = document.modattachments.origpage.value; document.modattachments.submit(); } - + END @@ -4078,11 +4089,15 @@ sub handler { 'only_body' => 1, 'add_entries' => \%onload}); my $end_page = &Apache::loncommon::end_page(); + my $windowname = 'loncapaclient'; + if ($env{'request.lti.login'}) { + $windowname .= 'lti'; + } $r->print (< $textline - +
$end_page @@ -4584,7 +4599,7 @@ ENDREDIR || ($env{'request.course.id'} && ($symb=~/^bulletin\_\_\_/)) || - (($env{'request.course.id'}) && ($feedurl =~ /ext\.tool$/)) + (($env{'request.course.id'} && ($feedurl =~ /ext\.tool$/))) ) { &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; @@ -4686,7 +4701,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++;