version 1.544, 2018/12/27 20:10:31
|
version 1.547, 2019/01/16 21:49:39
|
Line 1490 sub render {
|
Line 1490 sub render {
|
if ($args->{'iterator_map'}) { |
if ($args->{'iterator_map'}) { |
my $map = $args->{'iterator_map'}; |
my $map = $args->{'iterator_map'}; |
$map = $navmap->getResourceByUrl($map); |
$map = $navmap->getResourceByUrl($map); |
my $firstResource = $map->map_start(); |
if (ref($map)) { |
my $finishResource = $map->map_finish(); |
my $firstResource = $map->map_start(); |
|
my $finishResource = $map->map_finish(); |
$args->{'iterator'} = $it = $navmap->getIterator($firstResource, $finishResource, $filterHash, $condition); |
$args->{'iterator'} = $it = $navmap->getIterator($firstResource, $finishResource, $filterHash, $condition); |
|
} else { |
|
return; |
|
} |
} else { |
} else { |
$args->{'iterator'} = $it = $navmap->getIterator(undef, undef, $filterHash, $condition,undef,$args->{'include_top_level_map'}); |
$args->{'iterator'} = $it = $navmap->getIterator(undef, undef, $filterHash, $condition,undef,$args->{'include_top_level_map'}); |
} |
} |
Line 1828 END
|
Line 1831 END
|
} |
} |
} else { |
} else { |
my $deeplink = $navmap->get_mapparam(undef,$mapname,"0.deeplink"); |
my $deeplink = $navmap->get_mapparam(undef,$mapname,"0.deeplink"); |
if (($deeplink eq 'absent') || ($deeplink eq 'grades')) { |
if ($deeplink =~ /^(absent|grades),/) { |
if ($userCanSeeHidden) { |
if ($userCanSeeHidden) { |
$args->{'mapUnlisted'} = 1; |
$args->{'mapUnlisted'} = 1; |
} else { |
} else { |
Line 1899 END
|
Line 1902 END
|
} |
} |
} |
} |
# If deep-link parameter is set (and is not set to full) suppress link |
# If deep-link parameter is set (and is not set to full) suppress link |
# unless priviliged user, or calling context is sequence, and parameter |
# unless privileged user, or calling context is sequence, and parameter |
# set at map level |
# set at map level |
if ((!$curRes->deeplink($args->{'caller'})) || |
if ((!$curRes->deeplink($args->{'caller'})) || |
($curRes->deeplink($args->{'caller'}) eq 'full') || &advancedUser()) { |
($curRes->deeplink($args->{'caller'}) =~ /^full,/) || &advancedUser()) { |
$args->{'resource_nolink'} = 0; |
$args->{'resource_nolink'} = 0; |
} else { |
} else { |
$args->{'resource_nolink'} = 1; |
$args->{'resource_nolink'} = 1; |
Line 1938 END
|
Line 1941 END
|
$src = 'http://'.$hostname.$src; |
$src = 'http://'.$hostname.$src; |
} |
} |
$src .= ($srcHasQuestion? '&' : '?') . 'usehttp=1'; |
$src .= ($srcHasQuestion? '&' : '?') . 'usehttp=1'; |
$srcHasQuestion = 1;a |
$srcHasQuestion = 1; |
} |
} |
} elsif (($is_ssl) && ($src =~ m{^\Q/adm/wrapper/ext/\E(?!https:)})) { |
} elsif (($is_ssl) && ($src =~ m{^\Q/adm/wrapper/ext/\E(?!https:)})) { |
unless (&Apache::lonnet::uses_sts()) { |
unless (&Apache::lonnet::uses_sts()) { |
Line 2991 sub recursed_crumbs {
|
Line 2994 sub recursed_crumbs {
|
my $pc = $map->map_pc(); |
my $pc = $map->map_pc(); |
next if ((!$pc) || ($pc == 1)); |
next if ((!$pc) || ($pc == 1)); |
push(@links,$map); |
push(@links,$map); |
push(@revmapinfo,{'href' => $map->link().'?navmap=1','text' => $map->title(),'no_mt' => 1,}); |
push(@revmapinfo,{'href' => $env{'request.use_absolute'}.$map->link().'?navmap=1','text' => $map->title(),'no_mt' => 1,}); |
$totallength += length($map->title()); |
$totallength += length($map->title()); |
} |
} |
my $numlinks = scalar(@links); |
my $numlinks = scalar(@links); |
Line 3006 sub recursed_crumbs {
|
Line 3009 sub recursed_crumbs {
|
foreach my $map (@links) { |
foreach my $map (@links) { |
my $showntitle = &truncate_crumb_text($map->title(),$avg); |
my $showntitle = &truncate_crumb_text($map->title(),$avg); |
if ($showntitle ne '') { |
if ($showntitle ne '') { |
push(@revmapinfo,{'href' => $map->link().'?navmap=1','text' => $showntitle,'no_mt' => 1,}); |
push(@revmapinfo,{'href' => $env{'request.use_absolute'}.$map->link().'?navmap=1','text' => $showntitle,'no_mt' => 1,}); |
} |
} |
} |
} |
} |
} |
Line 5146 sub slot_control {
|
Line 5149 sub slot_control {
|
} |
} |
sub deeplink { |
sub deeplink { |
my ($self,$caller) = @_; |
my ($self,$caller) = @_; |
if ($caller eq 'sequence') { |
my $value = $self->parmval("deeplink"); |
my @deeplink = $self->parmval("deeplink"); |
if ($value) { |
if ($deeplink[1] eq 'resource') { |
my @deeplink = split(/,/,$value); |
return $deeplink[0]; |
if ($caller eq 'sequence') { |
|
if ($deeplink[1] ne 'res') { |
|
return; |
|
} |
} |
} |
} else { |
return $deeplink[0]; |
return $self->parmval("deeplink"); |
|
} |
} |
|
return; |
} |
} |
|
|
# Multiple things need this |
# Multiple things need this |