[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
www
www@source.lon-capa.org
Fri, 03 Dec 2010 16:17:27 -0000
www Fri Dec 3 16:17:27 2010 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
Propagating username and domain. At the moment, this appears to be working fine. Could it be that easy?
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.453 loncom/interface/lonnavmaps.pm:1.454
--- loncom/interface/lonnavmaps.pm:1.453 Fri Dec 3 15:19:09 2010
+++ loncom/interface/lonnavmaps.pm Fri Dec 3 16:17:27 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.453 2010/12/03 15:19:09 www Exp $
+# $Id: lonnavmaps.pm,v 1.454 2010/12/03 16:17:27 www Exp $
#
# Copyright Michigan State University Board of Trustees
@@ -2017,7 +2017,7 @@
my $cdom=$env{'course.'.$cid.'.domain'};
my $cnum=$env{'course.'.$cid.'.num'};
- my %emailstatus = &Apache::lonnet::dump('email_status');
+ my %emailstatus = &Apache::lonnet::dump('email_status',$self->{DOMAIN},$self->{USERNAME});
my $logoutTime = $emailstatus{'logout'};
my $courseLeaveTime = $emailstatus{'logout_'.$env{'request.course.id'}};
$self->{LAST_CHECK} = (($courseLeaveTime > $logoutTime) ?
@@ -2839,6 +2839,9 @@
weaken($self->{NAV_MAP} = shift);
return undef unless ($self->{NAV_MAP});
+ $self->{USERNAME} = $self->{NAV_MAP}->{USERNAME};
+ $self->{DOMAIN} = $self->{NAV_MAP}->{DOMAIN};
+
# Handle the parameters
$self->{FIRST_RESOURCE} = shift || $self->{NAV_MAP}->firstResource();
$self->{FINISH_RESOURCE} = shift || $self->{NAV_MAP}->finishResource();
@@ -3212,6 +3215,9 @@
weaken($self->{NAV_MAP} = shift);
return undef unless ($self->{NAV_MAP});
+ $self->{USERNAME} = $self->{NAV_MAP}->{USERNAME};
+ $self->{DOMAIN} = $self->{NAV_MAP}->{DOMAIN};
+
$self->{FIRST_RESOURCE} = shift || $self->{NAV_MAP}->firstResource();
$self->{FINISH_RESOURCE} = shift || $self->{NAV_MAP}->finishResource();
@@ -3448,6 +3454,9 @@
weaken($self->{NAV_MAP} = shift);
$self->{ID} = shift;
+ $self->{USERNAME} = $self->{NAV_MAP}->{USERNAME};
+ $self->{DOMAIN} = $self->{NAV_MAP}->{DOMAIN};
+
# Store this new resource in the parent nav map's cache.
$self->{NAV_MAP}->{RESOURCE_CACHE}->{$self->{ID}} = $self;
$self->{RESOURCE_ERROR} = 0;
@@ -4134,7 +4143,7 @@
my $self = shift;
if (!defined($self->{RETURN_HASH})) {
- my %tmpHash = &Apache::lonnet::restore($self->symb());
+ my %tmpHash = &Apache::lonnet::restore($self->symb(),undef,$self->{DOMAIN},$self->{USERNAME});
$self->{RETURN_HASH} = \%tmpHash;
}
}