version 1.235, 2004/12/17 21:44:19
|
version 1.237.2.1, 2005/04/01 20:01:32
|
Line 445 sub hidden_field {
|
Line 445 sub hidden_field {
|
{ # Scope the course search to avoid global variables |
{ # Scope the course search to avoid global variables |
# |
# |
# Variables For course search |
# Variables For course search |
|
my %alreadyseen; |
my %hash; |
my %hash; |
my $totalfound; |
my $totalfound; |
|
|
Line 463 sub course_search {
|
Line 464 sub course_search {
|
my $pretty_search_string = '<b>'.$ENV{'form.courseexp'}.'</b>'; |
my $pretty_search_string = '<b>'.$ENV{'form.courseexp'}.'</b>'; |
my $search_string = $ENV{'form.courseexp'}; |
my $search_string = $ENV{'form.courseexp'}; |
my @New_Words; |
my @New_Words; |
|
undef(%alreadyseen); |
if ($ENV{'form.crsrelated'}) { |
if ($ENV{'form.crsrelated'}) { |
($search_string,@New_Words) = &related_version($ENV{'form.courseexp'}); |
($search_string,@New_Words) = &related_version($ENV{'form.courseexp'}); |
if (@New_Words) { |
if (@New_Words) { |
Line 581 sub course_search {
|
Line 583 sub course_search {
|
|
|
sub checkonthis { |
sub checkonthis { |
my ($r,$id,$url,$level,$title,$fulltext,$symb,@allwords)=@_; |
my ($r,$id,$url,$level,$title,$fulltext,$symb,@allwords)=@_; |
|
$alreadyseen{$id}=1; |
|
if (&Apache::loncommon::connection_aborted($r)) { return; } |
$r->rflush(); |
$r->rflush(); |
|
|
my $result=$title.' '; |
my $result=$title.' '; |
Line 622 sub checkonthis {
|
Line 626 sub checkonthis {
|
my $dependencies= |
my $dependencies= |
&Apache::lonnet::metadata($url,'dependencies'); |
&Apache::lonnet::metadata($url,'dependencies'); |
foreach (split(/\,/,$dependencies)) { |
foreach (split(/\,/,$dependencies)) { |
if (($_=~/^\/res\//)) { |
if (($_=~/^\/res\//) && (!$alreadyseen{$id})) { |
&checkonthis($r,$id,$_,$level+1,'',$fulltext,undef,@allwords); |
&checkonthis($r,$id,$_,$level+1,'',$fulltext,undef,@allwords); |
} |
} |
} |
} |
Line 2465 END
|
Line 2469 END
|
delete ($Server_status{$server}); |
delete ($Server_status{$server}); |
next; |
next; |
} |
} |
$status=~/^([\.\w]+)$/; |
$status=~s|/||g; |
my $datafile=$r->dir_config('lonDaemons').'/tmp/'.$1; |
my $datafile=$r->dir_config('lonDaemons').'/tmp/'.$status; |
if (-e $datafile && ! -e "$datafile.end") { |
if (-e $datafile && ! -e "$datafile.end") { |
&update_status($r,&mt('Receiving results from [_1]',$server)); |
&update_status($r,&mt('Receiving results from [_1]',$server)); |
next; |
next; |