--- loncom/lonnet/perl/lonnet.pm 2001/03/20 21:33:37 1.110 +++ loncom/lonnet/perl/lonnet.pm 2001/03/22 16:13:22 1.115 @@ -3,8 +3,9 @@ # # Functions for use by content handlers: # -# metadata_query(sql-query-string) : returns file handle of where sql -# results will be stored for query +# metadata_query(sql-query-string,custom-metadata-regex) : +# returns file handle of where sql and +# regex results will be stored for query # plaintext(short) : plain text explanation of short term # fileembstyle(ext) : embed style in page for file extension # filedescription(ext) : descriptor text for file extension @@ -92,6 +93,7 @@ # 3/2 Gerd Kortemeyer # 3/15 Scott Harrison # 3/19,3/20 Gerd Kortemeyer +# 3/22 Scott Harrison package Apache::lonnet; @@ -1241,6 +1243,17 @@ sub definerole { # ---------------- Make a metadata query against the network of library servers sub metadata_query { + my ($query,$custom)=@_; + # need to put in a loop here and return list + unless ($custom) { + my $reply=&reply("querysend:".&escape($query),'msul3'); + return $reply; + } + else { + my $reply=&reply("querysend:".&escape($query).':'. + &escape($custom),'msul3'); + return $reply; + } my ($query)=@_; my $reply=&reply("querysend:".&escape($query),'msul3'); }