--- loncom/interface/lonsearchcourse.pm 2024/02/11 23:03:13 1.12 +++ loncom/interface/lonsearchcourse.pm 2024/04/16 21:09:14 1.14 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Course # -# $Id: lonsearchcourse.pm,v 1.12 2024/02/11 23:03:13 raeburn Exp $ +# $Id: lonsearchcourse.pm,v 1.14 2024/04/16 21:09:14 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -151,8 +151,8 @@ sub course_search { (($listed eq 'absent') || ($listed eq 'grades'))); } } - my $symb=&make_symb($1); - &checkonthis($r,$1,$hash{$key},0,&Apache::lonnet::gettitle($symb), + my $symb=&make_symb($rid); + &checkonthis($r,$rid,$hash{$key},0,&Apache::lonnet::gettitle($symb), $fulltext,$symb,$target,@allwords); } } @@ -296,9 +296,9 @@ sub checkonthis { # Check also the dependencies of this one my $dependencies= &Apache::lonnet::metadata($url,'dependencies'); - foreach my $url (split(/\,/,$dependencies)) { - if (($url =~ /^\/res\//) && (!$alreadyseen{$id})) { - &checkonthis($r,$id,$url,$level+1,'',$fulltext,undef,$target,@allwords); + foreach my $item (split(/\,/,$dependencies)) { + if (($item =~ /^\/res\//) && (!$alreadyseen{$id})) { + &checkonthis($r,$id,$item,$level+1,'',$fulltext,undef,$target,@allwords); } } }