Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralLearnerFlowDTO.java =================================================================== diff -u -r57157cef4ee9b4d70e92be83584eb8d10bcea83c -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 57157cef4ee9b4d70e92be83584eb8d10bcea83c) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -83,7 +83,6 @@ protected String currentMonitoredToolSession; - /** * @return Returns the currentMonitoredToolSession. */ Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralMonitoringDTO.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralMonitoringDTO.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralMonitoringDTO.java (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -0,0 +1,292 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.qa; + + +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + *

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

+ * + * @author Ozgur Demirtas + */ +public class GeneralMonitoringDTO implements Comparable +{ + protected String userExceptionNoToolSessions; + protected String userExceptionNoStudentActivity; + protected String userExceptionContentInUse; + protected String monitoredContentInUse; + + protected String defineLaterInEditMode; + + protected String countAllUsers; + protected String countSessionComplete; + + protected String activityTitle; + protected String activityInstructions; + + protected String editResponse; + + + protected Map mapQuestionContent; + protected String defaultQuestionContent; + + protected String onlineInstructions; + protected String offlineInstructions; + + protected List attachmentList; + protected List deletedAttachmentList; + + + public String toString() { + return new ToStringBuilder(this) + .append("userExceptionNoToolSessions: ", userExceptionNoToolSessions) + .append("userExceptionNoStudentActivity: ", userExceptionNoStudentActivity) + .append("userExceptionContentInUse: ", userExceptionContentInUse) + .append("defineLaterInEditMode: ", defineLaterInEditMode) + .append("monitoredContentInUse: ", monitoredContentInUse) + .append("activityTitle: ", activityTitle) + .append("activityInstructions: ", activityInstructions) + .append("editResponse: ", editResponse) + .append("mapQuestionContent: ", mapQuestionContent) + .append("defaultQuestionContent: ", defaultQuestionContent) + .append("countAllUsers: ", countAllUsers) + .append("countSessionComplete: ", countSessionComplete) + .append("onlineInstructions: ", onlineInstructions) + .append("offlineInstructions: ", offlineInstructions) + .append("attachmentList: ", attachmentList) + .append("deletedAttachmentList: ", deletedAttachmentList) + .toString(); + } + + public int compareTo(Object o) + { + GeneralMonitoringDTO generalMonitoringDTO = (GeneralMonitoringDTO) o; + + if (generalMonitoringDTO == null) + return 1; + else + return 0; + } + + + /** + * @return Returns the defineLaterInEditMode. + */ + public String getDefineLaterInEditMode() { + return defineLaterInEditMode; + } + /** + * @param defineLaterInEditMode The defineLaterInEditMode to set. + */ + public void setDefineLaterInEditMode(String defineLaterInEditMode) { + this.defineLaterInEditMode = defineLaterInEditMode; + } + /** + * @return Returns the monitoredContentInUse. + */ + public String getMonitoredContentInUse() { + return monitoredContentInUse; + } + /** + * @param monitoredContentInUse The monitoredContentInUse to set. + */ + public void setMonitoredContentInUse(String monitoredContentInUse) { + this.monitoredContentInUse = monitoredContentInUse; + } + /** + * @return Returns the userExceptionContentInUse. + */ + public String getUserExceptionContentInUse() { + return userExceptionContentInUse; + } + /** + * @param userExceptionContentInUse The userExceptionContentInUse to set. + */ + public void setUserExceptionContentInUse(String userExceptionContentInUse) { + this.userExceptionContentInUse = userExceptionContentInUse; + } + /** + * @return Returns the editResponse. + */ + public String getEditResponse() { + return editResponse; + } + /** + * @param editResponse The editResponse to set. + */ + public void setEditResponse(String editResponse) { + this.editResponse = editResponse; + } + /** + * @return Returns the mapQuestionContent. + */ + public Map getMapQuestionContent() { + return mapQuestionContent; + } + /** + * @param mapQuestionContent The mapQuestionContent to set. + */ + public void setMapQuestionContent(Map mapQuestionContent) { + this.mapQuestionContent = mapQuestionContent; + } + /** + * @return Returns the defaultQuestionContent. + */ + public String getDefaultQuestionContent() { + return defaultQuestionContent; + } + /** + * @param defaultQuestionContent The defaultQuestionContent to set. + */ + public void setDefaultQuestionContent(String defaultQuestionContent) { + this.defaultQuestionContent = defaultQuestionContent; + } + /** + * @return Returns the offlineInstructions. + */ + public String getOfflineInstructions() { + return offlineInstructions; + } + /** + * @param offlineInstructions The offlineInstructions to set. + */ + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + /** + * @return Returns the onlineInstructions. + */ + public String getOnlineInstructions() { + return onlineInstructions; + } + /** + * @param onlineInstructions The onlineInstructions to set. + */ + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + /** + * @return Returns the attachmentList. + */ + public List getAttachmentList() { + return attachmentList; + } + /** + * @param attachmentList The attachmentList to set. + */ + public void setAttachmentList(List attachmentList) { + this.attachmentList = attachmentList; + } + /** + * @return Returns the deletedAttachmentList. + */ + public List getDeletedAttachmentList() { + return deletedAttachmentList; + } + /** + * @param deletedAttachmentList The deletedAttachmentList to set. + */ + public void setDeletedAttachmentList(List deletedAttachmentList) { + this.deletedAttachmentList = deletedAttachmentList; + } + /** + * @return Returns the userExceptionNoStudentActivity. + */ + public String getUserExceptionNoStudentActivity() { + return userExceptionNoStudentActivity; + } + /** + * @param userExceptionNoStudentActivity The userExceptionNoStudentActivity to set. + */ + public void setUserExceptionNoStudentActivity( + String userExceptionNoStudentActivity) { + this.userExceptionNoStudentActivity = userExceptionNoStudentActivity; + } + /** + * @return Returns the countAllUsers. + */ + public String getCountAllUsers() { + return countAllUsers; + } + /** + * @param countAllUsers The countAllUsers to set. + */ + public void setCountAllUsers(String countAllUsers) { + this.countAllUsers = countAllUsers; + } + /** + * @return Returns the countSessionComplete. + */ + public String getCountSessionComplete() { + return countSessionComplete; + } + /** + * @param countSessionComplete The countSessionComplete to set. + */ + public void setCountSessionComplete(String countSessionComplete) { + this.countSessionComplete = countSessionComplete; + } + /** + * @return Returns the userExceptionNoToolSessions. + */ + public String getUserExceptionNoToolSessions() { + return userExceptionNoToolSessions; + } + /** + * @param userExceptionNoToolSessions The userExceptionNoToolSessions to set. + */ + public void setUserExceptionNoToolSessions( + String userExceptionNoToolSessions) { + this.userExceptionNoToolSessions = userExceptionNoToolSessions; + } + /** + * @return Returns the activityInstructions. + */ + public String getActivityInstructions() { + return activityInstructions; + } + /** + * @param activityInstructions The activityInstructions to set. + */ + public void setActivityInstructions(String activityInstructions) { + this.activityInstructions = activityInstructions; + } + /** + * @return Returns the activityTitle. + */ + public String getActivityTitle() { + return activityTitle; + } + /** + * @param activityTitle The activityTitle to set. + */ + public void setActivityTitle(String activityTitle) { + this.activityTitle = activityTitle; + } +} Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r2327711a9c21985a1a82c5f470c05152bba8d741 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 2327711a9c21985a1a82c5f470c05152bba8d741) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -28,9 +28,9 @@ public interface QaAppConstants { public static final String MY_SIGNATURE ="laqa11"; - public static final long DEFAULT_CONTENT_ID =0; - public static final long DEFAULT_QUE_CONTENT_ID =1; - public static final String TOOL_SERVICE ="tool_service"; + public static final long DEFAULT_CONTENT_ID =0; + public static final long DEFAULT_QUE_CONTENT_ID =1; + //public static final String TOOL_SERVICE ="tool_service"; public static final String ERROR_QAAPPLICATION = "error.exception.QaApplication"; public static final String TOOL_CONTENT_ID = "toolContentID"; public static final String MAP_QUESTION_CONTENT_KEY = "mapQuestionContentKey"; @@ -95,6 +95,7 @@ public static final Long INITIAL_QUESTION_COUNT =new Long(1); public static final String QA_GENERAL_AUTHORING_DTO ="qaGeneralAuthoringDTO"; + public static final String QA_GENERAL_MONITORING_DTO ="qaGeneralMonitoringDTO"; /* * Struts level constants @@ -146,7 +147,7 @@ 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"; - public static final String USER_EXCEPTION_CONTENT_DOESNOTEXIST ="userExceptionContentDoesNotExist"; + //public static final String USER_EXCEPTION_CONTENT_DOESNOTEXIST ="userExceptionContentDoesNotExist"; public static final String USER_EXCEPTION_TOOLSESSION_DOESNOTEXIST ="userExceptionToolSessionDoesNotExist"; public static final String USER_EXCEPTION_CONTENTID_REQUIRED ="userExceptionContentIdRequired"; public static final String USER_EXCEPTION_TOOLSESSIONID_REQUIRED ="userExceptionToolSessionIdRequired"; @@ -171,7 +172,6 @@ public static final String COUNT_ALL_USERS ="countAllUsers"; - public static final String CURRENT_MONITORING_TAB ="currentMonitoringTab"; public static final String LIST_MONITORED_ANSWERS_CONTAINER_DTO ="listMonitoredAnswersContainerDto"; public static final String SUMMARY_TOOL_SESSIONS ="summaryToolSessions"; public static final String SUMMARY_TOOL_SESSIONS_ID ="summaryToolSessionsId"; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java =================================================================== diff -u -r0fb4d41712e31bd525abb02f100373875b1c7fc6 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java (.../QaUtils.java) (revision 0fb4d41712e31bd525abb02f100373875b1c7fc6) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java (.../QaUtils.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -28,7 +28,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.TimeZone; import java.util.TreeMap; import javax.servlet.http.HttpServletRequest; @@ -462,7 +461,6 @@ request.getSession().removeAttribute(COUNT_SESSION_COMPLETE); request.getSession().removeAttribute(CURRENT_MONITORED_TOOL_SESSION); request.getSession().removeAttribute(COUNT_ALL_USERS); - request.getSession().removeAttribute(CURRENT_MONITORING_TAB); request.getSession().removeAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO); request.getSession().removeAttribute(SUMMARY_TOOL_SESSIONS); request.getSession().removeAttribute(SUMMARY_TOOL_SESSIONS_ID); @@ -529,7 +527,7 @@ request.getSession().removeAttribute(USER_EXCEPTION_UNCOMPATIBLE_IDS); request.getSession().removeAttribute(USER_EXCEPTION_NUMBERFORMAT); request.getSession().removeAttribute(USER_EXCEPTION_USER_DOESNOTEXIST); - request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST); + //request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST); request.getSession().removeAttribute(USER_EXCEPTION_TOOLSESSION_DOESNOTEXIST); request.getSession().removeAttribute(USER_EXCEPTION_CONTENTID_REQUIRED); request.getSession().removeAttribute(USER_EXCEPTION_TOOLSESSIONID_REQUIRED); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java =================================================================== diff -u -r6f0b2f51a5dd4135371017fd19a2292c35220689 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java (.../ClearSessionAction.java) (revision 6f0b2f51a5dd4135371017fd19a2292c35220689) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java (.../ClearSessionAction.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -45,23 +45,6 @@ public void clearSession(String customiseSessionID,HttpSession session, ToolAccessMode mode) { if(mode.isAuthor()){ session.removeAttribute(QaAction.SUBMIT_SUCCESS); - session.removeAttribute(QaAction.TOOL_SERVICE); - session.removeAttribute(QaAction.MAP_QUESTION_CONTENT); - session.removeAttribute(QaAction.EDITACTIVITY_EDITMODE); - session.removeAttribute(QaAction.RENDER_MONITORING_EDITACTIVITY); - session.removeAttribute(QaAction.ATTACHMENT_LIST); - session.removeAttribute(QaAction.DELETED_ATTACHMENT_LIST); - session.removeAttribute(QaAction.USER_EXCEPTION_QUESTIONS_DUPLICATE); - session.removeAttribute(QaAction.ACTIVITY_TITLE); - session.removeAttribute(QaAction.ACTIVITY_INSTRUCTIONS); - session.removeAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID); - session.removeAttribute(QaAction.DEFINE_LATER_IN_EDIT_MODE); - session.removeAttribute(QaAction.TARGET_MODE); - session.removeAttribute(QaAction.REQUESTED_MODULE); - session.removeAttribute(QaAction.ACTIVE_MODULE); - session.removeAttribute(QaAction.IS_DEFINE_LATER); - session.removeAttribute(QaAction.SHOW_AUTHORING_TABS); - session.removeAttribute("queIndex"); } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java =================================================================== diff -u -r57157cef4ee9b4d70e92be83584eb8d10bcea83c -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 57157cef4ee9b4d70e92be83584eb8d10bcea83c) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -115,7 +115,8 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(content); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - qaMonitoringAction.refreshSummaryData(request, content, qaService, true, true, toolSessionID.toString(), userID.toString(), generalLearnerFlowDTO); + qaMonitoringAction.refreshSummaryData(request, content, qaService, true, true, toolSessionID.toString(), + userID.toString(), generalLearnerFlowDTO, false); logger.debug("end refreshSummaryData for learner mode."); generalLearnerFlowDTO =(GeneralLearnerFlowDTO)request.getAttribute(GENERAL_LEARNER_FLOW_DTO); @@ -156,7 +157,8 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(content); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - qaMonitoringAction.refreshSummaryData(request, content, qaService, true, false, null, null, generalLearnerFlowDTO); + qaMonitoringAction.refreshSummaryData(request, content, qaService, true, false, + null, null, generalLearnerFlowDTO, false); logger.debug("end refreshSummaryData for teacher mode."); logger.debug("teacher uses content id: " + content.getQaContentId()); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java =================================================================== diff -u -r97ebe40dad2731256147d74073b541245be53871 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 97ebe40dad2731256147d74073b541245be53871) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -29,7 +29,6 @@ import java.util.TreeMap; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import org.lamsfoundation.lams.tool.qa.QaAppConstants; @@ -43,9 +42,6 @@ import org.lamsfoundation.lams.tool.qa.QaUsrResp; import org.lamsfoundation.lams.tool.qa.QaUtils; import org.lamsfoundation.lams.tool.qa.service.IQaService; -import org.lamsfoundation.lams.usermanagement.dto.UserDTO; -import org.lamsfoundation.lams.web.session.SessionManager; -import org.lamsfoundation.lams.web.util.AttributeNames; /** * @@ -396,7 +392,7 @@ { logger.debug("just populating data normally just like monitoring summary, except that the data is ony for a specific session" ); logger.debug("isUserNamesVisible true, isLearnerRequest true" ); - //String userID= (String)request.getSession().getAttribute(USER_ID); + String userID = QaUtils.getCurrentLearnerID(); logger.debug("userID: " + userID); QaQueUsr qaQueUsr=qaService.getQaQueUsrById(new Long(userID).longValue()); @@ -442,7 +438,7 @@ logger.debug("populating data normally exception are for a specific session and other user names are not visible."); logger.debug("isUserNamesVisible false, isLearnerRequest true" ); logger.debug("getting only current user's data" ); - //String userID= (String)request.getSession().getAttribute(USER_ID); + String userID = QaUtils.getCurrentLearnerID(); logger.debug("userID: " + userID); @@ -577,7 +573,7 @@ { Map data=(Map)listIterator.next(); map.put(mapIndex.toString(), data); - mapIndex=new Long(mapIndex.longValue()+1); + mapIndex=new Long(mapIndex.longValue()+1); } return map; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java =================================================================== diff -u -r0fb4d41712e31bd525abb02f100373875b1c7fc6 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java (.../QaAuthoringForm.java) (revision 0fb4d41712e31bd525abb02f100373875b1c7fc6) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java (.../QaAuthoringForm.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -153,6 +153,7 @@ public String toString() { return new ToStringBuilder(this) + .append("Listing current QaAuthoringForm properties: ") .append("toolContentID: ", toolContentID) .append("currentTab: ", currentTab) .append("activeModule: ", activeModule) Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -r97ebe40dad2731256147d74073b541245be53871 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 97ebe40dad2731256147d74073b541245be53871) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -297,7 +297,7 @@ QaMonitoringAction qaMonitoringAction= new QaMonitoringAction(); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, toolSessionID, null, generalLearnerFlowDTO); + qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, toolSessionID, null, generalLearnerFlowDTO, false); generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(false).toString()); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java =================================================================== diff -u -r57157cef4ee9b4d70e92be83584eb8d10bcea83c -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 57157cef4ee9b4d70e92be83584eb8d10bcea83c) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -389,7 +389,7 @@ generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, true, true, toolSessionID, learnerProgressUserId, - generalLearnerFlowDTO); + generalLearnerFlowDTO, false); logger.debug("fwd'ing to for learner progress" + INDIVIDUAL_LEARNER_REPORT); return (mapping.findForward(INDIVIDUAL_LEARNER_REPORT)); } @@ -452,7 +452,8 @@ generalLearnerFlowDTO.setRequestLearningReportViewOnly(new Boolean(true).toString()); logger.debug("using generalLearnerFlowDTO: " + generalLearnerFlowDTO); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, currentToolSessionID.toString(), null, generalLearnerFlowDTO); + qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, + currentToolSessionID.toString(), null, generalLearnerFlowDTO, false); logger.debug("final generalLearnerFlowDTO: " + generalLearnerFlowDTO); logger.debug("fwd'ing to." + INDIVIDUAL_LEARNER_REPORT); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java =================================================================== diff -u -r0fb4d41712e31bd525abb02f100373875b1c7fc6 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 0fb4d41712e31bd525abb02f100373875b1c7fc6) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -87,6 +87,7 @@ package org.lamsfoundation.lams.tool.qa.web; import java.io.IOException; +import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -103,6 +104,7 @@ import org.apache.struts.action.ActionMessages; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.qa.GeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.qa.GeneralMonitoringDTO; import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaUsrResp; @@ -151,8 +153,8 @@ ServletException { logger.debug("dispatching getStats..." + request); - - initStatsContent(mapping, form, request, response); + GeneralMonitoringDTO generalMonitoringDTO= new GeneralMonitoringDTO(); + initStatsContent(mapping, form, request, response, generalMonitoringDTO); return (mapping.findForward(LOAD_MONITORING)); } @@ -161,44 +163,62 @@ public void initStatsContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, + HttpServletResponse response, GeneralMonitoringDTO generalMonitoringDTO) throws IOException, ServletException { logger.debug("starting initStatsContent..."); logger.debug("dispatching getStats..." + request); - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + logger.debug("qaMonitoringForm: " + qaMonitoringForm); + + IQaService qaService = null; + if (getServlet() != null) + qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + else + qaService=qaMonitoringForm.getQaService(); + logger.debug("qaService: " + qaService); - if (qaService == null) - { - logger.debug("will retrieve qaService"); - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - logger.debug("retrieving qaService from session: " + qaService); - } - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); - - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); + + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); + + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + if (qaService.studentActivityOccurredGlobal(qaContent)) { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString()); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); } else { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString()); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); } - refreshStatsData(request); - request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false)); - - request.getSession().setAttribute(CURRENT_MONITORING_TAB, "stats"); - logger.debug("final USER_EXCEPTION_NO_TOOL_SESSIONS: " + request.getSession().getAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS)); + refreshStatsData(request, qaMonitoringForm, qaService, generalMonitoringDTO); + generalMonitoringDTO.setEditResponse(new Boolean(false).toString()); + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); logger.debug("ending initStatsContent..."); } @@ -242,38 +262,60 @@ { logger.debug("starting initInstructionsContent..."); logger.debug("dispatching getInstructions..." + request); + + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + logger.debug("qaMonitoringForm: " + qaMonitoringForm); - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); + GeneralMonitoringDTO generalMonitoringDTO= new GeneralMonitoringDTO(); + + IQaService qaService = null; + if (getServlet() != null) + qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + else + qaService=qaMonitoringForm.getQaService(); + logger.debug("qaService: " + qaService); - if (qaService == null) - { - logger.debug("will retrieve qaService"); - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - logger.debug("retrieving qaService from session: " + qaService); - } - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); - - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); + + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + if (qaService.studentActivityOccurredGlobal(qaContent)) { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } - refreshInstructionsData(request, qaContent); - request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false)); + generalMonitoringDTO.setEditResponse(new Boolean(false).toString()); + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - request.getSession().setAttribute(CURRENT_MONITORING_TAB, "instructions"); - logger.debug("final USER_EXCEPTION_NO_TOOL_SESSIONS: " + request.getSession().getAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS)); logger.debug("ending initInstructionsContent..."); } @@ -303,41 +345,67 @@ logger.debug("dispatching editActivity..."); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; logger.debug("qaMonitoringForm: " + qaMonitoringForm); - - - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); + + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); logger.debug("qaService: " + qaService); + if (qaService == null) - { - logger.debug("will retrieve qaService"); - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - logger.debug("retrieving qaService from session: " + qaService); - } - request.getSession().setAttribute(TOOL_SERVICE, qaService); - request.getSession().setAttribute(CURRENT_MONITORING_TAB, "editActivity"); - + qaService=qaMonitoringForm.getQaService(); + + QaStarterAction qaStarterAction= new QaStarterAction(); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); request.setAttribute(SOURCE_MC_STARTER, "monitoring"); logger.debug("SOURCE_MC_STARTER: monitoring"); /* it is possible that the content is being used by some learners. In this situation, the content is marked as "in use" and content in use is not modifiable*/ - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("qaContent:" + qaContent); + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + GeneralMonitoringDTO generalMonitoringDTO= new GeneralMonitoringDTO(); if (qaService.studentActivityOccurredGlobal(qaContent)) { logger.debug("student activity occurred on this content:" + qaContent); - request.getSession().setAttribute(USER_EXCEPTION_CONTENT_IN_USE, new Boolean(true).toString()); + //request.getSession().setAttribute(USER_EXCEPTION_CONTENT_IN_USE, new Boolean(true).toString()); + generalMonitoringDTO.setUserExceptionContentInUse(new Boolean(true).toString()); logger.debug("forwarding to: " + LOAD_MONITORING); return (mapping.findForward(LOAD_MONITORING)); } - request.getSession().setAttribute(ACTIVITY_TITLE, qaContent.getTitle()); - request.getSession().setAttribute(ACTIVITY_INSTRUCTIONS, qaContent.getInstructions()); + //request.getSession().setAttribute(ACTIVITY_TITLE, qaContent.getTitle()); + //request.getSession().setAttribute(ACTIVITY_INSTRUCTIONS, qaContent.getInstructions()); + + if (qaContent.getTitle() == null) + { + generalMonitoringDTO.setActivityTitle("Questions and Answers"); + generalMonitoringDTO.setActivityInstructions("Please answer the questions."); + } + else + { + generalMonitoringDTO.setActivityTitle(qaContent.getTitle()); + generalMonitoringDTO.setActivityInstructions(qaContent.getInstructions()); + } + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); /* note that we are casting monitoring form subclass into Authoring form*/ logger.debug("watch here: note that we are casting monitoring form subclass into Authoring form"); @@ -369,7 +437,7 @@ HttpServletResponse response) throws IOException, ServletException { - logger.debug("start getSummary..."); + logger.debug("start getSummary..."); initSummaryContent(mapping, form, request, response); return (mapping.findForward(LOAD_MONITORING)); } @@ -382,47 +450,63 @@ HttpServletResponse response) throws IOException, ServletException { - logger.debug("start initSummaryContent..."); + logger.debug("initSummaryContent..."); + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + logger.debug("qaMonitoringForm: " + qaMonitoringForm); + + GeneralMonitoringDTO generalMonitoringDTO= new GeneralMonitoringDTO(); - logger.debug("dispatching getSummary..." + request); - request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false)); - - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); + IQaService qaService = null; + if (getServlet() != null) + qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + else + qaService=qaMonitoringForm.getQaService(); + logger.debug("qaService: " + qaService); - if (qaService == null) - { - logger.debug("will retrieve qaService"); - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - logger.debug("retrieving qaService from session: " + qaService); - } - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); - - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); + + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); /* this section is related to summary tab. Starts here. */ Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); logger.debug("summaryToolSessions: " + summaryToolSessions); - request.getSession().setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); - logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getSession().getAttribute(SUMMARY_TOOL_SESSIONS)); + + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); /* ends here. */ - + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + /*true means there is at least 1 response*/ if (qaService.studentActivityOccurredGlobal(qaContent)) { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } - request.getSession().setAttribute(CURRENT_MONITORING_TAB, "summary"); - logger.debug("final USER_EXCEPTION_NO_TOOL_SESSIONS: " + request.getSession().getAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS)); + generalMonitoringDTO.setEditResponse(new Boolean(false).toString()); + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + logger.debug("end initSummaryContent..."); } @@ -435,14 +519,22 @@ ToolException { logger.debug("dispatching editActivityQuestions..."); - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); logger.debug("qaService: " + qaService); + GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); + //ATTENTION HERE: obtain strToolContentID String strToolContentID= null; - request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString()); + //request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString()); + generalMonitoringDTO.setMonitoredContentInUse(new Boolean(false).toString()); - request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(true).toString()); + //request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(true).toString()); + generalMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + QaUtils.setDefineLater(request, true,strToolContentID, qaService); return (mapping.findForward(LOAD_MONITORING)); } @@ -463,7 +555,7 @@ logger.debug("qaMonitoringForm: " + qaMonitoringForm); String questionIndex=qaMonitoringForm.getQuestionIndex(); logger.debug("questionIndex: " + questionIndex); - request.getSession().setAttribute(REMOVABLE_QUESTION_INDEX, questionIndex); + //request.getSession().setAttribute(REMOVABLE_QUESTION_INDEX, questionIndex); QaAction qaAction= new QaAction(); return qaAction.removeQuestion(mapping, form, request, response); @@ -472,8 +564,16 @@ public ActionForward submitAllContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { logger.debug("dispatching proxy submitAllContent..."); - request.getSession().setAttribute(ACTIVE_MODULE, DEFINE_LATER); - request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(false).toString()); + //request.getSession().setAttribute(ACTIVE_MODULE, DEFINE_LATER); + + GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); + generalMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + + + //request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(false).toString()); QaAction qaAction= new QaAction(); return qaAction.submitAllContent(mapping, form, request, response); @@ -506,40 +606,52 @@ IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); logger.debug("qaService: " + qaService); - request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false)); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + String currentMonitoredToolSession=qaMonitoringForm.getSelectedToolSessionId(); logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("All")) { - request.getSession().setAttribute(SELECTION_CASE, new Long(2)); + request.setAttribute(SELECTION_CASE, new Long(2)); } else { /* SELECTION_CASE == 1 indicates a selected group other than "All" */ - request.getSession().setAttribute(SELECTION_CASE, new Long(1)); + request.setAttribute(SELECTION_CASE, new Long(1)); } - logger.debug("SELECTION_CASE: " + request.getSession().getAttribute(SELECTION_CASE)); - - - request.getSession().setAttribute(CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); - logger.debug("CURRENT_MONITORED_TOOL_SESSION: " + request.getSession().getAttribute(CURRENT_MONITORED_TOOL_SESSION)); - - - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); + logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); + + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); + + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO); - - logger.debug("final USER_EXCEPTION_NO_TOOL_SESSIONS: " + request.getSession().getAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS)); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); + return (mapping.findForward(LOAD_MONITORING)); } @@ -567,28 +679,62 @@ { logger.debug("dispatching editResponse..."); - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); - logger.debug("qaService: " + qaService); - + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); + String responseId=qaMonitoringForm.getResponseId(); logger.debug("responseId: " + responseId); - request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(true)); request.getSession().setAttribute(EDITABLE_RESPONSE_ID, responseId); QaUsrResp qaUsrResp= qaService.retrieveQaUsrResp(new Long(responseId).longValue()); logger.debug("qaUsrResp: " + qaUsrResp); - refreshUserInput(request); + refreshUserInput(request, qaMonitoringForm); QaContent qaContent=qaUsrResp.getQaQueContent().getQaContent(); logger.debug("qaContent: " + qaContent); + String currentMonitoredToolSession=qaMonitoringForm.getSelectedToolSessionId(); + logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); + + if (currentMonitoredToolSession.equals("")) + { + currentMonitoredToolSession="All"; + } + + if (currentMonitoredToolSession.equals("All")) + { + request.setAttribute(SELECTION_CASE, new Long(2)); + } + else + { + request.setAttribute(SELECTION_CASE, new Long(1)); + } + + logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); + + + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, true); return (mapping.findForward(LOAD_MONITORING)); } @@ -618,10 +764,15 @@ { logger.debug("dispatching updateResponse..."); - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); - logger.debug("qaService: " + qaService); + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); + String responseId=qaMonitoringForm.getResponseId(); logger.debug("responseId: " + responseId); @@ -641,17 +792,45 @@ qaService.updateQaUsrResp(qaUsrResp); logger.debug("response updated."); - request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false)); + refreshUserInput(request, qaMonitoringForm); - refreshUserInput(request); + String currentMonitoredToolSession=qaMonitoringForm.getSelectedToolSessionId(); + logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); + + if (currentMonitoredToolSession.equals("")) + { + currentMonitoredToolSession="All"; + } + + if (currentMonitoredToolSession.equals("All")) + { + request.setAttribute(SELECTION_CASE, new Long(2)); + } + else + { + request.setAttribute(SELECTION_CASE, new Long(1)); + } + logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); + QaContent qaContent=qaUsrResp.getQaQueContent().getQaContent(); logger.debug("qaContent: " + qaContent); + + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); return (mapping.findForward(LOAD_MONITORING)); } @@ -678,13 +857,36 @@ ServletException { logger.debug("dispatching deleteResponse..."); - request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false)); - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); - logger.debug("qaService: " + qaService); + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); + + + String currentMonitoredToolSession=qaMonitoringForm.getSelectedToolSessionId(); + logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); + + if (currentMonitoredToolSession.equals("")) + { + currentMonitoredToolSession="All"; + } + + if (currentMonitoredToolSession.equals("All")) + { + request.setAttribute(SELECTION_CASE, new Long(2)); + } + else + { + request.setAttribute(SELECTION_CASE, new Long(1)); + } + + logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); + String responseId=qaMonitoringForm.getResponseId(); logger.debug("responseId: " + responseId); @@ -694,15 +896,27 @@ qaService.removeUserResponse(qaUsrResp); logger.debug("response deleted."); - refreshUserInput(request); + refreshUserInput(request, qaMonitoringForm); QaContent qaContent=qaUsrResp.getQaQueContent().getQaContent(); logger.debug("qaContent: " + qaContent); + + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); return (mapping.findForward(LOAD_MONITORING)); } @@ -711,20 +925,34 @@ * refreshUserInput(HttpServletRequest request) * @param request */ - public void refreshUserInput(HttpServletRequest request) + public void refreshUserInput(HttpServletRequest request, QaMonitoringForm qaMonitoringForm) { - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); - logger.debug("qaService: " + qaService); - - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); - - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); - logger.debug("existing qaContent:" + qaContent); + logger.debug("starting refreshUserInput: " + qaMonitoringForm); + + IQaService qaService = null; + if (getServlet() != null) + qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + else + qaService=qaMonitoringForm.getQaService(); + + logger.debug("qaService: " + qaService); + logger.debug("qaMonitoringForm: " + qaMonitoringForm); - List listMonitoredAnswersContainerDTO=MonitoringUtil.buildGroupsQuestionData(request, qaContent, qaService, true, false, null, null); - request.getSession().setAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO, listMonitoredAnswersContainerDTO); - logger.debug("LIST_MONITORED_ANSWERS_CONTAINER_DTO: " + request.getSession().getAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO)); + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("existing qaContent:" + qaContent); + + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); } @@ -772,41 +1000,6 @@ /** - * boolean isOnlyContentIdAvailable(HttpServletRequest request) - * @param request - * @return boolean - */ - public boolean isOnlyContentIdAvailable(HttpServletRequest request) - { - boolean existsContentId=false; - String strToolContentId=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - if ((strToolContentId != null) && (strToolContentId.length() > 0)) - existsContentId=true; - - boolean existsToolSession=false; - for (int toolSessionIdCounter=1; toolSessionIdCounter < MAX_TOOL_SESSION_COUNT.intValue(); toolSessionIdCounter++) - { - String strToolSessionId=request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID + toolSessionIdCounter); - if ((strToolSessionId != null) && (strToolSessionId.length() > 0)) - { - existsToolSession=true; - } - } - - if (existsContentId && (!existsToolSession)) - { - logger.debug("OnlyContentIdAvailable"); - return true; - } - else - { - logger.debug("Not OnlyContentIdAvailable"); - return false; - } - } - - - /** * calls learning action endLearning functionality * ActionForward endLearning(ActionMapping mapping, ActionForm form, @@ -853,43 +1046,115 @@ */ public void refreshSummaryData(HttpServletRequest request, QaContent qaContent, IQaService qaService, boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId, - GeneralLearnerFlowDTO generalLearnerFlowDTO) + GeneralLearnerFlowDTO generalLearnerFlowDTO, boolean setEditResponse) { - logger.debug("starting refreshSummaryData: "); + logger.debug("starting refreshSummaryData: setEditResponse + " + setEditResponse); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); logger.debug("qaService: " + isUserNamesVisible); logger.debug("isUserNamesVisible: " + isUserNamesVisible); logger.debug("isLearnerRequest: " + isLearnerRequest); + + GeneralMonitoringDTO generalMonitoringDTO= new GeneralMonitoringDTO(); /* this section is related to summary tab. Starts here. */ Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); logger.debug("summaryToolSessions: " + summaryToolSessions); - request.getSession().setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + if (qaContent.getTitle() == null) + { + generalMonitoringDTO.setActivityTitle("Questions and Answers"); + generalMonitoringDTO.setActivityInstructions("Please answer the questions."); + } + else + { + generalMonitoringDTO.setActivityTitle(qaContent.getTitle()); + generalMonitoringDTO.setActivityInstructions(qaContent.getInstructions()); + } + if (qaService.studentActivityOccurredGlobal(qaContent)) { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } + + boolean isContentInUse=QaUtils.isContentInUse(qaContent); + logger.debug("isContentInUse:" + isContentInUse); + + generalMonitoringDTO.setMonitoredContentInUse(new Boolean(false).toString()); + if (isContentInUse == true) + { + logger.debug("monitoring url does not allow editActivity since the content is in use."); + persistError(request,"error.content.inUse"); + //request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(true).toString()); + generalMonitoringDTO.setMonitoredContentInUse(new Boolean(true).toString()); + } + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); - request.getSession().setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + logger.debug("using allUsersData to retrieve data: " + isUserNamesVisible); List listMonitoredAnswersContainerDTO=MonitoringUtil.buildGroupsQuestionData(request, qaContent, qaService, isUserNamesVisible, isLearnerRequest, currentSessionId, userId); - request.getSession().setAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO, listMonitoredAnswersContainerDTO); - logger.debug("LIST_MONITORED_ANSWERS_CONTAINER_DTO: " + request.getSession().getAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO)); + logger.debug("listMonitoredAnswersContainerDTO: " + listMonitoredAnswersContainerDTO); + + + /*getting stats screen content from here... */ + int countAllUsers=qaService.getTotalNumberOfUsers(qaContent); + logger.debug("countAllUsers: " + countAllUsers); + + if (countAllUsers == 0) + { + logger.debug("error: countAllUsers is 0"); + generalMonitoringDTO.setUserExceptionNoStudentActivity(new Boolean(true).toString()); + } + + + generalMonitoringDTO.setCountAllUsers(new Integer(countAllUsers).toString()); + + int countSessionComplete=qaService.countSessionComplete(qaContent); + logger.debug("countSessionComplete: " + countSessionComplete); + + generalMonitoringDTO.setCountSessionComplete(new Integer(countSessionComplete).toString()); + logger.debug("ending refreshStatsData with generalMonitoringDTO: " + generalMonitoringDTO); + /* till here*/ + + + generalMonitoringDTO.setEditResponse(new Boolean(setEditResponse).toString()); + + /*getting instructions screen content from here... */ + generalMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + generalMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + if ((generalMonitoringDTO.getOnlineInstructions() == null) || (generalMonitoringDTO.getOnlineInstructions().length() == 0)) + { + generalMonitoringDTO.setOnlineInstructions(DEFAULT_ONLINE_INST); + } + + if ((generalMonitoringDTO.getOfflineInstructions() == null) || (generalMonitoringDTO.getOfflineInstructions().length() == 0)) + { + generalMonitoringDTO.setOfflineInstructions(DEFAULT_OFFLINE_INST); + } + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + generalMonitoringDTO.setAttachmentList(attachmentList); + generalMonitoringDTO.setDeletedAttachmentList(new ArrayList()); + /* ...till here **/ + + if (generalLearnerFlowDTO != null) { logger.debug("final generalLearnerFlowDTO: " + generalLearnerFlowDTO); @@ -902,9 +1167,12 @@ generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); } + logger.debug("end of refreshSummaryData, generalLearnerFlowDTO : " + generalLearnerFlowDTO); request.setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); } + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); /* ends here. */ } @@ -914,38 +1182,50 @@ * refreshStatsData(HttpServletRequest request) * @param request */ - public void refreshStatsData(HttpServletRequest request) + public void refreshStatsData(HttpServletRequest request , QaMonitoringForm qaMonitoringForm, IQaService qaService, + GeneralMonitoringDTO generalMonitoringDTO) { + logger.debug("starting refreshStatsData: " + qaService); + logger.debug("starting refreshStatsData with generalMonitoringDTO: " + generalMonitoringDTO); /* it is possible that no users has ever logged in for the activity yet*/ - IQaService qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); - logger.debug("qaService: " + qaService); - if (qaService == null) - { - logger.debug("will retrieve qaService"); - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - logger.debug("retrieving qaService from session: " + qaService); - } - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); - - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); - logger.debug("existing qaContent:" + qaContent); + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("existing qaContent:" + qaContent); + + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + int countAllUsers=qaService.getTotalNumberOfUsers(qaContent); logger.debug("countAllUsers: " + countAllUsers); if (countAllUsers == 0) { logger.debug("error: countAllUsers is 0"); - request.getSession().setAttribute(USER_EXCEPTION_NO_STUDENT_ACTIVITY, new Boolean(true)); + generalMonitoringDTO.setUserExceptionNoStudentActivity(new Boolean(true).toString()); } - request.getSession().setAttribute(COUNT_ALL_USERS, new Integer(countAllUsers).toString()); + + generalMonitoringDTO.setCountAllUsers(new Integer(countAllUsers).toString()); int countSessionComplete=qaService.countSessionComplete(qaContent); logger.debug("countSessionComplete: " + countSessionComplete); - request.getSession().setAttribute(COUNT_SESSION_COMPLETE, new Integer(countSessionComplete).toString()); + + generalMonitoringDTO.setCountSessionComplete(new Integer(countSessionComplete).toString()); + + logger.debug("ending refreshStatsData with generalMonitoringDTO: " + generalMonitoringDTO); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); } @@ -956,19 +1236,13 @@ ServletException, ToolException { logger.debug("dispatching showResponse..."); - IQaService qaService=null; - qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); - - if (qaService == null) - { - logger.debug("will retrieve qaService"); - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - } + + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); logger.debug("qaService: " + qaService); - QaMonitoringForm voteMonitoringForm = (QaMonitoringForm) form; - - String currentUid=voteMonitoringForm.getCurrentUid(); + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + + String currentUid=qaMonitoringForm.getCurrentUid(); logger.debug("currentUid: " + currentUid); QaUsrResp qaUsrResp =qaService.getAttemptByUID(new Long(currentUid)); logger.debug("qaUsrResp: " + qaUsrResp); @@ -977,13 +1251,31 @@ qaService.showResponse(qaUsrResp); logger.debug("qaUsrResp: " + qaUsrResp); - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); - - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); + + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); - String currentMonitoredToolSession=voteMonitoringForm.getSelectedToolSessionId(); + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); + + + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + + String currentMonitoredToolSession=qaMonitoringForm.getSelectedToolSessionId(); logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) @@ -993,21 +1285,19 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); - + logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("All")) { - request.getSession().setAttribute(SELECTION_CASE, new Long(2)); + request.setAttribute(SELECTION_CASE, new Long(2)); } else { - request.getSession().setAttribute(SELECTION_CASE, new Long(1)); + request.setAttribute(SELECTION_CASE, new Long(1)); } - logger.debug("SELECTION_CASE: " + request.getSession().getAttribute(SELECTION_CASE)); - request.getSession().setAttribute(CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); - logger.debug("CURRENT_MONITORED_TOOL_SESSION: " + request.getSession().getAttribute(CURRENT_MONITORED_TOOL_SESSION)); + logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); logger.debug("submitting session to refresh the data from the database: "); return (mapping.findForward(LOAD_MONITORING)); @@ -1021,75 +1311,67 @@ ServletException, ToolException { logger.debug("dispatching hideResponse..."); - IQaService qaService=null; - qaService = (IQaService)request.getSession().getAttribute(TOOL_SERVICE); - - if (qaService == null) - { - logger.debug("will retrieve qaService"); - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - } + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); logger.debug("qaService: " + qaService); - QaMonitoringForm voteMonitoringForm = (QaMonitoringForm) form; + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - String currentUid=voteMonitoringForm.getCurrentUid(); + String currentUid=qaMonitoringForm.getCurrentUid(); logger.debug("currentUid: " + currentUid); QaUsrResp qaUsrResp =qaService.getAttemptByUID(new Long(currentUid)); logger.debug("qaUsrResp: " + qaUsrResp); qaUsrResp.setVisible(false); qaService.updateUserResponse(qaUsrResp); qaService.hideResponse(qaUsrResp); logger.debug("qaUsrResp: " + qaUsrResp); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); - - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); + + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); + logger.debug("summaryToolSessions: " + summaryToolSessions); + request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); + logger.debug("SUMMARY_TOOL_SESSIONS: " + request.getAttribute(SUMMARY_TOOL_SESSIONS)); - String currentMonitoredToolSession=voteMonitoringForm.getSelectedToolSessionId(); + Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); + logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + + String currentMonitoredToolSession=qaMonitoringForm.getSelectedToolSessionId(); logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("")) { currentMonitoredToolSession="All"; } - GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO); - if (currentMonitoredToolSession.equals("All")) { - request.getSession().setAttribute(SELECTION_CASE, new Long(2)); + request.setAttribute(SELECTION_CASE, new Long(2)); } else { - request.getSession().setAttribute(SELECTION_CASE, new Long(1)); + request.setAttribute(SELECTION_CASE, new Long(1)); } - logger.debug("SELECTION_CASE: " + request.getSession().getAttribute(SELECTION_CASE)); - request.getSession().setAttribute(CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); - logger.debug("CURRENT_MONITORED_TOOL_SESSION: " + request.getSession().getAttribute(CURRENT_MONITORED_TOOL_SESSION)); + logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); + + GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); + logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); logger.debug("submitting session to refresh the data from the database: "); return (mapping.findForward(LOAD_MONITORING)); } - - - /** - * populates data for instructions screen - * @param request - * @param qaContent - */ - public void refreshInstructionsData(HttpServletRequest request, QaContent qaContent) - { - request.getSession().setAttribute(RICHTEXT_ONLINEINSTRUCTIONS,qaContent.getOnlineInstructions()); - request.getSession().setAttribute(RICHTEXT_OFFLINEINSTRUCTIONS,qaContent.getOfflineInstructions()); - } - - - } \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java =================================================================== diff -u -re9eb408b02e578697e41a0ef7c9b2ea402a50c2a -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java (.../QaMonitoringForm.java) (revision e9eb408b02e578697e41a0ef7c9b2ea402a50c2a) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java (.../QaMonitoringForm.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -24,7 +24,9 @@ /* ActionForm for the Monitoring environment */ +import org.apache.commons.lang.builder.ToStringBuilder; import org.lamsfoundation.lams.tool.qa.QaAppConstants; +import org.lamsfoundation.lams.tool.qa.service.IQaService; /** * @author Ozgur Demirtas @@ -36,11 +38,53 @@ protected String selectedToolSessionId; protected String isToolSessionChanged; + protected String editResponse; protected String hideResponse; protected String showResponse; protected String currentUid; + protected IQaService qaService; + + + public String toString() { + super.toString(); + return new ToStringBuilder(this) + .append("Listing current QaMonitoringForm properties: ") + .append("method: ", method) + .append("selectedToolSessionId: ", selectedToolSessionId) + .append("isToolSessionChanged: ", isToolSessionChanged) + .append("editResponse: ", editResponse) + .append("hideResponse: ", hideResponse) + .append("showResponse: ", showResponse) + .append("currentUid: ", currentUid) + .toString(); + } + /** + * @return Returns the editResponse. + */ + public String getEditResponse() { + return editResponse; + } + /** + * @param editResponse The editResponse to set. + */ + public void setEditResponse(String editResponse) { + this.editResponse = editResponse; + } + /** + * @return Returns the qaService. + */ + public IQaService getQaService() { + return qaService; + } + /** + * @param qaService The qaService to set. + */ + public void setQaService(IQaService qaService) { + this.qaService = qaService; + } + /** * @return Returns the currentUid. */ public String getCurrentUid() { Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java =================================================================== diff -u -r2327711a9c21985a1a82c5f470c05152bba8d741 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 2327711a9c21985a1a82c5f470c05152bba8d741) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -25,7 +25,9 @@ package org.lamsfoundation.lams.tool.qa.web; import java.io.IOException; +import java.util.ArrayList; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.TreeMap; @@ -42,6 +44,7 @@ import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; import org.lamsfoundation.lams.tool.qa.GeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.qa.GeneralMonitoringDTO; import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaApplicationException; import org.lamsfoundation.lams.tool.qa.QaComparator; @@ -92,44 +95,47 @@ logger.debug("init QaMonitoringStarterAction..."); QaUtils.cleanUpSessionAbsolute(request); - ActionForward validateParameters=validateParameters(request, mapping); + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + logger.debug("qaMonitoringForm: " + qaMonitoringForm); + + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + qaMonitoringForm.setQaService(qaService); + + + ActionForward validateParameters=validateParameters(request, mapping, qaMonitoringForm); logger.debug("validateParamaters: " + validateParameters); if (validateParameters != null) { return validateParameters; } - boolean initData=initialiseMonitoringData(mapping, form, request, response); + GeneralMonitoringDTO generalMonitoringDTO= new GeneralMonitoringDTO(); + boolean initData=initialiseMonitoringData(mapping, qaMonitoringForm, request, response, qaService, generalMonitoringDTO); logger.debug("initData: " + initData); if (initData == false) return (mapping.findForward(ERROR_LIST)); - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - logger.debug("qaMonitoringForm: " + qaMonitoringForm); qaMonitoringForm.setCurrentTab("1"); logger.debug("setting current tab to 1: "); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString()); - QaMonitoringAction qaMonitoringAction= new QaMonitoringAction(); logger.debug("calling initSummaryContent."); qaMonitoringAction.initSummaryContent(mapping, form, request, response); logger.debug("calling initInstructionsContent."); qaMonitoringAction.initInstructionsContent(mapping, form, request, response); logger.debug("calling initStatsContent."); - qaMonitoringAction.initStatsContent(mapping, form, request, response); + qaMonitoringAction.initStatsContent(mapping, form, request, response, generalMonitoringDTO); + logger.debug("post initStatsContent." + generalMonitoringDTO); - - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - /* we have made sure TOOL_CONTENT_ID is passed */ - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); + String toolContentID=qaMonitoringForm.getToolContentID(); + logger.debug("toolContentID: " + toolContentID); - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); - + QaContent qaContent=qaService.loadQa(new Long(toolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); + Map mapQuestionContent= new TreeMap(new QaComparator()); logger.debug("mapQuestionContent: " + mapQuestionContent); /* @@ -151,34 +157,58 @@ * make the first entry the default(first) one for jsp */ if (mapIndex.longValue() == 1) - request.getSession().setAttribute(DEFAULT_QUESTION_CONTENT, qaQueContent.getQuestion()); + generalMonitoringDTO.setDefaultQuestionContent(qaQueContent.getQuestion()); mapIndex=new Long(mapIndex.longValue()+1); } } logger.debug("Map initialized with existing contentid to: " + mapQuestionContent); logger.debug("callling presentInitialUserInterface for the existing content."); - request.getSession().setAttribute(MAP_QUESTION_CONTENT, mapQuestionContent); - logger.debug("execute initialized the Comparable Map: " + request.getSession().getAttribute("mapQuestionContent") ); + generalMonitoringDTO.setMapQuestionContent(mapQuestionContent); /*true means there is at least 1 response*/ if (qaService.studentActivityOccurredGlobal(qaContent)) { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(false).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + } else { - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString()); logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } - logger.debug("final USER_EXCEPTION_NO_TOOL_SESSIONS: " + request.getSession().getAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS)); - - request.getSession().setAttribute(CURRENT_MONITORED_TOOL_SESSION, "All"); - request.getSession().setAttribute(SELECTION_CASE, new Long(2)); - request.getSession().setAttribute(ACTIVE_MODULE, MONITORING); + request.setAttribute(SELECTION_CASE, new Long(2)); qaMonitoringForm.setActiveModule(MONITORING); + qaMonitoringForm.setEditResponse(new Boolean(false).toString()); + + + /**getting instructions screen content from here... */ + generalMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + generalMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + if ((generalMonitoringDTO.getOnlineInstructions() == null) || (generalMonitoringDTO.getOnlineInstructions().length() == 0)) + { + generalMonitoringDTO.setOnlineInstructions(DEFAULT_ONLINE_INST); + } + + if ((generalMonitoringDTO.getOfflineInstructions() == null) || (generalMonitoringDTO.getOfflineInstructions().length() == 0)) + { + generalMonitoringDTO.setOfflineInstructions(DEFAULT_OFFLINE_INST); + } + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + generalMonitoringDTO.setAttachmentList(attachmentList); + generalMonitoringDTO.setDeletedAttachmentList(new ArrayList()); + /** ...till here **/ + + + logger.debug("final qaMonitoringForm: " + qaMonitoringForm); + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + return (mapping.findForward(LOAD_MONITORING)); } @@ -193,83 +223,63 @@ * @param response * @return boolean */ - public boolean initialiseMonitoringData(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + public boolean initialiseMonitoringData(ActionMapping mapping, QaMonitoringForm qaMonitoringForm, HttpServletRequest request, + HttpServletResponse response, IQaService qaService, GeneralMonitoringDTO generalMonitoringDTO) { - logger.debug("start initializing monitoring data..."); - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - request.getSession().setAttribute(TOOL_SERVICE, qaService); - - request.getSession().setAttribute(CURRENT_MONITORING_TAB, "summary"); - request.getSession().setAttribute(EDIT_RESPONSE, new Boolean(false)); - - request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString()); - /* save time zone information to session scope. */ + logger.debug("start initializing monitoring data...: " + qaService); + generalMonitoringDTO.setEditResponse(new Boolean(false).toString()); + generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - /* we have made sure TOOL_CONTENT_ID is passed */ - Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); + String toolContentID=qaMonitoringForm.getToolContentID(); + logger.debug("toolContentID:" + toolContentID); - QaContent qaContent=qaService.loadQa(toolContentId.longValue()); + QaContent qaContent=qaService.loadQa(new Long(toolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); if (qaContent == null) { QaUtils.cleanUpSessionAbsolute(request); - request.getSession().setAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST, new Boolean(true).toString()); persistError(request, "error.content.doesNotExist"); return false; } + /* if (qaContent.getTitle() == null) { - request.getSession().setAttribute(ACTIVITY_TITLE, "Questions and Answers"); - request.getSession().setAttribute(ACTIVITY_INSTRUCTIONS, "Please answer the questions."); + generalMonitoringDTO.setActivityTitle("Questions and Answers"); + generalMonitoringDTO.setActivityInstructions("Please answer the questions."); } else { - request.getSession().setAttribute(ACTIVITY_TITLE, qaContent.getTitle()); - request.getSession().setAttribute(ACTIVITY_INSTRUCTIONS, qaContent.getInstructions()); + generalMonitoringDTO.setActivityTitle(qaContent.getTitle()); + generalMonitoringDTO.setActivityInstructions(qaContent.getInstructions()); } + */ - + /* if (qaService.studentActivityOccurred(qaContent)) { QaUtils.cleanUpSessionAbsolute(request); logger.debug("student activity occurred on this content:" + qaContent); - request.getSession().setAttribute(USER_EXCEPTION_CONTENT_IN_USE, new Boolean(true).toString()); + //request.getSession().setAttribute(USER_EXCEPTION_CONTENT_IN_USE, new Boolean(true).toString()); + generalMonitoringDTO.setUserExceptionContentInUse(new Boolean(true).toString()); } + */ QaMonitoringAction qaMonitoringAction= new QaMonitoringAction(); logger.debug("refreshing summary data..."); GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO); + qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, true, false, null, null, + generalLearnerFlowDTO, false); + logger.debug("refreshing stats data..."); - qaMonitoringAction.refreshStatsData(request); + qaMonitoringAction.refreshStatsData(request, qaMonitoringForm, qaService, generalMonitoringDTO); - logger.debug("refreshing instructions data..."); - qaMonitoringAction.refreshInstructionsData(request, qaContent); - - logger.debug("populating online and ofline files data for intructions tab"); - //FIX HERE!!! - //QaUtils.populateUploadedFilesData(request, qaContent, qaService, qaGeneralAuthoringDTO); - - boolean isContentInUse=QaUtils.isContentInUse(qaContent); - logger.debug("isContentInUse:" + isContentInUse); - - request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString()); - if (isContentInUse == true) - { - logger.debug("monitoring url does not allow editActivity since the content is in use."); - persistError(request,"error.content.inUse"); - request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(true).toString()); - } - - logger.debug("final IS_MONITORED_CONTENT_IN_USE: " + request.getSession().getAttribute(IS_MONITORED_CONTENT_IN_USE)); - logger.debug("end initializing monitoring data..."); + logger.debug("end initialising monitoring data..."); return true; } @@ -282,7 +292,7 @@ * @param mapping * @return ActionForward */ - protected ActionForward validateParameters(HttpServletRequest request, ActionMapping mapping) + protected ActionForward validateParameters(HttpServletRequest request, ActionMapping mapping, QaMonitoringForm qaMonitoringForm) { logger.debug("start validating monitoring parameters..."); @@ -301,7 +311,8 @@ { long toolContentId=new Long(strToolContentId).longValue(); logger.debug("passed TOOL_CONTENT_ID : " + new Long(toolContentId)); - request.getSession().setAttribute(TOOL_CONTENT_ID,new Long(toolContentId)); + + qaMonitoringForm.setToolContentID(new Long(toolContentId).toString()); } catch(NumberFormatException e) { Index: lams_tool_laqa/web/WEB-INF/struts-config.xml =================================================================== diff -u -r0fb4d41712e31bd525abb02f100373875b1c7fc6 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 0fb4d41712e31bd525abb02f100373875b1c7fc6) +++ lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -284,7 +284,7 @@ path="/monitoringStarter" type="org.lamsfoundation.lams.tool.qa.web.QaMonitoringStarterAction" name="QaMonitoringForm" - scope="session" + scope="request" parameter="method" unknown="false" validate="true"> @@ -312,7 +312,7 @@ path="/monitoring" type="org.lamsfoundation.lams.tool.qa.web.QaMonitoringAction" name="QaMonitoringForm" - scope="session" + scope="request" parameter="method" unknown="false" validate="true"> Index: lams_tool_laqa/web/monitoring/Edit.jsp =================================================================== diff -u -r8f690879a75ab70b6948682ae6d5c3400dcc3dad -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/web/monitoring/Edit.jsp (.../Edit.jsp) (revision 8f690879a75ab70b6948682ae6d5c3400dcc3dad) +++ lams_tool_laqa/web/monitoring/Edit.jsp (.../Edit.jsp) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -31,17 +31,17 @@ - + - + - + @@ -106,15 +105,13 @@ @@ -36,7 +36,7 @@
Index: lams_tool_laqa/web/monitoring/Instructions.jsp =================================================================== diff -u -r2a5c5ae4d68939c91b7eb7a77ae5ffc60a87ebf5 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/web/monitoring/Instructions.jsp (.../Instructions.jsp) (revision 2a5c5ae4d68939c91b7eb7a77ae5ffc60a87ebf5) +++ lams_tool_laqa/web/monitoring/Instructions.jsp (.../Instructions.jsp) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -32,24 +32,24 @@ +
- + +
- - - + - - + +
- + /download/?uuid=&preferDownload=false /download/?uuid=&preferDownload=true @@ -80,14 +80,13 @@
- - +
@@ -97,7 +96,7 @@
- +
- - - +
- + /download/?uuid=&preferDownload=false /download/?uuid=&preferDownload=true @@ -146,13 +143,12 @@ - +
-
-
+
Index: lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp =================================================================== diff -u -re48a67de27af42221ddce80419f05c1be4680430 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision e48a67de27af42221ddce80419f05c1be4680430) +++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -112,9 +112,9 @@ initEditor("instructions"); initEditor("questionContent0"); - - - + + + initEditor(""); } @@ -150,7 +150,8 @@ - + + Index: lams_tool_laqa/web/monitoring/Stats.jsp =================================================================== diff -u -r2a5c5ae4d68939c91b7eb7a77ae5ffc60a87ebf5 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/web/monitoring/Stats.jsp (.../Stats.jsp) (revision 2a5c5ae4d68939c91b7eb7a77ae5ffc60a87ebf5) +++ lams_tool_laqa/web/monitoring/Stats.jsp (.../Stats.jsp) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -27,7 +27,7 @@
- +
- +
Index: lams_tool_laqa/web/monitoring/SummaryContent.jsp =================================================================== diff -u -r57157cef4ee9b4d70e92be83584eb8d10bcea83c -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision 57157cef4ee9b4d70e92be83584eb8d10bcea83c) +++ lams_tool_laqa/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -23,7 +23,7 @@ - +
@@ -33,7 +33,7 @@
- + @@ -42,14 +42,14 @@ + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + Index: lams_tool_laqa/web/monitoring/UserResponses.jsp =================================================================== diff -u -r97ebe40dad2731256147d74073b541245be53871 -r0e25eab07d7153c61f50deb6332abc0d4ed3ec69 --- lams_tool_laqa/web/monitoring/UserResponses.jsp (.../UserResponses.jsp) (revision 97ebe40dad2731256147d74073b541245be53871) +++ lams_tool_laqa/web/monitoring/UserResponses.jsp (.../UserResponses.jsp) (revision 0e25eab07d7153c61f50deb6332abc0d4ed3ec69) @@ -22,7 +22,7 @@ <%@ include file="/common/taglibs.jsp" %> - + - +
+ + + + + images/edit.gif" align=left onclick="javascript:submitEditResponse('','editResponse');"> + + + + + + + + + + + + + + + + + images/tick.gif" align=left onclick="javascript:submitEditResponse('','updateResponse');"> + + + + + + + + + + + + + + + + images/edit.gif" align=left onclick="javascript:submitEditResponse('','editResponse');"> + + + + + + + + + + + +
@@ -53,7 +53,7 @@