Index: lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaContent.hbm.xml =================================================================== diff -u -rdb35a7570ddebdb6d078ffee52c09234941f5f9a -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaContent.hbm.xml (.../QaContent.hbm.xml) (revision db35a7570ddebdb6d078ffee52c09234941f5f9a) +++ lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaContent.hbm.xml (.../QaContent.hbm.xml) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -111,24 +111,7 @@ length="1" /> - - - - - - + @@ -186,20 +186,6 @@ - - - - - - - - - - - - - - @@ -424,8 +410,8 @@ - + Index: lams_tool_laqa/db/sql/create_lams_tool_qa.sql =================================================================== diff -u -r7e9ec88b3ebb98e346843941ecfb09f57a244a10 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/db/sql/create_lams_tool_qa.sql (.../create_lams_tool_qa.sql) (revision 7e9ec88b3ebb98e346843941ecfb09f57a244a10) +++ lams_tool_laqa/db/sql/create_lams_tool_qa.sql (.../create_lams_tool_qa.sql) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -30,8 +30,6 @@ , reflect TINYINT(1) NOT NULL DEFAULT 0 , questions_sequenced TINYINT(1) NOT NULL DEFAULT 0 , username_visible TINYINT(1) NOT NULL DEFAULT 0 - , monitoring_report_title VARCHAR(100) DEFAULT 'Learner Results' - , report_title VARCHAR(100) DEFAULT 'Report' , created_by BIGINT(20) NOT NULL DEFAULT 0 , run_offline TINYINT(1) DEFAULT 0 , define_later TINYINT(1) NOT NULL DEFAULT 0 @@ -122,3 +120,4 @@ + Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAllGroupsDTO.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAllGroupsDTO.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAllGroupsDTO.java (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -0,0 +1,104 @@ +/**************************************************************** + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.qa; + +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + *

DTO that holds question and user attempts data for jsp purposes + *

+ * + * @author Ozgur Demirtas + */ +public class QaAllGroupsDTO implements Comparable +{ + + private String sessionId; + + private String sessionName; + + private List groupData; + + + + public String toString() { + return new ToStringBuilder(this) + .append("sessionId:", sessionId) + .append("sessionName:", sessionName) + .append("groupData: ", groupData) + .toString(); + } + + public int compareTo(Object o) + { + QaAllGroupsDTO qaAllGroupsDTO = (QaAllGroupsDTO) o; + + if (qaAllGroupsDTO == null) + return 1; + else + return 0; + } + + + /** + * @return Returns the groupData. + */ + public List getGroupData() { + return groupData; + } + /** + * @param groupData The groupData to set. + */ + public void setGroupData(List groupData) { + this.groupData = groupData; + } + /** + * @return Returns the sessionName. + */ + public String getSessionName() { + return sessionName; + } + /** + * @param sessionName The sessionName to set. + */ + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + /** + * @return Returns the sessionId. + */ + public String getSessionId() { + return sessionId; + } + /** + * @param sessionId The sessionId to set. + */ + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } +} Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -84,6 +84,8 @@ public static final String LEARNER_NOTEBOOK ="learnerNotebook"; public static final String NOTEBOOK_ENTRIES_EXIST ="notebookEntriesExist"; public static final String QA_STATS_DTO ="qaStatsDTO"; + public static final String LIST_ALL_GROUPS_DTO ="listAllGroupsDTO"; + public static final String CURRENT_SESSION_NAME ="currentSessionName"; public static final String ACTIVE_MODULE ="activeModule"; public static final String AUTHORING ="authoring"; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredAnswersDTO.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredAnswersDTO.java (.../QaMonitoredAnswersDTO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredAnswersDTO.java (.../QaMonitoredAnswersDTO.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -37,6 +37,10 @@ */ public class QaMonitoredAnswersDTO implements Comparable { + private String sessionId; + + private String sessionName; + private String questionUid; private String question; @@ -86,7 +90,11 @@ public String toString() { return new ToStringBuilder(this) - .append("question", getQuestion()) + .append("sessionName:", sessionName) + .append("sessionId:", sessionId) + .append("questionUid:", questionUid) + .append("question:", question) + .append("questionAttempts:", questionAttempts) .toString(); } @@ -100,4 +108,28 @@ return (int) (new Long(questionUid).longValue() - new Long(qaMonitoredAnswersDTO.questionUid).longValue()); } + /** + * @return Returns the sessionId. + */ + public String getSessionId() { + return sessionId; + } + /** + * @param sessionId The sessionId to set. + */ + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + /** + * @return Returns the sessionName. + */ + public String getSessionName() { + return sessionName; + } + /** + * @param sessionName The sessionName to set. + */ + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredUserDTO.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredUserDTO.java (.../QaMonitoredUserDTO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredUserDTO.java (.../QaMonitoredUserDTO.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -78,7 +78,13 @@ public String toString() { return new ToStringBuilder(this) - .append("queUsrId and username", getQueUsrId() + " and " + getUserName()) + .append("sessionId:", sessionId) + .append("userName:", userName) + .append("queUsrId:", queUsrId) + .append("questionUid:", questionUid) + .append("response:", response) + .append("visible:", visible) + .append("usersAttempts:", usersAttempts) .toString(); } /** Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -55,7 +55,6 @@ public String doExport(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { logger.debug("dispathcing doExport"); - //request.setAttribute(IS_PORTFOLIO_EXPORT, new Boolean(true).toString()); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath(); logger.debug("basePath:" + basePath); @@ -116,7 +115,7 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(content); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); qaMonitoringAction.refreshSummaryData(request, content, qaService, true, true, toolSessionID.toString(), - userID.toString(), generalLearnerFlowDTO, false); + userID.toString(), generalLearnerFlowDTO, false, toolSessionID.toString()); logger.debug("end refreshSummaryData for learner mode."); generalLearnerFlowDTO =(GeneralLearnerFlowDTO)request.getAttribute(GENERAL_LEARNER_FLOW_DTO); @@ -126,7 +125,7 @@ request.getSession().setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); request.getSession().setAttribute(PORTFOLIO_EXPORT_MODE, "learner"); - qaMonitoringAction.prepareReflectionData(request, content, qaService, userID.toString(), true); + qaMonitoringAction.prepareReflectionData(request, content, qaService, userID.toString(), true, toolSessionID.toString()); logger.debug("ending learner mode: "); } @@ -159,7 +158,7 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(content); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); qaMonitoringAction.refreshSummaryData(request, content, qaService, true, false, - null, null, generalLearnerFlowDTO, false); + null, null, generalLearnerFlowDTO, false, "All"); logger.debug("end refreshSummaryData for teacher mode."); logger.debug("teacher uses content id: " + content.getQaContentId()); @@ -171,7 +170,7 @@ request.getSession().setAttribute(PORTFOLIO_EXPORT_MODE, "teacher"); - qaMonitoringAction.prepareReflectionData(request, content, qaService, null, true); + qaMonitoringAction.prepareReflectionData(request, content, qaService, null, true, "All"); logger.debug("ending teacher mode: "); } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -34,6 +34,7 @@ import org.apache.log4j.Logger; import org.lamsfoundation.lams.notebook.model.NotebookEntry; import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.qa.QaAllGroupsDTO; import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaMonitoredAnswersDTO; @@ -208,6 +209,8 @@ public static List buildGroupsQuestionData(HttpServletRequest request, QaContent qaContent, IQaService qaService, boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId) { + logger.debug("buildGroupsQuestionData: " + currentSessionId); + logger.debug("isUserNamesVisible: " + isUserNamesVisible); logger.debug("isLearnerRequest: " + isLearnerRequest); logger.debug("userId: " + userId); @@ -217,6 +220,18 @@ List listQuestions=qaService.getAllQuestionEntries(qaContent.getUid()); logger.debug("listQuestions:..." + listQuestions); + String sessionName=""; + if ((currentSessionId != null) && (!currentSessionId.equals("All"))) + { + QaSession qaSession=qaService.retrieveQaSessionOrNullById(new Long(currentSessionId).longValue()); + logger.debug("qaSession: " + qaSession); + + sessionName=qaSession.getSession_name(); + } + logger.debug("sessionName: " + sessionName); + request.setAttribute(CURRENT_SESSION_NAME, sessionName); + + List listMonitoredAnswersContainerDTO= new LinkedList(); Iterator itListQuestions = listQuestions.iterator(); @@ -230,6 +245,7 @@ QaMonitoredAnswersDTO qaMonitoredAnswersDTO= new QaMonitoredAnswersDTO(); qaMonitoredAnswersDTO.setQuestionUid(qaQueContent.getUid().toString()); qaMonitoredAnswersDTO.setQuestion(qaQueContent.getQuestion()); + qaMonitoredAnswersDTO.setSessionName(sessionName); logger.debug("using allUsersData to retrieve users data: " + isUserNamesVisible); Map questionAttemptData= buildGroupsAttemptData(request, qaContent, qaService, qaQueContent, qaQueContent.getUid().toString(), @@ -248,12 +264,13 @@ public static Map buildGroupsAttemptData(HttpServletRequest request, QaContent qaContent, IQaService qaService, QaQueContent qaQueContent, String questionUid, boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId) { + logger.debug("doing buildGroupsAttemptData..."); logger.debug("isUserNamesVisible: " + isUserNamesVisible); logger.debug("isLearnerRequest: " + isLearnerRequest); logger.debug("currentSessionId: " + currentSessionId); logger.debug("userId: " + userId); - logger.debug("doing buildGroupsAttemptData..."); + logger.debug("qaService: " + qaService); Map mapMonitoredAttemptsContainerDTO= new TreeMap(new QaStringComparator()); @@ -268,26 +285,47 @@ /*request is for monitoring summary */ if (!isLearnerRequest) { - while (itMap.hasNext()) - { - Map.Entry pairs = (Map.Entry)itMap.next(); - logger.debug("using the summary tool sessions pair: " + pairs.getKey() + " = " + pairs.getValue()); - - if (!(pairs.getValue().toString().equals("None")) && !(pairs.getValue().toString().equals("All"))) + + if (currentSessionId != null) + { + if (currentSessionId.equals("All")) { - logger.debug("using the numerical summary tool sessions pair: " + " = " + pairs.getValue()); - QaSession qaSession= qaService.retrieveQaSession(new Long(pairs.getValue().toString()).longValue()); - logger.debug("qaSession: " + " = " + qaSession); - if (qaSession != null) + logger.debug("**summary request is for All**:"); + while (itMap.hasNext()) { - List listUsers=qaService.getUserBySessionOnly(qaSession); - logger.debug("listMcUsers for session id:" + qaSession.getQaSessionId() + " = " + listUsers); - Map sessionUsersAttempts=populateSessionUsersAttempts(request, qaService, qaSession.getQaSessionId(), listUsers, questionUid, - isUserNamesVisible, isLearnerRequest, userId); - listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); - } + Map.Entry pairs = (Map.Entry)itMap.next(); + logger.debug("using the summary tool sessions pair: " + pairs.getKey() + " = " + pairs.getValue()); + + if (!(pairs.getValue().toString().equals("None")) && !(pairs.getValue().toString().equals("All"))) + { + logger.debug("using the numerical summary tool sessions pair: " + " = " + pairs.getValue()); + QaSession qaSession= qaService.retrieveQaSession(new Long(pairs.getValue().toString()).longValue()); + logger.debug("qaSession: " + " = " + qaSession); + if (qaSession != null) + { + List listUsers=qaService.getUserBySessionOnly(qaSession); + logger.debug("listMcUsers for session id:" + qaSession.getQaSessionId() + " = " + listUsers); + Map sessionUsersAttempts=populateSessionUsersAttempts(request, qaService, qaSession.getQaSessionId(), listUsers, questionUid, + isUserNamesVisible, isLearnerRequest, userId); + listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); + } + } + } } - } + else if (!currentSessionId.equals("All")) + { + logger.debug("**summary request is for currentSessionId**:" + currentSessionId); + QaSession qaSession= qaService.retrieveQaSession(new Long(currentSessionId.toString()).longValue()); + logger.debug("qaSession: " + " = " + qaSession); + + List listUsers=qaService.getUserBySessionOnly(qaSession); + logger.debug("listUsers: " + " = " + listUsers); + + Map sessionUsersAttempts=populateSessionUsersAttempts(request, qaService, new Long(currentSessionId), listUsers, questionUid, + isUserNamesVisible, isLearnerRequest, userId); + listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); + } + } } else { @@ -585,6 +623,22 @@ } + public static Map removeNewLinesMap(Map map) + { + Map newMap= new TreeMap(new QaStringComparator()); + + Iterator itMap = map.entrySet().iterator(); + while (itMap.hasNext()) + { + Map.Entry pairs = (Map.Entry)itMap.next(); + logger.debug("using the summary tool sessions pair: " + pairs.getKey() + " = " + pairs.getValue()); + newMap.put(pairs.getKey(), QaUtils.replaceNewLines(pairs.getValue().toString())); + } + logger.debug("newMap: " + newMap); + return newMap; + } + + public static Map convertToMap(List list) { logger.debug("using convertToMap: " + list); @@ -601,6 +655,7 @@ } return map; } + @@ -696,6 +751,87 @@ request.setAttribute(QA_STATS_DTO, qaStatsDTO); } + public static void generateGroupsSessionData(HttpServletRequest request, IQaService qaService, QaContent qaContent) + { + logger.debug("generateGroupsSessionData: " + qaContent); + + List listAllGroupsDTO=buildGroupBasedSessionData(request, qaContent, qaService); + logger.debug("listAllGroupsDTO: " + listAllGroupsDTO); + + request.setAttribute(LIST_ALL_GROUPS_DTO, listAllGroupsDTO); + } + + + + public static List buildGroupBasedSessionData(HttpServletRequest request, QaContent qaContent, IQaService qaService) + { + logger.debug("buildGroupBasedSessionData" + qaContent); + logger.debug("will be building groups question data for content:..." + qaContent); + List listQuestions=qaService.getAllQuestionEntries(qaContent.getUid()); + logger.debug("listQuestions:..." + listQuestions); + + List listAllGroupsContainerDTO= new LinkedList(); + + + Iterator iteratorSession= qaContent.getQaSessions().iterator(); + while (iteratorSession.hasNext()) + { + QaSession qaSession=(QaSession) iteratorSession.next(); + logger.debug("iteration for group based session data: " + qaSession); + String currentSessionId=qaSession.getQaSessionId().toString(); + logger.debug("currentSessionId: " + currentSessionId); + + String currentSessionName=qaSession.getSession_name(); + logger.debug("currentSessionName: " + currentSessionName); + + QaAllGroupsDTO qaAllGroupsDTO= new QaAllGroupsDTO(); + List listMonitoredAnswersContainerDTO= new LinkedList(); + + if (qaSession != null) + { + Iterator itListQuestions = listQuestions.iterator(); + while (itListQuestions.hasNext()) + { + QaQueContent qaQueContent =(QaQueContent)itListQuestions.next(); + logger.debug("qaQueContent:..." + qaQueContent); + + if (qaQueContent != null) + { + logger.debug("populating QaMonitoredAnswersDTO for : " + qaQueContent); + QaMonitoredAnswersDTO qaMonitoredAnswersDTO= new QaMonitoredAnswersDTO(); + qaMonitoredAnswersDTO.setQuestionUid(qaQueContent.getUid().toString()); + qaMonitoredAnswersDTO.setQuestion(qaQueContent.getQuestion()); + qaMonitoredAnswersDTO.setSessionId(currentSessionId); + qaMonitoredAnswersDTO.setSessionName(currentSessionName); + + Map questionAttemptData= buildGroupsAttemptData(request, qaContent, qaService, qaQueContent, qaQueContent.getUid().toString(), + true,false, currentSessionId, null); + logger.debug("generated questionAttemptData: " + questionAttemptData); + qaMonitoredAnswersDTO.setQuestionAttempts(questionAttemptData); + + logger.debug("adding qaMonitoredAnswersDTO to the listMonitoredAnswersContainerDTO: " + qaMonitoredAnswersDTO); + listMonitoredAnswersContainerDTO.add(qaMonitoredAnswersDTO); + } + } + } + logger.debug("listMonitoredAnswersContainerDTO:" + listMonitoredAnswersContainerDTO); + + logger.debug("adding listMonitoredAnswersContainerDTO to the qaAllGroupsDTO:" + listMonitoredAnswersContainerDTO); + qaAllGroupsDTO.setGroupData(listMonitoredAnswersContainerDTO); + qaAllGroupsDTO.setSessionName(currentSessionName); + qaAllGroupsDTO.setSessionId(currentSessionId); + + logger.debug("built qaAllGroupsDTO:" + qaAllGroupsDTO); + listAllGroupsContainerDTO.add(qaAllGroupsDTO); + + } + + + logger.debug("final listAllGroupsContainerDTO:..." + listAllGroupsContainerDTO); + return listAllGroupsContainerDTO; + } + + } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java =================================================================== diff -u -r6d2e2aad377adefe852a1b1b998ed71f0d5ee0d0 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 6d2e2aad377adefe852a1b1b998ed71f0d5ee0d0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -2161,7 +2161,8 @@ { logger.debug("dispatching proxy getStats..." + request); QaMonitoringAction qaMonitoringAction= new QaMonitoringAction(); - return qaMonitoringAction.getStats(mapping, form, request, response); + //return qaMonitoringAction.getStats(mapping, form, request, response, "All"); + return null; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaDLStarterAction.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaDLStarterAction.java (.../QaDLStarterAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaDLStarterAction.java (.../QaDLStarterAction.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -25,39 +25,23 @@ * QaDLStarterAction activates the Define Later module. * It reuses majority of the functionality from existing authoring module. * - * - - - - - - * - -*/ + * */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; import java.io.IOException; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -22,61 +22,72 @@ /** * @author Ozgur Demirtas * - * + validate="false"> - - - - - + + + + + + - - + + + + + + + + * @@ -218,13 +229,28 @@ } else { + logger.debug("the listing mode is sequential and there are multiple questions"); logger.debug("populating mapAnswers..."); mapAnswers=populateAnswersMap(qaLearningForm, request, generalLearnerFlowDTO, true, true); logger.debug("mapAnswers: " + mapAnswers); + + String httpSessionID=qaLearningForm.getHttpSessionID(); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + mapAnswersPresentable=(Map)sessionMap.get(MAP_ALL_RESULTS_KEY); + logger.debug("mapAnswersPresentable, before new lines conversion: " + mapAnswersPresentable); + mapAnswersPresentable=MonitoringUtil.removeNewLinesMap(mapAnswersPresentable); + logger.debug("mapAnswersPresentable, after new lines conversion: " + mapAnswersPresentable); } - logger.debug("final mapAnswers for the sequential mode:" + mapAnswers); + logger.debug("final mapAnswersPresentable for the sequential mode:" + mapAnswersPresentable); } + + + logger.debug("using mapAnswers:" + mapAnswers); generalLearnerFlowDTO.setMapAnswers(mapAnswers); @@ -470,7 +496,8 @@ QaMonitoringAction qaMonitoringAction= new QaMonitoringAction(); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, toolSessionID, null, generalLearnerFlowDTO, false); + qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, toolSessionID, null, + generalLearnerFlowDTO, false , toolSessionID); 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 -r6d2e2aad377adefe852a1b1b998ed71f0d5ee0d0 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 6d2e2aad377adefe852a1b1b998ed71f0d5ee0d0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -114,52 +114,74 @@ */ /** - * - - + + + + + + + - + + + + + name="notebook" + path="/learning/Notebook.jsp" + redirect="false" + /> + + * */ - * - */ - public class QaLearningStarterAction extends Action implements QaAppConstants { static Logger logger = Logger.getLogger(QaLearningStarterAction.class.getName()); @@ -192,11 +214,11 @@ generalLearnerFlowDTO.setHttpSessionID(sessionMap.getSessionID()); /*validate learning mode parameters*/ - ActionForward validateParameters=validateParameters(request, mapping, qaLearningForm); + boolean validateParameters=validateParameters(request, mapping, qaLearningForm); logger.debug("validateParamaters: " + validateParameters); - if (validateParameters != null) + if (!validateParameters) { - return validateParameters; + logger.debug("error during validation"); } String userID=qaLearningForm.getUserID(); @@ -409,7 +431,7 @@ generalLearnerFlowDTO.setTeacherViewOnly(new Boolean(true).toString()); qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, true, true, toolSessionID, learnerProgressUserId, - generalLearnerFlowDTO, false); + generalLearnerFlowDTO, false, toolSessionID); logger.debug("presenting teacher's report"); logger.debug("fwd'ing to for learner progress" + INDIVIDUAL_LEARNER_REPORT); @@ -476,7 +498,7 @@ logger.debug("using generalLearnerFlowDTO: " + generalLearnerFlowDTO); qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, - currentToolSessionID.toString(), null, generalLearnerFlowDTO, false); + currentToolSessionID.toString(), null, generalLearnerFlowDTO, false, toolSessionID); logger.debug("final generalLearnerFlowDTO: " + generalLearnerFlowDTO); @@ -524,7 +546,7 @@ * @param mapping * @return ActionForward */ - protected ActionForward validateParameters(HttpServletRequest request, ActionMapping mapping, QaLearningForm qaLearningForm) + protected boolean validateParameters(HttpServletRequest request, ActionMapping mapping, QaLearningForm qaLearningForm) { /* * obtain and setup the current user's data @@ -552,9 +574,8 @@ long toolSessionId=0; if ((strToolSessionId == null) || (strToolSessionId.length() == 0)) { - QaUtils.cleanUpSessionAbsolute(request); persistError(request, "error.toolSessionId.required"); - return (mapping.findForward(ERROR_LIST_LEARNER)); + return false; } else { @@ -566,10 +587,8 @@ } catch(NumberFormatException e) { - QaUtils.cleanUpSessionAbsolute(request); - //persistError(request, "error.sessionId.numberFormatException"); logger.debug("add error.sessionId.numberFormatException to ActionMessages."); - return (mapping.findForward(ERROR_LIST_LEARNER)); + return false; } } @@ -579,21 +598,17 @@ if ((mode == null) || (mode.length() == 0)) { - QaUtils.cleanUpSessionAbsolute(request); - //persistError(request, "error.mode.required"); - return (mapping.findForward(ERROR_LIST_LEARNER)); + return false; } if ((!mode.equals("learner")) && (!mode.equals("teacher")) && (!mode.equals("author"))) { - QaUtils.cleanUpSessionAbsolute(request); - //persistError(request, "error.mode.invalid"); - return (mapping.findForward(ERROR_LIST_LEARNER)); + return false; } logger.debug("session LEARNING_MODE set to:" + mode); qaLearningForm.setMode(mode); - return null; + return true; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -150,46 +150,15 @@ } - /** - * switches to Stats tab of the Monitoring url - * getStats(ActionMapping mapping, - ActionForm form, - HttpServletRequest request, - HttpServletResponse response) throws IOException, - ServletException - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - */ - public ActionForward getStats(ActionMapping mapping, - ActionForm form, - HttpServletRequest request, - HttpServletResponse response) throws IOException, - ServletException - { - logger.debug("dispatching getStats..." + request); - - GeneralMonitoringDTO generalMonitoringDTO= new GeneralMonitoringDTO(); - initStatsContent(mapping, form, request, response, generalMonitoringDTO); - return (mapping.findForward(LOAD_MONITORING)); - } - - - public void initStatsContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, GeneralMonitoringDTO generalMonitoringDTO) throws IOException, ServletException { logger.debug("starting initStatsContent..."); - logger.debug("dispatching getStats..." + request); + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; logger.debug("qaMonitoringForm: " + qaMonitoringForm); @@ -253,7 +222,7 @@ } request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false, "All"); prepareEditActivityScreenData(request, qaContent); @@ -289,6 +258,8 @@ logger.debug("ending initStatsContent..."); MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); + } @@ -385,7 +356,7 @@ generalMonitoringDTO.setEditResponse(new Boolean(false).toString()); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, "All"); prepareEditActivityScreenData(request, qaContent); @@ -428,6 +399,7 @@ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); logger.debug("ending initInstructionsContent..."); } @@ -542,7 +514,7 @@ logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, "All"); prepareEditActivityScreenData(request, qaContent); @@ -563,6 +535,8 @@ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); + /* 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"); return qaStarterAction.executeDefineLater(mapping, qaMonitoringForm, request, response, qaService); @@ -674,7 +648,7 @@ } request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, "All"); prepareEditActivityScreenData(request, qaContent); @@ -708,6 +682,7 @@ request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); logger.debug("end initSummaryContent..."); } @@ -764,7 +739,7 @@ prepareEditActivityScreenData(request, qaContent); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false, "All"); if (qaService.studentActivityOccurredGlobal(qaContent)) { @@ -843,8 +818,8 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); - return (mapping.findForward(LOAD_MONITORING)); } @@ -889,9 +864,14 @@ else { request.setAttribute(SELECTION_CASE, new Long(1)); + + QaSession qaSession=qaService.retrieveQaSessionOrNullById(new Long(currentMonitoredToolSession).longValue()); + logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); + request.setAttribute(CURRENT_SESSION_NAME, qaSession.getSession_name()); } logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); + request.setAttribute(CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); logger.debug("strToolContentID: " + strToolContentID); @@ -924,7 +904,7 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); prepareEditActivityScreenData(request, qaContent); @@ -937,7 +917,7 @@ } request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, currentMonitoredToolSession); /*find out if there are any reflection entries, from here*/ @@ -955,6 +935,7 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); return (mapping.findForward(LOAD_MONITORING)); } @@ -1025,10 +1006,15 @@ else { request.setAttribute(SELECTION_CASE, new Long(1)); + + QaSession qaSession=qaService.retrieveQaSessionOrNullById(new Long(currentMonitoredToolSession).longValue()); + logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); + request.setAttribute(CURRENT_SESSION_NAME, qaSession.getSession_name()); } logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); - + request.setAttribute(CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); + Map summaryToolSessions=MonitoringUtil.populateToolSessions(request, qaContent, qaService); logger.debug("summaryToolSessions: " + summaryToolSessions); @@ -1043,9 +1029,9 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, true); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, true, currentMonitoredToolSession); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); prepareEditActivityScreenData(request, qaContent); @@ -1074,11 +1060,126 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); - + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); + return (mapping.findForward(LOAD_MONITORING)); } + + + public ActionForward editGroupResponse(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws IOException, + ServletException + { + logger.debug("dispatching editGroupResponse..."); + + 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 editableSessionId=request.getParameter("sessionId"); + logger.debug("editableSessionId: " + editableSessionId); + request.setAttribute("editableSessionId", editableSessionId); + + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaMonitoringForm.setContentFolderID(contentFolderID); + + + String responseId=qaMonitoringForm.getResponseId(); + logger.debug("responseId: " + responseId); + request.getSession().setAttribute(EDITABLE_RESPONSE_ID, responseId); + + QaUsrResp qaUsrResp= qaService.retrieveQaUsrResp(new Long(responseId).longValue()); + logger.debug("qaUsrResp: " + qaUsrResp); + + 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, true, currentMonitoredToolSession); + + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); + + prepareEditActivityScreenData(request, qaContent); + + EditActivityDTO editActivityDTO = new EditActivityDTO(); + boolean isContentInUse=QaUtils.isContentInUse(qaContent); + logger.debug("isContentInUse:" + isContentInUse); + if (isContentInUse == true) + { + editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); + } + request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); + + + /*find out if there are any reflection entries, from here*/ + boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); + logger.debug("notebookEntriesExist : " + notebookEntriesExist); + + if (notebookEntriesExist) + { + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); + } + else + { + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); + } + /* ... till here*/ + + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); + request.setAttribute("currentMonitoredToolSession", "All"); + + return (mapping.findForward(LOAD_MONITORING)); + } + + + + /** * enables the user to update responses * ActionForward updateResponse(ActionMapping mapping, @@ -1151,12 +1252,18 @@ if (currentMonitoredToolSession.equals("All")) { request.setAttribute(SELECTION_CASE, new Long(2)); + + QaSession qaSession=qaService.retrieveQaSessionOrNullById(new Long(currentMonitoredToolSession).longValue()); + logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); + request.setAttribute(CURRENT_SESSION_NAME, qaSession.getSession_name()); } else { request.setAttribute(SELECTION_CASE, new Long(1)); } logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); + request.setAttribute(CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); + QaContent qaContent=qaUsrResp.getQaQueContent().getQaContent(); logger.debug("qaContent: " + qaContent); @@ -1174,9 +1281,9 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, currentMonitoredToolSession); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); prepareEditActivityScreenData(request, qaContent); @@ -1205,10 +1312,131 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); return (mapping.findForward(LOAD_MONITORING)); } + + + + public ActionForward updateGroupResponse(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws IOException, + ServletException + { + logger.debug("dispatching updateGroupResponse..."); + + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaMonitoringForm.setContentFolderID(contentFolderID); + + + String editResponse=request.getParameter(EDIT_RESPONSE); + logger.debug("editResponse: " + editResponse); + qaMonitoringForm.setEditResponse(editResponse); + + + String responseId=qaMonitoringForm.getResponseId(); + logger.debug("responseId: " + responseId); + + String updatedResponse=request.getParameter("updatedResponse"); + logger.debug("updatedResponse: " + updatedResponse); + QaUsrResp qaUsrResp= qaService.retrieveQaUsrResp(new Long(responseId).longValue()); + logger.debug("qaUsrResp: " + qaUsrResp); + + /* write out the audit log entry. If you move this after the update of the response, + then make sure you update the audit call to use a copy of the original answer */ + qaService.getAuditService().logChange(MY_SIGNATURE, + qaUsrResp.getQaQueUser().getQueUsrId(),qaUsrResp.getQaQueUser().getUsername(), + qaUsrResp.getAnswer(), updatedResponse); + + qaUsrResp.setAnswer(updatedResponse); + qaService.updateQaUsrResp(qaUsrResp); + logger.debug("response updated."); + + refreshUserInput(request, qaMonitoringForm); + + + 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, false, currentMonitoredToolSession); + + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); + + prepareEditActivityScreenData(request, qaContent); + + EditActivityDTO editActivityDTO = new EditActivityDTO(); + boolean isContentInUse=QaUtils.isContentInUse(qaContent); + logger.debug("isContentInUse:" + isContentInUse); + if (isContentInUse == true) + { + editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); + } + request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); + + + /*find out if there are any reflection entries, from here*/ + boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); + logger.debug("notebookEntriesExist : " + notebookEntriesExist); + + if (notebookEntriesExist) + { + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); + } + else + { + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); + } + /* ... till here*/ + + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); + request.setAttribute("currentMonitoredToolSession", "All"); + + return (mapping.findForward(LOAD_MONITORING)); + } + + /** * enables the user to delete responses * ActionForward deleteResponse(ActionMapping mapping, @@ -1296,9 +1524,9 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false ,currentMonitoredToolSession); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); prepareEditActivityScreenData(request, qaContent); @@ -1327,6 +1555,7 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); return (mapping.findForward(LOAD_MONITORING)); } @@ -1369,7 +1598,7 @@ Map summaryToolSessionsId=MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); - prepareReflectionData(request, qaContent, qaService,null, false); + //prepareReflectionData(request, qaContent, qaService,null, false); prepareEditActivityScreenData(request, qaContent); @@ -1399,6 +1628,7 @@ request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); } @@ -1435,9 +1665,11 @@ */ public void refreshSummaryData(HttpServletRequest request, QaContent qaContent, IQaService qaService, boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId, - GeneralLearnerFlowDTO generalLearnerFlowDTO, boolean setEditResponse) + GeneralLearnerFlowDTO generalLearnerFlowDTO, boolean setEditResponse, String currentMonitoredToolSession) { + logger.debug("starting refreshSummaryData: setEditResponse + " + setEditResponse); + logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); logger.debug("qaService: " + isUserNamesVisible); @@ -1496,6 +1728,7 @@ logger.debug("summaryToolSessionsId: " + summaryToolSessionsId); request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + currentSessionId=currentMonitoredToolSession; logger.debug("using allUsersData to retrieve data: " + isUserNamesVisible); List listMonitoredAnswersContainerDTO=MonitoringUtil.buildGroupsQuestionData(request, qaContent, qaService, @@ -1531,17 +1764,6 @@ 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); @@ -1566,7 +1788,7 @@ request.setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); } - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); prepareEditActivityScreenData(request, qaContent); @@ -1589,6 +1811,7 @@ request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); } @@ -1639,7 +1862,7 @@ generalMonitoringDTO.setCountSessionComplete(new Integer(countSessionComplete).toString()); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, "All"); prepareEditActivityScreenData(request, qaContent); @@ -1677,6 +1900,7 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); } @@ -1741,7 +1965,7 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, currentMonitoredToolSession); logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); if (currentMonitoredToolSession.equals("All")) @@ -1751,11 +1975,16 @@ else { request.setAttribute(SELECTION_CASE, new Long(1)); + + QaSession qaSession=qaService.retrieveQaSessionOrNullById(new Long(currentMonitoredToolSession).longValue()); + logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); + request.setAttribute(CURRENT_SESSION_NAME, qaSession.getSession_name()); } logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); + request.setAttribute(CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); prepareEditActivityScreenData(request, qaContent); @@ -1784,12 +2013,127 @@ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); logger.debug("submitting session to refresh the data from the database: "); return (mapping.findForward(LOAD_MONITORING)); } - + + + public ActionForward showGroupResponse(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws IOException, + ServletException, ToolException + { + logger.debug("dispatching showGroupResponse..."); + + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + + String currentUid=qaMonitoringForm.getCurrentUid(); + logger.debug("currentUid: " + currentUid); + QaUsrResp qaUsrResp =qaService.getAttemptByUID(new Long(currentUid)); + logger.debug("qaUsrResp: " + qaUsrResp); + qaUsrResp.setVisible(true); + qaService.updateUserResponse(qaUsrResp); + qaService.showResponse(qaUsrResp); + logger.debug("qaUsrResp: " + qaUsrResp); + + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + qaMonitoringForm.setToolContentID(strToolContentID); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaMonitoringForm.setContentFolderID(contentFolderID); + + + 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); + + + 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, false, currentMonitoredToolSession); + + logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); + 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)); + + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); + + prepareEditActivityScreenData(request, qaContent); + + EditActivityDTO editActivityDTO = new EditActivityDTO(); + boolean isContentInUse=QaUtils.isContentInUse(qaContent); + logger.debug("isContentInUse:" + isContentInUse); + if (isContentInUse == true) + { + editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); + } + request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); + + /*find out if there are any reflection entries, from here*/ + boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); + logger.debug("notebookEntriesExist : " + notebookEntriesExist); + + if (notebookEntriesExist) + { + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); + } + else + { + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); + } + /* ... till here*/ + + + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); + request.setAttribute("currentMonitoredToolSession", "All"); + + logger.debug("submitting session to refresh the data from the database: "); + return (mapping.findForward(LOAD_MONITORING)); + } + + + public ActionForward hideResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -1850,20 +2194,25 @@ if (currentMonitoredToolSession.equals("All")) { request.setAttribute(SELECTION_CASE, new Long(2)); + + QaSession qaSession=qaService.retrieveQaSessionOrNullById(new Long(currentMonitoredToolSession).longValue()); + logger.debug("retrieving qaSession name: " + qaSession.getSession_name()); + request.setAttribute(CURRENT_SESSION_NAME, qaSession.getSession_name()); } else { request.setAttribute(SELECTION_CASE, new Long(1)); } logger.debug("SELECTION_CASE: " + request.getAttribute(SELECTION_CASE)); + request.setAttribute(CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, currentMonitoredToolSession); - prepareReflectionData(request, qaContent, qaService,null, false); + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); prepareEditActivityScreenData(request, qaContent); @@ -1890,12 +2239,124 @@ } MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); logger.debug("submitting session to refresh the data from the database: "); return (mapping.findForward(LOAD_MONITORING)); } + + + public ActionForward hideGroupResponse(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws IOException, + ServletException, ToolException + { + logger.debug("dispatching hideGroupResponse..."); + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaMonitoringForm.setContentFolderID(contentFolderID); + + + 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); + + + 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); + + + 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)); + + GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); + logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); + + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false , currentMonitoredToolSession); + + prepareReflectionData(request, qaContent, qaService,null, false, currentMonitoredToolSession); + + prepareEditActivityScreenData(request, qaContent); + + EditActivityDTO editActivityDTO = new EditActivityDTO(); + boolean isContentInUse=QaUtils.isContentInUse(qaContent); + logger.debug("isContentInUse:" + isContentInUse); + if (isContentInUse == true) + { + editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); + } + request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); + + /*find out if there are any reflection entries, from here*/ + boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); + logger.debug("notebookEntriesExist : " + notebookEntriesExist); + + if (notebookEntriesExist) + { + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); + } + else + { + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); + } + + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); + request.setAttribute("currentMonitoredToolSession", "All"); + + logger.debug("submitting session to refresh the data from the database: "); + return (mapping.findForward(LOAD_MONITORING)); + } + + + public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, @@ -1973,97 +2434,12 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); return mapping.findForward(LEARNER_NOTEBOOK); } - public void prepareReflectionData(HttpServletRequest request, QaContent qaContent, - IQaService qaService, String userID, boolean exportMode) - { - logger.debug("starting prepareReflectionData: " + qaContent); - logger.debug("userID: " + userID); - logger.debug("exportMode: " + exportMode); - - List reflectionsContainerDTO= new LinkedList(); - if (userID == null) - { - logger.debug("all users mode"); - for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) - { - QaSession qaSession = (QaSession) sessionIter.next(); - logger.debug("qaSession: " + qaSession); - for (Iterator userIter = qaSession.getQaQueUsers().iterator(); userIter.hasNext();) - { - QaQueUsr user = (QaQueUsr) userIter.next(); - logger.debug("user: " + user); - - NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), - CoreNotebookConstants.NOTEBOOK_TOOL, - MY_SIGNATURE, new Integer(user.getQueUsrId().toString())); - - logger.debug("notebookEntry: " + notebookEntry); - - if (notebookEntry != null) { - ReflectionDTO reflectionDTO = new ReflectionDTO(); - reflectionDTO.setUserId(user.getQueUsrId().toString()); - reflectionDTO.setSessionId(qaSession.getQaSessionId().toString()); - reflectionDTO.setUserName(user.getUsername()); - reflectionDTO.setReflectionUid (notebookEntry.getUid().toString()); - String notebookEntryPresentable=QaUtils.replaceNewLines(notebookEntry.getEntry()); - reflectionDTO.setEntry(notebookEntryPresentable); - reflectionsContainerDTO.add(reflectionDTO); - } - } - } - } - else - { - logger.debug("single user mode"); - for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) - { - QaSession qaSession = (QaSession) sessionIter.next(); - logger.debug("qaSession: " + qaSession); - for (Iterator userIter = qaSession.getQaQueUsers().iterator(); userIter.hasNext();) - { - QaQueUsr user = (QaQueUsr) userIter.next(); - logger.debug("user: " + user); - - if (user.getQueUsrId().toString().equals(userID)) - { - logger.debug("getting reflection for user with userID: " + userID); - NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), - CoreNotebookConstants.NOTEBOOK_TOOL, - MY_SIGNATURE, new Integer(user.getQueUsrId().toString())); - - logger.debug("notebookEntry: " + notebookEntry); - - if (notebookEntry != null) { - ReflectionDTO reflectionDTO = new ReflectionDTO(); - reflectionDTO.setUserId(user.getQueUsrId().toString()); - reflectionDTO.setSessionId(qaSession.getQaSessionId().toString()); - reflectionDTO.setUserName(user.getUsername()); - reflectionDTO.setReflectionUid (notebookEntry.getUid().toString()); - String notebookEntryPresentable=QaUtils.replaceNewLines(notebookEntry.getEntry()); - reflectionDTO.setEntry(notebookEntryPresentable); - reflectionsContainerDTO.add(reflectionDTO); - } - } - } - } - } - - - logger.debug("reflectionsContainerDTO: " + reflectionsContainerDTO); - request.setAttribute(REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); - - if (exportMode) - { - request.getSession().setAttribute(REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); - } - - } - - + public void prepareEditActivityScreenData(HttpServletRequest request, QaContent qaContent) { logger.debug("starting prepareEditActivityScreenData: " + qaContent); @@ -2292,7 +2668,7 @@ logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false , "All"); /*find out if there are any reflection entries, from here*/ boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); @@ -2309,6 +2685,7 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); return mapping.findForward(LOAD_MONITORING); } @@ -2548,7 +2925,7 @@ logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false , "All"); /*find out if there are any reflection entries, from here*/ boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); @@ -2565,6 +2942,7 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); return mapping.findForward(LOAD_MONITORING); } @@ -2736,7 +3114,7 @@ logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false, "All"); /*find out if there are any reflection entries, from here*/ boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); @@ -2753,6 +3131,7 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); return mapping.findForward(LOAD_MONITORING); } @@ -2852,7 +3231,7 @@ logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false, "All"); /*find out if there are any reflection entries, from here*/ boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); @@ -2869,6 +3248,7 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); logger.debug("fwd ing to newQuestionBox: "); return (mapping.findForward("newQuestionBox")); @@ -3009,7 +3389,7 @@ logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false ,"All"); /*find out if there are any reflection entries, from here*/ boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); @@ -3026,6 +3406,7 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); logger.debug("fwd ing to editQuestionBox: "); return (mapping.findForward("editQuestionBox")); @@ -3194,7 +3575,7 @@ logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false , "All"); /*find out if there are any reflection entries, from here*/ boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); @@ -3211,7 +3592,9 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); + return mapping.findForward(LOAD_MONITORING); } @@ -3351,7 +3734,7 @@ logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false , "All"); /*find out if there are any reflection entries, from here*/ boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); @@ -3368,6 +3751,7 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); return mapping.findForward(LOAD_MONITORING); @@ -3508,7 +3892,7 @@ logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - prepareReflectionData(request, qaContent, qaService, null, false); + prepareReflectionData(request, qaContent, qaService, null, false , "All"); /*find out if there are any reflection entries, from here*/ boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); @@ -3525,8 +3909,226 @@ /* ... till here*/ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); return mapping.findForward(LOAD_MONITORING); } + + + + public void prepareReflectionData(HttpServletRequest request, QaContent qaContent, + IQaService qaService, String userID, boolean exportMode, String currentSessionId) + { + logger.debug("starting prepareReflectionData: " + qaContent); + logger.debug("currentSessionId: " + currentSessionId); + logger.debug("userID: " + userID); + logger.debug("exportMode: " + exportMode); + + + List reflectionsContainerDTO= new LinkedList(); + /* + if (currentSessionId.equals("All")) + { + reflectionsContainerDTO=getReflectionList(qaContent, userID, qaService); + } + else + { + reflectionsContainerDTO=getReflectionListForSession(qaContent, userID, qaService, currentSessionId); + } + */ + + reflectionsContainerDTO=getReflectionList(qaContent, userID, qaService); + + logger.debug("reflectionsContainerDTO: " + reflectionsContainerDTO); + request.setAttribute(REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); + + if (exportMode) + { + request.getSession().setAttribute(REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); + } + } + + + /** + * returns reflection data for all sessions + * + * getReflectionList + * @param qaContent + * @param userID + * @param qaService + * @return + */ + public List getReflectionList(QaContent qaContent, String userID, IQaService qaService) + { + logger.debug("getting reflections for all sessions"); + List reflectionsContainerDTO= new LinkedList(); + if (userID == null) + { + logger.debug("all users mode"); + for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) + { + QaSession qaSession = (QaSession) sessionIter.next(); + logger.debug("qaSession: " + qaSession); + logger.debug("qaSession sessionId: " + qaSession.getQaSessionId()); + + for (Iterator userIter = qaSession.getQaQueUsers().iterator(); userIter.hasNext();) + { + QaQueUsr user = (QaQueUsr) userIter.next(); + logger.debug("user: " + user); + + NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), + CoreNotebookConstants.NOTEBOOK_TOOL, + MY_SIGNATURE, new Integer(user.getQueUsrId().toString())); + + logger.debug("notebookEntry: " + notebookEntry); + + if (notebookEntry != null) { + ReflectionDTO reflectionDTO = new ReflectionDTO(); + reflectionDTO.setUserId(user.getQueUsrId().toString()); + reflectionDTO.setSessionId(qaSession.getQaSessionId().toString()); + reflectionDTO.setUserName(user.getFullname()); + reflectionDTO.setReflectionUid (notebookEntry.getUid().toString()); + String notebookEntryPresentable=QaUtils.replaceNewLines(notebookEntry.getEntry()); + reflectionDTO.setEntry(notebookEntryPresentable); + reflectionsContainerDTO.add(reflectionDTO); + } + } + } + } + else + { + logger.debug("single user mode"); + for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) + { + QaSession qaSession = (QaSession) sessionIter.next(); + logger.debug("qaSession: " + qaSession); + for (Iterator userIter = qaSession.getQaQueUsers().iterator(); userIter.hasNext();) + { + QaQueUsr user = (QaQueUsr) userIter.next(); + logger.debug("user: " + user); + + if (user.getQueUsrId().toString().equals(userID)) + { + logger.debug("getting reflection for user with userID: " + userID); + NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), + CoreNotebookConstants.NOTEBOOK_TOOL, + MY_SIGNATURE, new Integer(user.getQueUsrId().toString())); + + logger.debug("notebookEntry: " + notebookEntry); + + if (notebookEntry != null) { + ReflectionDTO reflectionDTO = new ReflectionDTO(); + reflectionDTO.setUserId(user.getQueUsrId().toString()); + reflectionDTO.setSessionId(qaSession.getQaSessionId().toString()); + reflectionDTO.setUserName(user.getFullname()); + reflectionDTO.setReflectionUid (notebookEntry.getUid().toString()); + String notebookEntryPresentable=QaUtils.replaceNewLines(notebookEntry.getEntry()); + reflectionDTO.setEntry(notebookEntryPresentable); + reflectionsContainerDTO.add(reflectionDTO); + } + } + } + } + } + + return reflectionsContainerDTO; + } + + /** + * returns reflection data for a specific session + * + * getReflectionListForSession(QaContent qaContent, String userID, IQaService qaService, String currentSessionId) + * @param qaContent + * @param userID + * @param qaService + * @param currentSessionId + * @return + */ + public List getReflectionListForSession(QaContent qaContent, String userID, IQaService qaService, String currentSessionId) + { + logger.debug("getting reflections for a specific session"); + logger.debug("currentSessionId: " + currentSessionId); + + List reflectionsContainerDTO= new LinkedList(); + if (userID == null) + { + logger.debug("all users mode"); + for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) + { + QaSession qaSession = (QaSession) sessionIter.next(); + logger.debug("qaSession: " + qaSession); + logger.debug("qaSession sessionId: " + qaSession.getQaSessionId()); + + if (currentSessionId.equals(qaSession.getQaSessionId())) + { + + for (Iterator userIter = qaSession.getQaQueUsers().iterator(); userIter.hasNext();) + { + QaQueUsr user = (QaQueUsr) userIter.next(); + logger.debug("user: " + user); + + NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), + CoreNotebookConstants.NOTEBOOK_TOOL, + MY_SIGNATURE, new Integer(user.getQueUsrId().toString())); + + logger.debug("notebookEntry: " + notebookEntry); + + if (notebookEntry != null) { + ReflectionDTO reflectionDTO = new ReflectionDTO(); + reflectionDTO.setUserId(user.getQueUsrId().toString()); + reflectionDTO.setSessionId(qaSession.getQaSessionId().toString()); + reflectionDTO.setUserName(user.getFullname()); + reflectionDTO.setReflectionUid (notebookEntry.getUid().toString()); + String notebookEntryPresentable=QaUtils.replaceNewLines(notebookEntry.getEntry()); + reflectionDTO.setEntry(notebookEntryPresentable); + reflectionsContainerDTO.add(reflectionDTO); + } + } + } + } + } + else + { + logger.debug("single user mode"); + for (Iterator sessionIter = qaContent.getQaSessions().iterator(); sessionIter.hasNext();) + { + QaSession qaSession = (QaSession) sessionIter.next(); + logger.debug("qaSession: " + qaSession); + + if (currentSessionId.equals(qaSession.getQaSessionId())) + { + for (Iterator userIter = qaSession.getQaQueUsers().iterator(); userIter.hasNext();) + { + QaQueUsr user = (QaQueUsr) userIter.next(); + logger.debug("user: " + user); + + if (user.getQueUsrId().toString().equals(userID)) + { + logger.debug("getting reflection for user with userID: " + userID); + NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), + CoreNotebookConstants.NOTEBOOK_TOOL, + MY_SIGNATURE, new Integer(user.getQueUsrId().toString())); + + logger.debug("notebookEntry: " + notebookEntry); + + if (notebookEntry != null) { + ReflectionDTO reflectionDTO = new ReflectionDTO(); + reflectionDTO.setUserId(user.getQueUsrId().toString()); + reflectionDTO.setSessionId(qaSession.getQaSessionId().toString()); + reflectionDTO.setUserName(user.getFullname()); + reflectionDTO.setReflectionUid (notebookEntry.getUid().toString()); + String notebookEntryPresentable=QaUtils.replaceNewLines(notebookEntry.getEntry()); + reflectionDTO.setEntry(notebookEntryPresentable); + reflectionsContainerDTO.add(reflectionDTO); + } + } + } + + } + } + } + + return reflectionsContainerDTO; + } } \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java (.../QaMonitoringForm.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java (.../QaMonitoringForm.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -45,6 +45,8 @@ protected String showResponse; protected String currentUid; + protected String sessionId; + protected IQaService qaService; @@ -159,4 +161,16 @@ public void setMethod(String method) { this.method = method; } + /** + * @return Returns the sessionId. + */ + public String getSessionId() { + return sessionId; + } + /** + * @param sessionId The sessionId to set. + */ + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -184,7 +184,7 @@ request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); - qaMonitoringAction.prepareReflectionData(request, qaContent, qaService, null, false); + qaMonitoringAction.prepareReflectionData(request, qaContent, qaService, null, false, "All"); logger.debug("final qaMonitoringForm: " + qaMonitoringForm); logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); @@ -245,6 +245,8 @@ MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + request.setAttribute("currentMonitoredToolSession", "All"); + MonitoringUtil.generateGroupsSessionData(request, qaService, qaContent); logger.debug("fwding to : " + LOAD_MONITORING); return (mapping.findForward(LOAD_MONITORING)); @@ -287,7 +289,7 @@ logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, true, false, null, null, - generalLearnerFlowDTO, false); + generalLearnerFlowDTO, false , "All"); logger.debug("refreshing stats data..."); qaMonitoringAction.refreshStatsData(request, qaMonitoringForm, qaService, generalMonitoringDTO); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -114,12 +114,7 @@ path="/monitoring/MonitoringMaincontent.jsp" redirect="false" /> - - + * @@ -249,12 +244,11 @@ String sourceMcStarter = (String) request.getAttribute(SOURCE_MC_STARTER); logger.debug("sourceMcStarter: " + sourceMcStarter); - ActionForward validateSignature=readSignature(request,mapping, qaService, qaGeneralAuthoringDTO, qaAuthoringForm); + boolean validateSignature=readSignature(request,mapping, qaService, qaGeneralAuthoringDTO, qaAuthoringForm); logger.debug("validateSignature: " + validateSignature); - if (validateSignature != null) + if (validateSignature == false) { - logger.debug("validateSignature not null : " + validateSignature); - return validateSignature; + logger.debug("error during validation"); } /* mark the http session as an authoring activity */ @@ -554,7 +548,7 @@ * @param mapping * @return ActionForward */ - public ActionForward readSignature(HttpServletRequest request, ActionMapping mapping, IQaService qaService, + public boolean readSignature(HttpServletRequest request, ActionMapping mapping, IQaService qaService, QaGeneralAuthoringDTO qaGeneralAuthoringDTO, QaAuthoringForm qaAuthoringForm) { logger.debug("qaService: " + qaService); @@ -569,18 +563,15 @@ logger.debug("retrieved tool default contentId: " + defaultContentID); if (defaultContentID == 0) { - QaUtils.cleanUpSessionAbsolute(request); logger.debug("default content id has not been setup"); - return (mapping.findForward(ERROR_LIST)); + return false; } } catch(Exception e) { - QaUtils.cleanUpSessionAbsolute(request); logger.debug("error getting the default content id: " + e.getMessage()); persistError(request,"error.defaultContent.notSetup"); - logger.debug("forwarding to: " + ERROR_LIST); - return (mapping.findForward(ERROR_LIST)); + return false; } @@ -592,10 +583,9 @@ QaContent qaContent=qaService.loadQa(defaultContentID); if (qaContent == null) { - QaUtils.cleanUpSessionAbsolute(request); logger.debug("Exception occured: No default content"); persistError(request,"error.defaultContent.notSetup"); - return (mapping.findForward(ERROR_LIST)); + return false; } logger.debug("using qaContent: " + qaContent); logger.debug("using qaContent uid: " + qaContent.getUid()); @@ -604,45 +594,17 @@ } catch(Exception e) { - QaUtils.cleanUpSessionAbsolute(request); logger.debug("Exception occured: No default question content"); persistError(request,"error.defaultContent.notSetup"); - logger.debug("forwarding to: " + ERROR_LIST); - return (mapping.findForward(ERROR_LIST)); + return false; } - /* retrieve uid of the default question content */ - long queContentUID=0; - try - { - logger.debug("retrieve the default question content based on default content UID: " + contentUID); - QaQueContent qaQueContent=qaService.getToolDefaultQuestionContent(contentUID); - logger.debug("using qaQueContent: " + qaQueContent); - if (qaQueContent == null) - { - logger.debug("Exception occured: No default question content"); - persistError(request,"error.defaultQuestionContent.notAvailable"); - QaUtils.cleanUpSessionAbsolute(request); - return (mapping.findForward(LOAD_QUESTIONS)); - } - logger.debug("using qaQueContent uid: " + qaQueContent.getUid()); - qaGeneralAuthoringDTO.setDefaultQuestionContent(qaQueContent.getQuestion()); - } - catch(Exception e) - { - logger.debug("Exception occured: No default question content"); - persistError(request,"error.defaultQuestionContent.notAvailable"); - QaUtils.cleanUpSessionAbsolute(request); - logger.debug("forwarding to: " + ERROR_LIST); - return (mapping.findForward(ERROR_LIST)); - } - logger.debug("QA tool has the default content id: " + defaultContentID); qaGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString()); qaAuthoringForm.setDefaultContentIdStr(new Long(defaultContentID).toString()); - return null; + return true; } Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/Errorbox.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/QaErrorBox.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/QaContent.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/QaQueContent.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/QaQueUsr.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/QaSession.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/QaUploadedFile.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/QaUsrResp.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/web/WEB-INF/struts-config.xml =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -72,11 +72,6 @@ redirect="false" /> - - - - - - - - - - -
Index: lams_tool_laqa/web/authoring/newQuestionBox.jsp =================================================================== diff -u -r987a74c62956d533b5e9dc73443257d7931fe40a -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/web/authoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 987a74c62956d533b5e9dc73443257d7931fe40a) +++ lams_tool_laqa/web/authoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -83,17 +83,21 @@ Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/css/tool_custom.css'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/javascript/forum.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/javascript/message.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/index.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/learningIndex.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/web/monitoring/AllSessionsSummary.jsp =================================================================== diff -u --- lams_tool_laqa/web/monitoring/AllSessionsSummary.jsp (revision 0) +++ lams_tool_laqa/web/monitoring/AllSessionsSummary.jsp (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -0,0 +1,212 @@ +<%-- +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 version 2 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_laqa/web/monitoring/IndividualSessionSummary.jsp =================================================================== diff -u --- lams_tool_laqa/web/monitoring/IndividualSessionSummary.jsp (revision 0) +++ lams_tool_laqa/web/monitoring/IndividualSessionSummary.jsp (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -0,0 +1,190 @@ +<%-- +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 version 2 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + Index: lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -71,6 +71,14 @@ submitMethod(actionMethod); } + function submitEditGroupResponse(sessionId, responseId, actionMethod) + { + document.QaMonitoringForm.sessionId.value=sessionId; + document.QaMonitoringForm.responseId.value=responseId; + submitMethod(actionMethod); + } + + function submitMethod(actionMethod) { submitMonitoringMethod(actionMethod); @@ -92,6 +100,14 @@ submitMethod(actionMethod); } + function submitGroupResponse(sessionId, currentUid, actionMethod) + { + document.QaMonitoringForm.sessionId.value=sessionId; + document.QaMonitoringForm.currentUid.value=currentUid; + submitMethod(actionMethod); + } + + function submitModifyMonitoringQuestion(questionIndexValue, actionMethod) { document.QaMonitoringForm.questionIndex.value=questionIndexValue; Index: lams_tool_laqa/web/monitoring/Reflections.jsp =================================================================== diff -u --- lams_tool_laqa/web/monitoring/Reflections.jsp (revision 0) +++ lams_tool_laqa/web/monitoring/Reflections.jsp (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -0,0 +1,61 @@ +<%-- +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 version 2 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> + +<%@ include file="/common/taglibs.jsp"%> + + +
- - - - -     - - - - - -

+ + + + + + +
                     + + + + + + + +
- - - - -     - - - - - -

+ + + + + + +
                     + + + + + + + +
:
: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + ','','editGroupResponse');"> + images/edit.gif" border="0"> + + + + + + + + + + + + + +
+ + + + +
+ + + ','','updateGroupResponse');"> + images/tick.gif" border="0"> + + + + + + + + + + + + + +
+ + + + +
+ + ','','editGroupResponse');"> + images/edit.gif" border="0"> + + + + + + + + + + + + + +
+ + + + +
   
+
:
: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + ','editResponse');"> + images/edit.gif" border="0"> + + + + + + + + + + + + + +
+ + + + +
+ + + ','updateResponse');"> + images/tick.gif" border="0"> + + + + + + + + + + + + + +
+ + + + +
+ + ','editResponse');"> + images/edit.gif" border="0"> + + + + + + + + + + + + + +
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + Index: lams_tool_laqa/web/monitoring/SummaryContent.jsp =================================================================== diff -u -r0db83894504dc7652d3670a6ce496605b961faa1 -r24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc --- lams_tool_laqa/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) +++ lams_tool_laqa/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc) @@ -21,7 +21,9 @@ <%@ include file="/common/taglibs.jsp"%> + +
+ +
+ + + + + + + + + + + + + + + +
@@ -51,7 +53,7 @@ - - - - - - - - - - - - - - - -
+
   
: - -
- + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ','editResponse');"> - images/edit.gif" border="0"> - - - - - - - - - - - - - -
- - - - -
- - - ','updateResponse');"> - images/tick.gif" border="0"> - - - - - - - - - - - - - -
- - - - -
- - ','editResponse');"> - images/edit.gif" border="0"> - - - - - - - - - - - - - -
- - - - -
-
+ + + + + + + - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - -
-
- - \ No newline at end of file Fisheye: Tag 24cbd649c978f88f34f4e80b5d8ab8ab2faefdcc refers to a dead (removed) revision in file `lams_tool_laqa/web/monitoringIndex.jsp'. Fisheye: No comparison available. Pass `N' to diff?