--- loncom/interface/lonfeedback.pm 2021/01/04 03:43:30 1.370.2.5
+++ loncom/interface/lonfeedback.pm 2018/04/14 17:52:43 1.379
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.370.2.5 2021/01/04 03:43:30 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.379 2018/04/14 17:52:43 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
@@ -1776,11 +1781,14 @@ sub mail_screen {
my %lt = &Apache::lonlocal::texthash(
'myqu' => 'Question/comment/feedback:',
+ 'title' => 'Title',
'reta' => 'Retained attachments',
'atta' => 'Attachment',
);
- if ($env{'form.editdisc'} || $env{'form.replydisc'}){
- $lt{'myqu'} = &mt('Post Discussion');
+ if($env{'form.editdisc'} || $env{'form.replydisc'}){
+ %lt = &Apache::lonlocal::texthash(
+ 'myqu' => 'Post Discussion',
+ );
}
my $restitle = &get_resource_title($caller_symb,$feedurl);
my $quote='';
@@ -2055,8 +2063,8 @@ END
} else {
$r->print(<
-$lt{'atta'} $attachmaxtext:
-
+$lt{'atta'} $attachmaxtext:
+
END
}
@@ -2067,7 +2075,7 @@ END
$r->print('');
}
$r->print(<
+
END
@@ -2832,6 +2840,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(<
@@ -2840,7 +2852,7 @@ $typestyle
$blog
$toolarge
$status
-
$end_page
@@ -4540,6 +4560,8 @@ ENDREDIR
($env{'request.course.id'} && ($feedurl!~m:^/adm:))
||
($env{'request.course.id'} && ($symb=~/^bulletin\_\_\_/))
+ ||
+ (($env{'request.course.id'} && ($feedurl =~ /ext\.tool$/)))
) {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
@@ -4641,7 +4663,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++;