--- loncom/interface/lonsearchcat.pm 2001/03/15 14:20:13 1.14
+++ loncom/interface/lonsearchcat.pm 2001/03/15 19:23:10 1.25
@@ -77,7 +77,10 @@ END
}
if ($ENV{'form.basicsubmit'} eq 'SEARCH') {
- return &basicsearch($r,$ENV{'form.basicexp'});
+ return &basicsearch($r,\%ENV);
+ }
+ elsif ($ENV{'form.advancedsubmit'} eq 'SEARCH') {
+ return &advancedsearch($r,\%ENV);
}
$scrout=''; # building a part of screen output
@@ -178,7 +181,7 @@ For author-specific metadata, enter in a
CUSTOMMETADATA
$scrout.=&simpletextfield('custommetadata',$ENV{'form.custommetadata'});
-$scrout.='initial users of this system do not need to worry about this option';
+$scrout.=' initial users of this system do not need to worry about this option';
# ---------------------------------------------------------------- Print screen
$r->print(<';
}
+# ------------------------------------------------ Performing a advanced search
+sub advancedsearch {
+ my ($r,$envhash)=@_;
+ my %ENV=%{$envhash};
+
+ $r->print(<
+END
+ }
+ } (keys %ENV);
- my $replyfile='';
- $reply=~/^([\.\w]+)$/; # must do since 'use strict' checks for tainting
- $replyfile=$r->dir_config('lonDaemons').'/tmp/'.$1;
- $reply=~/(.*?)\_/;
- my $hostname=$1;
-
- {
- while (1) {
- last if -e $replyfile;
- sleep 1;
+ $r->print(<
+
+The LearningOnline Network with CAPA
+BEGINNING
+ $r->print(<
+
+
+Search Catalog
+
END
-}
+ }
- unless ($compiledresult) {
- $compiledresult="There were no results that matched your query";
- }
+ unless ($compiledresult) {
+ $compiledresult="There were no results that matched your query";
+ }
- # make query information persistent to allow for subsequent revision
- my $persistent='';
- map {
- if (/^form\./ && !/submit/) {
- my $name=$_;
- my $key=$name;
- $name=~s/^form\.//;
- $persistent.=<
END
- }
- } (keys %ENV);
+ }
+ } (keys %ENV);
- $r->print(<print(<
The LearningOnline Network with CAPA
BEGINNING
- $r->print(<
SCRIPT
- $r->print(<print(<
@@ -536,15 +609,14 @@ $persistent
Search Query
-Basic search: $expression
+Basic search: $ENV{'form.basicexp'}
Search Results
$compiledresult
RESULTS
-
- return OK;
+ }
}
1;