--- loncom/interface/lonsearchcat.pm 2001/03/15 14:31:05 1.15
+++ loncom/interface/lonsearchcat.pm 2001/03/15 19:38:49 1.31
@@ -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
@@ -416,55 +419,136 @@ sub selectbox {
return $selout.'';
}
+# ------------------------------------------------ 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 +620,14 @@ $persistent
Search Query
-Basic search: $expression
+Basic search: $ENV{'form.basicexp'}
Search Results
$compiledresult
RESULTS
-
- return OK;
+ }
}
1;