--- loncom/interface/lonsearchcat.pm 2002/06/24 15:26:28 1.127 +++ loncom/interface/lonsearchcat.pm 2002/06/25 15:08:59 1.129 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.127 2002/06/24 15:26:28 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.129 2002/06/25 15:08:59 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -67,14 +67,14 @@ search (on a server basis) is displayed ############################################################################### ############################################################################### +############################################################################### ## ## ## ORGANIZATION OF THIS PERL MODULE ## ## ## ## 1. Modules used by this module ## -## 2. Choices for different output views (detailed, summary, xml, etc) ## -## 3. BEGIN block (to be run once after compilation) ## -## 4. Handling routine called via Apache and mod_perl ## -## 5. Other subroutines ## +## 2. Variables used throughout the module ## +## 3. handler subroutine called via Apache and mod_perl ## +## 4. Other subroutines ## ## ## ############################################################################### @@ -273,7 +273,8 @@ sub basic_search_form{ $hidden

Basic Search

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

@@ -322,6 +323,23 @@ Returns a scalar which holds html for th sub advanced_search_form{ my ($closebutton,$hidden) = @_; + my $advanced_buttons = <<"END"; +

+ + +$closebutton + + + + +

+END my $scrout=<<"ENDHEADER"; @@ -336,34 +354,44 @@ sub advanced_search_form{ -

Search Catalog

- -$hidden +

Advanced Catalog Search


-

Advanced Search

+Enter terms or quoted phrases separated by search operators +such as AND, OR, or NOT.
+$advanced_buttons +$hidden +
ENDHEADER - $scrout.=&searchphrasefield('Limit by title','title', + $scrout.=&searchphrasefield('title','title', $ENV{'form.title'}); - $scrout.=&searchphrasefield('Limit by author','author', + $scrout.=&searchphrasefield('author','author', $ENV{'form.author'}); - $scrout.=&searchphrasefield('Limit by subject','subject', + $scrout.=&searchphrasefield('subject','subject', $ENV{'form.subject'}); - $scrout.=&searchphrasefield('Limit by keywords','keywords', + $scrout.=&searchphrasefield('keywords','keywords', $ENV{'form.keywords'}); - $scrout.=&searchphrasefield('Limit by URL','url', + $scrout.=&searchphrasefield('URL','url', $ENV{'form.url'}); # $scrout.=&searchphrasefield('Limit by version','version', # $ENV{'form.version'}); - $scrout.=&searchphrasefield('Limit by notes','notes', + $scrout.=&searchphrasefield('notes','notes', $ENV{'form.notes'}); - $scrout.=&searchphrasefield('Limit by abstract','abstract', + $scrout.=&searchphrasefield('abstract','abstract', $ENV{'form.abstract'}); - $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)); + # Hack - an empty table row. + $scrout.="\n"; + $scrout.=&searchphrasefield('file
extension','mime', + $ENV{'form.mime'}); + $scrout.="\n"; + $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.language'}='any' unless length($ENV{'form.language'}); $scrout.=&selectbox('Limit by language','language', $ENV{'form.language'},'any','Any Language', @@ -410,8 +438,6 @@ LASTREVISIONDATEEND $ENV{'form.lastrevisiondateend_year'}, ); $scrout.='

'; - $scrout.=&searchphrasefield('Limit by publisher/owner','owner', - $ENV{'form.owner'}); $ENV{'form.copyright'}='any' unless length($ENV{'form.copyright'}); $scrout.=&selectbox('Limit by copyright/distribution','copyright', $ENV{'form.copyright'}, @@ -440,21 +466,7 @@ in a fielded listing for each record res CUSTOMSHOW $scrout.=&simpletextfield('customshow',$ENV{'form.customshow'}); $scrout.=< - - -$closebutton - - - - -

+$advanced_buttons @@ -534,7 +546,46 @@ the day, month, and year. =item &selectbox() -Returns html selection form. +Returns a scalar containing an html tag. + +=item $default + +The default value of the form. Can be $anyvalue or in @idlist. + +=item $anyvalue + +The