--- rat/lonuserstate.pm 2003/11/01 16:42:13 1.67 +++ rat/lonuserstate.pm 2003/12/12 16:38:53 1.68 @@ -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.68 2003/12/12 16:38:53 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -164,9 +164,12 @@ sub loadmap { $turi='/adm/coursedocs/showdoc'.$turi; } } else { # normal internal resource - if (($embstyle eq 'img') || ($embstyle eq 'emb')) { - $turi='/adm/wrapper'.$turi; - } + my $mapdir=$uri; + $mapdir=~s/[^\/]+$//; + $turi=&Apache::lonnet::hreflocation($mapdir,$turi); + if (($embstyle eq 'img') || ($embstyle eq 'emb')) { + $turi='/adm/wrapper'.$turi; + } } }