--- loncom/interface/lonnavmaps.pm 2012/10/12 13:48:50 1.489
+++ loncom/interface/lonnavmaps.pm 2012/12/08 20:10:26 1.491
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.489 2012/10/12 13:48:50 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.491 2012/12/08 20:10:26 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
@@ -1040,7 +1040,7 @@ sub render_resource {
}
if (!$params->{'resource_nolink'} && !$resource->is_sequence() && !$resource->is_empty_sequence) {
- $result .= "$curMarkerBegin$title$partLabel$curMarkerEnd$nonLinkedText";
+ $result .= "$curMarkerBegin$title$partLabel$curMarkerEnd$editmapLink$nonLinkedText";
} else {
$result .= "$curMarkerBegin$linkopen$title$partLabel$curMarkerEnd$editmapLink$nonLinkedText";
}
@@ -2011,6 +2011,7 @@ sub new {
$self->{USERNAME} = shift || $env{'user.name'};
$self->{DOMAIN} = shift || $env{'user.domain'};
+ $self->{CODE} = shift;
@@ -2027,7 +2028,7 @@ sub new {
# assume there are course hashes for the specific requested user@domamin:
#
- if (($self->{USERNAME} eq $env{'user.name'}) && ($self->{DOMAIN} eq $env{'user.domain'})) {
+ if (($self->{USERNAME} eq $env{'user.name'}) && ($self->{DOMAIN} eq $env{'user.domain'}) && !$self->{CODE}) {
# tie the nav hash
@@ -2050,7 +2051,7 @@ sub new {
$self->{PARM_HASH} = \%parmhash;
$self->{PARM_CACHE} = {};
} else {
- $self->change_user($self->{USERNAME}, $self->{DOMAIN});
+ $self->change_user($self->{USERNAME}, $self->{DOMAIN}, $self->{CODE});
}
return $self;
@@ -2063,12 +2064,14 @@ sub new {
# Parameters:
# user - New user.
# domain- Domain the user belongs to.
+# code - Anonymous CODE in use.
# Implicit inputs:
#
sub change_user {
my $self = shift;
$self->{USERNAME} = shift;
$self->{DOMAIN} = shift;
+ $self->{CODE} = shift;
# If the hashes are already tied make sure to break that bond:
@@ -2084,7 +2087,7 @@ sub change_user {
my ($cdom, $cnum) = split(/\_/, $env{'request.course.id'});
my %big_hash;
- &Apache::lonmap::loadmap($cnum, $cdom, $self->{USERNAME}, $self->{DOMAIN}, \%big_hash);
+ &Apache::lonmap::loadmap($cnum, $cdom, $self->{USERNAME}, $self->{DOMAIN}, $self->{CODE}, \%big_hash);
$self->{NAV_HASH} = \%big_hash;