Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r69092337b728f903f824a74377bd0ebf9391120c -ra61647737b2a52dfc32f5d47247df8adebbc7854 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 69092337b728f903f824a74377bd0ebf9391120c) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision a61647737b2a52dfc32f5d47247df8adebbc7854) @@ -187,11 +187,7 @@ public static final String TO_TOOL_CONTENT_ID = "toToolContentId"; public static final String LEARNER_REPORT = "learnerRep"; 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"; - public static final String REQUEST_LEARNING_REPORT_VIEWONLY = "requestLearningReportViewOnly"; - public static final String REVISITED_LEARNER_REP = "revisitedLearnerRep"; public static final String IS_DISABLED = "isDisabled"; /* Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java =================================================================== diff -u -r69092337b728f903f824a74377bd0ebf9391120c -ra61647737b2a52dfc32f5d47247df8adebbc7854 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 69092337b728f903f824a74377bd0ebf9391120c) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision a61647737b2a52dfc32f5d47247df8adebbc7854) @@ -27,7 +27,6 @@ import java.util.Map; import java.util.Set; -import org.apache.commons.lang.builder.ToStringBuilder; import org.lamsfoundation.lams.tool.qa.model.QaQueContent; import org.lamsfoundation.lams.tool.qa.model.QaUsrResp; @@ -64,8 +63,6 @@ protected String remainingQuestionCount; - protected String teacherViewOnly; - protected String notebookEntriesVisible; protected String reflection; @@ -80,12 +77,8 @@ protected boolean showOtherAnswers; - protected String requestLearningReport; + protected boolean isLearnerFinished; - protected String requestLearningReportProgress; - - protected String requestLearningReportViewOnly; - protected Map mapAnswers; protected Map mapAnswersPresentable; @@ -247,22 +240,6 @@ } } - @Override - public String toString() { - return new ToStringBuilder(this).append("remainingQuestionCount: ", remainingQuestionCount) - .append("totalQuestionCount : ", totalQuestionCount) - .append("activityInstructions: ", activityInstructions).append("teacherViewOnly: ", teacherViewOnly) - .append("lockWhenFinished: ", lockWhenFinished).append("activityTitle: ", activityTitle) - .append("countSessionComplete: ", countSessionComplete).append("toolSessionID: ", toolSessionID) - .append("currentQuestionIndex: ", currentQuestionIndex) - .append("questionListingMode: ", questionListingMode) - .append("userNameVisible: ", userNameVisible).append("requestLearningReport: ", requestLearningReport) - .append("requestLearningReportProgress: ", requestLearningReportProgress) - .append("requestLearningReportViewOnly: ", requestLearningReportViewOnly) - .append("mapAnswers: ", mapAnswers).append("mapQuestions: ", mapQuestions) - .append("mapQuestionContentLearner: ", mapQuestionContentLearner).toString(); - } - /** * @param currentQuestionIndex * The currentQuestionIndex to set. @@ -398,52 +375,15 @@ this.httpSessionID = httpSessionID; } - /** - * @return Returns the requestLearningReport. - */ - public String getRequestLearningReport() { - return requestLearningReport; + public boolean getIsLearnerFinished() { + return isLearnerFinished; } - /** - * @param requestLearningReport - * The requestLearningReport to set. - */ - public void setRequestLearningReport(String requestLearningReport) { - this.requestLearningReport = requestLearningReport; + public void setIsLearnerFinished(boolean isLearnerFinished) { + this.isLearnerFinished = isLearnerFinished; } /** - * @return Returns the requestLearningReportProgress. - */ - public String getRequestLearningReportProgress() { - return requestLearningReportProgress; - } - - /** - * @param requestLearningReportProgress - * The requestLearningReportProgress to set. - */ - public void setRequestLearningReportProgress(String requestLearningReportProgress) { - this.requestLearningReportProgress = requestLearningReportProgress; - } - - /** - * @return Returns the requestLearningReportViewOnly. - */ - public String getRequestLearningReportViewOnly() { - return requestLearningReportViewOnly; - } - - /** - * @param requestLearningReportViewOnly - * The requestLearningReportViewOnly to set. - */ - public void setRequestLearningReportViewOnly(String requestLearningReportViewOnly) { - this.requestLearningReportViewOnly = requestLearningReportViewOnly; - } - - /** * @return Returns the questions. */ public List getUserResponses() { @@ -564,21 +504,6 @@ } /** - * @return Returns the teacherViewOnly. - */ - public String getTeacherViewOnly() { - return teacherViewOnly; - } - - /** - * @param teacherViewOnly - * The teacherViewOnly to set. - */ - public void setTeacherViewOnly(String teacherViewOnly) { - this.teacherViewOnly = teacherViewOnly; - } - - /** * @return Returns the remainingQuestionCount. */ public String getRemainingQuestionCount() { Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java =================================================================== diff -u -r69092337b728f903f824a74377bd0ebf9391120c -ra61647737b2a52dfc32f5d47247df8adebbc7854 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java (.../QaUtils.java) (revision 69092337b728f903f824a74377bd0ebf9391120c) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java (.../QaUtils.java) (revision a61647737b2a52dfc32f5d47247df8adebbc7854) @@ -159,11 +159,7 @@ request.getSession().removeAttribute(QaAppConstants.CURRENT_ANSWER); request.getSession().removeAttribute(QaAppConstants.DEFINE_LATER); request.getSession().removeAttribute(QaAppConstants.SOURCE_MC_STARTER); - request.getSession().removeAttribute(QaAppConstants.REQUEST_LEARNING_REPORT); - request.getSession().removeAttribute(QaAppConstants.REQUEST_LEARNING_REPORT_VIEWONLY); request.getSession().removeAttribute(QaAppConstants.REQUEST_PREVIEW); - request.getSession().removeAttribute(QaAppConstants.REQUEST_LEARNING_REPORT_PROGRESS); - request.getSession().removeAttribute(QaAppConstants.USER_EXCEPTION_WRONG_FORMAT); request.getSession().removeAttribute(QaAppConstants.USER_EXCEPTION_UNCOMPATIBLE_IDS); request.getSession().removeAttribute(QaAppConstants.USER_EXCEPTION_NUMBERFORMAT); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaLearningController.java =================================================================== diff -u -r20aa6cbca9fc96d341080e6ad39f82593443f792 -ra61647737b2a52dfc32f5d47247df8adebbc7854 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaLearningController.java (.../QaLearningController.java) (revision 20aa6cbca9fc96d341080e6ad39f82593443f792) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaLearningController.java (.../QaLearningController.java) (revision a61647737b2a52dfc32f5d47247df8adebbc7854) @@ -40,7 +40,6 @@ import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; -import org.lamsfoundation.lams.learningdesign.dto.ActivityPositionDTO; import org.lamsfoundation.lams.notebook.model.NotebookEntry; import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.rating.dto.ItemRatingCriteriaDTO; @@ -82,7 +81,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.context.WebApplicationContext; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.JsonNodeFactory; @@ -94,52 +92,26 @@ @Controller @RequestMapping("/learning") public class QaLearningController implements QaAppConstants { - private static Logger logger = Logger.getLogger(QaLearningController.class.getName()); - @Autowired private IQaService qaService; @Autowired @Qualifier("qaMessageService") private MessageService messageService; - @Autowired - private WebApplicationContext applicationContext; - - @RequestMapping("/") - public String unspecified() throws IOException, ServletException, ToolException { - QaLearningController.logger.warn("dispatching unspecified..."); - return null; - } - @RequestMapping("/learning") public String execute(@ModelAttribute("qaLearningForm") QaLearningForm qaLearningForm, HttpServletRequest request) throws IOException, ServletException, QaApplicationException { QaUtils.cleanUpSessionAbsolute(request); - /* validate learning mode parameters */ - validateParameters(request, qaLearningForm); - String mode = qaLearningForm.getMode(); - String toolSessionID = qaLearningForm.getToolSessionID(); + String toolSessionID = request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID); + qaLearningForm.setToolSessionID(toolSessionID); + String mode = request.getParameter(MODE); + qaLearningForm.setMode(mode); - /* - * By now, the passed tool session id MUST exist in the db by calling: - * public void createToolSession(Long toolSessionId, Long toolContentId) by the core. - * - * make sure this session exists in tool's session table by now. - */ QaSession qaSession = qaService.getSessionById(new Long(toolSessionID).longValue()); - if (qaSession == null) { - QaUtils.cleanUpSessionAbsolute(request); - throw new ServletException("No session found"); - } - QaContent qaContent = qaSession.getQaContent(); - if (qaContent == null) { - QaUtils.cleanUpSessionAbsolute(request); - throw new ServletException("No QA content found"); - } QaQueUsr user = null; if ((mode != null) && mode.equals(ToolAccessMode.TEACHER.toString())) { @@ -183,7 +155,7 @@ } /* holds the question contents for a given tool session and relevant content */ - Map mapQuestionStrings = new TreeMap(new QaComparator()); + Map mapQuestionStrings = new TreeMap<>(new QaComparator()); Map mapQuestions = new TreeMap<>(); String httpSessionID = qaLearningForm.getHttpSessionID(); @@ -243,9 +215,9 @@ /* * fetch question content from content */ - Iterator contentIterator = qaContent.getQaQueContents().iterator(); + Iterator contentIterator = qaContent.getQaQueContents().iterator(); while (contentIterator.hasNext()) { - QaQueContent qaQuestion = (QaQueContent) contentIterator.next(); + QaQueContent qaQuestion = contentIterator.next(); if (qaQuestion != null) { int displayOrder = qaQuestion.getDisplayOrder(); @@ -256,15 +228,15 @@ QaQuestionDTO questionDTO = new QaQuestionDTO(qaQuestion); mapQuestions.put(displayOrder, questionDTO); - mapQuestionStrings.put(new Integer(displayOrder).toString(), qaQuestion.getQuestion()); + mapQuestionStrings.put(String.valueOf(displayOrder), qaQuestion.getQuestion()); } } } generalLearnerFlowDTO.setMapQuestions(mapQuestionStrings); generalLearnerFlowDTO.setMapQuestionContentLearner(mapQuestions); - generalLearnerFlowDTO.setTotalQuestionCount(new Integer(mapQuestions.size())); - qaLearningForm.setTotalQuestionCount(new Integer(mapQuestions.size()).toString()); + generalLearnerFlowDTO.setTotalQuestionCount(mapQuestions.size()); + qaLearningForm.setTotalQuestionCount(String.valueOf(mapQuestions.size())); String feedBackType = ""; if (qaContent.isQuestionsSequenced()) { @@ -276,25 +248,18 @@ generalLearnerFlowDTO.setUserFeedback(userFeedback); generalLearnerFlowDTO.setRemainingQuestionCount(generalLearnerFlowDTO.getTotalQuestionCount().toString()); - generalLearnerFlowDTO.setInitialScreen(new Boolean(true).toString()); + generalLearnerFlowDTO.setInitialScreen(Boolean.TRUE.toString()); request.setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); /* - * by now, we know that the mode is either teacher or learner - * check if the mode is teacher and request is for Learner Progress + * check if the mode is teacher */ if (mode.equals("teacher")) { - //start generating learner progress report for toolSessionID - /* * the report should have the all entries for the users in this tool session, * and display under the "my answers" section the answers for the user id in the url */ -// Long learnerProgressUserId = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); - generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); - generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); - generalLearnerFlowDTO.setTeacherViewOnly(new Boolean(true).toString()); QaLearningController.refreshSummaryData(request, qaContent, qaSession, qaService, sessionMapId, user, generalLearnerFlowDTO); @@ -328,20 +293,14 @@ * the report should have all the users' entries OR the report should have only the current * session's entries */ - generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); - + QaLearningController.refreshSummaryData(request, qaContent, qaSession, qaService, sessionMapId, user, generalLearnerFlowDTO); - if (user.isLearnerFinished()) { - generalLearnerFlowDTO.setRequestLearningReportViewOnly(new Boolean(true).toString()); - return "learning/RevisitedLearnerRep"; - } else { - generalLearnerFlowDTO.setRequestLearningReportViewOnly(new Boolean(false).toString()); - return "learning/LearnerRep"; - } + generalLearnerFlowDTO.setIsLearnerFinished(user.isLearnerFinished()); + return "learning/learnerRep"; - // show submissionDeadline page otherwise + // show submissionDeadline page otherwise } else { return "learning/submissionDeadline"; } @@ -360,7 +319,6 @@ * if the 'All Responses' has been clicked no more user entry is accepted, and isResponseFinalized() returns * true */ - Long currentToolSessionID = new Long(qaLearningForm.getToolSessionID()); //if Response is Finalized if (user.isResponseFinalized()) { @@ -369,28 +327,22 @@ if (checkSession != null) { Long checkQaSessionId = checkSession.getQaSessionId(); - if (checkQaSessionId.toString().equals(currentToolSessionID.toString())) { + if (checkQaSessionId.toString().equals(toolSessionID)) { // the learner is in the same session and has already responsed to this content - generalLearnerFlowDTO.setLockWhenFinished(new Boolean(qaContent.isLockWhenFinished()).toString()); + generalLearnerFlowDTO.setLockWhenFinished(String.valueOf(qaContent.isLockWhenFinished())); generalLearnerFlowDTO.setNoReeditAllowed(qaContent.isNoReeditAllowed()); /* * the report should have all the users' entries OR the report should have only the current * session's entries */ - generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); QaLearningController.refreshSummaryData(request, qaContent, qaSession, qaService, sessionMapId, user, generalLearnerFlowDTO); - if (user.isLearnerFinished()) { - generalLearnerFlowDTO.setRequestLearningReportViewOnly(new Boolean(true).toString()); - return "learning/RevisitedLearnerRep"; - } else { - generalLearnerFlowDTO.setRequestLearningReportViewOnly(new Boolean(false).toString()); - return "learning/LearnerRep"; - } + generalLearnerFlowDTO.setIsLearnerFinished(user.isLearnerFinished()); + return "learning/learnerRep"; } } } @@ -401,45 +353,6 @@ return "learning/AnswersContent"; } - /** - * validates the learning mode parameters - */ - protected void validateParameters(HttpServletRequest request, - @ModelAttribute("qaLearningForm") QaLearningForm qaLearningForm) { - /* - * process incoming tool session id and later derive toolContentId from it. - */ - String strToolSessionId = request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID); - long toolSessionId = 0; - if ((strToolSessionId == null) || (strToolSessionId.length() == 0)) { - MultiValueMap errorMap = new LinkedMultiValueMap<>(); - errorMap.add("GLOBAL", messageService.getMessage("error.toolSessionId.required")); - logger.error("error.toolSessionId.required"); - request.setAttribute("errorMap", errorMap); - return; - } else { - try { - toolSessionId = new Long(strToolSessionId).longValue(); - qaLearningForm.setToolSessionID(new Long(toolSessionId).toString()); - } catch (NumberFormatException e) { - logger.error("add error.sessionId.numberFormatException to ActionMessages."); - return; - } - } - - /* mode can be learner, teacher or author */ - String mode = request.getParameter(MODE); - if ((mode == null) || (mode.length() == 0)) { - logger.error("Mode is empty"); - return; - } - if ((!mode.equals("learner")) && (!mode.equals("teacher")) && (!mode.equals("author"))) { - logger.error("Wrong mode"); - return; - } - qaLearningForm.setMode(mode); - } - private QaQueUsr getSpecifiedUser(String toolSessionId, Integer userId) { QaQueUsr qaUser = qaService.getUserByIdAndSession(userId.longValue(), new Long(toolSessionId)); if (qaUser == null) { @@ -542,7 +455,6 @@ sessionMap.put(QaAppConstants.MAP_ALL_RESULTS_KEY, mapAnswers); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); qaLearningForm.setHttpSessionID(sessionMap.getSessionID()); - qaLearningForm.resetAll(); generalLearnerFlowDTO.setHttpSessionID(sessionMap.getSessionID()); boolean lockWhenFinished = qaContent.isLockWhenFinished(); @@ -562,7 +474,6 @@ @RequestMapping(value = "/checkLeaderProgress") @ResponseBody public String checkLeaderProgress(HttpServletRequest request, HttpServletResponse response) throws IOException { - Long toolSessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); QaSession session = qaService.getSessionById(toolSessionId); @@ -577,7 +488,7 @@ } /** - * auto saves responses + * Auto saves responses. */ @RequestMapping("/autoSaveAnswers") @ResponseStatus(HttpStatus.OK) @@ -596,7 +507,6 @@ int intTotalQuestionCount = qaContent.getQaQueContents().size(); if (!qaContent.isQuestionsSequenced()) { - for (int questionIndex = QaAppConstants.INITIAL_QUESTION_COUNT .intValue(); questionIndex <= intTotalQuestionCount; questionIndex++) { String newAnswer = request.getParameter("answer" + questionIndex); @@ -622,7 +532,6 @@ @RequestMapping("/redoQuestions") public String redoQuestions(@ModelAttribute("qaLearningForm") QaLearningForm qaLearningForm, HttpServletRequest request) throws IOException, ServletException { - LearningUtil.saveFormRequestData(request, qaLearningForm); String toolSessionID = request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID); @@ -658,7 +567,6 @@ LearningUtil.populateAnswers(sessionMap, qaContent, qaQueUsr, mapQuestions, generalLearnerFlowDTO, qaService); request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - qaLearningForm.resetAll(); request.setAttribute("learningForm", qaLearningForm); return "learning/AnswersContent"; } @@ -672,7 +580,6 @@ @RequestMapping("/storeAllResults") public String storeAllResults(@ModelAttribute("qaLearningForm") QaLearningForm qaLearningForm, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - LearningUtil.saveFormRequestData(request, qaLearningForm); String toolSessionID = request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID); @@ -683,9 +590,6 @@ // LearningUtil.storeResponses(mapAnswers, qaService, toolContentID, new Long(toolSessionID)); - qaLearningForm.resetUserActions(); - qaLearningForm.setSubmitAnswersContent(null); - if (qaContent.isShowOtherAnswers()) { GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaService, qaContent); String httpSessionID = qaLearningForm.getHttpSessionID(); @@ -695,13 +599,8 @@ QaLearningController.refreshSummaryData(request, qaContent, qaSession, qaService, httpSessionID, user, generalLearnerFlowDTO); - generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); - generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(false).toString()); - generalLearnerFlowDTO.setReflection(new Boolean(qaContent.isReflect()).toString()); - qaLearningForm.resetAll(); - boolean lockWhenFinished = qaContent.isLockWhenFinished(); generalLearnerFlowDTO.setLockWhenFinished(new Boolean(lockWhenFinished).toString()); generalLearnerFlowDTO.setNoReeditAllowed(qaContent.isNoReeditAllowed()); @@ -767,21 +666,12 @@ SessionMap sessionMap = (SessionMap) request.getSession() .getAttribute(httpSessionID); - /* recreate the users and responses */ - qaLearningForm.resetUserActions(); - qaLearningForm.setSubmitAnswersContent(null); - QaLearningController.refreshSummaryData(request, qaContent, qaSession, qaService, httpSessionID, user, generalLearnerFlowDTO); - generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); - generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(false).toString()); - generalLearnerFlowDTO.setReflection(new Boolean(qaContent.isReflect()).toString()); - // generalLearnerFlowDTO.setNotebookEntriesVisible(new Boolean(false).toString()); + // generalLearnerFlowDTO.setNotebookEntriesVisible(Boolean.FALSE.toString()); - qaLearningForm.resetAll(); - boolean lockWhenFinished; boolean noReeditAllowed; if (sessionMap.get("noRefresh") != null && (boolean) sessionMap.get("noRefresh")) { @@ -846,10 +736,8 @@ } GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaService, qaContent); - storeSequentialAnswer(qaLearningForm, request, generalLearnerFlowDTO, true); - qaLearningForm.resetAll(); request.setAttribute("learningForm", qaLearningForm); return "learning/AnswersContent"; } @@ -920,8 +808,6 @@ generalLearnerFlowDTO.setUserFeedback(userFeedback); generalLearnerFlowDTO.setRemainingQuestionCount("" + remainingQuestionCount); - qaLearningForm.resetUserActions(); /* resets all except submitAnswersContent */ - sessionMap.put(QaAppConstants.MAP_ALL_RESULTS_KEY, mapAnswers); sessionMap.put(QaAppConstants.MAP_SEQUENTIAL_ANSWERS_KEY, mapSequentialAnswers); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); @@ -1002,10 +888,8 @@ } GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaService, qaContent); - storeSequentialAnswer(qaLearningForm, request, generalLearnerFlowDTO, false); - qaLearningForm.resetAll(); return "learning/AnswersContent"; } @@ -1040,7 +924,6 @@ String httpSessionID = qaLearningForm.getHttpSessionID(); // request.getSession().removeAttribute(httpSessionID); qaLearningForm.setHttpSessionID(httpSessionID); - qaLearningForm.resetAll(); String nextActivityUrl = qaService.finishToolSession(Long.valueOf(toolSessionID), user.getUserID().longValue()); response.sendRedirect(nextActivityUrl); @@ -1085,7 +968,6 @@ qaService.updateEntry(entry); } - qaLearningForm.resetUserActions(); /* resets all except submitAnswersContent */ return endLearning(qaLearningForm, request, response); } @@ -1130,9 +1012,7 @@ } request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - reflectionForm.resetUserActions(); /* resets all except submitAnswersContent */ - reflectionForm.resetAll(); return "learning/Notebook"; } @@ -1213,7 +1093,6 @@ sessionMap.put(AttributeNames.ATTR_COUNT_RATED_ITEMS, countRatedQuestions); generalLearnerFlowDTO.setUserResponses(userResponses); - generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); } /** Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaLearningForm.java =================================================================== diff -u -r2c884ed118ba4107ff035886dee97513321183a0 -ra61647737b2a52dfc32f5d47247df8adebbc7854 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaLearningForm.java (.../QaLearningForm.java) (revision 2c884ed118ba4107ff035886dee97513321183a0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaLearningForm.java (.../QaLearningForm.java) (revision a61647737b2a52dfc32f5d47247df8adebbc7854) @@ -32,133 +32,17 @@ protected String answer; protected String currentQuestionIndex; - protected String submitAnswersContent; - protected String getNextQuestion; - protected String getPreviousQuestion; - protected String endLearning; protected String refreshAnswers; - protected String submitReflection; - protected String updateReflection; - protected String forwardtoReflection; protected String totalQuestionCount; protected String httpSessionID; protected String toolSessionID; protected String questionIndex; protected String userID; protected String entryText; - protected String viewAllResults; - protected String viewAll; - protected String redoQuestions; protected String responseId; - protected String btnCombined; - protected String btnGetPrevious; - protected String btnDone; - protected String btnGetNext; - - protected String requestLearningReport; - protected String requestLearningReportProgress; - protected String requestLearningReportViewOnly; - /** - * @return Returns the btnCombined. - */ - public String getBtnCombined() { - return btnCombined; - } - - /** - * @param btnCombined - * The btnCombined to set. - */ - public void setBtnCombined(String btnCombined) { - this.btnCombined = btnCombined; - } - - /** - * @return Returns the btnDone. - */ - public String getBtnDone() { - return btnDone; - } - - /** - * @param btnDone - * The btnDone to set. - */ - public void setBtnDone(String btnDone) { - this.btnDone = btnDone; - } - - /** - * @return Returns the btnGetNext. - */ - public String getBtnGetNext() { - return btnGetNext; - } - - /** - * @param btnGetNext - * The btnGetNext to set. - */ - public void setBtnGetNext(String btnGetNext) { - this.btnGetNext = btnGetNext; - } - - /** - * @return Returns the btnGetPrevious. - */ - public String getBtnGetPrevious() { - return btnGetPrevious; - } - - /** - * @param btnGetPrevious - * The btnGetPrevious to set. - */ - public void setBtnGetPrevious(String btnGetPrevious) { - this.btnGetPrevious = btnGetPrevious; - } - - /** - * reset user actions in learning mode - * - * @param qaAuthoringForm - * return void - */ - - public void resetUserActions() { - this.getNextQuestion = null; - this.getPreviousQuestion = null; - this.endLearning = null; - this.submitReflection = null; - this.forwardtoReflection = null; - } - - public void resetAll() { - this.submitAnswersContent = null; - this.getNextQuestion = null; - this.getPreviousQuestion = null; - this.endLearning = null; - this.submitReflection = null; - this.forwardtoReflection = null; - - this.viewAllResults = null; - this.viewAll = null; - this.redoQuestions = null; - - this.btnCombined = null; - this.btnGetPrevious = null; - this.btnDone = null; - this.btnGetNext = null; - - this.requestLearningReport = null; - this.requestLearningReportProgress = null; - this.requestLearningReportViewOnly = null; - } - - /** * @return Returns the currentQuestionIndex. */ public String getCurrentQuestionIndex() { @@ -189,66 +73,6 @@ } /** - * @return Returns the getNextQuestion. - */ - public String getGetNextQuestion() { - return getNextQuestion; - } - - /** - * @param getNextQuestion - * The getNextQuestion to set. - */ - public void setGetNextQuestion(String getNextQuestion) { - this.getNextQuestion = getNextQuestion; - } - - /** - * @return Returns the getPreviousQuestion. - */ - public String getGetPreviousQuestion() { - return getPreviousQuestion; - } - - /** - * @param getPreviousQuestion - * The getPreviousQuestion to set. - */ - public void setGetPreviousQuestion(String getPreviousQuestion) { - this.getPreviousQuestion = getPreviousQuestion; - } - - /** - * @return Returns the submitAnswersContent. - */ - public String getSubmitAnswersContent() { - return submitAnswersContent; - } - - /** - * @param submitAnswersContent - * The submitAnswersContent to set. - */ - public void setSubmitAnswersContent(String submitAnswersContent) { - this.submitAnswersContent = submitAnswersContent; - } - - /** - * @return Returns the endLearning. - */ - public String getEndLearning() { - return endLearning; - } - - /** - * @param endLearning - * The endLearning to set. - */ - public void setEndLearning(String endLearning) { - this.endLearning = endLearning; - } - - /** * @return Returns the responseId. */ public String getResponseId() { @@ -264,21 +88,6 @@ } /** - * @return Returns the viewAllResults. - */ - public String getViewAllResults() { - return viewAllResults; - } - - /** - * @param viewAllResults - * The viewAllResults to set. - */ - public void setViewAllResults(String viewAllResults) { - this.viewAllResults = viewAllResults; - } - - /** * @return Returns the toolSessionID. */ public String getToolSessionID() { @@ -371,66 +180,6 @@ } /** - * @return Returns the requestLearningReport. - */ - public String getRequestLearningReport() { - return requestLearningReport; - } - - /** - * @param requestLearningReport - * The requestLearningReport to set. - */ - public void setRequestLearningReport(String requestLearningReport) { - this.requestLearningReport = requestLearningReport; - } - - /** - * @return Returns the requestLearningReportProgress. - */ - public String getRequestLearningReportProgress() { - return requestLearningReportProgress; - } - - /** - * @param requestLearningReportProgress - * The requestLearningReportProgress to set. - */ - public void setRequestLearningReportProgress(String requestLearningReportProgress) { - this.requestLearningReportProgress = requestLearningReportProgress; - } - - /** - * @return Returns the requestLearningReportViewOnly. - */ - public String getRequestLearningReportViewOnly() { - return requestLearningReportViewOnly; - } - - /** - * @param requestLearningReportViewOnly - * The requestLearningReportViewOnly to set. - */ - public void setRequestLearningReportViewOnly(String requestLearningReportViewOnly) { - this.requestLearningReportViewOnly = requestLearningReportViewOnly; - } - - /** - * @return Returns the redoQuestions. - */ - public String getRedoQuestions() { - return redoQuestions; - } - - /** - * @param redoQuestions - * The redoQuestions to set. - */ - public void setRedoQuestions(String redoQuestions) { - this.redoQuestions = redoQuestions; - } - - /** * @return Returns the refreshAnswers. */ public String getRefreshAnswers() { @@ -460,64 +209,4 @@ this.entryText = entryText; } - /** - * @return Returns the forwardtoReflection. - */ - public String getForwardtoReflection() { - return forwardtoReflection; - } - - /** - * @param forwardtoReflection - * The forwardtoReflection to set. - */ - public void setForwardtoReflection(String forwardtoReflection) { - this.forwardtoReflection = forwardtoReflection; - } - - /** - * @return Returns the submitReflection. - */ - public String getSubmitReflection() { - return submitReflection; - } - - /** - * @param submitReflection - * The submitReflection to set. - */ - public void setSubmitReflection(String submitReflection) { - this.submitReflection = submitReflection; - } - - /** - * @return Returns the viewAll. - */ - public String getViewAll() { - return viewAll; - } - - /** - * @param viewAll - * The viewAll to set. - */ - public void setViewAll(String viewAll) { - this.viewAll = viewAll; - } - - /** - * @return Returns the updateReflection. - */ - public String getUpdateReflection() { - return updateReflection; - } - - /** - * @param updateReflection - * The updateReflection to set. - */ - public void setUpdateReflection(String updateReflection) { - this.updateReflection = updateReflection; - } - } Index: lams_tool_laqa/web/learning/LearnerRep.jsp =================================================================== diff -u -r3bb7e0141ae1cc15ccd737c95d90b5762a34ad61 -ra61647737b2a52dfc32f5d47247df8adebbc7854 --- lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision 3bb7e0141ae1cc15ccd737c95d90b5762a34ad61) +++ lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision a61647737b2a52dfc32f5d47247df8adebbc7854) @@ -20,7 +20,7 @@ - + - @@ -256,11 +255,11 @@ - + - + @@ -303,16 +302,11 @@ - -

- -

-
@@ -425,56 +419,83 @@ - - - - - + + + + + + + + +
+
+
+
+ +
+
+
+ +
+
+ +
- - -
- + + + +
+
+
+
+ - - - + +
+ + + - - - - - - - -
+ + -
+ + + + + - + + + + +
+
+ - - Fisheye: Tag a61647737b2a52dfc32f5d47247df8adebbc7854 refers to a dead (removed) revision in file `lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp'. Fisheye: No comparison available. Pass `N' to diff?