[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Fri, 15 Jun 2007 23:01:08 -0000


albertel		Fri Jun 15 19:01:08 2007 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
  Log:
  - seed the author field with the users name
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.208 loncom/interface/lonmeta.pm:1.209
--- loncom/interface/lonmeta.pm:1.208	Tue May 15 16:21:17 2007
+++ loncom/interface/lonmeta.pm	Fri Jun 15 19:01:07 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.208 2007/05/15 20:21:17 albertel Exp $
+# $Id: lonmeta.pm,v 1.209 2007/06/15 23:01:07 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1312,6 +1312,11 @@
 		$Apache::lonpublisher::metadatafields{'owner'} =
 		    $env{'user.name'}.':'.$env{'user.domain'};
 	    }
+	    if (! $Apache::lonpublisher::metadatafields{'author'}) {
+		$Apache::lonpublisher::metadatafields{'author'} =
+		    &Apache::loncommon::plainname($env{'user.name'},
+						  $env{'user.domain'});
+	    }
 	    if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') {
 
                 if ($file_type eq 'portfolio') {