--- rat/lonuserstate.pm 2003/11/01 16:37:22 1.66 +++ 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.66 2003/11/01 16:37:22 www Exp $ +# $Id: lonuserstate.pm,v 1.68 2003/12/12 16:38:53 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -77,8 +77,6 @@ sub putinversion { if ($version eq &Apache::lonnet::getversion( &Apache::lonnet::filelocation('',$uri))) { return $uri; } - &Apache::lonnet::logthis($uri.' '.$version.' '. &Apache::lonnet::getversion( - &Apache::lonnet::filelocation('',$uri))); $uri=~s/\.(\w+)$/\.$version\.$1/; } return $uri; @@ -166,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; + } } }