Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/ExportPortfolioDTO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/Attic/ExportPortfolioDTO.java,v
diff -u -r1.4 -r1.5
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/ExportPortfolioDTO.java 26 Mar 2008 03:57:40 -0000 1.4
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/ExportPortfolioDTO.java 23 May 2008 06:05:24 -0000 1.5
@@ -49,7 +49,7 @@
protected List listUserEntries;
protected List listMonitoredAnswersContainerDto;
-
+ protected boolean allowText;
public int compareTo(Object o)
{
@@ -176,4 +176,12 @@
public void setShowResults(String showResults) {
this.showResults = showResults;
}
+
+ public boolean isAllowText() {
+ return allowText;
+ }
+
+ public void setAllowText(boolean allowText) {
+ this.allowText = allowText;
+ }
}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java,v
diff -u -r1.24 -r1.25
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java 13 May 2008 03:44:34 -0000 1.24
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java 23 May 2008 06:05:24 -0000 1.25
@@ -137,7 +137,9 @@
logger.error(error);
throw new VoteApplicationException(error);
}
-
+
+ exportPortfolioDTO.setAllowText(content.isAllowText());
+
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO=new VoteGeneralMonitoringDTO();
VoteMonitoringAction voteMonitoringAction= new VoteMonitoringAction();
@@ -193,6 +195,8 @@
throw new VoteApplicationException(error);
}
+ exportPortfolioDTO.setAllowText(content.isAllowText());
+
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO=new VoteGeneralMonitoringDTO();
VoteMonitoringAction voteMonitoringAction= new VoteMonitoringAction();
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java,v
diff -u -r1.46 -r1.47
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java 13 May 2008 07:23:20 -0000 1.46
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java 23 May 2008 06:05:24 -0000 1.47
@@ -53,6 +53,8 @@
import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt;
import org.lamsfoundation.lams.tool.vote.service.IVoteService;
+import org.lamsfoundation.lams.tool.vote.service.VoteServicePOJO;
+import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy;
import org.lamsfoundation.lams.util.MessageService;
/**
@@ -678,7 +680,7 @@
* @return
*/
public static List prepareChartDTO(HttpServletRequest request, IVoteService voteService, VoteMonitoringForm voteMonitoringForm,
- Long toolContentID)
+ Long toolContentID, MessageService messageService)
{
logger.debug("start preparing ChartDTO with voteMonitoringForm: " + voteMonitoringForm);
logger.debug("start preparing ChartDTO with toolContentID: " + toolContentID);
@@ -838,8 +840,10 @@
}
logger.debug("final share: " + share);
- mapStandardNominationsContent.put(mapIndex.toString(), "Open Vote");
- mapStandardNominationsHTMLedContent.put(mapIndex.toString(), "Open Vote");
+ if (voteContent.isAllowText()) {
+ mapStandardNominationsContent.put(mapIndex.toString(), messageService.getMessage("label.open.vote"));
+ mapStandardNominationsHTMLedContent.put(mapIndex.toString(), messageService.getMessage("label.open.vote"));
+ }
mapStandardRatesContent.put(mapIndex.toString(), new Double(share).toString());
mapStandardUserCount.put(mapIndex.toString(), new Integer(userEnteredVotesCount).toString());
/**following are needed just for proper iteration in the summary jsp*/
@@ -1241,9 +1245,11 @@
}
logger.debug("final share: " + share);
-
- mapStandardNominationsContent.put(mapIndex.toString(), messageService.getMessage("label.open.vote"));
- mapStandardNominationsHTMLedContent.put(mapIndex.toString(), messageService.getMessage("label.open.vote"));
+
+ if(voteContent.isAllowText()) {
+ mapStandardNominationsContent.put(mapIndex.toString(), messageService.getMessage("label.open.vote"));
+ mapStandardNominationsHTMLedContent.put(mapIndex.toString(), messageService.getMessage("label.open.vote"));
+ }
mapStandardRatesContent.put(mapIndex.toString(), new Double(share).toString());
mapStandardUserCount.put(mapIndex.toString(), new Integer(userEnteredVotesCount).toString());
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java,v
diff -u -r1.43 -r1.44
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java 13 May 2008 03:44:34 -0000 1.43
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java 23 May 2008 06:05:24 -0000 1.44
@@ -198,18 +198,19 @@
HttpServletRequest request,
HttpServletResponse response,
IVoteService voteService,
+ MessageService messageService,
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO
) throws IOException,
ServletException
{
logger.debug("calling submitSession...voteGeneralMonitoringDTO:" + voteGeneralMonitoringDTO);
- commonSubmitSessionCode(form, request, voteService,voteGeneralMonitoringDTO);
+ commonSubmitSessionCode(form, request, voteService, messageService, voteGeneralMonitoringDTO);
logger.debug("post commonSubmitSessionCode: " +voteGeneralMonitoringDTO);
return (mapping.findForward(LOAD_MONITORING));
}
- protected void commonSubmitSessionCode(ActionForm form, HttpServletRequest request,IVoteService voteService,
+ protected void commonSubmitSessionCode(ActionForm form, HttpServletRequest request,IVoteService voteService, MessageService messageService,
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO) throws IOException, ServletException
{
logger.debug("starting commonSubmitSessionCode...voteGeneralMonitoringDTO:" + voteGeneralMonitoringDTO);
@@ -228,15 +229,15 @@
VoteContent voteContent=voteService.retrieveVote(new Long(toolContentID));
logger.debug("existing voteContent:" + voteContent);
-
-
+
+
if (currentMonitoredToolSession.equals("All"))
{
voteGeneralMonitoringDTO.setSelectionCase(new Long(2));
request.setAttribute(SELECTION_CASE, new Long(2));
logger.debug("generate DTO for All sessions: ");
- List listVoteAllSessionsDTO=MonitoringUtil.prepareChartDTO(request, voteService, voteMonitoringForm, voteContent.getVoteContentId());
+ List listVoteAllSessionsDTO=MonitoringUtil.prepareChartDTO(request, voteService, voteMonitoringForm, voteContent.getVoteContentId(), messageService);
logger.debug("listVoteAllSessionsDTO: " + listVoteAllSessionsDTO);
voteGeneralMonitoringDTO.setListVoteAllSessionsDTO(listVoteAllSessionsDTO);
}
@@ -405,7 +406,8 @@
public ActionForward submitSession(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
- HttpServletResponse response)
+ HttpServletResponse response,
+ MessageService messageService)
throws IOException,ServletException
{
logger.debug("dispathcing submitSession..");
@@ -414,7 +416,7 @@
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO= new VoteGeneralMonitoringDTO();
- commonSubmitSessionCode(form, request, voteService,voteGeneralMonitoringDTO);
+ commonSubmitSessionCode(form, request, voteService, messageService, voteGeneralMonitoringDTO);
logger.debug("post commonSubmitSessionCode: " +voteGeneralMonitoringDTO);
@@ -1469,7 +1471,7 @@
logger.debug("submitting session to refresh the data from the database: ");
- return submitSession(mapping, form, request, response, voteService, voteGeneralMonitoringDTO);
+ return submitSession(mapping, form, request, response, voteService, getMessageService(), voteGeneralMonitoringDTO);
}
@@ -1613,7 +1615,7 @@
MonitoringUtil.buildVoteStatsDTO(request,voteService, voteContent);
logger.debug("submitting session to refresh the data from the database: ");
- return submitSession(mapping, form, request, response, voteService, voteGeneralMonitoringDTO);
+ return submitSession(mapping, form, request, response, voteService, getMessageService(), voteGeneralMonitoringDTO);
}
@@ -3835,7 +3837,7 @@
* Return ResourceService bean.
*/
private MessageService getMessageService() {
- return (MessageService) VoteServiceProxy.getMessageService(getServlet().getServletContext());
+ return VoteServiceProxy.getMessageService(getServlet().getServletContext());
}
}
\ No newline at end of file
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java,v
diff -u -r1.34 -r1.35
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 26 Sep 2006 02:26:49 -0000 1.34
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 23 May 2008 06:05:24 -0000 1.35
@@ -54,6 +54,7 @@
import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
import org.lamsfoundation.lams.tool.vote.service.IVoteService;
import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy;
+import org.lamsfoundation.lams.util.MessageService;
import org.lamsfoundation.lams.web.util.AttributeNames;
import org.lamsfoundation.lams.web.util.SessionMap;
@@ -108,6 +109,8 @@
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
logger.debug("voteService: " + voteService);
+ MessageService messageService = VoteServiceProxy.getMessageService(getServlet().getServletContext());
+
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
logger.debug("voteMonitoringForm: " + voteMonitoringForm);
@@ -205,7 +208,7 @@
//voteMonitoringAction.prepareReflectionData(request, voteContent, voteService, null, false);
logger.debug("calling submitSession with selectedToolSessionId" + voteMonitoringForm.getSelectedToolSessionId());
- return voteMonitoringAction.submitSession(mapping, voteMonitoringForm, request, response, voteService, voteGeneralMonitoringDTO);
+ return voteMonitoringAction.submitSession(mapping, voteMonitoringForm, request, response, voteService, messageService, voteGeneralMonitoringDTO);
}
Index: lams_tool_vote/web/export/ExportContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/web/export/ExportContent.jsp,v
diff -u -r1.19 -r1.20
--- lams_tool_vote/web/export/ExportContent.jsp 26 Mar 2008 04:09:09 -0000 1.19
+++ lams_tool_vote/web/export/ExportContent.jsp 23 May 2008 06:05:24 -0000 1.20
@@ -66,37 +66,40 @@
-
-
-
-
-
- |
-
-
-
- |
- |
-
-
-
-
-
-
-
-
- |
-
-
- |
-
-
-
-
- |
-
+
+
+
+
+
+
+ |
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+
@@ -135,42 +138,43 @@
-
-
-
-
-
- |
-
-
-
- |
- |
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
- |
- |
-
-
-
-
-
- |
-
+
+
+
+
+
+ |
+
+
+
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ |
+ |
+
+
+
+
+
+ |
+
+