[LON-CAPA-cvs] cvs: loncom /interface lonsupportreq.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Sun, 10 Apr 2005 23:45:57 -0000
raeburn Sun Apr 10 19:45:57 2005 EDT
Modified files:
/loncom/interface lonsupportreq.pm
Log:
Record lonID if user's cookie contains one.
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.26 loncom/interface/lonsupportreq.pm:1.27
--- loncom/interface/lonsupportreq.pm:1.26 Sun Apr 10 19:37:21 2005
+++ loncom/interface/lonsupportreq.pm Sun Apr 10 19:45:57 2005
@@ -1,5 +1,5 @@
#
-# $Id: lonsupportreq.pm,v 1.26 2005/04/10 23:37:21 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.27 2005/04/10 23:45:57 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -30,6 +30,7 @@
use lib qw(/home/httpd/lib/perl);
use MIME::Types;
use MIME::Lite;
+use CGI::Cookie();
use Apache::Constants qw(:common);
use Apache::loncommon();
use Apache::lonnet;
@@ -640,6 +641,7 @@
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 @cookievars = ('lonID');
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1);
my $admin = $Apache::lonnet::perlvar{'lonAdminMail'};
@@ -749,10 +751,19 @@
}
}
+ my %cookies = ();
+ my $cookie=CGI::Cookie->parse($r->header_in('Cookie'));
+ if ($$cookie{'lonID'} =~ /lonID=(\w+);/) {
+ $cookies{'lonID'} = $1;
+ }
+
if ($attachmentpath =~ m-/([^/]+)$-) {
$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'}";
$supportmsg .= "\n";
+ foreach (@cookievars) {
+ $supportmsg .= "$_: $cookies{$_}\n";
+ }
foreach (@ENVvars) {
$supportmsg .= "$_: $ENV{$_}\n";
}
@@ -778,6 +789,9 @@
} else {
my $envdata = '';
+ foreach (@cookievars) {
+ $envdata .= "$_: $cookies{$_}\n";
+ }
foreach (@ENVvars) {
$envdata .= "$_: $ENV{$_}\n";
}
@@ -845,6 +859,11 @@
<tr>
<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>, ");