--- loncom/xml/lonxml.pm 2001/05/13 20:01:11 1.74 +++ loncom/xml/lonxml.pm 2001/05/13 21:40:32 1.75 @@ -642,8 +642,34 @@ sub warning { } } +#Should allow multiple definitions of the same tag name +sub register_insert2 { + my @data = split /\n/, &Apache::lonnet::getfile('/home/httpd/lonTabs/insertlist.tab'); + my $i; + my @order; + for ($i=0;$i < $#data; $i++) { + my $line = $data[$i]; + if ( $line =~ /^\#/ || $line =~ /^\s*\n/) { next; } + if ( $line =~ /TABLE/ ) { last; } + my ($tag,$descrip,$function,$show) = split(/,/, $line); + if ($show eq 'no') { next; } + $insertlist{"$i.tag"} = $tag; + $insertlist{"$i.description"} = $descrip; + $insertlist{"$i.function"} = $function; + } + for (;$i < $#data;$i++) { + my $line = $data[$i]; + my ($tag,@which) = split(/ +/,$line); + for (my $j=0;$j <$#which;$j++) { + if ( $which[$j] eq 'Y' ) { + push(@{ $insertlist{"$tag.which"} },$j); + } + } + } +} + sub register_insert { - my @data = split /\n/, &Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/insertlist.tab'); + my @data = split /\n/, &Apache::lonnet::getfile('/home/httpd/lonTabs/insertlist.tab'); my $i; my @order; for ($i=0;$i < $#data; $i++) {