--- rat/lonuserstate.pm 2003/03/01 15:13:59 1.54 +++ rat/lonuserstate.pm 2003/03/25 22:50:14 1.57 @@ -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.54 2003/03/01 15:13:59 www Exp $ +# $Id: lonuserstate.pm,v 1.57 2003/03/25 22:50:14 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -97,7 +97,7 @@ sub loadmap { my $instr=&Apache::lonnet::getfile($fn); - unless ($instr == -1) { + unless ($instr eq -1) { # Successfully got file, parse it @@ -377,11 +377,11 @@ sub accinit { my $resid=$_; my $uri=$hash{'src_'.$resid}; $uri=~s/^\/adm\/wrapper//; + $uri=&Apache::lonnet::declutter($uri); my @uriparts=split(/\//,$uri); my $urifile=$uriparts[$#uriparts]; $#uriparts--; my $uripath=join('/',@uriparts); - $uripath=&Apache::lonnet::declutter($uripath); if ($uripath) { my $uricond='0'; if (defined($hash{'conditions_'.$resid})) { @@ -389,7 +389,7 @@ sub accinit { } if (defined($acchash{'acc.res.'.$short.'.'.$uripath})) { if ($acchash{'acc.res.'.$short.'.'.$uripath}=~ - /(\&$urifile\:[^\&]*)/) { + /(\&\Q$urifile\E\:[^\&]*)/) { my $replace=$1; my $regexp=$replace; $regexp=~s/\|/\\\|/g;