--- loncom/interface/lonindexer.pm 2001/06/26 21:11:18 1.12
+++ loncom/interface/lonindexer.pm 2001/08/08 03:00:11 1.16
@@ -1,6 +1,8 @@
# The LearningOnline Network with CAPA
+#
# Directory Indexer
# (Login Screen
+#
# 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14 Gerd Kortemeyer)
# 11/23 Gerd Kortemeyer
# 07/20-08/04 H.K. Ng
@@ -13,6 +15,8 @@
# 06/02/2001 Scott Harrison
# 06/15/2001 Scott Harrison
# 06/26/2001 H. K. Ng
+# 07/08/2001 H. K. Ng
+# 8/6,8/7 Scott Harrison
package Apache::lonindexer;
@@ -28,8 +32,10 @@ my %language;
my $hidden;
my $extrafield;
my $fnum;
+my $dnum;
sub BEGIN {
- my $fh=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}.'/language.tab');
+ my $fh=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}.
+ '/language.tab');
map {
$_=~/(\w+)\s+([\w\s\-]+)/;
$language{$1}=$2;
@@ -42,6 +48,7 @@ sub handler {
$r->send_http_header;
return OK if $r->header_only;
$fnum=0;
+ $dnum=0;
my $iconpath= $r->dir_config('lonIconsURL') . "/";
my $domain = $r->dir_config('lonDefDomain');
my $role = $r->dir_config('lonRole');
@@ -52,51 +59,90 @@ sub handler {
my $tabdir = $r->dir_config('lonTabDir');
my $fileclr='#ffffe6';
+ my $line;
+ my (@attrchk,@openpath);
+ my $uri=$r->uri;
+
# -------------------------------------- see if called from an interactive mode
+# foreach my $key (sort(keys(%ENV))) {
+# $r->print("$key is $ENV{$key} ");
+# }
+# $r->print("END ENV");
map {
my ($name, $value) = split(/=/,$_);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
if ($name eq 'catalogmode') {
$ENV{'form.'.$name}=$value;
- }
+ }
+ if ($name eq 'launch') {
+ $ENV{'form.'.$name}=$value;
+ }
+ if ($name eq 'acts') {
+ $ENV{'form.'.$name}=$value;
+ }
} (split(/&/,$ENV{'QUERY_STRING'}));
$hidden=''; my $closebutton='';
my $groupimportbutton='';
my $colspan='';
- if ($ENV{'form.catalogmode'} eq 'interactive') {
- $extrafield='
");
+ $hash{"pre_${fnum}_link"}=$filelink;
+ $hash{"pre_${fnum}_title"}=$title;
$fnum++;
}
@@ -521,32 +698,32 @@ sub display_line{
my $rem = $indentm1%10.0;
my $count = 0;
while ($count < $ten) {
- $r->print("\n");
+ $r->print ("\n");
$count++;
}
- $r->print("\n") if $rem > 0;
+ $r->print ("\n") if $rem > 0;
}
+ $r->print ('');
$r->print ('print (' name="'.$msg.'" height="22" type="image" border="0">'."\n");
- $r->print("\n");
- $r->print("$listname $tabtag\n");
+ $r->print (''."\n");
+ $r->print ("$listname$tabtag\n");
}
}
-#---------------------prints the beginning of a form for directory or file link
+# ------------------- prints the beginning of a form for directory or file link
sub begin_form {
my ($r,$uri) = @_;
my $anchor = $uri;
$anchor =~ s/\///g;
- $r->print ('