[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm /metadata_database/LONCAPA lonmetadata.pm
bisitz
bisitz@source.lon-capa.org
Tue, 21 Apr 2009 15:38:05 -0000
bisitz Tue Apr 21 15:38:05 2009 EDT
Modified files:
/loncom/interface lonmeta.pm
/loncom/metadata_database/LONCAPA lonmetadata.pm
Log:
Corrected and optimized dynamical metadata "Evaluation Comments":
- Only wrap comments output in div, if actual comment data is available
- Added white space between username and comment
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.230 loncom/interface/lonmeta.pm:1.231
--- loncom/interface/lonmeta.pm:1.230 Tue Apr 21 15:23:18 2009
+++ loncom/interface/lonmeta.pm Tue Apr 21 15:38:02 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.230 2009/04/21 15:23:18 bisitz Exp $
+# $Id: lonmeta.pm,v 1.231 2009/04/21 15:38:02 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'})) {
+ if (exists($dynmeta{'comments'}) and $dynmeta{'comments'} ne '') {
$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.25 loncom/metadata_database/LONCAPA/lonmetadata.pm:1.26
--- loncom/metadata_database/LONCAPA/lonmetadata.pm:1.25 Fri Dec 7 22:31:08 2007
+++ loncom/metadata_database/LONCAPA/lonmetadata.pm Tue Apr 21 15:38:05 2009
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonmetadata.pm,v 1.25 2007/12/07 22:31:08 raeburn Exp $
+# $Id: lonmetadata.pm,v 1.26 2009/04/21 15:38:05 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -935,15 +935,19 @@
}
#
# put together comments
- my $comments = '<div class="LCevalcomments">';
+ my $comments = '';
foreach my $evaluator (keys(%{$resdata->{'evaluation'}->{'comments'}})){
$comments .=
'<p>'.
- '<b>'.$evaluator.'</b>:'.
+ '<b>'.$evaluator.'</b>: '.
$resdata->{'evaluation'}->{'comments'}->{$evaluator}.
'</p>';
}
- $comments .= '</div>';
+ if ($comments) {
+ $comments = '<div class="LCevalcomments">'
+ .$comments
+ .'</div>';
+ }
$data{'comments'} = $comments;
#
if (exists($resdata->{'stats'})) {