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

bisitz bisitz@source.lon-capa.org
Wed, 29 Apr 2009 15:21:00 -0000


bisitz		Wed Apr 29 15:21:00 2009 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
    /loncom/metadata_database/LONCAPA	lonmetadata.pm 
  Log:
  Optimized handling of evaluation comments for metadata:
  Only create metadata field, if actual content exisits
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.231 loncom/interface/lonmeta.pm:1.232
--- loncom/interface/lonmeta.pm:1.231	Tue Apr 21 15:38:02 2009
+++ loncom/interface/lonmeta.pm	Wed Apr 29 15:20:54 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.231 2009/04/21 15:38:02 bisitz Exp $
+# $Id: lonmeta.pm,v 1.232 2009/04/29 15:20:54 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1123,7 +1123,7 @@
                  .&mt('visible to author and co-authors only')
                  .')</div>'
         );
-        if (exists($dynmeta{'comments'}) and $dynmeta{'comments'} ne '') {
+        if (exists($dynmeta{'comments'})) {
             $r->print('<blockquote>'.$dynmeta{'comments'}.'</blockquote>');
         } else {
             $r->print('<p>'
Index: loncom/metadata_database/LONCAPA/lonmetadata.pm
diff -u loncom/metadata_database/LONCAPA/lonmetadata.pm:1.26 loncom/metadata_database/LONCAPA/lonmetadata.pm:1.27
--- loncom/metadata_database/LONCAPA/lonmetadata.pm:1.26	Tue Apr 21 15:38:05 2009
+++ loncom/metadata_database/LONCAPA/lonmetadata.pm	Wed Apr 29 15:21:00 2009
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonmetadata.pm,v 1.26 2009/04/21 15:38:05 bisitz Exp $
+# $Id: lonmetadata.pm,v 1.27 2009/04/29 15:21:00 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -947,8 +947,8 @@
         $comments = '<div class="LCevalcomments">'
                    .$comments
                    .'</div>';
+        $data{'comments'} = $comments;
     }
-    $data{'comments'} = $comments;
     #
     if (exists($resdata->{'stats'})) {
         $data{'stats'} = $resdata->{'stats'};