Diff for /loncom/interface/loncommon.pm between versions 1.12 and 1.15

version 1.12, 2001/12/11 13:49:57 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 64  sub BEGIN { Line 65  sub BEGIN {
     next if /^\#/;      next if /^\#/;
     chomp;      chomp;
     my ($key,$val)=(split(/\s+/,$_,2));      my ($key,$val)=(split(/\s+/,$_,2));
     $copyright{$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
Line 82  sub BEGIN { Line 94  sub BEGIN {
     }      }
 }  }
   
   # ---------------------------------------------------------------- Language IDs
   sub languageids {
       return keys(%language);
   }
   
   # -------------------------------------------------------- Language Description
   sub languagedescription {
       return $language{shift};
   }
   
   # --------------------------------------------------------------- Copyright IDs
   sub copyrightids {
       return keys(%cprtag);
   }
   
   # ------------------------------------------------------- Copyright Description
   sub copyrightdescription {
       return $cprtag{shift};
   }
   
   # ------------------------------------------------------------- File Categories
   sub filecategories {
       return keys(%fc);
   }
   
   # ------------------------------------------------------------- File Categories
   sub filecategorytypes {
       return @{$fc{lc(shift)}};
   }
   
   # ------------------------------------------------------------------ File Types
   sub fileextensions {
       return keys(%fe);
   }
   
   # ------------------------------------------------------------- Embedding Style
   sub fileembstyle {
       return $fe{lc(shift)};
   }
   
   # ------------------------------------------------------------ Description Text
   sub filedescription {
       return $fd{lc(shift)};
   }
   
 sub get_previous_attempt {  sub get_previous_attempt {
   my ($symb,$username,$domain,$course)=@_;    my ($symb,$username,$domain,$course)=@_;
   my $prevattempts='';    my $prevattempts='';

Removed from v.1.12  
changed lines
  Added in v.1.15


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>