--- rat/lonpageflip.pm 2021/07/19 15:48:25 1.106 +++ rat/lonpageflip.pm 2021/08/06 01:27:04 1.108 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.106 2021/07/19 15:48:25 raeburn Exp $ +# $Id: lonpageflip.pm,v 1.108 2021/08/06 01:27:04 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -127,8 +127,8 @@ sub move { $deeplinkonly = 0; if ($hash{'deeplinkonly_'.$next}) { my ($value,$level) = split(/:/,$hash{'deeplinkonly_'.$next}); - my ($listed,$scope,$access) = split(/,/,$value); - unless (($access eq 'any') || ($hash{'is_map_'.$next})) { + my ($state,$others,$listed,$scope,$protect) = split(/,/,$value); + unless (($state eq 'both') || ($hash{'is_map_'.$next})) { if ($level eq 'resource') { $deeplinkonly = 1; } elsif ($level eq 'map') { @@ -161,12 +161,11 @@ sub move { } } elsif (($hash{'deeplinkonly_'.$prev}) && (!$firstres)) { my ($value,$level) = split(/:/,$hash{'deeplinkonly_'.$prev}); - my ($listed,$scope,$access) = split(/,/,$value); - unless (($access eq 'any') || ($hash{'is_map_'.$prev})) { + my ($state,$others,$listed,$scope,$protect) = split(/,/,$value); + unless (($state eq 'both') || ($hash{'is_map_'.$prev})) { if ($level eq 'resource') { $deeplinkonly = 1; } elsif ($level eq 'map') { - my ($listed,$scope,$access) = split(/,/,$value); if ($scope eq 'rec') { unless ($mapid == $prevmapid) { unless ($deeplinkchecked) { @@ -204,7 +203,7 @@ sub move { (!$env{'request.role.adv'}) && (($hash{'randomout_'.$next}) || ($deeplinkonly) - || ($hash{'deeplinkout_'.$next}) + || ($hash{'deeplinkout_'.$next})) ) || (!$allowed) ) @@ -339,7 +338,7 @@ sub first_accessible_resource { if ($hash{'encrypted_'.$newrid}) { $furl=&Apache::lonenc::encrypted($furl); } - { + } } untie(%hash); return $furl;