--- loncom/interface/lonnavmaps.pm 2006/05/15 23:40:54 1.383 +++ loncom/interface/lonnavmaps.pm 2006/05/30 12:46:09 1.384 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.383 2006/05/15 23:40:54 albertel Exp $ +# $Id: lonnavmaps.pm,v 1.384 2006/05/30 12:46:09 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,6 +40,8 @@ use Apache::lonnet; use POSIX qw (floor strftime); use Data::Dumper; # for debugging, not always use Time::HiRes qw( gettimeofday tv_interval ); +use lib '/home/httpd/lib/perl/'; +use LONCAPA; # symbolic constants sub SYMB { return 1; } @@ -469,14 +471,14 @@ sub getLinkForResource { my $anchor; if ($res->is_page()) { foreach (@$stack) { if (defined($_)) { $anchor = $_; } } - $anchor=&Apache::lonnet::escape($anchor->shown_symb()); + $anchor=&escape($anchor->shown_symb()); return ($res->link(),$res->shown_symb(),$anchor); } # in case folder was skipped over as "only sequence" my ($map,$id,$src)=&Apache::lonnet::decode_symb($res->symb()); if ($map=~/\.page$/) { my $url=&Apache::lonnet::clutter($map); - $anchor=&Apache::lonnet::escape($src->shown_symb()); + $anchor=&escape($src->shown_symb()); return ($url,$res->shown_symb(),$anchor); } } @@ -1122,9 +1124,9 @@ sub render_resource { removeFromFilter($filter, $mapId); $linkopen .= "&condition=" . $it->{CONDITION} . '&hereType=' . $params->{'hereType'} . '&here=' . - &Apache::lonnet::escape($params->{'here'}) . + &escape($params->{'here'}) . '&jump=' . - &Apache::lonnet::escape($resource->symb()) . + &escape($resource->symb()) . "&folderManip=1\">"; } else { @@ -1176,7 +1178,7 @@ sub render_resource { !$params->{'condensed'}) { my $displaypart=$resource->part_display($part); $partLabel = " (".&mt('Part: [_1]', $displaypart).")"; - if ($link!~/\#/) { $link.='#'.&Apache::lonnet::escape($part); } + if ($link!~/\#/) { $link.='#'.&escape($part); } $title = ""; } @@ -1220,7 +1222,7 @@ sub render_communication_status { foreach (split(/\,/, $feedback)) { if ($_) { $feedbackHTML .= ' ' + . &escape($_) . '">' . ''; } @@ -1235,7 +1237,7 @@ sub render_communication_status { if ($_) { $errorcount++; $errorHTML .= ' ' + . &escape($_) . '">' . ''; } @@ -1608,11 +1610,11 @@ sub render { my ($link,$text); if ($condition) { $link='"navmaps?condition=0&filter=&'.$queryString. - '&here='.&Apache::lonnet::escape($here).'"'; + '&here='.&escape($here).'"'; $text='Close all folders'; } else { $link='"navmaps?condition=1&filter=&'.$queryString. - '&here='.&Apache::lonnet::escape($here).'"'; + '&here='.&escape($here).'"'; $text='Open all folders'; } if ($args->{'caller'} eq 'navmapsdisplay') { @@ -1923,7 +1925,7 @@ END my $srcHasQuestion = $src =~ /\?/; $args->{"resourceLink"} = $src. ($srcHasQuestion?'&':'?') . - 'symb=' . &Apache::lonnet::escape($symb).$anchor; + 'symb=' . &escape($symb).$anchor; } # Now, we've decided what parts to show. Loop through them and # show them. @@ -2228,7 +2230,7 @@ sub generate_email_discuss_status { foreach my $msgid (@keys) { if ((!$emailstatus{$msgid}) || ($emailstatus{$msgid} eq 'new')) { my $plain= - &Apache::lonnet::unescape(&Apache::lonnet::unescape($msgid)); + &LONCAPA::unescape(&LONCAPA::unescape($msgid)); if ($plain=~/ \[([^\]]+)\]\:/) { my $url=$1; if ($plain=~/\:Error \[/) { @@ -4164,7 +4166,7 @@ email data was not extracted when the na used like this: for (split(/\,/, $res->getFeedback())) { - my $link = &Apache::lonnet::escape($_); + my $link = &escape($_); ... and use the link as appropriate.