--- loncom/interface/lonmeta.pm 2005/02/17 08:29:43 1.92 +++ loncom/interface/lonmeta.pm 2005/03/16 22:52:04 1.93 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.92 2005/02/17 08:29:43 albertel Exp $ +# $Id: lonmeta.pm,v 1.93 2005/03/16 22:52:04 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -237,10 +237,8 @@ sub diffgraph { # The field names sub fieldnames { my $file_type=shift; - if ($file_type eq 'portfolio') { - return &Apache::lonlocal::texthash - ( - 'title' => 'Title', + my %fields = + ('title' => 'Title', 'author' =>'Author(s)', 'authorspace' => 'Author Space', 'modifyinguser' => 'Last Modifying User', @@ -250,19 +248,10 @@ sub fieldnames { 'abstract' => 'Abstract', 'lowestgradelevel' => 'Lowest Grade Level', 'highestgradelevel' => 'Highest Grade Level'); - } else { - return &Apache::lonlocal::texthash - ( - 'title' => 'Title', - 'author' =>'Author(s)', - 'authorspace' => 'Author Space', - 'modifyinguser' => 'Last Modifying User', - 'subject' => 'Subject', - 'keywords' => 'Keyword(s)', - 'notes' => 'Notes', - 'abstract' => 'Abstract', - 'lowestgradelevel' => 'Lowest Grade Level', - 'highestgradelevel' => 'Highest Grade Level', + if (! defined($file_type) || $file_type ne 'portfolio') { + %fields = + (%fields, + 'domain' => 'Domain', 'standards' => 'Standards', 'mime' => 'MIME Type', 'language' => 'Language', @@ -295,7 +284,8 @@ sub fieldnames { 'disc' => 'Degree of discrimination', 'dependencies' => 'Resources used by this resource', ); - } + } + return &Apache::lonlocal::texthash(%fields); } # Pretty printing of metadata field