Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java =================================================================== diff -u -raf2294a9411ee67e92a614ee7e60df3c1c764b6e -r7cefcae725bb4e568ae1d61624a75bd6b3f3a8c3 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 7cefcae725bb4e568ae1d61624a75bd6b3f3a8c3) @@ -91,7 +91,7 @@ protected Map mapQuestions; - protected Map mapQuestionContentLearner; + protected Map mapQuestionContentLearner; protected List listMonitoredAnswersContainerDTO; @@ -146,15 +146,15 @@ /** * @return Returns the mapQuestionContentLearner. */ - public Map getMapQuestionContentLearner() { + public Map getMapQuestionContentLearner() { return mapQuestionContentLearner; } /** * @param mapQuestionContentLearner * The mapQuestionContentLearner to set. */ - public void setMapQuestionContentLearner(Map mapQuestionContentLearner) { + public void setMapQuestionContentLearner(Map mapQuestionContentLearner) { this.mapQuestionContentLearner = mapQuestionContentLearner; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java =================================================================== diff -u -rbe07c35c372d904a65581d98660e73f3b13b69db -r7cefcae725bb4e568ae1d61624a75bd6b3f3a8c3 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java (.../LearningUtil.java) (revision be07c35c372d904a65581d98660e73f3b13b69db) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java (.../LearningUtil.java) (revision 7cefcae725bb4e568ae1d61624a75bd6b3f3a8c3) @@ -83,13 +83,13 @@ generalLearnerFlowDTO.setTotalQuestionCount(new Integer(qaContent.getQaQueContents().size())); //create mapQuestions - Map mapQuestions = new TreeMap(); + Map mapQuestions = new TreeMap(); for (QaQueContent question : qaContent.getQaQueContents()) { int displayOrder = question.getDisplayOrder(); if (displayOrder != 0) { //add the question to the questions Map in the displayOrder QaQuestionDTO questionDTO = new QaQuestionDTO(question); - mapQuestions.put(questionDTO.getDisplayOrder(), questionDTO); + mapQuestions.put(displayOrder, questionDTO); } } generalLearnerFlowDTO.setMapQuestionContentLearner(mapQuestions); @@ -125,7 +125,7 @@ /** */ public static void populateAnswers(Map sessionMap, QaContent qaContent, QaQueUsr qaQueUsr, - Map mapQuestions, GeneralLearnerFlowDTO generalLearnerFlowDTO, + Map mapQuestions, GeneralLearnerFlowDTO generalLearnerFlowDTO, IQaService qaService) { //create mapAnswers Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -rc5457cc74f3986b393bc2947604b17168ba54dfb -r7cefcae725bb4e568ae1d61624a75bd6b3f3a8c3 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision c5457cc74f3986b393bc2947604b17168ba54dfb) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 7cefcae725bb4e568ae1d61624a75bd6b3f3a8c3) @@ -135,7 +135,7 @@ mapAnswers.put(questionIndexString, answer); mapAnswersPresentable.put(questionIndexString, answer); - Map questionContentMap = generalLearnerFlowDTO.getMapQuestionContentLearner(); + Map questionContentMap = generalLearnerFlowDTO.getMapQuestionContentLearner(); QaQuestionDTO dto = questionContentMap.get(questionIndexString); if (dto.isRequired() && isEmpty(answer)) { errors.add(Globals.ERROR_KEY, new ActionMessage("error.required", questionIndexString)); @@ -154,7 +154,7 @@ mapAnswersPresentable = MonitoringUtil.removeNewLinesMap(mapAnswersPresentable); // only need to check the final question as the others will have been checked when the user clicked next. - Map questionMap = generalLearnerFlowDTO.getMapQuestionContentLearner(); + Map questionMap = generalLearnerFlowDTO.getMapQuestionContentLearner(); int numQuestions = questionMap.size(); String finalQuestionIndex = new Integer(numQuestions).toString(); QaQuestionDTO dto = questionMap.get(finalQuestionIndex); @@ -183,7 +183,7 @@ generalLearnerFlowDTO.setReflection(new Boolean(qaContent.isReflect()).toString()); request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - + // notify teachers on response submit if (errors.isEmpty() && qaContent.isNotifyTeachersOnResponseSubmit()) { qaService.notifyTeachersOnResponseSubmit(new Long(toolSessionID)); @@ -289,7 +289,7 @@ generalLearnerFlowDTO.setToolContentID(qaContent.getQaContentId().toString()); // create mapQuestions - Map mapQuestions = generalLearnerFlowDTO.getMapQuestionContentLearner(); + Map mapQuestions = generalLearnerFlowDTO.getMapQuestionContentLearner(); generalLearnerFlowDTO.setMapQuestions(mapQuestions); generalLearnerFlowDTO.setTotalQuestionCount(new Integer(mapQuestions.size())); generalLearnerFlowDTO.setRemainingQuestionCount(new Integer(mapQuestions.size()).toString()); @@ -562,7 +562,7 @@ // is this question required and are they trying to go to the next question? // if so, check if the answer is blank and generate an error if it is blank. - Map questionContentMap = generalLearnerFlowDTO.getMapQuestionContentLearner(); + Map questionContentMap = generalLearnerFlowDTO.getMapQuestionContentLearner(); QaQuestionDTO dto = questionContentMap.get(currentQuestionIndex); boolean isRequiredQuestionMissed = dto.isRequired() && isEmpty(newAnswer); if (getNextQuestion && isRequiredQuestionMissed) { Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java =================================================================== diff -u -r6ac8c3a8a953aab157cb5075fba73b09da5e4cf8 -r7cefcae725bb4e568ae1d61624a75bd6b3f3a8c3 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 6ac8c3a8a953aab157cb5075fba73b09da5e4cf8) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 7cefcae725bb4e568ae1d61624a75bd6b3f3a8c3) @@ -163,7 +163,7 @@ /* holds the question contents for a given tool session and relevant content */ Map mapQuestionStrings = new TreeMap(new QaComparator()); - Map mapQuestions = new TreeMap(); + Map mapQuestions = new TreeMap(); String httpSessionID = qaLearningForm.getHttpSessionID(); SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); @@ -228,7 +228,7 @@ * add the question to the questions Map in the displayOrder */ QaQuestionDTO questionDTO = new QaQuestionDTO(qaQuestion); - mapQuestions.put(questionDTO.getDisplayOrder(), questionDTO); + mapQuestions.put(displayOrder, questionDTO); mapQuestionStrings.put(new Integer(displayOrder).toString(), qaQuestion.getQuestion());