--- loncom/interface/lonsearchcat.pm 2001/08/26 21:19:35 1.98
+++ loncom/interface/lonsearchcat.pm 2001/08/28 12:12:38 1.100
@@ -335,7 +335,7 @@ LASTREVISIONDATEEND
LIMIT BY SPECIAL METADATA FIELDS:
For resource-specific metadata, enter in an expression in the form of
-key=value separated by operators such as AND or OR.
+key=value separated by operators such as AND, OR or NOT. Example: grandmother=75 OR grandfather=85
CUSTOMMETADATA
@@ -358,6 +358,13 @@ $scrout.=' initial users of this syst
The LearningOnline Network with CAPA
+
@@ -368,7 +375,7 @@ $hidden
Basic Search
Enter terms or phrases separated by search operators
-such as AND or OR then press SEARCH below. Terms should be specific
+such as AND, OR, or NOT then press SEARCH below. Terms should be specific
to the title, author, subject, notes, or abstract information associated
with a resource.
@@ -385,6 +392,7 @@ ENDDOCUMENT
$closebutton
$basicviewselect
+
Advanced Search
@@ -394,6 +402,7 @@ $scrout
$closebutton
$advancedviewselect
+
@@ -451,7 +460,7 @@ sub searchphrasefield {
my ($title,$name,$value)=@_;
my $instruction=<$uctitle:".
@@ -904,7 +913,7 @@ BEGINNING
# conditional output of script functions dependent on the mode in
# which the search was invoked
$r->print(<
SCRIPT
$r->print(<
SCRIPT
- $r->print(<
SCRIPT
$r->rflush();
@@ -998,27 +1012,28 @@ RESULTS
$grid.="javascript:opener.displayinfo('+";
# "'"+'key
$grid.="\"'\"+'";
- $grid.=$sk." domain=".$hostdomains{$sk};
+ $grid.=$sk;
my $hc;
if ($rhash{$sk} eq 'con_lost') {
$hc="!!!BAD CONNECTION, CONTACT SYSTEM ADMINISTRATOR!!!";
}
else {
$hc="'+\"'\"+\"+hc['$sk']+\"+\"'\"+'";
- $hcinit.="hc[\"$sk\"]=0;";
+ $hcinit.="hc[\"$sk\"]=\"not yet connected...\";";
}
$grid.=" hitcount=".$hc;
+ $grid.=" domain=".$hostdomains{$sk};
$grid.=" IP=".$hostips{$sk};
# '+"'"+'">'+
$grid.="'+\"'\"+')\">'+";
$grid.="\n";
$grid.="''+\n";
+ " src=\"/adm/lonIcons/srvnull.gif\" alt=\"".$sk."\" />'+\n";
$grid.="' '+\n" unless $sn%10;
$sn++;
}
$r->print(<
+');
- $r->rflush();
my $servercount=0;
$sn=0;
my $hitcountsum=0;
@@ -1080,19 +1087,17 @@ ENDPOP
$tflag=1;
$compiledresult='';
my $hostname=$rkey;
- $r->print(''."\n");
- $r->rflush();
my $reply=$rhash{$rkey};
my @results;
my $replyfile='';
if ($reply eq 'con_lost') {
- my $percent=sprintf('%3.0f',($servercount/$servernum*100));
- $r->print('');
+ $r->print(''.
+ "\n");
+ $r->rflush();
}
else {
$reply=~/^([\.\w]+)$/; # must do since 'use strict' checks for tainting
@@ -1102,12 +1107,14 @@ ENDPOP
my $temp=0;
WLOOP: while (1) {
if (-e $replyfile && $tflag) {
- $r->print(''.
+ $r->print(''.
"\n");
$r->rflush();
- $r->print(''.
+ $r->print(''.
"\n");
$r->rflush();
$tflag=0;
@@ -1115,9 +1122,10 @@ ENDPOP
last WLOOP if $temp>5;
if (-e "$replyfile.end") {
if (-s $replyfile) {
- $r->print(''.
- "\n");
+ $r->print(''."\n");
$r->rflush();
my $fh=Apache::File->new($replyfile) or
($r->print('ERROR: file '.
@@ -1125,32 +1133,50 @@ ENDPOP
return OK);
@results=<$fh> if $fh;
$hitcount{$rkey}=@results+0;
- $r->print(''.
"\n");
$r->rflush();
$hitcountsum+=$hitcount{$rkey};
- $r->print(''.
"\n");
$r->rflush();
}
+ else {
+ $r->print(''.
+ "\n");
+ $r->rflush();
+ $r->print(''.
+ "\n");
+ $r->rflush();
+ }
last WLOOP;
}
last WLOOP unless $timeremain;
sleep 1;
$timeremain--;
$elapsetime++;
- $r->print(''."\n");
- $r->rflush();
- $r->print(''."\n");
$r->rflush();
$temp++;
}
}
+ $r->print(''."\n");
+ $r->rflush();
}
my $customshow='';
my $extrashow='';
@@ -1258,14 +1284,11 @@ END
$compiledresult
RESULTS
my $percent=sprintf('%3.0f',($servercount/$servernum*100));
- $r->print(''."\n");
}
unless ($resultflag) {
$r->print("\nThere were no results that matched your query\n");
}
-# $r->print(''."\n"); $r->rflush();
+# $r->print(''."\n"); $r->rflush();
$r->print(<