--- rat/lonambiguous.pm 2005/02/17 09:09:57 1.14 +++ rat/lonambiguous.pm 2005/03/01 00:22:57 1.15 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to resolve ambiguous file locations # -# $Id: lonambiguous.pm,v 1.14 2005/02/17 09:09:57 albertel Exp $ +# $Id: lonambiguous.pm,v 1.15 2005/03/01 00:22:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -93,7 +93,7 @@ sub handler { my $resid=$2; my $resurl=$bighash{'src_'.$mapid.'.'.$resid}; &Apache::lonnet::symblist($bighash{'map_id_'.$mapid}, - $resurl => $resid); + $resurl => [$resurl,$resid]); untie(%bighash); $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$resurl); @@ -130,13 +130,13 @@ sub handler { # ---------------------------------------------------------- There was an entry if ($syval) { - - if ($syval=~/\_$/) { + my ($page,undef,$res)=&Apache::lonnet::decode_symb($syval); + if ($res eq 'page') { # ----------------------------------- Okay, this should have appeared on a page - $syval=~s/\_\_\_$//; &Apache::loncommon::content_type($r,'text/html'); $r->header_out(Location => - 'http://'.$ENV{'HTTP_HOST'}.'/res/'.$syval); + 'http://'.$ENV{'HTTP_HOST'}. + &Apache::lonnet::clutter($page)); return REDIRECT; } else { # There is not really a problem (???), but cannot go back without endless loop