version 1.14, 2001/12/11 19:37:12
|
version 1.15, 2001/12/11 23:38:28
|
Line 42 use Apache::lonmsg();
|
Line 42 use Apache::lonmsg();
|
my %language; |
my %language; |
my %cprtag; |
my %cprtag; |
my %fe; my %fd; |
my %fe; my %fd; |
|
my %fc; |
|
|
# ----------------------------------------------------------------------- BEGIN |
# ----------------------------------------------------------------------- BEGIN |
sub BEGIN { |
sub BEGIN { |
Line 67 sub BEGIN {
|
Line 68 sub BEGIN {
|
$cprtag{$key}=$val; |
$cprtag{$key}=$val; |
} |
} |
} |
} |
|
# ------------------------------------------------------------- file categories |
|
{ |
|
my $fh=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}. |
|
'/filecategories.tab'); |
|
while (<$fh>) { |
|
next if /^\#/; |
|
chomp; |
|
my ($key,$val)=(split(/\s+/,$_,2)); |
|
push @{$fc{$key}},$val; |
|
} |
|
} |
# ------------------------------------------------------------------ file types |
# ------------------------------------------------------------------ file types |
{ |
{ |
my $fh=Apache::File->new("$perlvar{'lonTabDir'}/filetypes.tab"); |
my $fh=Apache::File->new("$perlvar{'lonTabDir'}/filetypes.tab"); |
Line 84 sub BEGIN {
|
Line 96 sub BEGIN {
|
|
|
# ---------------------------------------------------------------- Language IDs |
# ---------------------------------------------------------------- Language IDs |
sub languageids { |
sub languageids { |
|
return keys(%language); |
} |
} |
|
|
# -------------------------------------------------------- Language Description |
# -------------------------------------------------------- Language Description |
sub languagedescription { |
sub languagedescription { |
|
return $language{shift}; |
} |
} |
|
|
# --------------------------------------------------------------- Copyright IDs |
# --------------------------------------------------------------- Copyright IDs |
sub copyrightids { |
sub copyrightids { |
|
return keys(%cprtag); |
} |
} |
|
|
# ------------------------------------------------------- Copyright Description |
# ------------------------------------------------------- Copyright Description |
sub copyrightdescription { |
sub copyrightdescription { |
|
return $cprtag{shift}; |
} |
} |
|
|
# ------------------------------------------------------------- File Categories |
# ------------------------------------------------------------- File Categories |
sub filecategories { |
sub filecategories { |
|
return keys(%fc); |
|
} |
|
|
|
# ------------------------------------------------------------- File Categories |
|
sub filecategorytypes { |
|
return @{$fc{lc(shift)}}; |
} |
} |
|
|
# ------------------------------------------------------------------ File Types |
# ------------------------------------------------------------------ File Types |
sub fileextensions { |
sub fileextensions { |
|
return keys(%fe); |
} |
} |
|
|
# ------------------------------------------------------------- Embedding Style |
# ------------------------------------------------------------- Embedding Style |
sub fileembstyle { |
sub fileembstyle { |
|
return $fe{lc(shift)}; |
} |
} |
|
|
# ------------------------------------------------------------ Description Text |
# ------------------------------------------------------------ Description Text |
sub filedescription { |
sub filedescription { |
|
return $fd{lc(shift)}; |
} |
} |
|
|
sub get_previous_attempt { |
sub get_previous_attempt { |