--- loncom/interface/lonmeta.pm 2003/12/30 22:19:18 1.51
+++ loncom/interface/lonmeta.pm 2004/04/06 15:07:41 1.62
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.51 2003/12/30 22:19:18 www Exp $
+# $Id: lonmeta.pm,v 1.62 2004/04/06 15:07:41 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -212,6 +212,8 @@ sub fieldnames {
return &Apache::lonlocal::texthash(
'title' => 'Title',
'author' =>'Author(s)',
+ 'authorspace' => 'Author Space',
+ 'modifyinguser' => 'Last Modifying User',
'subject' => 'Subject',
'keywords' => 'Keyword(s)',
'notes' => 'Notes',
@@ -260,8 +262,9 @@ sub prettyprint {
# Dates
if (($type eq 'creationdate') ||
($type eq 'lastrevisiondate')) {
- return &Apache::lonlocal::locallocaltime(
- &Apache::lonmysql::unsqltime($value));
+ return ($value?&Apache::lonlocal::locallocaltime(
+ &Apache::lonmysql::unsqltime($value)):
+ &mt('not available'));
}
# Language
if ($type eq 'language') {
@@ -298,8 +301,9 @@ sub prettyprint {
($type eq 'comefrom_list') ||
($type eq 'sequsage_list')) {
return join('
',map {
- &Apache::lonnet::gettitle($_).' ['.
- &Apache::lonhtmlcommon::crumbs(&Apache::lonnet::clutter($_),'preview').']';
+ my $url=&Apache::lonnet::clutter($_);
+ ''.&Apache::lonnet::gettitle($url).''.
+ &Apache::lonhtmlcommon::crumbs($url,'preview','',undef,'+0');
} split(/\s*\,\s*/,$value));
}
# Evaluations
@@ -328,8 +332,13 @@ sub prettyprint {
}
# ============================================== Pretty input of metadata field
+sub direct {
+ return shift;
+}
+
sub selectbox {
my ($name,$value,$functionref,@idlist)=@_;
+ unless (defined($functionref)) { $functionref=\&direct; }
my $selout='