--- rat/lonuserstate.pm 2020/01/16 21:49:07 1.149.2.2.2.1 +++ rat/lonuserstate.pm 2020/03/05 22:39:57 1.149.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construct and maintain state and binary representation of course for user # -# $Id: lonuserstate.pm,v 1.149.2.2.2.1 2020/01/16 21:49:07 raeburn Exp $ +# $Id: lonuserstate.pm,v 1.149.2.3 2020/03/05 22:39:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -469,7 +469,11 @@ sub parse_resource { # is not a page. If the resource is a page then it must be # assembled (at fetch time?). - unless ($ispage) { + if ($ispage) { + if ($token->[2]->{'external'} eq 'true') { # external + $turi=~s{^http\://}{/ext/}; + } + } else { $turi=~/\.(\w+)$/; my $embstyle=&Apache::loncommon::fileembstyle($1); if ($token->[2]->{'external'} eq 'true') { # external @@ -484,8 +488,6 @@ sub parse_resource { } elsif ($turi!~/\.(sequence|page)$/) { $turi='/adm/coursedocs/showdoc'.$turi; } - } elsif ($turi=~ m{^/adm/$match_domain/$match_courseid/\d+/ext\.tool$}) { - $turi='/adm/wrapper'.$turi; } elsif ($turi=~/\S/) { # normal non-empty internal resource my $mapdir=$uri; $mapdir=~s/[^\/]+$//;