--- loncom/interface/lonsearchcat.pm 2002/06/26 16:04:13 1.130 +++ loncom/interface/lonsearchcat.pm 2002/06/27 14:46:00 1.132 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.130 2002/06/26 16:04:13 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.132 2002/06/27 14:46:00 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -273,7 +273,7 @@ sub basic_search_form{ $hidden

Basic Search

-Enter terms or quoted phrases separated by AND, OR, or NOT +Enter terms or phrases separated by AND, OR, or NOT then press SEARCH below.

@@ -346,7 +346,7 @@ END

Advanced Catalog Search


-Enter terms or quoted phrases separated by search operators +Enter terms or phrases separated by search operators such as AND, OR, or NOT.
$advanced_buttons @@ -388,13 +388,37 @@ ENDHEADER $scrout.=&searchphrasefield('publisher
owner','owner', $ENV{'form.owner'}); $scrout.="\n"; -# $ENV{'form.mime'}='any' unless length($ENV{'form.mime'}); -# $scrout.=&selectbox('Limit by MIME type','mime', -# $ENV{'form.mime'}, -# 'any','Any type', -# \&{Apache::loncommon::filedescriptionex}, -# (&Apache::loncommon::fileextensions)); + $ENV{'form.category'}='any' unless length($ENV{'form.category'}); + $scrout.=&selectbox('File Category','category', + $ENV{'form.category'}, + 'any','Any category', + undef, + (&Apache::loncommon::filecategories())); $ENV{'form.language'}='any' unless length($ENV{'form.language'}); + # + # Allow restriction to multiple domains. + # I make the crazy assumption that there will never be a domain 'any'. + # + my @domains =&Apache::loncommon::get_domains(); + # adjust the size of the select box + my $size = 4; + my $size = (scalar @domains < ($size - 1) ? scalar @domains + 1 : $size); + # standalone machines do not get to choose a domain to search. + if ((scalar @domains) == 1) { + $scrout .=''."\n"; + } else { + $scrout.=''. + 'DOMAINS
'. + '\n"; + } + # + # + # $scrout.=&selectbox('Limit by language','language', $ENV{'form.language'},'any','Any Language', \&{Apache::loncommon::languagedescription}, @@ -667,7 +691,7 @@ sub selectbox { if (! defined($functionref)) { $functionref = sub { $_[0]}; } my $uctitle=uc($title); my $selout="\n".'

'. - ''.$uctitle.':
'; foreach ($anyvalue,@idlist) { $selout.='