--- loncom/interface/lonsearchcat.pm 2001/10/16 17:12:51 1.101 +++ loncom/interface/lonsearchcat.pm 2001/10/17 03:31:34 1.102 @@ -7,8 +7,7 @@ # Scott Harrison: 03/12/2001, 03/13/2001, 03/14/2001, 03/15/2001, 03/19/2001 # Scott Harrison: 03/20/2001, 03/21/2001, 03/22/2001, 03/26/2001, 03/27/2001 # Scott Harrison: 04/02/2001, 08/15/2001, 08/24/2001, 08/25/2001 -# 10/12,10/14,10/15 Scott Harrison - +# 10/12,10/14,10/15,10/16 Scott Harrison ############################################################################### ## ## ## ORGANIZATION OF THIS PERL MODULE ## @@ -917,7 +916,7 @@ sub output_results { my %ENV=%{$envhash}; my %rhash=%{$replyref}; my $compiledresult=''; - my $timeremain=30; + my $timeremain=300; my $elapsetime=0; my $resultflag=0; my $tflag=1; @@ -982,6 +981,11 @@ SCRIPT 'scrollbars=1,width=400,height=300'); openhelpwin.focus(); } + function abortsearch(val) { + openhelpwin=open('/adm/help/searchcat.html','helpscreen', + 'scrollbars=1,width=400,height=300'); + openhelpwin.focus(); + } SCRIPT $r->rflush(); @@ -1090,7 +1094,7 @@ RESULTS '<'+'br />'+ ' <'+'input type="button" name="button"'+ ' value="abort search and view current results" '+ - ' />'+ + ' onClick="javascript:opener.abortsearch()" />'+ ' <'+'input type="button" name="button"'+ ' value="help" onClick="javascript:opener.openhelp()" />'+ '<'+'/tt>'+ @@ -1102,10 +1106,15 @@ ENDPOP $r->rflush(); my $servercount=0; - $sn=0; my $hitcountsum=0; - foreach my $rkey (sort keys %rhash) { + my $bloop=$servernum; + my %orkey; + BLOOP: while(1) { + my $sn=0; + last BLOOP unless $bloop; + RLOOP: foreach my $rkey (sort keys %rhash) { $sn++; + next RLOOP if $orkey{$rkey}; $servercount++; $tflag=1; $compiledresult=''; @@ -1121,6 +1130,8 @@ ENDPOP 'src="/adm/lonIcons/srvbad.gif";'. "\n"); $r->rflush(); + $bloop--; + $orkey{$rkey}=1; } else { $reply=~/^([\.\w]+)$/; # must do since 'use strict' checks for tainting @@ -1142,8 +1153,10 @@ ENDPOP $r->rflush(); $tflag=0; } - last WLOOP if $temp>5; + last WLOOP if $temp>1; if (-e "$replyfile.end") { + $bloop--; + $orkey{$rkey}=1; if (-s $replyfile) { $r->print('