Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralMonitoringDTO.java =================================================================== diff -u -rdea5004371152a95bec9fc2db87a455fa84c0887 -r189a3f0c09213d7a68f462bf6a4eb9ee7ae9ba05 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralMonitoringDTO.java (.../McGeneralMonitoringDTO.java) (revision dea5004371152a95bec9fc2db87a455fa84c0887) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralMonitoringDTO.java (.../McGeneralMonitoringDTO.java) (revision 189a3f0c09213d7a68f462bf6a4eb9ee7ae9ba05) @@ -68,6 +68,7 @@ protected String isToolSessionChanged; protected String responseId; protected String currentUid; + protected String displayAnswers; protected String toolContentID; protected Map mapOptionsContent; @@ -569,6 +570,18 @@ this.currentUid = currentUid; } /** + * @return Returns the displayAnswers. + */ + public String getDisplayAnswers() { + return displayAnswers; + } + /** + * @param displayAnswers The displayAnswers to set. + */ + public void setDisplayAnswers(String displayAnswers) { + this.displayAnswers = displayAnswers; + } + /** * @return Returns the isToolSessionChanged. */ public String getIsToolSessionChanged() { @@ -683,6 +696,7 @@ .append("mapStudentsMcd: ", mapStudentsMcd) .append("responseId: ", responseId) .append("currentUid: ", currentUid) + .append("displayAnswers: ", displayAnswers) .append("sessionUserCount: ", sessionUserCount) .append("completedSessionUserCount: ", completedSessionUserCount) .append("completedSessionUserPercent: ", completedSessionUserPercent) Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java =================================================================== diff -u -rdea5004371152a95bec9fc2db87a455fa84c0887 -r189a3f0c09213d7a68f462bf6a4eb9ee7ae9ba05 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java (.../McMonitoringAction.java) (revision dea5004371152a95bec9fc2db87a455fa84c0887) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java (.../McMonitoringAction.java) (revision 189a3f0c09213d7a68f462bf6a4eb9ee7ae9ba05) @@ -216,8 +216,7 @@ McContent mcContent=mcService.retrieveMc(new Long(toolContentID)); logger.debug("existing mcContent:" + mcContent); - - + if (currentMonitoredToolSession.equals("All")) { List listMcAllSessionsDTO = new LinkedList(); @@ -250,7 +249,10 @@ mcGeneralMonitoringDTO.setRequestLearningReport(new Boolean(false).toString()); mcGeneralMonitoringDTO.setSummaryToolSessions(populateToolSessions(mcContent)); + mcGeneralMonitoringDTO.setDisplayAnswers(new Boolean(mcContent.isDisplayAnswers()).toString()); + logger.debug("existing mcContent:" + mcContent); + /*setting editable screen properties*/ McGeneralAuthoringDTO mcGeneralAuthoringDTO= new McGeneralAuthoringDTO(); mcGeneralAuthoringDTO.setActivityTitle(mcContent.getTitle()); @@ -417,9 +419,45 @@ { logger.debug("dispatching submitSession.."); IMcService mcService = McServiceProxy.getMcService(getServlet().getServletContext()); + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + McContent mcContent=mcService.retrieveMc(new Long(strToolContentID)); + mcContent.setDisplayAnswers(new Boolean(true)); + logger.debug("mcContent: " + mcContent); return commonSubmitSessionCode((McMonitoringForm) form, request, mapping, mcService, new McGeneralMonitoringDTO() ); } + /** + * ActionForward displayAnswers(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) + * + * displayAnswers + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws IOException + * @throws ServletException + */ + public ActionForward displayAnswers(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) + throws IOException,ServletException + { + logger.debug("dispatching displayAnswers.."); + IMcService mcService = McServiceProxy.getMcService(getServlet().getServletContext()); + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + McContent mcContent=mcService.retrieveMc(new Long(strToolContentID)); + mcContent.setDisplayAnswers(new Boolean(true)); + logger.debug("mcContent: " + mcContent); + return commonSubmitSessionCode((McMonitoringForm) form, request, mapping, mcService, new McGeneralMonitoringDTO() ); + } + + /** * editActivityQuestions Index: lams_tool_lamc/web/monitoring/MonitoringMaincontent.jsp =================================================================== diff -u -r18e5e690d2e1a7c3d918759f7a2827c8205feaac -r189a3f0c09213d7a68f462bf6a4eb9ee7ae9ba05 --- lams_tool_lamc/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 18e5e690d2e1a7c3d918759f7a2827c8205feaac) +++ lams_tool_lamc/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 189a3f0c09213d7a68f462bf6a4eb9ee7ae9ba05) @@ -92,8 +92,12 @@ document.McMonitoringForm.questionIndex.value=questionIndexValue; submitMethod(actionMethod); } + + function submitChangeDisplayAnswers(displayAnswers, actionMethod) { + document.McMonitoringForm.displayAnswers.value=displayAnswers; + submitMonitoringMethod(actionMethod); + } - function submitEditResponse(responseId, actionMethod) { document.McMonitoringForm.responseId.value=responseId; Index: lams_tool_lamc/web/monitoring/SummaryContent.jsp =================================================================== diff -u -rfab1518543de95018107368da0ed5cdfb8c4f8e3 -r189a3f0c09213d7a68f462bf6a4eb9ee7ae9ba05 --- lams_tool_lamc/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision fab1518543de95018107368da0ed5cdfb8c4f8e3) +++ lams_tool_lamc/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision 189a3f0c09213d7a68f462bf6a4eb9ee7ae9ba05) @@ -32,6 +32,23 @@ + + + +

+ +

+
+ +

+
+ + + + +

+
+