Index: lams_tool_vote/db/sql/create_lams_tool_vote.sql =================================================================== diff -u -rbeea90636c10488ed392e5b6e6030b46c727ca66 -r37b0d767ea3967f19546a54e735822e3ba2b0a0e --- lams_tool_vote/db/sql/create_lams_tool_vote.sql (.../create_lams_tool_vote.sql) (revision beea90636c10488ed392e5b6e6030b46c727ca66) +++ lams_tool_vote/db/sql/create_lams_tool_vote.sql (.../create_lams_tool_vote.sql) (revision 37b0d767ea3967f19546a54e735822e3ba2b0a0e) @@ -89,4 +89,5 @@ INSERT INTO tl_lavote11_content(uid, content_id , title , instructions , creation_date , created_by , run_offline , define_later, offline_instructions, online_instructions, content_in_use, retries) VALUES (1, ${default_content_id} ,'Voting Title','Voting Instructions', NOW(), 1,0, 0, 'offline instructions','online instructions', 0, 0); -INSERT INTO tl_lavote11_nomination_content (uid,nomination, display_order, vote_content_id) VALUES (1, 'sample nomination', 1, 1); \ No newline at end of file +INSERT INTO tl_lavote11_nomination_content (uid,nomination, display_order, vote_content_id) VALUES (1, 'Sample Nomination 1', 1, 1); +INSERT INTO tl_lavote11_nomination_content (uid,nomination, display_order, vote_content_id) VALUES (2, 'Sample Nomination 2', 2, 1); \ No newline at end of file Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java =================================================================== diff -u -r578183182c3aa8d836f7c4ff61886137fb71bcf2 -r37b0d767ea3967f19546a54e735822e3ba2b0a0e --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java (.../VoteStarterAction.java) (revision 578183182c3aa8d836f7c4ff61886137fb71bcf2) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java (.../VoteStarterAction.java) (revision 37b0d767ea3967f19546a54e735822e3ba2b0a0e) @@ -91,7 +91,6 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; -import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; import org.lamsfoundation.lams.tool.vote.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.VoteComparator; @@ -155,8 +154,6 @@ String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); logger.debug("sourceVoteStarter: " + sourceVoteStarter); - - voteAuthoringForm.resetRadioBoxes(); voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); @@ -225,100 +222,6 @@ return (mapping.findForward(ERROR_LIST)); } - - /* note: copyToolContent and removeToolContent code is redundant for production. - * test whether the authoring level tool contract: - public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException; - * is working or not - * - * test code starts from here... - */ - String copyToolContent= (String) request.getParameter(COPY_TOOL_CONTENT); - logger.debug("copyToolContent: " + copyToolContent); - - if ((copyToolContent != null) && (copyToolContent.equals("1"))) - { - logger.debug("user request to copy the content"); - Long fromContentId=new Long(strToolContentId); - logger.debug("fromContentId: " + fromContentId); - - Long toContentId=new Long(9876); - logger.debug("toContentId: " + toContentId); - - try - { - voteService.copyToolContent(fromContentId, toContentId); - } - catch(ToolException e) - { - VoteUtils.cleanUpSessionAbsolute(request); - logger.debug("error copying the content: " + e); - } - } - - String removeToolContent= (String) request.getParameter(REMOVE_TOOL_CONTENT); - logger.debug("removeToolContent: " + removeToolContent); - - if ((removeToolContent != null) && (removeToolContent.equals("1"))) - { - logger.debug("user request to remove the content"); - Long fromContentId=new Long(strToolContentId); - logger.debug("fromContentId: " + fromContentId); - - try - { - voteService.removeToolContent(fromContentId, true); - } - catch(ToolException e) - { - VoteUtils.cleanUpSessionAbsolute(request); - logger.debug("error removing the content: " + e); - } - } - - String setDefineLater= (String) request.getParameter("setDefineLater"); - logger.debug("setDefineLater: " + setDefineLater); - - if ((setDefineLater != null) && (setDefineLater.equals("1"))) - { - logger.debug("user request to set content as define later"); - Long fromContentId=new Long(strToolContentId); - logger.debug("fromContentId: " + fromContentId); - - try - { - voteService.setAsDefineLater(fromContentId); - } - catch(ToolException e) - { - VoteUtils.cleanUpSessionAbsolute(request); - logger.debug("error setting the define later on the content: " + e); - } - } - - - String strSetRunoffline= (String) request.getParameter("strSetRunoffline"); - logger.debug("strSetRunoffline: " + strSetRunoffline); - - if ((setDefineLater != null) && (setDefineLater.equals("1"))) - { - logger.debug("user request to set content as run offline"); - Long fromContentId=new Long(strToolContentId); - logger.debug("fromContentId: " + fromContentId); - - try - { - voteService.setAsRunOffline(fromContentId); - } - catch(ToolException e) - { - VoteUtils.cleanUpSessionAbsolute(request); - logger.debug("error setting the run offline on the content: " + e); - } - } - /* ...testing code ends here*/ - - /* * find out if the passed tool content id exists in the db * present user either a first timer screen with default content data or fetch the existing content. @@ -390,7 +293,7 @@ { logger.debug("starting initialiseAttributes..."); - /* needs to run only once per tool*/ + /* for development: needs to run only once per tool*/ /* VoteUtils.configureContentRepository(request, voteService); */ /* these two are for Instructions jsp */