Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r55645d4b796f36715b66a70fce66406a986ee647 -r14e8c67fbecc09db1e8f1d1c031db8433b7be927 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 55645d4b796f36715b66a70fce66406a986ee647) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 14e8c67fbecc09db1e8f1d1c031db8433b7be927) @@ -193,7 +193,7 @@ public static final String FROM_TOOL_CONTENT_ID = "fromToolContentId"; public static final String TO_TOOL_CONTENT_ID = "toToolContentId"; public static final String LEARNER_REPORT = "learnerRep"; - public static final String INDIVIDUAL_LEARNER_REPORT = "individualLearnerRep"; + public static final String LEARNER_REP = "individualLearnerRep"; public static final String REQUEST_LEARNING_REPORT = "requestLearningReport"; public static final String REQUEST_LEARNING_REPORT_PROGRESS = "requestLearningReportProgress"; public static final String REQUEST_PREVIEW = "requestPreview"; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -r55645d4b796f36715b66a70fce66406a986ee647 -r14e8c67fbecc09db1e8f1d1c031db8433b7be927 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 55645d4b796f36715b66a70fce66406a986ee647) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 14e8c67fbecc09db1e8f1d1c031db8433b7be927) @@ -49,6 +49,7 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; +import org.apache.struts.action.ActionRedirect; import org.apache.tomcat.util.json.JSONArray; import org.apache.tomcat.util.json.JSONException; import org.apache.tomcat.util.json.JSONObject; @@ -116,6 +117,15 @@ QaSession qaSession = QaLearningAction.qaService.getSessionById(new Long(toolSessionID).longValue()); QaContent qaContent = qaSession.getQaContent(); + + QaQueUsr qaQueUsr = getCurrentUser(toolSessionID); + //prohibit users from submitting answers after response is finalized but Resubmit button is not pressed (e.g. using 2 browsers) + if (qaQueUsr.isResponseFinalized()) { + ActionRedirect redirect = new ActionRedirect(mapping.findForwardConfig("learningStarter")); + redirect.addParameter(AttributeNames.PARAM_TOOL_SESSION_ID, toolSessionID); + redirect.addParameter(MODE, "learner"); + return redirect; + } GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -400,7 +410,7 @@ } request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - return (mapping.findForward(QaAppConstants.INDIVIDUAL_LEARNER_REPORT)); + return (mapping.findForward(QaAppConstants.LEARNER_REP)); } else if (qaContent.isReflect()) { return forwardtoReflection(mapping, request, qaContent, toolSessionID, userID, qaLearningForm); @@ -486,7 +496,7 @@ request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - return (mapping.findForward(QaAppConstants.INDIVIDUAL_LEARNER_REPORT)); + return (mapping.findForward(QaAppConstants.LEARNER_REP)); } /** @@ -515,6 +525,15 @@ QaSession qaSession = QaLearningAction.qaService.getSessionById(new Long(toolSessionID).longValue()); QaContent qaContent = qaSession.getQaContent(); + + QaQueUsr qaQueUsr = getCurrentUser(toolSessionID); + //prohibit users from submitting answers after response is finalized but Resubmit button is not pressed (e.g. using 2 browsers) + if (qaQueUsr.isResponseFinalized()) { + ActionRedirect redirect = new ActionRedirect(mapping.findForwardConfig("learningStarter")); + redirect.addParameter(AttributeNames.PARAM_TOOL_SESSION_ID, toolSessionID); + redirect.addParameter(MODE, "learner"); + return redirect; + } GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -653,6 +672,15 @@ qaLearningForm.setToolSessionID(toolSessionID); QaSession qaSession = QaLearningAction.qaService.getSessionById(new Long(toolSessionID).longValue()); QaContent qaContent = qaSession.getQaContent(); + + QaQueUsr qaQueUsr = getCurrentUser(toolSessionID); + //prohibit users from submitting answers after response is finalized but Resubmit button is not pressed (e.g. using 2 browsers) + if (qaQueUsr.isResponseFinalized()) { + ActionRedirect redirect = new ActionRedirect(mapping.findForwardConfig("learningStarter")); + redirect.addParameter(AttributeNames.PARAM_TOOL_SESSION_ID, toolSessionID); + redirect.addParameter(MODE, "learner"); + return redirect; + } GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java =================================================================== diff -u -r55645d4b796f36715b66a70fce66406a986ee647 -r14e8c67fbecc09db1e8f1d1c031db8433b7be927 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 55645d4b796f36715b66a70fce66406a986ee647) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 14e8c67fbecc09db1e8f1d1c031db8433b7be927) @@ -75,7 +75,7 @@ import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; -/**d +/** * This class is used to load the default content and initialize the presentation Map for Learner mode. * It is important that ALL the session attributes created in this action gets removed by: QaUtils.cleanupSession(request) * @@ -158,7 +158,7 @@ } } - /* holds the question contents for a given tool session and relevant content s*/ + /* holds the question contents for a given tool session and relevant content */ Map mapQuestionStrings = new TreeMap(new QaComparator()); Map mapQuestions = new TreeMap(); @@ -287,7 +287,7 @@ generalLearnerFlowDTO); request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - return (mapping.findForward(INDIVIDUAL_LEARNER_REPORT)); + return (mapping.findForward(LEARNER_REP)); } //check if there is submission deadline @@ -344,7 +344,7 @@ return (mapping.findForward(REVISITED_LEARNER_REP)); } else { generalLearnerFlowDTO.setRequestLearningReportViewOnly(new Boolean(false).toString()); - return (mapping.findForward(INDIVIDUAL_LEARNER_REPORT)); + return (mapping.findForward(LEARNER_REP)); } } } Index: lams_tool_laqa/web/WEB-INF/struts-config.xml =================================================================== diff -u -ra7661f206a3f21114f1c05f9a29f56e20f5e35f0 -r14e8c67fbecc09db1e8f1d1c031db8433b7be927 --- lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision a7661f206a3f21114f1c05f9a29f56e20f5e35f0) +++ lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 14e8c67fbecc09db1e8f1d1c031db8433b7be927) @@ -186,14 +186,7 @@ path="/learning/LearnerRep.jsp" redirect="false" /> - - - -
+
-
+
Index: lams_tool_laqa/web/authoring/newQuestionBox.jsp =================================================================== diff -u -r55645d4b796f36715b66a70fce66406a986ee647 -r14e8c67fbecc09db1e8f1d1c031db8433b7be927 --- lams_tool_laqa/web/authoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 55645d4b796f36715b66a70fce66406a986ee647) +++ lams_tool_laqa/web/authoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 14e8c67fbecc09db1e8f1d1c031db8433b7be927) @@ -209,7 +209,7 @@
-
+
-
+