Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 -raf2294a9411ee67e92a614ee7e60df3c1c764b6e --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) @@ -145,7 +145,6 @@ public static final String MAP_TOOL_SESSIONS = "mapToolSessions"; public static final Integer MAX_TOOL_SESSION_COUNT = new Integer(500); - public static final String IS_TOOL_SESSION_CHANGED = "isToolSessionChanged"; public static final String USER_EXCEPTION_WRONG_FORMAT = "userExceptionWrongFormat"; public static final String USER_EXCEPTION_UNCOMPATIBLE_IDS = "userExceptionUncompatibleIds"; public static final String USER_EXCEPTION_NUMBERFORMAT = "userExceptionNumberFormat"; @@ -173,7 +172,6 @@ public static final String COUNT_ALL_USERS = "countAllUsers"; public static final String LIST_MONITORED_ANSWERS_CONTAINER_DTO = "listMonitoredAnswersContainerDto"; - public static final String SUMMARY_TOOL_SESSIONS = "summaryToolSessions"; public static final String EDIT_ACTIVITY_DTO = "editActivityDTO"; public static final String ACTIVITY_TITLE = "activityTitle"; @@ -257,8 +255,8 @@ public static final String SUBMIT_SUCCESS = "sbmtSuccess"; // for condition management use public static final String ATTR_SESSION_MAP_ID = "sessionMapID"; - public static final Object ATTR_CONDITION_SET = "conditionList"; - public static final Object ATTR_QA_AUTHORING_FORM = "QaAuthoringForm"; + public static final String ATTR_CONDITION_SET = "conditionList"; + public static final String ATTR_QA_AUTHORING_FORM = "QaAuthoringForm"; public static final String PARAM_ORDER_ID = "orderId"; public static final String ATTR_DELETED_CONDITION_LIST = "deletedConditionList"; public static final int QUESTION_CUTOFF_INDEX = 40; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java =================================================================== diff -u -rbe07c35c372d904a65581d98660e73f3b13b69db -raf2294a9411ee67e92a614ee7e60df3c1c764b6e --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision be07c35c372d904a65581d98660e73f3b13b69db) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) @@ -30,8 +30,7 @@ /** *

- * DTO that holds learner flow decision properties and some other view-only - * properties + * DTO that holds learner flow decision properties and some other view-only properties *

* * @author Ozgur Demirtas @@ -92,12 +91,10 @@ protected Map mapQuestions; - protected Map mapQuestionContentLearner; + protected Map mapQuestionContentLearner; protected List listMonitoredAnswersContainerDTO; - protected String currentMonitoredToolSession; - protected String initialScreen; protected String lockWhenFinished; @@ -107,11 +104,11 @@ protected String existMultipleUserResponses; protected String usernameVisible; - + protected String allowRichEditor; - + protected String useSelectLeaderToolOuput; - + protected String allowRateAnswers; /** @@ -123,28 +120,13 @@ /** * @param usernameVisible - * The usernameVisible to set. + * The usernameVisible to set. */ public void setUsernameVisible(String usernameVisible) { this.usernameVisible = usernameVisible; } /** - * @return Returns the currentMonitoredToolSession. - */ - public String getCurrentMonitoredToolSession() { - return currentMonitoredToolSession; - } - - /** - * @param currentMonitoredToolSession - * The currentMonitoredToolSession to set. - */ - public void setCurrentMonitoredToolSession(String currentMonitoredToolSession) { - this.currentMonitoredToolSession = currentMonitoredToolSession; - } - - /** * @return Returns the currentAnswer. */ public String getCurrentAnswer() { @@ -153,7 +135,7 @@ /** * @param currentAnswer - * The currentAnswer to set. + * The currentAnswer to set. */ public void setCurrentAnswer(String currentAnswer) { this.currentAnswer = currentAnswer; @@ -164,15 +146,15 @@ /** * @return Returns the mapQuestionContentLearner. */ - public Map getMapQuestionContentLearner() { + public Map getMapQuestionContentLearner() { return mapQuestionContentLearner; } /** * @param mapQuestionContentLearner - * The mapQuestionContentLearner to set. + * The mapQuestionContentLearner to set. */ - public void setMapQuestionContentLearner(Map mapQuestionContentLearner) { + public void setMapQuestionContentLearner(Map mapQuestionContentLearner) { this.mapQuestionContentLearner = mapQuestionContentLearner; } @@ -185,7 +167,7 @@ /** * @param userFeedback - * The userFeedback to set. + * The userFeedback to set. */ public void setUserFeedback(String userFeedback) { this.userFeedback = userFeedback; @@ -200,7 +182,7 @@ /** * @param activityInstructions - * The activityInstructions to set. + * The activityInstructions to set. */ public void setActivityInstructions(String activityInstructions) { this.activityInstructions = activityInstructions; @@ -215,7 +197,7 @@ /** * @param activityTitle - * The activityTitle to set. + * The activityTitle to set. */ public void setActivityTitle(String activityTitle) { this.activityTitle = activityTitle; @@ -230,7 +212,7 @@ /** * @param countSessionComplete - * The countSessionComplete to set. + * The countSessionComplete to set. */ public void setCountSessionComplete(String countSessionComplete) { this.countSessionComplete = countSessionComplete; @@ -245,7 +227,7 @@ /** * @param questionListingMode - * The questionListingMode to set. + * The questionListingMode to set. */ public void setQuestionListingMode(String questionListingMode) { this.questionListingMode = questionListingMode; @@ -261,33 +243,33 @@ } public String toString() { - return new ToStringBuilder(this).append( - "remainingQuestionCount: ", remainingQuestionCount).append("totalQuestionCount : ", totalQuestionCount) + 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("reportTitleLearner: ", reportTitleLearner).append( - "userNameVisible: ", userNameVisible).append("requestLearningReport: ", requestLearningReport) - .append("requestLearningReportProgress: ", requestLearningReportProgress).append( - "requestLearningReportViewOnly: ", requestLearningReportViewOnly).append("mapAnswers: ", - mapAnswers).append("mapQuestions: ", mapQuestions).append("mapQuestionContentLearner: ", - mapQuestionContentLearner).append("listMonitoredAnswersContainerDTO: ", - listMonitoredAnswersContainerDTO).append("currentMonitoredToolSession: ", - currentMonitoredToolSession).toString(); + .append("lockWhenFinished: ", lockWhenFinished).append("activityTitle: ", activityTitle) + .append("countSessionComplete: ", countSessionComplete).append("toolSessionID: ", toolSessionID) + .append("currentQuestionIndex: ", currentQuestionIndex) + .append("questionListingMode: ", questionListingMode) + .append("reportTitleLearner: ", reportTitleLearner).append("userNameVisible: ", userNameVisible) + .append("requestLearningReport: ", requestLearningReport) + .append("requestLearningReportProgress: ", requestLearningReportProgress) + .append("requestLearningReportViewOnly: ", requestLearningReportViewOnly) + .append("mapAnswers: ", mapAnswers).append("mapQuestions: ", mapQuestions) + .append("mapQuestionContentLearner: ", mapQuestionContentLearner) + .append("listMonitoredAnswersContainerDTO: ", listMonitoredAnswersContainerDTO).toString(); } /** * @param currentQuestionIndex - * The currentQuestionIndex to set. + * The currentQuestionIndex to set. */ public void setCurrentQuestionIndex(Integer currentQuestionIndex) { this.currentQuestionIndex = currentQuestionIndex; } /** * @param totalQuestionCount - * The totalQuestionCount to set. + * The totalQuestionCount to set. */ public void setTotalQuestionCount(Integer totalQuestionCount) { this.totalQuestionCount = totalQuestionCount; @@ -302,7 +284,7 @@ /** * @param toolContentID - * The toolContentID to set. + * The toolContentID to set. */ public void setToolContentID(String toolContentID) { this.toolContentID = toolContentID; @@ -317,7 +299,7 @@ /** * @param toolSessionID - * The toolSessionID to set. + * The toolSessionID to set. */ public void setToolSessionID(String toolSessionID) { this.toolSessionID = toolSessionID; @@ -346,7 +328,7 @@ /** * @param endLearningMessage - * The endLearningMessage to set. + * The endLearningMessage to set. */ public void setEndLearningMessage(String endLearningMessage) { this.endLearningMessage = endLearningMessage; @@ -361,7 +343,7 @@ /** * @param reportTitleLearner - * The reportTitleLearner to set. + * The reportTitleLearner to set. */ public void setReportTitleLearner(String reportTitleLearner) { this.reportTitleLearner = reportTitleLearner; @@ -376,7 +358,7 @@ /** * @param userNameVisible - * The userNameVisible to set. + * The userNameVisible to set. */ public void setUserNameVisible(String userNameVisible) { this.userNameVisible = userNameVisible; @@ -391,7 +373,7 @@ /** * @param mapAnswers - * The mapAnswers to set. + * The mapAnswers to set. */ public void setMapAnswers(Map mapAnswers) { this.mapAnswers = mapAnswers; @@ -406,7 +388,7 @@ /** * @param mapQuestions - * The mapQuestions to set. + * The mapQuestions to set. */ public void setMapQuestions(Map mapQuestions) { this.mapQuestions = mapQuestions; @@ -421,7 +403,7 @@ /** * @param httpSessionID - * The httpSessionID to set. + * The httpSessionID to set. */ public void setHttpSessionID(String httpSessionID) { this.httpSessionID = httpSessionID; @@ -436,7 +418,7 @@ /** * @param requestLearningReport - * The requestLearningReport to set. + * The requestLearningReport to set. */ public void setRequestLearningReport(String requestLearningReport) { this.requestLearningReport = requestLearningReport; @@ -451,7 +433,7 @@ /** * @param requestLearningReportProgress - * The requestLearningReportProgress to set. + * The requestLearningReportProgress to set. */ public void setRequestLearningReportProgress(String requestLearningReportProgress) { this.requestLearningReportProgress = requestLearningReportProgress; @@ -466,7 +448,7 @@ /** * @param requestLearningReportViewOnly - * The requestLearningReportViewOnly to set. + * The requestLearningReportViewOnly to set. */ public void setRequestLearningReportViewOnly(String requestLearningReportViewOnly) { this.requestLearningReportViewOnly = requestLearningReportViewOnly; @@ -481,7 +463,7 @@ /** * @param listMonitoredAnswersContainerDTO - * The listMonitoredAnswersContainerDTO to set. + * The listMonitoredAnswersContainerDTO to set. */ public void setListMonitoredAnswersContainerDTO(List listMonitoredAnswersContainerDTO) { this.listMonitoredAnswersContainerDTO = listMonitoredAnswersContainerDTO; @@ -496,7 +478,7 @@ /** * @param mapAnswersPresentable - * The mapAnswersPresentable to set. + * The mapAnswersPresentable to set. */ public void setMapAnswersPresentable(Map mapAnswersPresentable) { this.mapAnswersPresentable = mapAnswersPresentable; @@ -511,7 +493,7 @@ /** * @param reflection - * The reflection to set. + * The reflection to set. */ public void setReflection(String reflection) { this.reflection = reflection; @@ -526,7 +508,7 @@ /** * @param reflectionSubject - * The reflectionSubject to set. + * The reflectionSubject to set. */ public void setReflectionSubject(String reflectionSubject) { this.reflectionSubject = reflectionSubject; @@ -541,7 +523,7 @@ /** * @param notebookEntry - * The notebookEntry to set. + * The notebookEntry to set. */ public void setNotebookEntry(String notebookEntry) { this.notebookEntry = notebookEntry; @@ -556,7 +538,7 @@ /** * @param notebookEntriesVisible - * The notebookEntriesVisible to set. + * The notebookEntriesVisible to set. */ public void setNotebookEntriesVisible(String notebookEntriesVisible) { this.notebookEntriesVisible = notebookEntriesVisible; @@ -571,7 +553,7 @@ /** * @param userName - * The userName to set. + * The userName to set. */ public void setUserName(String userName) { this.userName = userName; @@ -586,7 +568,7 @@ /** * @param teacherViewOnly - * The teacherViewOnly to set. + * The teacherViewOnly to set. */ public void setTeacherViewOnly(String teacherViewOnly) { this.teacherViewOnly = teacherViewOnly; @@ -601,7 +583,7 @@ /** * @param remainingQuestionCount - * The remainingQuestionCount to set. + * The remainingQuestionCount to set. */ public void setRemainingQuestionCount(String remainingQuestionCount) { this.remainingQuestionCount = remainingQuestionCount; @@ -616,7 +598,7 @@ /** * @param initialScreen - * The initialScreen to set. + * The initialScreen to set. */ public void setInitialScreen(String initialScreen) { this.initialScreen = initialScreen; @@ -631,7 +613,7 @@ /** * @param lockWhenFinished - * The lockWhenFinished to set. + * The lockWhenFinished to set. */ public void setLockWhenFinished(String lockWhenFinished) { this.lockWhenFinished = lockWhenFinished; @@ -646,7 +628,7 @@ /** * @param showOtherAnswers - * The showOtherAnswers to set. + * The showOtherAnswers to set. */ public void setShowOtherAnswers(String showOtherAnswers) { this.showOtherAnswers = showOtherAnswers; @@ -661,7 +643,7 @@ /** * @param userUid - * The userUid to set. + * The userUid to set. */ public void setUserUid(String userUid) { this.userUid = userUid; @@ -676,33 +658,33 @@ /** * @param existMultipleUserResponses - * The existMultipleUserResponses to set. + * The existMultipleUserResponses to set. */ public void setExistMultipleUserResponses(String existMultipleUserResponses) { this.existMultipleUserResponses = existMultipleUserResponses; } public String getAllowRichEditor() { - return allowRichEditor; + return allowRichEditor; } public void setAllowRichEditor(String allowRichEditor) { - this.allowRichEditor = allowRichEditor; - } - + this.allowRichEditor = allowRichEditor; + } + public String getUseSelectLeaderToolOuput() { - return useSelectLeaderToolOuput; + return useSelectLeaderToolOuput; } public void setUseSelectLeaderToolOuput(String useSelectLeaderToolOuput) { - this.useSelectLeaderToolOuput = useSelectLeaderToolOuput; + this.useSelectLeaderToolOuput = useSelectLeaderToolOuput; } - + public String getAllowRateAnswers() { - return allowRateAnswers; + return allowRateAnswers; } public void setAllowRateAnswers(String allowRateAnswers) { - this.allowRateAnswers = allowRateAnswers; + this.allowRateAnswers = allowRateAnswers; } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java =================================================================== diff -u -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 -raf2294a9411ee67e92a614ee7e60df3c1c764b6e --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java (.../QaUtils.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java (.../QaUtils.java) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) @@ -25,10 +25,6 @@ import java.text.DateFormat; import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; @@ -171,31 +167,6 @@ } /** - * builds a String based map from a list convertToMap(List sessionsList) - * - * @param sessionsList - * @return Map - */ - public static Map convertToStringMap(List sessionsList, String listType) { - Map map = new TreeMap(new QaComparator()); - - Iterator listIterator = sessionsList.iterator(); - Long mapIndex = new Long(1); - - while (listIterator.hasNext()) { - if (listType.equals("String")) { - String text = (String) listIterator.next(); - map.put(mapIndex.toString(), text); - } else if (listType.equals("Long")) { - Long LongValue = (Long) listIterator.next(); - map.put(mapIndex.toString(), LongValue.toString()); - } - mapIndex = new Long(mapIndex.longValue() + 1); - } - return map; - } - - /** * the only attributes kept are TOOL_SESSION and TOOL_CONTENT_ID and * ACTIVITY_TITLE ACTIVITY_INSTRUCTIONS * cleanUpSessionAbsolute(HttpServletRequest request) @@ -241,11 +212,9 @@ request.getSession().removeAttribute(COMPLETED); request.getSession().removeAttribute(MAP_TOOL_SESSIONS); request.getSession().removeAttribute(MAX_TOOL_SESSION_COUNT.toString()); - request.getSession().removeAttribute(IS_TOOL_SESSION_CHANGED); request.getSession().removeAttribute(COUNT_SESSION_COMPLETE); request.getSession().removeAttribute(COUNT_ALL_USERS); request.getSession().removeAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO); - request.getSession().removeAttribute(SUMMARY_TOOL_SESSIONS); request.getSession().removeAttribute(MODE); request.getSession().removeAttribute(LEARNER); request.getSession().removeAttribute(TEACHER); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java =================================================================== diff -u -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 -raf2294a9411ee67e92a614ee7e60df3c1c764b6e --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) @@ -157,8 +157,6 @@ List reflectionDTOs = qaService.getReflectList(content, userID.toString()); request.getSession().setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - request.setAttribute("currentMonitoredToolSession", "All"); - // generateGroupsSessionData List listAllGroupsDTO = MonitoringUtil.buildGroupBasedSessionData(request, content, qaService); request.setAttribute(LIST_ALL_GROUPS_DTO, listAllGroupsDTO); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java =================================================================== diff -u -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 -raf2294a9411ee67e92a614ee7e60df3c1c764b6e --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) @@ -59,53 +59,13 @@ import org.lamsfoundation.lams.web.util.AttributeNames; /** - * * Keeps all operations needed for Monitoring mode. * * @author Ozgur Demirtas - * */ public class MonitoringUtil implements QaAppConstants { /** - * populates all the tool sessions in a map - * - * @param request - * @param mcContent - * @return Map - */ - public static Map populateToolSessions(HttpServletRequest request, QaContent qaContent, IQaService qaService) { - List sessionsList = qaService.getSessionNamesFromContent(qaContent); - - Map sessionsMap = QaUtils.convertToStringMap(sessionsList, "String"); - if (sessionsMap.isEmpty()) { - sessionsMap.put(new Long(1).toString(), "None"); - } else { - sessionsMap.put(new Long(sessionsMap.size() + 1).toString(), "All"); - } - return sessionsMap; - } - - /** - * populates all the tool sessions in a map - * - * @param request - * @param mcContent - * @return Map - */ - public static Map populateToolSessionsId(HttpServletRequest request, QaContent qaContent, IQaService qaService) { - List sessionsList = qaService.getSessionsFromContent(qaContent); - - Map sessionsMap = QaUtils.convertToStringMap(sessionsList, "Long"); - if (sessionsMap.isEmpty()) { - sessionsMap.put(new Long(1).toString(), "None"); - } else { - sessionsMap.put(new Long(sessionsMap.size() + 1).toString(), "All"); - } - return sessionsMap; - } - - /** * User id is needed if learnerRequest = true, as it is required to work out * if the data being analysed is the current user (for not show other names) * or to work out which is the user's answers (for not show all answers). @@ -198,14 +158,11 @@ qaMonitoredUserDTOs.add(qaMonitoredUserDTO); } } - return convertToMcMonitoredUserDTOMap(qaMonitoredUserDTOs); - } - - private static Map convertToMcMonitoredUserDTOMap(List list) { + + //convert To McMonitoredUserDTOMap Map map = new TreeMap(new QaStringComparator()); - Long mapIndex = new Long(1); - for (QaMonitoredUserDTO data : list) { + for (QaMonitoredUserDTO data : qaMonitoredUserDTOs) { map.put(mapIndex.toString(), data); mapIndex = mapIndex + 1; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java =================================================================== diff -u -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 -raf2294a9411ee67e92a614ee7e60df3c1c764b6e --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) @@ -62,8 +62,6 @@ import org.lamsfoundation.lams.web.action.LamsDispatchAction; import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; -import org.springframework.web.context.WebApplicationContext; -import org.springframework.web.context.support.WebApplicationContextUtils; /** * @author Ozgur Demirtas @@ -99,7 +97,7 @@ String httpSessionID = qaAuthoringForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); SortedSet conditionSet = (SortedSet) sessionMap .get(QaAppConstants.ATTR_CONDITION_SET); @@ -251,7 +249,7 @@ String httpSessionID = qaAuthoringForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); qaAuthoringForm.setContentFolderID(contentFolderID); @@ -295,7 +293,6 @@ while (listIterator.hasNext()) { qaQuestionDTO = (QaQuestionDTO) listIterator.next(); - String question = qaQuestionDTO.getQuestion(); String displayOrder = qaQuestionDTO.getDisplayOrder(); @@ -406,7 +403,7 @@ String httpSessionID = qaAuthoringForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); qaAuthoringForm.setContentFolderID(contentFolderID); @@ -423,8 +420,6 @@ qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString()); - AuthoringUtil authoringUtil = new AuthoringUtil(); - List listQuestionContentDTO = (List) sessionMap.get(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY); String newQuestion = request.getParameter("newQuestion"); @@ -510,7 +505,7 @@ String httpSessionID = qaAuthoringForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); @@ -576,7 +571,7 @@ String httpSessionID = qaAuthoringForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); @@ -666,7 +661,7 @@ String httpSessionID = qaAuthoringForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); @@ -677,7 +672,6 @@ while (listIterator.hasNext()) { qaQuestionDTO = (QaQuestionDTO) listIterator.next(); - String question = qaQuestionDTO.getQuestion(); String displayOrder = qaQuestionDTO.getDisplayOrder(); if (displayOrder != null && !displayOrder.equals("")) { @@ -740,8 +734,6 @@ qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - AuthoringUtil authoringUtil = new AuthoringUtil(); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); request.getSession().setAttribute(httpSessionID, sessionMap); @@ -788,7 +780,7 @@ String httpSessionID = qaAuthoringForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); @@ -819,8 +811,6 @@ String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); @@ -829,8 +819,6 @@ qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - AuthoringUtil authoringUtil = new AuthoringUtil(); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); request.getSession().setAttribute(httpSessionID, sessionMap); @@ -876,7 +864,7 @@ String httpSessionID = qaAuthoringForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); @@ -907,8 +895,6 @@ String defaultContentIdStr = request.getParameter(QaAppConstants.DEFAULT_CONTENT_ID_STR); - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); @@ -918,8 +904,6 @@ qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - AuthoringUtil authoringUtil = new AuthoringUtil(); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); request.getSession().setAttribute(httpSessionID, sessionMap); @@ -960,49 +944,12 @@ saveErrors(request, errors); } - /** - * QaToolContentHandler getToolContentHandler() - * - * @return - */ - private QaToolContentHandler getToolContentHandler() { - if (toolContentHandler == null) { - WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet() - .getServletContext()); - toolContentHandler = (QaToolContentHandler) wac.getBean("qaToolContentHandler"); - } - return toolContentHandler; - } - public ActionForward editActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return null; } /** - * calls monitoring action stats screen generation - * - * ActionForward getStats(ActionMapping mapping, ActionForm form, - * HttpServletRequest request, HttpServletResponse response) throws - * IOException, ServletException - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - */ - public ActionForward getStats(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - // return qaMonitoringAction.getStats(mapping, form, request, response, - // "All"); - return null; - } - - /** * generates Edit Activity screen * * @param mapping @@ -1023,7 +970,7 @@ String httpSessionID = qaAuthoringForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); qaAuthoringForm.setContentFolderID(contentFolderID); @@ -1049,7 +996,6 @@ sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, qaContent.getInstructions()); /* determine whether the request is from Monitoring url Edit Activity */ - String sourceMcStarter = (String) request.getAttribute(QaAppConstants.SOURCE_MC_STARTER); qaAuthoringForm.setDefineLaterInEditMode(new Boolean(true).toString()); qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); @@ -1128,7 +1074,7 @@ * @param request * @return */ - private List getDeletedQaConditionList(SessionMap sessionMap) { + private List getDeletedQaConditionList(SessionMap sessionMap) { List list = (List) sessionMap.get(QaAppConstants.ATTR_DELETED_CONDITION_LIST); if (list == null) { list = new ArrayList(); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java =================================================================== diff -u -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 -raf2294a9411ee67e92a614ee7e60df3c1c764b6e --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) @@ -28,7 +28,6 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.TimeZone; @@ -95,18 +94,13 @@ */ public ActionForward editActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - if (qaService == null) { qaService = qaMonitoringForm.getQaService(); } - QaStarterAction qaStarterAction = new QaStarterAction(); - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); qaMonitoringForm.setToolContentID(strToolContentID); @@ -124,10 +118,6 @@ */ QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { generalMonitoringDTO.setUserExceptionContentInUse(new Boolean(true).toString()); @@ -155,11 +145,15 @@ request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - prepareEditActivityScreenData(request, qaContent); + QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); + qaGeneralAuthoringDTO.setActivityTitle(qaContent.getTitle()); + qaGeneralAuthoringDTO.setActivityInstructions(qaContent.getInstructions()); + request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); MonitoringUtil.setUpMonitoring(request, qaService, qaContent); /* note that we are casting monitoring form subclass into Authoring form */ + QaStarterAction qaStarterAction = new QaStarterAction(); return qaStarterAction.executeDefineLater(mapping, qaMonitoringForm, request, response, qaService); } @@ -202,7 +196,6 @@ QaUtils.setDefineLater(request, true, strToolContentID, qaService); - prepareEditActivityScreenData(request, qaContent); request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); @@ -220,14 +213,13 @@ request.setAttribute(QaAppConstants.LIST_QUESTION_CONTENT_DTO, listQuestionContentDTO); request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = (QaGeneralAuthoringDTO) request - .getAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO); + QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); + qaGeneralAuthoringDTO.setActivityTitle(qaContent.getTitle()); + qaGeneralAuthoringDTO.setActivityInstructions(qaContent.getInstructions()); qaGeneralAuthoringDTO.setActiveModule(QaAppConstants.MONITORING); - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); MonitoringUtil.setUpMonitoring(request, qaService, qaContent); @@ -279,18 +271,7 @@ return null; } - - public void prepareEditActivityScreenData(HttpServletRequest request, QaContent qaContent) { - - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - qaGeneralAuthoringDTO.setActivityTitle(qaContent.getTitle()); - qaGeneralAuthoringDTO.setActivityInstructions(qaContent.getInstructions()); - - - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - } - public ActionForward submitAllContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { @@ -937,8 +918,6 @@ qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - AuthoringUtil authoringUtil = new AuthoringUtil(); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); request.getSession().setAttribute(httpSessionID, sessionMap); @@ -1136,8 +1115,6 @@ qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - AuthoringUtil authoringUtil = new AuthoringUtil(); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); request.getSession().setAttribute(httpSessionID, sessionMap); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java =================================================================== diff -u -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 -raf2294a9411ee67e92a614ee7e60df3c1c764b6e --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) @@ -28,7 +28,6 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; @@ -50,9 +49,8 @@ import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaQueContent; import org.lamsfoundation.lams.tool.qa.dto.EditActivityDTO; -import org.lamsfoundation.lams.tool.qa.dto.GeneralLearnerFlowDTO; import org.lamsfoundation.lams.tool.qa.dto.GeneralMonitoringDTO; -import org.lamsfoundation.lams.tool.qa.dto.QaMonitoredAnswersDTO; +import org.lamsfoundation.lams.tool.qa.dto.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.dto.QaQuestionDTO; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; @@ -98,9 +96,7 @@ throw new ServletException("Data not initialised in Monitoring"); } - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); - if (qaContent.getTitle() == null) { generalMonitoringDTO.setActivityTitle("Questions and Answers"); generalMonitoringDTO.setActivityInstructions("Please answer the questions."); @@ -129,8 +125,6 @@ /* this section is related to summary tab. Starts here. */ - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse = qaContent.isContentLocked(); @@ -147,9 +141,12 @@ qaMonitoringForm.setActiveModule(MONITORING); /*for Edit Activity screen, BasicTab-ViewOnly*/ - qaMonitoringAction.prepareEditActivityScreenData(request, qaContent); + QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); + qaGeneralAuthoringDTO.setActivityTitle(qaContent.getTitle()); + qaGeneralAuthoringDTO.setActivityInstructions(qaContent.getInstructions()); + request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - SessionMap sessionMap = new SessionMap(); + SessionMap sessionMap = new SessionMap(); sessionMap.put(ACTIVITY_TITLE_KEY, qaContent.getTitle()); sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, qaContent.getInstructions()); @@ -174,7 +171,6 @@ conditionSet.addAll(qaContent.getConditions()); sessionMap.put(QaAppConstants.ATTR_CONDITION_SET, conditionSet); - request.setAttribute("currentMonitoredToolSession", "All"); MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return (mapping.findForward(LOAD_MONITORING)); Index: lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp =================================================================== diff -u -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 -raf2294a9411ee67e92a614ee7e60df3c1c764b6e --- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) +++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision af2294a9411ee67e92a614ee7e60df3c1c764b6e) @@ -254,42 +254,10 @@ document.QaMonitoringForm.submit(); } - function submitAuthoringMethod(actionMethod) { - document.QaAuthoringForm.dispatch.value=actionMethod; - document.QaAuthoringForm.submit(); - } - - function submitModifyQuestion(questionIndexValue, actionMethod) { - document.QaMonitoringForm.questionIndex.value=questionIndexValue; - submitMethod(actionMethod); - } - - function submitEditGroupResponse(sessionId, responseId, actionMethod) { - document.QaMonitoringForm.sessionId.value=sessionId; - document.QaMonitoringForm.responseId.value=responseId; - submitMethod(actionMethod); - } - function submitMethod(actionMethod) { submitMonitoringMethod(actionMethod); } - - function deleteOption(deletableOptionIndex, actionMethod) { - document.QaMonitoringForm.deletableOptionIndex.value=deletableOptionIndex; - submitMethod(actionMethod); - } - function submitResponse(currentUid, actionMethod) { - document.QaMonitoringForm.currentUid.value=currentUid; - submitMethod(actionMethod); - } - - function submitGroupResponse(sessionId, currentUid, actionMethod) { - document.QaMonitoringForm.sessionId.value=sessionId; - document.QaMonitoringForm.currentUid.value=currentUid; - submitMethod(actionMethod); - } - function submitModifyMonitoringQuestion(questionIndexValue, actionMethod) { document.QaMonitoringForm.questionIndex.value=questionIndexValue; submitMethod(actionMethod);