Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java =================================================================== diff -u -r0f6c8333c4187ad33fafc3fc874525e091be8d21 -r35f1843c3f562fb2e648e7b2c55565cc38ea990a --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java (.../IVoteService.java) (revision 0f6c8333c4187ad33fafc3fc874525e091be8d21) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java (.../IVoteService.java) (revision 35f1843c3f562fb2e648e7b2c55565cc38ea990a) @@ -93,6 +93,10 @@ public List getUserBySessionOnly(final VoteSession voteSession) throws VoteApplicationException; + public void hideOpenVote(VoteUsrAttempt voteUsrAttempt) throws VoteApplicationException; + + public void showOpenVote(VoteUsrAttempt voteUsrAttempt) throws VoteApplicationException; + public void updateVoteQueContent(VoteQueContent voteQueContent) throws VoteApplicationException; public int getAttemptsForQuestionContent(final Long voteQueContentId) throws VoteApplicationException; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java =================================================================== diff -u -r2544e101518962e76f9a225bf2ba77eb1422b64c -r35f1843c3f562fb2e648e7b2c55565cc38ea990a --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision 2544e101518962e76f9a225bf2ba77eb1422b64c) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision 35f1843c3f562fb2e648e7b2c55565cc38ea990a) @@ -463,9 +463,6 @@ { try { - auditService.logShowEntry(MY_SIGNATURE, voteQueUsr.getQueUsrId(), - voteQueUsr.getUsername(), voteQueUsr.toString()); - voteUserDAO.saveVoteUser(voteQueUsr); } catch (DataAccessException e) @@ -526,9 +523,6 @@ { try { - auditService.logShowEntry(MY_SIGNATURE, voteUsrAttempt.getQueUsrId(), - voteUsrAttempt.getVoteQueUsr().getUsername(), voteUsrAttempt.toString()); - voteUsrAttemptDAO.saveVoteUsrAttempt(voteUsrAttempt); } catch (DataAccessException e) @@ -737,9 +731,6 @@ { try { - auditService.logShowEntry(MY_SIGNATURE, voteUsrAttempt.getQueUsrId(), - voteUsrAttempt.getVoteQueUsr().getUsername(), voteUsrAttempt.toString()); - voteUsrAttemptDAO.updateVoteUsrAttempt(voteUsrAttempt); } catch (DataAccessException e) @@ -1138,9 +1129,6 @@ { try { - auditService.logShowEntry(MY_SIGNATURE, attempt.getQueUsrId(), - attempt.getVoteQueUsr().getUsername(), attempt.toString()); - voteUsrAttemptDAO.removeVoteUsrAttempt(attempt); } catch(DataAccessException e) @@ -1166,14 +1154,28 @@ } } + + public void hideOpenVote(VoteUsrAttempt voteUsrAttempt) throws VoteApplicationException + { + logger.debug("hiding user entry: " + voteUsrAttempt.getUserEntry()); + auditService.logHideEntry(MY_SIGNATURE, voteUsrAttempt.getQueUsrId(), + voteUsrAttempt.getVoteQueUsr().getUsername(), voteUsrAttempt.getUserEntry()); + } + + public void showOpenVote(VoteUsrAttempt voteUsrAttempt) throws VoteApplicationException + { + logger.debug("showing user entry: " + voteUsrAttempt.getUserEntry()); + auditService.logShowEntry(MY_SIGNATURE, voteUsrAttempt.getQueUsrId(), + voteUsrAttempt.getVoteQueUsr().getUsername(), voteUsrAttempt.getUserEntry()); + } public void deleteVoteQueUsr(VoteQueUsr voteQueUsr) throws VoteApplicationException { try { - auditService.logShowEntry(MY_SIGNATURE, voteQueUsr.getQueUsrId(), - voteQueUsr.getUsername(), voteQueUsr.toString()); + //auditService.logShowEntry(MY_SIGNATURE, voteQueUsr.getQueUsrId(), + // voteQueUsr.getUsername(), voteQueUsr.toString()); voteUserDAO.removeVoteUser(voteQueUsr); } @@ -1541,6 +1543,7 @@ } } + /** * Export the XML fragment for the tool's content, along with any files needed * for the content. Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java =================================================================== diff -u -rb84d20745f129939756ff298e1c1b01a33baf495 -r35f1843c3f562fb2e648e7b2c55565cc38ea990a --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java (.../VoteMonitoringAction.java) (revision b84d20745f129939756ff298e1c1b01a33baf495) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java (.../VoteMonitoringAction.java) (revision 35f1843c3f562fb2e648e7b2c55565cc38ea990a) @@ -908,6 +908,8 @@ logger.debug("voteUsrAttempt: " + voteUsrAttempt); voteUsrAttempt.setVisible(false); voteService.updateVoteUsrAttempt(voteUsrAttempt); + logger.debug("hiding the user entry : " + voteUsrAttempt.getUserEntry()); + voteService.hideOpenVote(voteUsrAttempt); Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); logger.debug("toolContentId: " + toolContentId); @@ -963,7 +965,8 @@ logger.debug("voteUsrAttempt: " + voteUsrAttempt); voteUsrAttempt.setVisible(true); voteService.updateVoteUsrAttempt(voteUsrAttempt); - + voteService.showOpenVote(voteUsrAttempt); + Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); logger.debug("toolContentId: " + toolContentId);