version 1.230.2.1, 2005/01/19 20:22:36
|
version 1.230.2.2, 2005/02/02 21:27:28
|
Line 444 sub hidden_field {
|
Line 444 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 462 sub course_search {
|
Line 463 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 504 sub course_search {
|
Line 506 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 550 sub checkonthis {
|
Line 554 sub checkonthis {
|
# Check also the dependencies of this one |
# Check also the dependencies of this one |
my $dependencies= |
my $dependencies= |
&Apache::lonnet::metadata($url,'dependencies'); |
&Apache::lonnet::metadata($url,'dependencies'); |
foreach (split(/\,/,$dependencies)) { |
foreach (split(/\,/,$dependencies) && (!$alreadyseen{$id})) { |
if (($_=~/^\/res\//)) { |
if (($_=~/^\/res\//)) { |
&checkonthis($r,$id,$_,$level+1,'',$fulltext,undef,@allwords); |
&checkonthis($r,$id,$_,$level+1,'',$fulltext,undef,@allwords); |
} |
} |