version 1.25, 2005/04/07 06:56:23
|
version 1.26, 2005/04/10 23:37:21
|
Line 637 END
|
Line 637 END
|
|
|
sub print_request_receipt { |
sub print_request_receipt { |
my ($r,$url,$function) = @_; |
my ($r,$url,$function) = @_; |
my @envvars = ('lonID','HTTP_HOST','HTTP_USER_AGENT','REMOTE_ADDR','SERVER_ADDR','SERVER_NAME','browser.os','browser.type','browser.version','user.home','request.role'); |
my @ENVvars = ('HTTP_HOST','HTTP_USER_AGENT','REMOTE_ADDR','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 @loncvars = ('user.name','user.domain','request.course.sec','request.course.id'); |
|
|
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1); |
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1); |
Line 752 END
|
Line 753 END
|
$fname = $1; |
$fname = $1; |
$displaymsg .= "<br />An uploaded screenshot file - $fname ($attachmentsize bytes) was included in the request sent by $env{'user.name'} from LON-CAPA domain: $env{'user.domain'}"; |
$displaymsg .= "<br />An uploaded screenshot file - $fname ($attachmentsize bytes) was included in the request sent by $env{'user.name'} from LON-CAPA domain: $env{'user.domain'}"; |
$supportmsg .= "\n"; |
$supportmsg .= "\n"; |
|
foreach (@ENVvars) { |
|
$supportmsg .= "$_: $ENV{$_}\n"; |
|
} |
foreach (@envvars) { |
foreach (@envvars) { |
$supportmsg .= "$_: $env{$_}\n"; |
$supportmsg .= "$_: $env{$_}\n"; |
} |
} |
Line 774 END
|
Line 778 END
|
|
|
} else { |
} else { |
my $envdata = ''; |
my $envdata = ''; |
|
foreach (@ENVvars) { |
|
$envdata .= "$_: $ENV{$_}\n"; |
|
} |
foreach (@envvars) { |
foreach (@envvars) { |
$envdata .= "$_: $env{$_}\n"; |
$envdata .= "$_: $env{$_}\n"; |
} |
} |
Line 785 END
|
Line 792 END
|
} |
} |
|
|
### Send it: |
### Send it: |
# ->send can cause an sh launch which can pass all of %env along |
|
# which can be to large for /bin/sh's little mind |
|
$msg->send('sendmail'); |
$msg->send('sendmail'); |
|
|
if ($attachmentpath =~ m#$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+#) { |
if ($attachmentpath =~ m#$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+#) { |
Line 840 END
|
Line 845 END
|
<tr> |
<tr> |
<td> |
<td> |
|); |
|); |
|
foreach (@ENVvars) { |
|
unless($ENV{$_} eq '') { |
|
$r->print("$_: <font color='$vlinkcolor'>$ENV{$_}</font>, "); |
|
} |
|
} |
foreach (@envvars) { |
foreach (@envvars) { |
unless($env{$_} eq '') { |
unless($env{$_} eq '') { |
$r->print("$_: <font color='$vlinkcolor'>$env{$_}</font>, "); |
$r->print("$_: <font color='$vlinkcolor'>$env{$_}</font>, "); |