--- rat/lonpageflip.pm 2018/12/29 23:24:58 1.100 +++ rat/lonpageflip.pm 2018/12/30 19:47:06 1.101 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.100 2018/12/29 23:24:58 raeburn Exp $ +# $Id: lonpageflip.pm,v 1.101 2018/12/30 19:47:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -472,7 +472,7 @@ sub handler { return REDIRECT; } } - if ($direction eq 'return') { + if ($direction eq 'return') { # -------------------------------------------------------- Return to last known my ($newloc,$usehttp); if (($last) && (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'.db', @@ -484,10 +484,11 @@ sub handler { $usehttp = &check_http_req(\$newloc); if ($hash{'encrypted_'.$id}) { $newloc=&Apache::lonenc::encrypted($newloc); - } elsif ($newloc =~ m{^(/adm/wrapper/ext/[^\#]+)(?:|\#([^\#]+))$}) { + } + if ($newloc =~ m{^(/adm/wrapper/ext/[^\#]+)(?:|(\#[^\#]+))$}) { my ($url,$anchor) = ($1,$2); if ($anchor) { - $newloc = $url.(($url=~/\?/)?'&':'?').'symb='.&escape($last); + $newloc = $url.(($url=~/\?/)?'&':'?').'symb='.&escape($last).$anchor; } } } else {