Index: lams_tool_images/web/pages/learning/learning.jsp =================================================================== diff -u -r989e4b47442b99cfcdf170f565a1b0c4c69fb03c -rd135b890fdc2d5b58c6bd02c48c8b3365d9a2ffe --- lams_tool_images/web/pages/learning/learning.jsp (.../learning.jsp) (revision 989e4b47442b99cfcdf170f565a1b0c4c69fb03c) +++ lams_tool_images/web/pages/learning/learning.jsp (.../learning.jsp) (revision d135b890fdc2d5b58c6bd02c48c8b3365d9a2ffe) @@ -224,31 +224,26 @@ } if (${imageGallery.allowVote && (mode != 'teacher') && (not finishedLock)}) { - var votedImageUid = $('#commentsArea_votedImageUid').val(); + var isVoted = $('#commentsArea_isVoted').val(); var votingFormLabel; - if (votedImageUid == 0) { - + if (isVoted == "true") { + $('#votingForm_vote').attr('disabled', false); - $('#votingForm_vote').attr('checked', false); - votingFormLabel = ""; - - } else if (imageUid == votedImageUid) { - - $('#votingForm_vote').attr('disabled', false); $('#votingForm_vote').attr('checked', true); - votingFormLabel = ""; - + votingFormLabel = ""; + } else { - $('#votingForm_vote').attr('disabled', true); + $('#votingForm_vote').attr('disabled', false); $('#votingForm_vote').attr('checked', false); - votingFormLabel = ""; + votingFormLabel = ""; + } $('#votingForm_label').text(votingFormLabel); $('#votingForm_imageUid').attr('value', imageUid); } else if (${finishedLock}) { - var votedImageUid = $('#commentsArea_votedImageUid').val(); - if (imageUid == votedImageUid) { + var isVoted = $('#commentsArea_isVoted').val(); + if (isVoted == "true") { $('#votingForm_vote').attr('checked', true); } else { $('#votingForm_vote').attr('checked', false);