[LON-CAPA-cvs] cvs: loncom /publisher lonpubdir.pm

www lon-capa-cvs@mail.lon-capa.org
Sun, 04 Jan 2004 00:50:11 -0000


www		Sat Jan  3 19:50:11 2004 EDT

  Modified files:              
    /loncom/publisher	lonpubdir.pm 
  Log:
  Bug #2449
  
  
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.54 loncom/publisher/lonpubdir.pm:1.55
--- loncom/publisher/lonpubdir.pm:1.54	Sat Jan  3 10:57:11 2004
+++ loncom/publisher/lonpubdir.pm	Sat Jan  3 19:50:11 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.54 2004/01/03 15:57:11 www Exp $
+# $Id: lonpubdir.pm,v 1.55 2004/01/04 00:50:11 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -245,7 +245,10 @@
     return $title;
 }
 
-
+sub getCopyRightString {
+    my $fullname = shift;
+    return &Apache::lonnet::metadata($fullname, 'copyright');
+}
 #
 #  Put out a directory table row:
 #    putdirectory(r, base, here, dirname, modtime)
@@ -308,7 +311,8 @@
 	    $ratime,$rmtime,$rctime,
 	    $rblksize,$rblocks)=stat($resdir.'/'.$filename);
 	if ($rmtime>=$cmtime) {
-	    $status=&mt('Published');
+	    $status=&mt('Published').'<br />'.
+		&mt(&getCopyRightString($targetdir.'/'.$filename));
             $bgcolor='#CCFF88';
 	    if (&Apache::lonnet::metadata($targetdir.'/'.$filename,'obsolete')) {
 		$status=&mt('Obsolete');
@@ -316,12 +320,13 @@
 	    }
 	    $title='<a href="/res/'.$targetdir.'/'.$filename.
 		'.meta" target=cat>'.
-		getTitleString($targetdir.'/'.$filename, 'title').'</a>';
+		&getTitleString($targetdir.'/'.$filename).'</a>';
 	} else {
-	    $status=&mt('Modified');
+	    $status=&mt('Modified').'<br />'.
+		&mt(&getCopyRightString($targetdir.'/'.$filename));
             $bgcolor='#FFFF77';
 	    $title='<a href="/res/'.$targetdir.'/'.$filename.'.meta" target=cat>'.
-		getTitleString($targetdir.'/'.$filename,'title').'</a>';
+		&getTitleString($targetdir.'/'.$filename).'</a>';
 	    if (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
 		$status.='<br><a href="/adm/diff?filename=/~'.$uname.
 		    $thisdisfn.'/'.$filename.