--- loncom/lonnet/perl/lonnet.pm 2000/11/27 23:10:18 1.72 +++ loncom/lonnet/perl/lonnet.pm 2000/11/28 02:48:25 1.73 @@ -61,6 +61,8 @@ # an array of IDs # idrget(domain,array): returns hash with IDs for usernames (name=>id,...) for # an array of names +# metadata(file,entry): returns the metadata entry for a file. entry='keys' +# returns a comma separated list of keys # # 6/1/99,6/2,6/10,6/11,6/12,6/14,6/26,6/28,6/29,6/30, # 7/1,7/2,7/9,7/10,7/12,7/14,7/15,7/19, @@ -1475,9 +1477,11 @@ sub EXT { sub metadata { my ($uri,$what)=@_; $uri=&declutter($uri); - unless ($uri=~/\.meta$/) { $uri.='.meta'; } + my $filename=$uri; + $uri=~s/\.meta$//; unless ($metacache{$uri.':keys'}) { - my $metastring=&getfile($perlvar{'lonDocRoot'}.'/res/'.$uri); + unless ($filename=~/\.meta$/) { $filename.='.meta'; } + my $metastring=&getfile($perlvar{'lonDocRoot'}.'/res/'.$filename); my $parser=HTML::TokeParser->new(\$metastring); my $token; while ($token=$parser->get_token) {