--- loncom/interface/loncommon.pm 2006/04/22 17:17:49 1.350 +++ loncom/interface/loncommon.pm 2006/04/22 20:58:32 1.351 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.350 2006/04/22 17:17:49 albertel Exp $ +# $Id: loncommon.pm,v 1.351 2006/04/22 20:58:32 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -76,7 +76,7 @@ my %language; my %supported_language; my %cprtag; my %scprtag; -my %fe; my %fd; +my %fe; my %fd; my %fm; my %category_extensions; # ---------------------------------------------- Designs @@ -133,7 +133,7 @@ BEGIN { close($fh); } } -# ------------------------------------------------------------------ source copyrights +# ----------------------------------------------------------- source copyrights { my $sourcecopyrightfile = $Apache::lonnet::perlvar{'lonIncludes'}. '/source_copyright.tab'; @@ -196,10 +196,11 @@ BEGIN { while (<$fh>) { next if (/^\#/); chomp; - my ($ending,$emb,$descr)=split(/\s+/,$_,3); + my ($ending,$emb,$mime,$descr)=split(/\s+/,$_,4); if ($descr ne '') { $fe{$ending}=lc($emb); $fd{$ending}=$descr; + if ($mime ne 'unk') { $fm{$ending}=$mime; } } } close($fh); @@ -2198,6 +2199,10 @@ sub fileembstyle { return $fe{lc(shift(@_))}; } +sub filemimetype { + return $fm{lc(shift(@_))}; +} + sub filecategoryselect { my ($name,$value)=@_;