version 1.165, 2021/08/06 01:27:04
|
version 1.166, 2021/08/10 15:28:14
|
Line 1616 sub build_tmp_hashes {
|
Line 1616 sub build_tmp_hashes {
|
$deeplink = $hash{'deeplinkonly_'.$loginrid}; |
$deeplink = $hash{'deeplinkonly_'.$loginrid}; |
} |
} |
if ($deeplink) { |
if ($deeplink) { |
|
my $disallow; |
my ($state,$others,$listed,$scope,$protect) = split(/,/,$deeplink); |
my ($state,$others,$listed,$scope,$protect) = split(/,/,$deeplink); |
if ($others eq 'hide') { |
if (($protect ne 'none') && ($protect ne '')) { |
my @recfolders; |
my ($acctype,$item) = split(/:/,$protect); |
if ($scope eq 'rec') { |
if ($acctype =~ /lti(c|d)$/) { |
foreach my $key (keys(%hash)) { |
unless ($env{'request.linkprot'} eq $item.$1.':'.$env{'request.deeplink.login'}) { |
if ($key=~/^map_hierarchy_(\d+)$/) { |
$disallow = 1; |
my $mpc = $1; |
} |
my @ids = split(/,/,$hash{$key}); |
} elsif ($acctype eq 'key') { |
if (grep(/^$deeplink_login_pc$/,@ids)) { |
unless ($env{'request.linkkey'} eq $item) { |
my $idx; |
$disallow = 1; |
foreach my $mapid (@ids) { |
} |
if ($idx) { |
} |
push(@recfolders,$mapid); |
} |
} elsif ($mapid == $deeplink_login_pc) { |
if ($disallow) { |
push(@recfolders,$mapid); |
&Apache::lonnet::delenv('request.deeplink.login'); |
$idx = $mapid; |
} else { |
|
if ($others eq 'hide') { |
|
my @recfolders; |
|
if ($scope eq 'rec') { |
|
foreach my $key (keys(%hash)) { |
|
if ($key=~/^map_hierarchy_(\d+)$/) { |
|
my $mpc = $1; |
|
my @ids = split(/,/,$hash{$key}); |
|
if (grep(/^$deeplink_login_pc$/,@ids)) { |
|
my $idx; |
|
foreach my $mapid (@ids) { |
|
if ($idx) { |
|
push(@recfolders,$mapid); |
|
} elsif ($mapid == $deeplink_login_pc) { |
|
push(@recfolders,$mapid); |
|
$idx = $mapid; |
|
} |
} |
} |
|
push(@recfolders,$mpc); |
} |
} |
push(@recfolders,$mpc); |
|
} |
} |
} |
} |
} |
} |
} |
foreach my $key (keys(%hash)) { |
foreach my $key (keys(%hash)) { |
if ($key=~/^src_(.+)$/) { |
if ($key=~/^src_(.+)$/) { |
my $rid = $1; |
my $rid = $1; |
next if ($rid eq '0.0'); |
next if ($rid eq '0.0'); |
next if ($rid eq $loginrid); |
next if ($rid eq $loginrid); |
if ($scope ne 'res') { |
if ($scope ne 'res') { |
my $mapid = (split(/\./,$rid))[0]; |
my $mapid = (split(/\./,$rid))[0]; |
next if ($mapid eq $deeplink_login_pc); |
next if ($mapid eq $deeplink_login_pc); |
if ($scope eq 'rec') { |
if ($scope eq 'rec') { |
next if (grep(/^$mapid$/,@recfolders)); |
next if (grep(/^$mapid$/,@recfolders)); |
} |
} |
} |
|
$deeplinkout{$rid} = 1; |
} |
} |
$deeplinkout{$rid} = 1; |
|
} |
} |
} |
} |
} |
} |
|
&deeplinkouts(); |
} |
} |
&deeplinkouts(); |
|
} |
} |
} |
} |
&mapcrumbs(); |
&mapcrumbs(); |