Fisheye: Tag c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a refers to a dead (removed) revision in file `lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/Nullable.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -49,7 +49,6 @@ public static final String TITLE = "title"; public static final String INSTRUCTIONS = "instructions"; public static final String LOAD_LEARNER = "learning/AnswersContent"; - public static final String VIEW_ALL_RESULTS = "viewAllResults"; public static final String INDIVIDUAL_LEARNER_RESULTS = "learning/IndividualLearnerResults"; public static final String MAP_ALL_RESULTS_KEY = "mapAllResultsKey"; public static final String SOURCE_QA_STARTER = "sourceQaStarter"; @@ -66,99 +65,34 @@ public static final String IS_TOOL_SESSION_AVAILABLE = "isToolSessionAvailable"; public static final String REMOVABLE_QUESTION_INDEX = "removableQuestionIndex"; - public static final String DEFINE_LATER = "defineLater"; public static final String WAIT_FOR_LEADER = "waitForLeader"; - - public static final String SOURCE_MC_STARTER = "sourceMcStarter"; public static final Integer MAX_QUESTION_COUNT = 50; - public static final String GENERAL_LEARNER_FLOW_DTO = "generalLearnerFlowDTO"; - public static final Long INITIAL_QUESTION_COUNT = 1L; /* * Struts level constants */ public static final String LOAD_MONITORING = "loadMonitoring"; - public static final String LEARNING_MODE = "learningMode"; public static final String SUCCESS = "success"; - /* - * authoring mode controllers - */ - public static final String IS_ADD_QUESTION = "isAddQuestion"; - public static final String IS_REMOVE_QUESTION = "isRemoveQuestion"; - public static final String IS_REMOVE_CONTENT = "isRemoveContent"; - - /* - * authoring mode constants - */ - public static final String MAP_QUESTION_CONTENT = "mapQuestionContent"; - public static final String END_LEARNING_MESSSAGE = "endLearningMessage"; - public static final String ON = "ON"; - public static final String OFF = "OFF"; - public static final String RICHTEXT_TITLE = "richTextTitle"; - public static final String RICHTEXT_INSTRUCTIONS = "richTextInstructions"; - public static final String RICHTEXT_BLANK = "

 

"; - - public static final String USER_ID = "userID"; - public final long ONE_DAY = 60 * 60 * 1000 * 24; - public final static String NOT_ATTEMPTED = "NOT_ATTEMPTED"; - public final static String INCOMPLETE = "INCOMPLETE"; public static final String COMPLETED = "COMPLETED"; - public static final String MAP_TOOL_SESSIONS = "mapToolSessions"; - public static final Integer MAX_TOOL_SESSION_COUNT = new Integer(500); - public static final String COUNT_SESSION_COMPLETE = "countSessionComplete"; - - public static final String COUNT_ALL_USERS = "countAllUsers"; - public static final String LIST_MONITORED_ANSWERS_CONTAINER_DTO = "listMonitoredAnswersContainerDto"; - public static final String ACTIVITY_TITLE = "activityTitle"; public static final String ACTIVITY_INSTRUCTIONS = "activityInstructions"; - public static final String IS_USERNAME_VISIBLE = "isUsernameVisible"; - public static final String CURRENT_ANSWER = "currentAnswer"; public static final String MODE = "mode"; - public static final String LEARNER = "learner"; - public static final String TEACHER = "teacher"; - /* - * user actions - */ - public static final String ADD_NEW_QUESTION = "addNewQuestion"; - public static final String REMOVE_QUESTION = "removeQuestion"; - public static final String REMOVE_ALL_CONTENT = "removeAllContent"; - public static final String SUBMIT_ALL_CONTENT = "submitAllContent"; - public static final String SUBMIT_TAB_DONE = "submitTabDone"; - - public static final String OPTION_OFF = "false"; - // LEARNER mode contants - public static final String MAP_QUESTION_CONTENT_LEARNER = "mapQuestionContentLearner"; - public static final String CURRENT_QUESTION_INDEX = "currentQuestionIndex"; - public static final String TOTAL_QUESTION_COUNT = "totalQuestionCount"; - public static final String MAP_ANSWERS = "mapAnswers"; - public static final String USER_FEEDBACK = "userFeedback"; - public static final String REPORT_TITLE_LEARNER = "reportTitleLearner"; - public static final String END_LEARNING_MESSAGE = "endLearningMessage"; - public static final String CHECK_ALL_SESSIONS_COMPLETED = "checkAllSessionsCompleted"; - 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 LEARNER_REP = "individualLearnerRep"; public static final String REVISITED_LEARNER_REP = "revisitedLearnerRep"; public static final String IS_DISABLED = "isDisabled"; /* * Monitoring Mode constants */ - public static final String EDITACTIVITY_EDITMODE = "editActivityEditMode"; - public static final String RENDER_MONITORING_EDITACTIVITY = "renderMonitoringEditActivity"; - public static final String NO_AVAILABLE_SESSIONS = "noAvailableSessions"; - public static final String NO_TOOL_SESSIONS_AVAILABLE = "noToolSessionAvailable"; public static final String ATTR_CONTENT = "content"; public static final String ATTR_SUBMISSION_DEADLINE = "submissionDeadline"; public static final String ATTR_SUBMISSION_DEADLINE_DATESTRING = "submissionDateString"; @@ -168,13 +102,9 @@ public static final String ATTR_IS_USER_LEADER = "isUserLeader"; public static final String ATTR_GROUP_LEADER = "groupLeader"; - public static final String TIMEZONE = "timeZone"; - public static final String TIMEZONE_ID = "timeZoneId"; /* * Monitor and Learning common constants - used in jsp reporting */ - - public static final String QUESTION_LISTING_MODE = "questionListingMode"; public static final String QUESTION_LISTING_MODE_SEQUENTIAL = "questionListingModeSequential"; public static final String QUESTION_LISTING_MODE_PREVIEW = "questionListingModePreview"; public static final String QUESTION_LISTING_MODE_COMBINED = "questionListingModeCombined"; @@ -183,7 +113,6 @@ public static final String FEEDBACK_TYPE_COMBINED = "You are being presented total of: "; public static final String QUESTIONS = " questions."; - public static final String SUBMIT_SUCCESS = "sbmtSuccess"; // for condition management use public static final String ATTR_SESSION_MAP_ID = "sessionMapID"; public static final String ATTR_CONDITION_SET = "conditionList"; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaUsrRespDAO.java =================================================================== diff -u -r69092337b728f903f824a74377bd0ebf9391120c -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaUsrRespDAO.java (.../IQaUsrRespDAO.java) (revision 69092337b728f903f824a74377bd0ebf9391120c) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaUsrRespDAO.java (.../IQaUsrRespDAO.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -43,8 +43,6 @@ public QaUsrResp getResponseByUserAndQuestion(final Long queUsrId, final Long questionId); - int getCountResponsesByQaContent(final Long qaContentId); - List getResponsesByUserUid(final Long userUid); List getResponseBySessionAndQuestion(final Long qaSessionId, final Long questionId); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java (.../QaUsrRespDAO.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java (.../QaUsrRespDAO.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -51,9 +51,6 @@ private static final String LOAD_ATTEMPT_FOR_USER = "from qaUsrResp in class QaUsrResp " + "where qaUsrResp.qaQueUser.uid=:userUid order by qaUsrResp.qbToolQuestion.displayOrder asc"; - private static final String GET_COUNT_RESPONSES_BY_QACONTENT = "SELECT COUNT(*) from " + QaUsrResp.class.getName() - + " as r where r.qbToolQuestion.toolContentId=?"; - @Override public void createUserResponse(QaUsrResp qaUsrResp) { getSession().save(qaUsrResp); @@ -260,16 +257,6 @@ return list; } - @Override - public int getCountResponsesByQaContent(final Long qaContentId) { - - List list = doFind(GET_COUNT_RESPONSES_BY_QACONTENT, new Object[] { qaContentId }); - if (list == null || list.size() == 0) { - return 0; - } - return ((Number) list.get(0)).intValue(); - } - private static final String GET_COUNT_RESPONSES_FOR_SESSION_AND_QUESTION_WITH_NAME_SEARCH = "SELECT COUNT(*) FROM " + QaUsrResp.class.getName() + " AS r WHERE r.answer IS NOT NULL AND r.qaQueUser.qaSession.qaSessionId=? AND r.qbToolQuestion.uid=? AND r.qaQueUser.queUsrId!=?"; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -74,8 +74,6 @@ protected String notebookEntry; - protected String endLearningMessage; - protected String userNameVisible; protected boolean showOtherAnswers; @@ -324,21 +322,6 @@ } /** - * @return Returns the endLearningMessage. - */ - public String getEndLearningMessage() { - return endLearningMessage; - } - - /** - * @param endLearningMessage - * The endLearningMessage to set. - */ - public void setEndLearningMessage(String endLearningMessage) { - this.endLearningMessage = endLearningMessage; - } - - /** * @return Returns the userNameVisible. */ public String getUserNameVisible() { Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/model/QaQueUsr.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/model/QaQueUsr.java (.../QaQueUsr.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/model/QaQueUsr.java (.../QaQueUsr.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -42,7 +42,6 @@ import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; -import org.lamsfoundation.lams.tool.qa.Nullable; /** * @@ -52,7 +51,7 @@ */ @Entity @Table(name = "tl_laqa11_que_usr") -public class QaQueUsr implements Serializable, Nullable, Comparable { +public class QaQueUsr implements Serializable, Comparable { private static final long serialVersionUID = -6768077344827699440L; @@ -203,11 +202,6 @@ return new HashCodeBuilder().append(getQueUsrId()).toHashCode(); } - @Override - public boolean isNull() { - return false; - } - /** * @return Returns the uid. */ Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/model/QaSession.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/model/QaSession.java (.../QaSession.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/model/QaSession.java (.../QaSession.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -43,7 +43,6 @@ import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; -import org.lamsfoundation.lams.tool.qa.Nullable; /** * Holds tool sessions @@ -53,8 +52,10 @@ */ @Entity @Table(name = "tl_laqa11_session") -public class QaSession implements Serializable, Comparable, Nullable { +public class QaSession implements Serializable, Comparable { + private static final long serialVersionUID = -4996580401710962900L; + public final static String INCOMPLETE = "INCOMPLETE"; public static final String COMPLETED = "COMPLETED"; @@ -192,11 +193,6 @@ return (int) (qaSessionId.longValue() - qaSession.qaSessionId.longValue()); } - @Override - public boolean isNull() { - return false; - } - public Long getUid() { return uid; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -38,7 +38,6 @@ import org.lamsfoundation.lams.tool.qa.model.QaQueUsr; import org.lamsfoundation.lams.tool.qa.model.QaSession; import org.lamsfoundation.lams.tool.qa.model.QaUsrResp; -import org.lamsfoundation.lams.tool.qa.util.QaApplicationException; import org.lamsfoundation.lams.tool.service.ICommonToolService; /** @@ -174,15 +173,6 @@ void copyToolContent(Long fromContentId, Long toContentId) throws ToolException; /** - * checks the paramter content in the user responses table - * - * @param qa - * @return boolean - * @throws QaApplicationException - */ - boolean isStudentActivityOccurredGlobal(QaContent qaContent); - - /** * createToolSession(Long toolSessionId,String toolSessionName, Long toolContentId) * * It is also defined here since in development we want to be able call it directly from the web-layer instead of it Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaService.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaService.java (.../QaService.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaService.java (.../QaService.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -75,7 +75,6 @@ import org.lamsfoundation.lams.tool.qa.model.QaQueUsr; import org.lamsfoundation.lams.tool.qa.model.QaSession; import org.lamsfoundation.lams.tool.qa.model.QaUsrResp; -import org.lamsfoundation.lams.tool.qa.util.QaApplicationException; import org.lamsfoundation.lams.tool.service.ILamsToolService; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; @@ -417,15 +416,6 @@ } @Override - public boolean isStudentActivityOccurredGlobal(QaContent qaContent) { - int countResponses = 0; - if (qaContent != null) { - countResponses = qaUsrRespDAO.getCountResponsesByQaContent(qaContent.getQaContentId()); - } - return countResponses > 0; - } - - @Override public void resetDefineLater(Long toolContentId) throws DataMissingException, ToolException { QaContent qaContent = qaDAO.getQaByContentId(toolContentId.longValue()); if (qaContent == null) { @@ -709,8 +699,6 @@ QaSession qaSession = null; try { qaSession = getSessionById(toolSessionId.longValue()); - } catch (QaApplicationException e) { - throw new DataMissingException("error retrieving qaSession: " + e); } catch (Exception e) { throw new ToolException("error retrieving qaSession: " + e); } @@ -720,11 +708,7 @@ throw new DataMissingException("qaSession is missing"); } - try { - qaSessionDAO.deleteQaSession(qaSession); - } catch (QaApplicationException e) { - throw new ToolException("error deleting qaSession:" + e); - } + qaSessionDAO.deleteQaSession(qaSession); } @Override @@ -1147,9 +1131,6 @@ qa.setQuestionsSequenced(JsonUtil.optBoolean(toolContentJSON, "questionsSequenced", Boolean.FALSE)); // submissionDeadline is set in monitoring - // qa.setMonitoringReportTitle(); Can't find this field in the database - assuming unused. - // qa.setReportTitle(); Can't find this field in the database - assuming unused. - // qa.setContent(content); Can't find this field in the database - assuming unused. saveOrUpdateQaContent(qa); // Questions Fisheye: Tag c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a refers to a dead (removed) revision in file `lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaApplicationException.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a refers to a dead (removed) revision in file `lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaAuthoringController.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaAuthoringController.java (.../QaAuthoringController.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaAuthoringController.java (.../QaAuthoringController.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -54,9 +54,7 @@ import org.lamsfoundation.lams.tool.qa.model.QaContent; import org.lamsfoundation.lams.tool.qa.model.QaQueContent; import org.lamsfoundation.lams.tool.qa.service.IQaService; -import org.lamsfoundation.lams.tool.qa.util.QaApplicationException; import org.lamsfoundation.lams.tool.qa.util.QaQuestionComparator; -import org.lamsfoundation.lams.tool.qa.util.QaUtils; import org.lamsfoundation.lams.tool.qa.web.form.QaAuthoringForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; @@ -100,8 +98,7 @@ @RequestMapping("/authoring") public String execute(@ModelAttribute("authoringForm") QaAuthoringForm form, HttpServletRequest request, - @RequestParam Long toolContentID) throws IOException, ServletException, QaApplicationException { - QaUtils.cleanUpSessionAbsolute(request); + @RequestParam Long toolContentID) throws IOException, ServletException { ToolAccessMode mode = WebUtil.readToolAccessModeAuthorDefaulted(request); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); @@ -133,8 +130,6 @@ qaQuestions.clear(); qaQuestions.addAll(qa.getQaQueContents()); - form.resetUserAction(); - // request is from monitoring module if (mode.isTeacher()) { qaService.setDefineLater(toolContentID, true); @@ -284,7 +279,6 @@ qaService.deleteCondition(condition); } - form.resetUserAction(); return "authoring/AuthoringTabsHolder"; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaLearningController.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaLearningController.java (.../QaLearningController.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaLearningController.java (.../QaLearningController.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -58,10 +58,8 @@ import org.lamsfoundation.lams.tool.qa.model.QaUsrResp; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.util.LearningUtil; -import org.lamsfoundation.lams.tool.qa.util.QaApplicationException; import org.lamsfoundation.lams.tool.qa.util.QaComparator; import org.lamsfoundation.lams.tool.qa.util.QaStringComparator; -import org.lamsfoundation.lams.tool.qa.util.QaUtils; import org.lamsfoundation.lams.tool.qa.web.form.QaLearningForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.util.DateUtil; @@ -111,10 +109,7 @@ @RequestMapping("/learning") public String execute(@ModelAttribute("qaLearningForm") QaLearningForm qaLearningForm, HttpServletRequest request) - throws IOException, ServletException, QaApplicationException { - - QaUtils.cleanUpSessionAbsolute(request); - + throws IOException, ServletException { /* validate learning mode parameters */ validateParameters(request, qaLearningForm); String mode = qaLearningForm.getMode(); @@ -128,13 +123,11 @@ */ 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"); } @@ -231,7 +224,6 @@ * Is the tool activity been checked as Define Later in the property inspector? */ if (qaContent.isDefineLater()) { - QaUtils.cleanUpSessionAbsolute(request); return "learning/defineLater"; } @@ -551,7 +543,6 @@ sessionMap.put(QaAppConstants.MAP_ALL_RESULTS_KEY, mapAnswers); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); qaLearningForm.setSessionMapID(sessionMap.getSessionID()); - qaLearningForm.resetAll(); generalLearnerFlowDTO.setSessionMapID(sessionMap.getSessionID()); boolean lockWhenFinished = qaContent.isLockWhenFinished(); @@ -684,7 +675,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"; } @@ -711,9 +701,6 @@ // LearningUtil.storeResponses(mapAnswers, qaService, toolContentID, new Long(toolSessionID)); - qaLearningForm.resetUserActions(); - qaLearningForm.setSubmitAnswersContent(null); - if (qaContent.isShowOtherAnswers()) { GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaService, qaContent); String sessionMapID = qaLearningForm.getSessionMapID(); @@ -725,11 +712,8 @@ 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()); @@ -796,8 +780,6 @@ .getAttribute(sessionMapID); /* recreate the users and responses */ - qaLearningForm.resetUserActions(); - qaLearningForm.setSubmitAnswersContent(null); QaLearningController.refreshSummaryData(request, qaContent, qaSession, qaService, sessionMapID, user, generalLearnerFlowDTO); @@ -808,8 +790,6 @@ generalLearnerFlowDTO.setReflection(new Boolean(qaContent.isReflect()).toString()); // generalLearnerFlowDTO.setNotebookEntriesVisible(new Boolean(false).toString()); - qaLearningForm.resetAll(); - boolean lockWhenFinished; boolean noReeditAllowed; if (sessionMap.get("noRefresh") != null && (boolean) sessionMap.get("noRefresh")) { @@ -877,7 +857,6 @@ storeSequentialAnswer(qaLearningForm, request, generalLearnerFlowDTO, true); - qaLearningForm.resetAll(); request.setAttribute("learningForm", qaLearningForm); return "learning/AnswersContent"; } @@ -954,8 +933,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); @@ -1036,10 +1013,8 @@ } GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaService, qaContent); - storeSequentialAnswer(qaLearningForm, request, generalLearnerFlowDTO, false); - qaLearningForm.resetAll(); return "learning/AnswersContent"; } @@ -1086,8 +1061,6 @@ // request.getSession().removeAttribute(sessionMapID); qaLearningForm.setSessionMapID(sessionMapID); - qaLearningForm.resetAll(); - String nextActivityUrl = qaService.leaveToolSession(new Long(toolSessionID), new Long(user.getUserID().longValue())); response.sendRedirect(nextActivityUrl); @@ -1142,7 +1115,6 @@ qaService.updateEntry(entry); } - qaLearningForm.resetUserActions(); /* resets all except submitAnswersContent */ return endLearning(qaLearningForm, request, response); } @@ -1196,9 +1168,7 @@ } request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - reflectionForm.resetUserActions(); /* resets all except submitAnswersContent */ - reflectionForm.resetAll(); return "learning/Notebook"; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaMonitoringController.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaMonitoringController.java (.../QaMonitoringController.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/QaMonitoringController.java (.../QaMonitoringController.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -53,9 +53,7 @@ import org.lamsfoundation.lams.tool.qa.model.QaSession; import org.lamsfoundation.lams.tool.qa.model.QaUsrResp; import org.lamsfoundation.lams.tool.qa.service.IQaService; -import org.lamsfoundation.lams.tool.qa.util.QaApplicationException; import org.lamsfoundation.lams.tool.qa.util.QaSessionComparator; -import org.lamsfoundation.lams.tool.qa.util.QaUtils; import org.lamsfoundation.lams.tool.qa.web.form.QaMonitoringForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.util.DateUtil; @@ -91,23 +89,19 @@ @RequestMapping("/monitoring") private String execute(@ModelAttribute("qaMonitoringForm") QaMonitoringForm qaMonitoringForm, - HttpServletRequest request) throws IOException, ServletException, QaApplicationException { - QaUtils.cleanUpSessionAbsolute(request); - + HttpServletRequest request) throws IOException, ServletException { String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); qaMonitoringForm.setContentFolderID(contentFolderID); String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); if ((strToolContentID == null) || (strToolContentID.length() == 0)) { - QaUtils.cleanUpSessionAbsolute(request); throw new ServletException("No Tool Content ID found"); } qaMonitoringForm.setToolContentID(strToolContentID); String toolContentID = qaMonitoringForm.getToolContentID(); QaContent qaContent = qaService.getQaContent(new Long(toolContentID).longValue()); if (qaContent == null) { - QaUtils.cleanUpSessionAbsolute(request); throw new ServletException("Data not initialised in Monitoring"); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaAuthoringForm.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaAuthoringForm.java (.../QaAuthoringForm.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaAuthoringForm.java (.../QaAuthoringForm.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -33,50 +33,10 @@ public class QaAuthoringForm extends QaLearningForm implements QaAppConstants { private QaContent qa; - - protected String addContent; - protected String removeContent; - protected String removeAllContent; - protected String submitAllContent; - protected String submitTabDone; - protected String choice; - protected String choiceBasic; - protected String choiceAdvanced; - protected String choiceInstructions; - - /* basic content */ protected String questionIndex; - protected String isRemoveContent; - protected String toolContentID; - /* advanced content */ - protected String reportTitle; - protected String monitoringReportTitle; - protected String endLearningMessage; - - /* proxy controllers for Monitoring tabs */ - protected String summaryMonitoring; - protected String instructionsMonitoring; - protected String editActivityMonitoring; - protected String statsMonitoring; - - protected String edit; private String contentFolderID; - - public void resetUserAction() { - this.addContent = null; - this.removeContent = null; - this.removeAllContent = null; - this.submitAllContent = null; - this.submitTabDone = null; - - this.summaryMonitoring = null; - this.instructionsMonitoring = null; - this.editActivityMonitoring = null; - this.statsMonitoring = null; - this.edit = null; - } public QaContent getQa() { return qa; @@ -86,21 +46,6 @@ } /** - * @return Returns the isRemoveContent. - */ - public String getIsRemoveContent() { - return isRemoveContent; - } - - /** - * @param isRemoveContent - * The isRemoveContent to set. - */ - public void setIsRemoveContent(String isRemoveContent) { - this.isRemoveContent = isRemoveContent; - } - - /** * @return Returns the questionIndex. */ @Override @@ -118,261 +63,6 @@ } /** - * @return Returns the addContent. - */ - public String getAddContent() { - return addContent; - } - - /** - * @param addContent - * The addContent to set. - */ - public void setAddContent(String addContent) { - this.addContent = addContent; - } - - /** - * @return Returns the removeContent. - */ - public String getRemoveContent() { - return removeContent; - } - - /** - * @param removeContent - * The removeContent to set. - */ - public void setRemoveContent(String removeContent) { - this.removeContent = removeContent; - } - - /** - * @return Returns the removeAllContent. - */ - public String getRemoveAllContent() { - return removeAllContent; - } - - /** - * @param removeAllContent - * The removeAllContent to set. - */ - public void setRemoveAllContent(String removeAllContent) { - this.removeAllContent = removeAllContent; - } - - /** - * @return Returns the submitAllContent. - */ - public String getSubmitAllContent() { - return submitAllContent; - } - - /** - * @param submitAllContent - * The submitAllContent to set. - */ - public void setSubmitAllContent(String submitAllContent) { - this.submitAllContent = submitAllContent; - } - - /** - * @return Returns the choiceAdvanced. - */ - public String getChoiceAdvanced() { - return choiceAdvanced; - } - - /** - * @param choiceAdvanced - * The choiceAdvanced to set. - */ - public void setChoiceAdvanced(String choiceAdvanced) { - this.choiceAdvanced = choiceAdvanced; - } - - /** - * @return Returns the choiceBasic. - */ - public String getChoiceBasic() { - return choiceBasic; - } - - /** - * @param choiceBasic - * The choiceBasic to set. - */ - public void setChoiceBasic(String choiceBasic) { - this.choiceBasic = choiceBasic; - } - - /** - * @return Returns the choiceInstructions. - */ - public String getChoiceInstructions() { - return choiceInstructions; - } - - /** - * @param choiceInstructions - * The choiceInstructions to set. - */ - public void setChoiceInstructions(String choiceInstructions) { - this.choiceInstructions = choiceInstructions; - } - - /** - * @return Returns the choice. - */ - public String getChoice() { - return choice; - } - - /** - * @param choice - * The choice to set. - */ - public void setChoice(String choice) { - this.choice = choice; - } - - /** - * @return Returns the reportTitle. - */ - public String getReportTitle() { - return reportTitle; - } - - /** - * @param reportTitle - * The reportTitle to set. - */ - public void setReportTitle(String reportTitle) { - this.reportTitle = reportTitle; - } - - /** - * @return Returns the submitTabDone. - */ - public String getSubmitTabDone() { - return submitTabDone; - } - - /** - * @param submitTabDone - * The submitTabDone to set. - */ - public void setSubmitTabDone(String submitTabDone) { - this.submitTabDone = submitTabDone; - } - - /** - * @return Returns the endLearningMessage. - */ - public String getEndLearningMessage() { - return endLearningMessage; - } - - /** - * @param endLearningMessage - * The endLearningMessage to set. - */ - public void setEndLearningMessage(String endLearningMessage) { - this.endLearningMessage = endLearningMessage; - } - - /** - * @return Returns the monitoringReportTitle. - */ - public String getMonitoringReportTitle() { - return monitoringReportTitle; - } - - /** - * @param monitoringReportTitle - * The monitoringReportTitle to set. - */ - public void setMonitoringReportTitle(String monitoringReportTitle) { - this.monitoringReportTitle = monitoringReportTitle; - } - - /** - * @return Returns the editActivityMonitoring. - */ - public String getEditActivityMonitoring() { - return editActivityMonitoring; - } - - /** - * @param editActivityMonitoring - * The editActivityMonitoring to set. - */ - public void setEditActivityMonitoring(String editActivityMonitoring) { - this.editActivityMonitoring = editActivityMonitoring; - } - - /** - * @return Returns the instructionsMonitoring. - */ - public String getInstructionsMonitoring() { - return instructionsMonitoring; - } - - /** - * @param instructionsMonitoring - * The instructionsMonitoring to set. - */ - public void setInstructionsMonitoring(String instructionsMonitoring) { - this.instructionsMonitoring = instructionsMonitoring; - } - - /** - * @return Returns the statsMonitoring. - */ - public String getStatsMonitoring() { - return statsMonitoring; - } - - /** - * @param statsMonitoring - * The statsMonitoring to set. - */ - public void setStatsMonitoring(String statsMonitoring) { - this.statsMonitoring = statsMonitoring; - } - - /** - * @return Returns the summaryMonitoring. - */ - public String getSummaryMonitoring() { - return summaryMonitoring; - } - - /** - * @param summaryMonitoring - * The summaryMonitoring to set. - */ - public void setSummaryMonitoring(String summaryMonitoring) { - this.summaryMonitoring = summaryMonitoring; - } - - /** - * @return Returns the edit. - */ - public String getEdit() { - return edit; - } - - /** - * @param edit - * The edit to set. - */ - public void setEdit(String edit) { - this.edit = edit; - } - - /** * @return Returns the toolContentID. */ public String getToolContentID() { Fisheye: Tag c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a refers to a dead (removed) revision in file `lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaEmptyForm.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaLearningForm.java =================================================================== diff -u -r86c25c80d92701a94c3161575c76c363891402ad -rc4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaLearningForm.java (.../QaLearningForm.java) (revision 86c25c80d92701a94c3161575c76c363891402ad) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaLearningForm.java (.../QaLearningForm.java) (revision c4e8969c8dd14ae2428a6cfd6bb941dfe5cf479a) @@ -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 sessionMapID; 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; - } - }