Diff for /loncom/interface/lonfeedback.pm between versions 1.350 and 1.351

version 1.350, 2012/03/17 04:55:10 version 1.351, 2012/03/17 14:49:29
Line 1457  sub build_posting_display { Line 1457  sub build_posting_display {
                                     $message.                                      $message.
                                     '</div></blockquote>';                                      '</div></blockquote>';
                             if ($canvote) {                              if ($canvote) {
                                   my $ownpost;
                                   if (($uname eq $env{'user.name'}) &&
                                       ($udom eq $env{'user.domain'})) {
                                       $ownpost = 1;
                                   }   
 # Put in the like and unlike buttons  # Put in the like and unlike buttons
                                 if (($uname eq $env{'user.name'}) && ($udom eq $env{'user.domain'})) {                                  if ($ownpost || (($hiddens{$idx}) && ($seehidden))) { 
                                     my $novote = &mt('No voting for your own posts');                                      my $novote;
                                       if ($ownpost) { 
                                           $novote = &mt('No voting for your own posts.');
                                       } else {
                                           $novote = &mt('No voting for hidden posts.');
                                       }
                                     $$discussionitems[$idx].=                                      $$discussionitems[$idx].=
                                         '<a href="javascript:alert('."'$novote'".');" style="text-decoration: none;">'.                                          '<a href="javascript:alert('."'$novote'".');" style="text-decoration: none;">'.
                                         '<img border="0" src="/res/adm/pages/thumbsup_novote.png" alt="'.$novote.'" />&nbsp;'.                                          '<img border="0" src="/res/adm/pages/thumbsup_novote.png" alt="'.$novote.'" />&nbsp;'.
                                         '<img border="0" src="/res/adm/pages/thumbsdown_novote.png" alt="'.$novote.'" /></a>';                                           '<img border="0" src="/res/adm/pages/thumbsdown_novote.png" alt="'.$novote.'" /></a>'; 
   
                                 } else {                                  } else {
                                     if ($userlikes{$idx}) {                                      if ($userlikes{$idx}) {
                                         $$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsup_gray.png" alt="'.&mt('You like this posting').'" />';                                          $$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsup_gray.png" alt="'.&mt('You like this posting').'" />';
Line 4127  ENDREDIR Line 4138  ENDREDIR
           if (&discussion_vote_available($status,$realsymb)) {            if (&discussion_vote_available($status,$realsymb)) {
               my %contrib=&Apache::lonnet::restore($symb,$env{'request.course.id'},                my %contrib=&Apache::lonnet::restore($symb,$env{'request.course.id'},
                                                    $cdom,$cnum);                                                     $cdom,$cnum);
                 my $ownpost;
               if (($contrib{$idx.':sendername'} eq $env{'user.name'}) &&                 if (($contrib{$idx.':sendername'} eq $env{'user.name'}) && 
                   ($contrib{$idx.':senderdomain'} eq $env{'user.domain'})) {                    ($contrib{$idx.':senderdomain'} eq $env{'user.domain'})) {
                   $result = &mt("Vote not registered. No voting for your own posts.");                    $ownpost = 1;
                 }
                 if ($ownpost || $contrib{$idx.':hidden'} || $contrib{$idx.':deleted'}) {
                     $result = &mt('Vote not registered.').' ';
                 }
                 if ($ownpost) {
                     $result .= &mt('No voting for your own posts.');
                 } elsif ($contrib{$idx.':hidden'}) {
                     $result .= &mt('No voting for hidden posts.');
                 } elsif ($contrib{$idx.':deleted'}) {
                     $result .= &mt('No voting for deleted posts.');
               } else {                } else {
   
 #  #
 # Likes and unlikes are in db-file "disclikes" of the course  # Likes and unlikes are in db-file "disclikes" of the course
 # The prefix is the $symb to identify the resource discussion,  # The prefix is the $symb to identify the resource discussion,

Removed from v.1.350  
changed lines
  Added in v.1.351


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>