--- loncom/interface/loncommon.pm 2004/05/03 16:07:18 1.191 +++ loncom/interface/loncommon.pm 2004/06/11 02:21:45 1.192 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.191 2004/05/03 16:07:18 matthew Exp $ +# $Id: loncommon.pm,v 1.192 2004/06/11 02:21:45 taceyjo1 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -74,6 +74,7 @@ my $readit; my %language; my %supported_language; my %cprtag; +my %scprtag; my %fe; my %fd; my %category_extensions; @@ -131,6 +132,20 @@ BEGIN { close($fh); } } +# ------------------------------------------------------------------ source copyrights + { + my $sourcecopyrightfile = $Apache::lonnet::perlvar{'lonIncludes'}. + '/source_copyright.tab'; + if ( open (my $fh,"<$sourcecopyrightfile") ) { + while (<$fh>) { + next if /^\#/; + chomp; + my ($key,$val)=(split(/\s+/,$_,2)); + $scprtag{$key}=$val; + } + close($fh); + } + } # -------------------------------------------------------------- domain designs @@ -1811,6 +1826,27 @@ returns description of a specified copyr sub copyrightdescription { return &mt($cprtag{shift(@_)}); } +=item * source_copyrightids() + +returns list of all source copyrights + +=cut + +sub source_copyrightids { + return sort(keys(%scprtag)); +} + +=pod + +=item * source_copyrightdescription() + +returns description of a specified source copyright id + +=cut + +sub source_copyrightdescription { + return &mt($scprtag{shift(@_)}); +} =pod