version 1.25, 2005/04/07 06:56:23
|
version 1.28, 2005/04/12 00:20:00
|
Line 30 use strict;
|
Line 30 use strict;
|
use lib qw(/home/httpd/lib/perl); |
use lib qw(/home/httpd/lib/perl); |
use MIME::Types; |
use MIME::Types; |
use MIME::Lite; |
use MIME::Lite; |
|
use CGI::Cookie(); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonnet; |
use Apache::lonnet; |
Line 637 END
|
Line 638 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 @cookievars = ('lonID'); |
|
|
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1); |
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1); |
my $admin = $Apache::lonnet::perlvar{'lonAdminMail'}; |
my $admin = $Apache::lonnet::perlvar{'lonAdminMail'}; |
Line 748 END
|
Line 751 END
|
} |
} |
} |
} |
|
|
|
my %cookies = (); |
|
my $cookie=CGI::Cookie->parse($r->header_in('Cookie')); |
|
if ($$cookie{'lonID'} =~ /lonID=(\w+);/) { |
|
$cookies{'lonID'} = $1; |
|
} |
|
|
if ($attachmentpath =~ m-/([^/]+)$-) { |
if ($attachmentpath =~ m-/([^/]+)$-) { |
$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 (@cookievars) { |
|
$supportmsg .= "$_: $cookies{$_}\n"; |
|
} |
|
foreach (@ENVvars) { |
|
$supportmsg .= "$_: $ENV{$_}\n"; |
|
} |
foreach (@envvars) { |
foreach (@envvars) { |
$supportmsg .= "$_: $env{$_}\n"; |
$supportmsg .= "$_: $env{$_}\n"; |
} |
} |
Line 774 END
|
Line 789 END
|
|
|
} else { |
} else { |
my $envdata = ''; |
my $envdata = ''; |
|
foreach (@cookievars) { |
|
$envdata .= "$_: $cookies{$_}\n"; |
|
} |
|
foreach (@ENVvars) { |
|
$envdata .= "$_: $ENV{$_}\n"; |
|
} |
foreach (@envvars) { |
foreach (@envvars) { |
$envdata .= "$_: $env{$_}\n"; |
$envdata .= "$_: $env{$_}\n"; |
} |
} |
Line 785 END
|
Line 806 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 859 END
|
<tr> |
<tr> |
<td> |
<td> |
|); |
|); |
|
foreach (@cookievars) { |
|
unless($cookies{$_} eq '') { |
|
$r->print("$_: <font color='$vlinkcolor'>$cookies{$_}</font>, "); |
|
} |
|
} |
|
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>, "); |
Line 938 Please review the information in "Log-in
|
Line 967 Please review the information in "Log-in
|
|
|
sub retrieve_instcodes { |
sub retrieve_instcodes { |
my ($coursecodes,$codedom,$totcodes) = @_; |
my ($coursecodes,$codedom,$totcodes) = @_; |
my %courses = &Apache::lonnet::courseiddump($codedom,'.',1,'.','.'); |
my %courses = &Apache::lonnet::courseiddump($codedom,'.',1,'.','.','.'); |
foreach my $course (keys %courses) { |
foreach my $course (keys %courses) { |
if ($courses{$course} =~ m/^[^:]*:([^:]+)/) { |
if ($courses{$course} =~ m/^[^:]*:([^:]+)/) { |
$$coursecodes{$course} = &Apache::lonnet::unescape($1); |
$$coursecodes{$course} = &Apache::lonnet::unescape($1); |