--- loncom/xml/lonxml.pm 2001/12/14 22:59:34 1.141 +++ loncom/xml/lonxml.pm 2001/12/21 22:44:06 1.142 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.141 2001/12/14 22:59:34 albertel Exp $ +# $Id: lonxml.pm,v 1.142 2001/12/21 22:44:06 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -74,14 +74,13 @@ sub register { sub deregister { my ($space,@taglist) = @_; - &printalltags(); foreach my $temptag (@taglist) { my $tempspace = $Apache::lonxml::alltags{$temptag}[-1]; if ($tempspace eq $space) { pop(@{ $Apache::lonxml::alltags{$temptag} }); } } - &printalltags(); + #&printalltags(); } use Apache::Constants qw(:common); @@ -926,14 +925,14 @@ sub newparser { sub parstring { my ($token) = @_; my $temp=''; - map { + foreach (@{$token->[3]}) { unless ($_=~/\W/) { my $val=$token->[2]->{$_}; $val =~ s/([\%\@\\])/\\$1/g; #if ($val =~ m/^[\%\@]/) { $val="\\".$val; } $temp .= "my \$$_=\"$val\";" } - } @{$token->[3]}; + } return $temp; } @@ -946,10 +945,10 @@ sub writeallows { my $thisdir=$thisurl; $thisdir=~s/\/[^\/]+$//; my %httpref=(); - map { + foreach (@extlinks) { $httpref{'httpref.'. &Apache::lonnet::hreflocation($thisdir,$_)}=$thisurl; - } @extlinks; + } @extlinks=(); &Apache::lonnet::appenv(%httpref); } @@ -959,7 +958,7 @@ sub writeallows { # sub afterburn { my $result=shift; - map { + foreach (split(/&/,$ENV{'QUERY_STRING'})) { my ($name, $value) = split(/=/,$_); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; @@ -968,22 +967,22 @@ sub afterburn { $ENV{'form.'.$name}=$value; } } - } (split(/&/,$ENV{'QUERY_STRING'})); + } if ($ENV{'form.highlight'}) { - map { + foreach (split(/\,/,$ENV{'form.highlight'})) { my $anchorname=$_; my $matchthis=$anchorname; $matchthis=~s/\_+/\\s\+/g; $result=~s/($matchthis)/\$1\<\/font\>/gs; - } split(/\,/,$ENV{'form.highlight'}); + } } if ($ENV{'form.link'}) { - map { + foreach (split(/\,/,$ENV{'form.link'})) { my ($anchorname,$linkurl)=split(/\>/,$_); my $matchthis=$anchorname; $matchthis=~s/\_+/\\s\+/g; $result=~s/($matchthis)/\$1\<\/a\>/gs; - } split(/\,/,$ENV{'form.link'}); + } } if ($ENV{'form.anchor'}) { my $anchorname=$ENV{'form.anchor'};