--- loncom/interface/lonindexer.pm 2004/01/29 00:45:12 1.89 +++ loncom/interface/lonindexer.pm 2004/02/05 03:42:52 1.90 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.89 2004/01/29 00:45:12 www Exp $ +# $Id: lonindexer.pm,v 1.90 2004/02/05 03:42:52 taceyjo1 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -164,7 +164,7 @@ END # selection is made. # $element is the name of the element in $formname which receives # the URL. - # &Apache::lonxml::debug('Checking mode, form, element'); + &Apache::lonxml::debug('Checking mode, form, element'); &setvalues(\%hash,'form.mode' ,\%ENV,'form.mode' ); &setvalues(\%hash,'form.form' ,\%ENV,'form.form' ); &setvalues(\%hash,'form.element' ,\%ENV,'form.element'); @@ -187,8 +187,7 @@ END $element = $ENV{'form.element'}; $titleelement = $ENV{'form.titleelement'}; } - &Apache::lonxml::debug("mode=$mode form=$form element=$element - titleelement=$titleelement"); + #&Apache::lonxml::debug("mode=$mode form=$form element=$element titleelement=$titleelement"); # ------ set catalogmodefunctions to have extra needed javascript functionality my $catalogmodefunctions=''; if ($ENV{'form.catalogmode'} eq 'interactive' or @@ -562,14 +561,15 @@ sub scanDir { my $c = $r->connection(); my ($compuri,$curdir); my $dirptr=16384; + my $obs; $indent++; - my %dupdirs = %dirs; my @list=&get_list($r,$startdir); foreach my $line (@list) { return if ($c->aborted()); - my ($strip,$dom,undef,$testdir,undef)=split(/\&/,$line,5); - next if $strip =~ /.*\.meta$/; + #This is a kludge, sorry aboot this + my ($strip,$dom,undef,$testdir,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,$obs)=split(/\&/,$line,15); + next if($strip =~ /.*\.meta$/ | $obs eq '1'); my (@fileparts) = split(/\./,$strip); if ($hash{'display_attrs_9'} != 1) { if (scalar(@fileparts) >= 3) { @@ -622,7 +622,8 @@ sub get_list { @list = &Apache::lonnet::dirlist($uri); $hash{'dirlist_files_'.$luri} = join("\n",@list); } - return @list=&match_ext($r,@list); + @list=&match_ext($r,@list); + return @list; } sub initdebug { @@ -694,7 +695,6 @@ sub display_line { my $tabtag=''; my $i=0; - while ($i<=8) { $tabtag=join('',$tabtag," ") if $hash{'display_attrs_'.$i} == 1; @@ -782,7 +782,6 @@ sub display_line { # display file if ($fnptr == 0 and $filecom[3] ne '') { my $filelink = $startdir.$filecom[0]; - next if &Apache::lonnet::metadata($filelink,'obsolete'); my @file_ext = split (/\./,$listname); my $curfext = $file_ext[-1]; if (@Omit) { @@ -813,8 +812,8 @@ sub display_line { } elsif ($ENV{'form.catalogmode'} eq 'groupimport') { $title=$listname; - $title = &Apache::lonnet::metadata($filelink,'title') - if ($metafile == 1); + #$title = &Apache::lonnet::metadata($filelink,'title') + #if ($metafile == 1); $title=$listname unless $title; my $titleesc=&HTML::Entities::encode($title); $r->print("
\n");