--- loncom/interface/lonnavmaps.pm 2004/02/24 16:09:30 1.248 +++ loncom/interface/lonnavmaps.pm 2004/03/05 21:51:50 1.250 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.248 2004/02/24 16:09:30 www Exp $ +# $Id: lonnavmaps.pm,v 1.250 2004/03/05 21:51:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -297,7 +297,8 @@ sub getLinkForResource { # in case folder was skipped over as "only sequence" my ($map,$id,$src)=&Apache::lonnet::decode_symb($res->symb()); if ($map=~/\.page$/) { - return &Apache::lonnet::clutter($map); + return &Apache::lonnet::clutter($map).'#'. + &Apache::lonnet::escape(&Apache::lonnet::declutter($src)); } } } @@ -1539,11 +1540,15 @@ sub render { my $filter = $it->{FILTER}; my $stack = $it->getStack(); my $src = getLinkForResource($stack); - + my $anchor=''; + if ($src=~s/(\#.*$)//) { + $anchor=$1; + } my $srcHasQuestion = $src =~ /\?/; $args->{"resourceLink"} = $src. ($srcHasQuestion?'&':'?') . - 'symb=' . &Apache::lonnet::escape($curRes->symb()); + 'symb=' . &Apache::lonnet::escape($curRes->symb()). + $anchor; # Now, display each column. foreach my $col (@$cols) { @@ -3170,7 +3175,7 @@ sub is_page { sub is_problem { my $self=shift; my $src = $self->src(); - return ($src =~ /problem$/); + return ($src =~ /\.(problem|exam|quiz|assess|survey|form|library)$/); } sub is_sequence { my $self=shift;