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

raeburn raeburn at source.lon-capa.org
Sun Jan 3 22:46:06 EST 2021


raeburn		Mon Jan  4 03:46:06 2021 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonsupportreq.pm 
  Log:
  - For 2.11
    Backport 1.101, 1.102
  
  
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.79.2.7 loncom/interface/lonsupportreq.pm:1.79.2.8
--- loncom/interface/lonsupportreq.pm:1.79.2.7	Wed Aug 28 02:17:10 2019
+++ loncom/interface/lonsupportreq.pm	Mon Jan  4 03:46:06 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Helpdesk request form
 #
-# $Id: lonsupportreq.pm,v 1.79.2.7 2019/08/28 02:17:10 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.79.2.8 2021/01/04 03:46:06 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -663,7 +663,8 @@
             return;
         }
     }
-    my @ENVvars = ('HTTP_HOST','HTTP_USER_AGENT','REMOTE_ADDR','SERVER_ADDR','SERVER_NAME');
+    my $ip = &Apache::lonnet::get_requestor_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');
     my @cookievars;
@@ -1051,6 +1052,7 @@
         foreach my $var(@ENVvars) {
             $supportmsg .= "$var: $ENV{$var}\n";
         }
+        $supportmsg .= "REMOTE_ADDR: $ip\n";
         foreach my $var (@envvars) {
             $supportmsg .= "$var: $env{$var}\n";
         }
@@ -1071,6 +1073,7 @@
         foreach my $var (@ENVvars) {
             $attachment_text .= "$var: $ENV{$var}\n";
         }
+        $attachment_text .= "REMOTE_ADDR: $ip\n";
         foreach my $var (@envvars) {
             $attachment_text .= "$var: $env{$var}\n";
         }
@@ -1145,6 +1148,10 @@
                        $var.'</span>: '.$ENV{$var}.', ';
         }
     }
+    if ($ip ne '') {
+        $envmsg .= '<span class="LC_helpform_receipt_cat">'.
+                   'REMOTE_ADDR</span>: '.$ip.', ';
+    }
     foreach my $var (@envvars) {
         if ($env{$var} ne '') { 
             $envmsg .= '<span class="LC_helpform_receipt_cat">'.




More information about the LON-CAPA-cvs mailing list