--- loncom/interface/lonfeedback.pm 2012/01/10 14:52:57 1.333
+++ loncom/interface/lonfeedback.pm 2012/03/15 12:45:21 1.340
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.333 2012/01/10 14:52:57 www Exp $
+# $Id: lonfeedback.pm,v 1.340 2012/03/15 12:45:21 goltermann Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1155,22 +1155,12 @@ sub build_posting_display {
@{$$namesort{$lastname}{$firstname}} = ("$idx");
}
if ($outputtarget ne 'tex') {
+# Add karma stars
my $karma=&userkarma($contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'});
for (my $i=1;$i<=$karma;$i++) {
$sender.='';
}
- unless ($likes{$symb.':'.$idx.':likers'}=~/\,\Q$thisuser\E\,/) {
- $sender.=' '.&discussion_link($symb,'
','like',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Like this posting"));
- }
- unless ($likes{$symb.':'.$idx.':unlikers'}=~/\,\Q$thisuser\E\,/) {
- $sender.=' '.&discussion_link($symb,'
',,'unlike',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Unlike this posting"));
- }
- my $thislikes=$likes{$symb.':'.$idx.':likes'};
- if ($thislikes>0) {
- $sender.=' ('.&mt("[_1] likes",$thislikes).')';
- } elsif ($thislikes<0) {
- $sender.=' ('.&mt("[_1] unlikes",abs($thislikes)).')';
- }
+# Can people edit this?
if (&editing_allowed($escsymb.':::'.$idx,$group)) {
if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {
$sender.=' '.
@@ -1366,13 +1356,32 @@ sub build_posting_display {
} elsif ($thislikes<$oneminus) {
$likesize="75";
}
+# Actually glue in the message itself
$$discussionitems[$idx].= '
'. "'; +# Put in the like and unlike buttons + unless ($likes{$symb.':'.$idx.':likers'}=~/\,\Q$thisuser\E\,/) { + $$discussionitems[$idx].=' '.&discussion_link($symb,'". $message. '