version 1.48.2.2, 2020/09/03 12:49:17
|
version 1.52, 2020/09/03 12:14:30
|
Line 36 use Apache::lonnet;
|
Line 36 use Apache::lonnet;
|
use Apache::Constants qw(:common :http REDIRECT); |
use Apache::Constants qw(:common :http REDIRECT); |
use GDBM_File; |
use GDBM_File; |
use LONCAPA::map(); |
use LONCAPA::map(); |
|
use LONCAPA::ltiutils; |
use LONCAPA; |
use LONCAPA; |
use Apache::lonpageflip(); |
use Apache::lonpageflip(); |
use Apache::loncommon(); |
use Apache::loncommon(); |
Line 260 sub handler {
|
Line 261 sub handler {
|
if (ref($navmap)) { |
if (ref($navmap)) { |
# renderer call |
# renderer call |
if (&Apache::lonnet::is_on_map($requrl)) { |
if (&Apache::lonnet::is_on_map($requrl)) { |
@crumbs = ({text => $crstype.' Contents', |
my ($ltiscope,$ltiuri); |
href => "javascript:gopost('/adm/navmaps','')"}); |
if (($env{'request.lti.login'}) && ($env{'request.lti.uri'})) { |
my $res = $navmap->getResourceByUrl($mapurl); |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
if (ref($res)) { |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $symb = $res->symb(); |
($ltiscope,$ltiuri) = &LONCAPA::ltiutils::lti_provider_scope($env{'request.lti.uri'},$cdom,$cnum); |
if ($symb) { |
} |
my ($parent) = &Apache::lonnet::decode_symb($res->symb()); |
@crumbs = (); |
if ($parent ne $env{'course.'.$env{'request.course.id'}.'.url'}) { |
unless ($ltiscope eq 'resource') { |
my @mapcrumbs = $navmap->recursed_crumbs($parent); |
unless ($ltiscope eq 'map') { |
if (@mapcrumbs) { |
@crumbs = ({text => $crstype.' Contents', |
push(@crumbs,@mapcrumbs); |
href => "javascript:gopost('/adm/navmaps','')"}); |
|
} |
|
my $res = $navmap->getResourceByUrl($mapurl); |
|
if (ref($res)) { |
|
my $symb = $res->symb(); |
|
if ($symb) { |
|
my ($parent) = &Apache::lonnet::decode_symb($res->symb()); |
|
if (($parent ne $env{'course.'.$env{'request.course.id'}.'.url'}) && |
|
!(($ltiscope eq 'map') && ($requrl eq $ltiuri))) { |
|
my @mapcrumbs = $navmap->recursed_crumbs($parent); |
|
if (@mapcrumbs) { |
|
push(@crumbs,@mapcrumbs); |
|
} |
} |
} |
|
$env{'request.symb'} = $symb; |
} |
} |
$env{'request.symb'} = $symb; |
|
} |
} |
} |
} |
push(@crumbs,{text => $maptitle, no_mt => 1}); |
push(@crumbs,{text => $maptitle, no_mt => 1}); |
Line 404 sub handler {
|
Line 417 sub handler {
|
if ($is_encrypted) { |
if ($is_encrypted) { |
$showdisurl = &Apache::lonenc::encrypted($disurl); |
$showdisurl = &Apache::lonenc::encrypted($disurl); |
} |
} |
if ($disurl =~ m{^/adm/navmaps(\?|$)}) { |
if ($disurl =~ m{/adm/navmaps(\?|$)}) { |
&Apache::lonnet::symblist($requrl,$disurl => [$disurl,$dismapid]); |
&Apache::lonnet::symblist($requrl,$disurl => [$disurl,$dismapid]); |
} else { |
} else { |
&Apache::lonnet::symblist($requrl,$disurl => [$disurl,$dismapid], |
&Apache::lonnet::symblist($requrl,$disurl => [$disurl,$dismapid], |