[LON-CAPA-cvs] cvs: loncom /interface lonindexer.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 29 Mar 2004 21:18:00 -0000
www Mon Mar 29 16:18:00 2004 EDT
Modified files:
/loncom/interface lonindexer.pm
Log:
Now correctly registers open/close for sequences. Work on listing next.
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.95 loncom/interface/lonindexer.pm:1.96
--- loncom/interface/lonindexer.pm:1.95 Sun Mar 28 16:01:06 2004
+++ loncom/interface/lonindexer.pm Mon Mar 29 16:18:00 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.95 2004/03/28 21:01:06 www Exp $
+# $Id: lonindexer.pm,v 1.96 2004/03/29 21:18:00 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -592,7 +592,7 @@
$curdir = $startdir;
}
my $diropen = 'closed';
- if (($dirptr&$testdir) or ($dom =~ /^(domain|user)$/) || ($compuri=~/\.(sequence|page)$/)) {
+ if (($dirptr&$testdir) or ($dom =~ /^(domain|user)$/) or ($compuri=~/\.(sequence|page)\/$/)) {
while (my ($key,$val)= each %dupdirs) {
if ($key eq $compuri and $val eq "open") {
$diropen = "opened";
@@ -671,7 +671,7 @@
next if ($unpackline[0] eq '..');
my @filecom = split (/\./,$unpackline[0]);
my $fext = pop(@filecom);
- my $fnptr = $unpackline[3]&$dirptr;
+ my $fnptr = ($unpackline[3]&$dirptr) || ($fext=~/\.(page|sequence)$/);
if ($fnptr == 0 and $unpackline[3] ne "") {
my $embstyle = &Apache::loncommon::fileembstyle($fext);
push @trimlist,$line if (defined($embstyle) &&