--- loncom/interface/lonnavmaps.pm 2021/07/19 15:48:26 1.553 +++ loncom/interface/lonnavmaps.pm 2022/05/02 05:41:15 1.555 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.553 2021/07/19 15:48:26 raeburn Exp $ +# $Id: lonnavmaps.pm,v 1.555 2022/05/02 05:41:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1464,11 +1464,15 @@ sub render { my $mapIterator = $navmap->getIterator(undef, undef, undef, 1); my $curRes; my $found = 0; + my $here_is_navmaps = 0; + if ($here =~ m{___\d+___adm/navmaps$}) { + $here_is_navmaps = 1; + } # We only need to do this if we need to open the maps to show the # current position. This will change the counter so we can't count # for the jump marker with this loop. - while ($here && ($curRes = $mapIterator->next()) && !$found) { + while ($here && ($curRes = $mapIterator->next()) && !$found && !$here_is_navmaps) { if (ref($curRes) && $curRes->symb() eq $here) { my $mapStack = $mapIterator->getStack(); @@ -1858,7 +1862,8 @@ END } } else { my $deeplink = $navmap->get_mapparam(undef,$mapname,"0.deeplink"); - if ($deeplink =~ /^(absent|grades),/) { + my ($state,$others,$listed) = split(/,/,$deeplink); + if (($listed eq 'absent') || ($listed eq 'grades')) { if ($userCanSeeHidden) { $args->{'mapUnlisted'} = 1; } else { @@ -3662,7 +3667,7 @@ cause the iterator to return the top-lev before anything else. deeplinklisted if true (default false), will check "listed" status of a resource with a deeplink, and unless "absent" will exclude deeplink checking when retrieving the browsePriv from -lonnet::allowed(). +lonnet::allowed(). Thus, by default, only top-level resources will be shown. Change the condition to a 1 without changing the hash, and all resources will be @@ -5192,7 +5197,7 @@ sub deeplink { my ($self,$caller,$action) = @_; my $deeplink = $self->parmval("deeplink"); if ($deeplink) { - my ($listed,$scope,$access) = split(/,/,$deeplink); + my ($state,$others,$listed,$scope) = split(/,/,$deeplink); if ($action eq 'getlisted') { return $listed; } @@ -5222,7 +5227,7 @@ sub deeplink { } } } - unless (($caller eq 'sequence') || ($access eq 'any')) { + unless (($caller eq 'sequence') || ($state eq 'both')) { return $listed; } } @@ -6435,7 +6440,7 @@ sub browsePriv { $self->{SYMB},undef, undef,$noblockcheck, undef,$nodeeplinkcheck, - $nodeeplinkout); + $nodeeplinkout); } =pod