[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonsupportreq.pm

raeburn raeburn at source.lon-capa.org
Wed Jan 19 08:57:19 EST 2022


raeburn		Wed Jan 19 13:57:19 2022 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonsupportreq.pm 
  Log:
  - For 2.11
    Backport 1.104
  
  
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.79.2.9 loncom/interface/lonsupportreq.pm:1.79.2.10
--- loncom/interface/lonsupportreq.pm:1.79.2.9	Sat Jan  1 19:55:31 2022
+++ loncom/interface/lonsupportreq.pm	Wed Jan 19 13:57:19 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Helpdesk request form
 #
-# $Id: lonsupportreq.pm,v 1.79.2.9 2022/01/01 19:55:31 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.79.2.10 2022/01/19 13:57:19 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -393,7 +393,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') {
         $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