--- loncom/interface/lonsupportreq.pm 2019/07/23 13:58:53 1.96
+++ loncom/interface/lonsupportreq.pm 2020/12/18 19:14:25 1.102
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Helpdesk request form
#
-# $Id: lonsupportreq.pm,v 1.96 2019/07/23 13:58:53 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.102 2020/12/18 19:14:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -319,9 +319,10 @@ $jscript
$loaditems
// ]]>
-
ENDJS
- if ($recaptcha_version >=2) {
+ if ($knownuser) {
+ $js .="\n".'';
+ } elsif ($recaptcha_version >=2) {
$js.= "\n".''."\n";
}
my %add_entries = (
@@ -582,8 +583,8 @@ ENDJS
}
$showmax = ' ('.sprintf("%.2f",$showmax).' '.&mt('MB max.').')';
$output .= &Apache::lonhtmlcommon::row_title($html_lt{'opfi'},undef,$css[$i])
- .' '
- .''
+ .' '
+ .''
.'
'."\n".$html_lt{'uplf'}.$showmax."\n"
.&Apache::lonhtmlcommon::row_closure();
$num ++;
@@ -662,7 +663,8 @@ sub print_request_receipt {
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;
@@ -1071,6 +1073,7 @@ END
foreach my $var(@ENVvars) {
$supportmsg .= "$var: $ENV{$var}\n";
}
+ $supportmsg .= "REMOTE_ADDR: $ip\n";
foreach my $var (@envvars) {
$supportmsg .= "$var: $env{$var}\n";
}
@@ -1094,6 +1097,7 @@ END
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";
}
@@ -1116,8 +1120,8 @@ END
}
# Compose and send a MIME email
- &Apache::loncommon::mime_email($from, $to, $subject, $supportmsg, $cc_string, $bcc,
- $attachmentpath, $fname, $attachment_text);
+ &Apache::loncommon::mime_email($from,'',$to,$subject,$supportmsg,$cc_string,
+ $bcc,$attachmentpath,$fname,$attachment_text);
if ($attachmentpath =~ m|$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+|) {
unlink($attachmentpath);
@@ -1141,6 +1145,10 @@ END
$var.': '.$ENV{$var}.', ';
}
}
+ if ($ip ne '') {
+ $envmsg .= ''.
+ 'REMOTE_ADDR: '.$ip.', ';
+ }
foreach my $var (@envvars) {
if ($env{$var} ne '') {
$envmsg .= ''.