version 1.24, 2003/10/07 20:30:13
|
version 1.29, 2004/07/12 20:42:31
|
Line 39 use Apache::Constants qw(:common);
|
Line 39 use Apache::Constants qw(:common);
|
use GDBM_File; |
use GDBM_File; |
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::lonnet; |
|
|
my %hash; # variable to tie to user specific database |
my %hash; # variable to tie to user specific database |
my $iconpath; # variable to be accessible to multiple subroutines |
my $iconpath; # variable to be accessible to multiple subroutines |
Line 234 END
|
Line 235 END
|
my $key = $_; |
my $key = $_; |
$key =~ s/^store_//; |
$key =~ s/^store_//; |
$shash{$key} = $hash{'storectr_'.$key}; |
$shash{$key} = $hash{'storectr_'.$key}; |
$thash{$key} = $hash{'store_'.$key}; |
if (&Apache::lonnet::gettitle($key) eq '') { |
|
$thash{$key} = $hash{'store_'.$key}; |
|
} else { |
|
$thash{$key} = &Apache::lonnet::gettitle($key); |
|
} |
} |
} |
} |
} |
if ($ENV{'form.oldval'}) { |
if ($ENV{'form.oldval'}) { |
Line 314 END
|
Line 319 END
|
|
|
# --- Expand here if "GO BACK" button desired |
# --- Expand here if "GO BACK" button desired |
if ($ENV{'form.catalogmode'} eq 'groupimport') { |
if ($ENV{'form.catalogmode'} eq 'groupimport') { |
|
my $resurl = &Apache::loncommon::lastresurl(); |
$r->print(<<END); |
$r->print(<<END); |
<input type="button" name="alter" value="$lt{'gb'}" |
<input type="button" name="alter" value="$lt{'gb'}" |
onClick="window.location='/res/?catalogmode=groupimport'" /> |
onClick="window.location='$resurl?catalogmode=groupimport'" /> |
END |
END |
} |
} |
if ($ENV{'form.catalogmode'} eq 'groupsearch') { |
if ($ENV{'form.catalogmode'} eq 'groupsearch') { |
Line 351 END
|
Line 357 END
|
foreach (sort {$shash{$a}<=>$shash{$b}} (keys %shash)) { |
foreach (sort {$shash{$a}<=>$shash{$b}} (keys %shash)) { |
my $key=$_; |
my $key=$_; |
$ctr++; |
$ctr++; |
my @file_ext = split(/\./,$key); |
my $iconname=&Apache::loncommon::icon($key); |
my $curfext = $file_ext[scalar(@file_ext)-1]; |
|
my $iconname="unknown.gif"; |
|
my $embstyle = &Apache::loncommon::fileembstyle($curfext); |
|
# The unless conditional that follows is a bit of overkill |
|
$iconname = $curfext.".gif" unless |
|
(!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn'); |
|
if ($clen > 1) { |
if ($clen > 1) { |
$r->print("<tr><td bgcolor='$fileclr'>"); |
$r->print("<tr><td bgcolor='$fileclr'>"); |
$r->print(&movers($clen,$ctr)); |
$r->print(&movers($clen,$ctr)); |
Line 367 END
|
Line 367 END
|
$r->print("</td><td bgcolor='$fileclr'>"); |
$r->print("</td><td bgcolor='$fileclr'>"); |
$r->print(&select_box($clen,$ctr)); |
$r->print(&select_box($clen,$ctr)); |
$r->print("</td><td bgcolor='$fileclr'>"); |
$r->print("</td><td bgcolor='$fileclr'>"); |
$r->print("<img src='$iconpath$iconname'>"); |
$r->print("<img src='$iconname' />"); |
$r->print("</td><td bgcolor='$fileclr'>"); |
$r->print("</td><td bgcolor='$fileclr'>"); |
$r->print("$thash{$key}</td><td bgcolor='$fileclr'>\n"); |
$r->print("$thash{$key}</td><td bgcolor='$fileclr'>\n"); |
$r->print("$key</td></tr>\n"); |
$r->print("$key</td></tr>\n"); |