--- rat/lonuserstate.pm 2003/11/01 16:37:22 1.66 +++ 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.66 2003/11/01 16:37:22 www Exp $ +# $Id: lonuserstate.pm,v 1.69 2003/12/15 15:26:26 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; @@ -165,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; + } } }