--- rat/lonuserstate.pm 2005/06/08 18:49:38 1.92 +++ rat/lonuserstate.pm 2005/07/15 12:29:07 1.95 @@ -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.92 2005/06/08 18:49:38 www Exp $ +# $Id: lonuserstate.pm,v 1.95 2005/07/15 12:29:07 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -73,6 +73,7 @@ sub versiontrack { sub putinversion { my $uri=shift; + my $key=$env{'request.course.id'}.'_'.&Apache::lonnet::clutter($uri); if ($hash{'version_'.$uri}) { my $version=$hash{'version_'.$uri}; if ($version eq 'mostrecent') { return $uri; } @@ -81,6 +82,7 @@ sub putinversion { { return $uri; } $uri=~s/\.(\w+)$/\.$version\.$1/; } + &Apache::lonnet::do_cache_new('courseresversion',$key,&Apache::lonnet::declutter($uri),600); return $uri; } @@ -126,6 +128,7 @@ sub loadmap { # Successfully got file, parse it my $parser = HTML::TokeParser->new(\$instr); + $parser->attr_encoded(1); my $token; my $linkpc=0; @@ -588,6 +591,7 @@ sub readmap { } # ----------------------------------------------- Close hashes to finally store # --------------------------------- Routine must pass this point, no early outs + $hash{'first_url'}=$retfurl; unless ((untie(%hash)) && (untie(%parmhash))) { &Apache::lonnet::logthis("WARNING: ". "Could not untie coursemap $fn for $uri.");