[LON-CAPA-cvs] cvs: loncom /interface lonsupportreq.pm
raeburn
raeburn at source.lon-capa.org
Tue Jan 18 16:41:31 EST 2022
raeburn Tue Jan 18 21:41:31 2022 EDT
Modified files:
/loncom/interface lonsupportreq.pm
Log:
- Bug 6955
Cc field omitted from "Ask helpdesk" form for authenticated users subject
to IP-based communication blocking, when "Messaging" selected for blocking.
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.103 loncom/interface/lonsupportreq.pm:1.104
--- loncom/interface/lonsupportreq.pm:1.103 Sat Jan 1 19:53:45 2022
+++ loncom/interface/lonsupportreq.pm Tue Jan 18 21:41:31 2022
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Helpdesk request form
#
-# $Id: lonsupportreq.pm,v 1.103 2022/01/01 19:53:45 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.104 2022/01/18 21:41:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -391,7 +391,11 @@
$i = $num%2;
if ($knownuser) {
if ($homeserver) {
- unless ($helpform{'cc'} eq 'no') {
+ my $ip = &Apache::lonnet::get_requestor_ip($r);
+ my %setters;
+ my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) =
+ &Apache::loncommon::blockcheck(\%setters,'com',$ip);
+ unless (($helpform{'cc'} eq 'no') || ($by_ip)) {
$output .= &Apache::lonhtmlcommon::row_title($html_lt{'emac'},undef,$css[$i]).
'<input type="text" size="50" name="cc" value="" /><br />'."\n".
&Apache::lonhtmlcommon::row_closure();
@@ -663,7 +667,10 @@
return;
}
}
- my $ip = &Apache::lonnet::get_requestor_ip();
+ my $ip = &Apache::lonnet::get_requestor_ip($r);
+ my %setters;
+ my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) =
+ &Apache::loncommon::blockcheck(\%setters,'com',$ip);
my @ENVvars = ('HTTP_HOST','HTTP_USER_AGENT','SERVER_ADDR','SERVER_NAME');
my @envvars = ('browser.os','browser.type','browser.version','user.home','request.role');
my @loncvars = ('user.name','user.domain','request.course.sec','request.course.id');
@@ -709,7 +716,7 @@
unless (($helpform{'course'} eq 'no') || ($env{'request.lti.login'})) {
$formvars{'course'} = 1;
}
- unless ($helpform{'cc'} eq 'no') {
+ unless (($helpform{'cc'} eq 'no') || ($by_ip)) {
$formvars{'cc'} = 1;
}
unless ($helpform{'screenshot'} eq 'no') {
More information about the LON-CAPA-cvs
mailing list