--- rat/lonuserstate.pm 2003/11/01 16:42:13 1.67 +++ rat/lonuserstate.pm 2003/12/15 15:26:26 1.69 @@ -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.67 2003/11/01 16:42:13 www Exp $ +# $Id: lonuserstate.pm,v 1.69 2003/12/15 15:26:26 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -163,10 +163,13 @@ sub loadmap { } elsif ($turi!~/\.(sequence|page)$/) { $turi='/adm/coursedocs/showdoc'.$turi; } - } else { # normal internal resource - if (($embstyle eq 'img') || ($embstyle eq 'emb')) { - $turi='/adm/wrapper'.$turi; - } + } elsif ($turi) { # normal non-empty internal resource + my $mapdir=$uri; + $mapdir=~s/[^\/]+$//; + $turi=&Apache::lonnet::hreflocation($mapdir,$turi); + if (($embstyle eq 'img') || ($embstyle eq 'emb')) { + $turi='/adm/wrapper'.$turi; + } } }