Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/EditActivityDTO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/EditActivityDTO.java (.../EditActivityDTO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/EditActivityDTO.java (.../EditActivityDTO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralLearnerFlowDTO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,4 +1,4 @@ -/*************************************************************************** +/**************************************************************** * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) * ============================================================= * License Information: http://lamsfoundation.org/licensing/lams/2.0/ @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; @@ -88,6 +89,8 @@ protected Map mapQuestions; + protected Map mapFeedback; + protected Map mapQuestionContentLearner; protected List listMonitoredAnswersContainerDTO; @@ -241,6 +244,7 @@ .append("mapQuestionContentLearner: ", mapQuestionContentLearner) .append("listMonitoredAnswersContainerDTO: ", listMonitoredAnswersContainerDTO) .append("currentMonitoredToolSession: ", currentMonitoredToolSession) + .append("mapFeedback: ", mapFeedback) .toString(); } @@ -493,4 +497,16 @@ public void setUserName(String userName) { this.userName = userName; } + /** + * @return Returns the mapFeedback. + */ + public Map getMapFeedback() { + return mapFeedback; + } + /** + * @param mapFeedback The mapFeedback to set. + */ + public void setMapFeedback(Map mapFeedback) { + this.mapFeedback = mapFeedback; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralMonitoringDTO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralMonitoringDTO.java (.../GeneralMonitoringDTO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralMonitoringDTO.java (.../GeneralMonitoringDTO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,4 +1,4 @@ -/*************************************************************************** +/**************************************************************** * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) * ============================================================= * License Information: http://lamsfoundation.org/licensing/lams/2.0/ @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; @@ -62,6 +63,8 @@ protected List attachmentList; protected List deletedAttachmentList; + protected String contentFolderID; + public String toString() { return new ToStringBuilder(this) @@ -289,4 +292,16 @@ public void setActivityTitle(String activityTitle) { this.activityTitle = activityTitle; } + /** + * @return Returns the contentFolderID. + */ + public String getContentFolderID() { + return contentFolderID; + } + /** + * @param contentFolderID The contentFolderID to set. + */ + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/Nullable.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/Nullable.java (.../Nullable.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/Nullable.java (.../Nullable.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; @@ -40,6 +42,8 @@ public static final String OFFLINE_INSTRUCTIONS_KEY = "offlineInstructionsKey"; public static final String ACTIVITY_TITLE_KEY = "activityTitleKey"; public static final String ACTIVITY_INSTRUCTIONS_KEY = "activityInstructionsKey"; + public static final String LIST_QUESTION_CONTENT_DTO = "listQuestionContentDTO"; + public static final String LIST_QUESTION_CONTENT_DTO_KEY = "listQuestionContentDTOKey"; public static final String TARGET_MODE ="targetMode"; public static final String TARGET_MODE_AUTHORING ="Authoring"; @@ -78,6 +82,8 @@ public static final String ENTRY_TEXT ="entryText"; public static final String REFLECTIONS_CONTAINER_DTO ="reflectionsContainerDTO"; 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 ACTIVE_MODULE ="activeModule"; public static final String AUTHORING ="authoring"; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaApplicationException.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaApplicationException.java (.../QaApplicationException.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaApplicationException.java (.../QaApplicationException.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaComparator.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaComparator.java (.../QaComparator.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaComparator.java (.../QaComparator.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaContent.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaContent.java (.../QaContent.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaContent.java (.../QaContent.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaGeneralAuthoringDTO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaGeneralAuthoringDTO.java (.../QaGeneralAuthoringDTO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaGeneralAuthoringDTO.java (.../QaGeneralAuthoringDTO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,4 +1,4 @@ -/*************************************************************************** +/**************************************************************** * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) * ============================================================= * License Information: http://lamsfoundation.org/licensing/lams/2.0/ @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; @@ -49,32 +51,38 @@ protected String activityTitle; protected String activityInstructions; - protected String reportTitle; - protected String monitoringReportTitle; - protected String endLearningMessage; protected String onlineInstructions; protected String offlineInstructions; protected String usernameVisible; + protected String reflect; protected String synchInMonitor; protected String questionsSequenced; protected String editActivityEditMode; + protected String reflectionSubject; protected String monitoredContentInUse; protected String httpSessionID; protected String requestedModule; protected String isDefineLater; protected Map mapQuestionContent; + protected List attachmentList; protected List deletedAttachmentList; protected String sbmtSuccess; protected String userExceptionQuestionsDuplicate; + protected String contentFolderID; + protected String editableQuestionText; + protected String editableQuestionFeedback; + + public String toString() { return new ToStringBuilder(this) .append("toolContentID: ", toolContentID) + .append("contentFolderID: ", contentFolderID) .append("httpSessionID: ", httpSessionID) .append("currentTab: ", currentTab) .append("activeModule: ", activeModule) @@ -86,15 +94,14 @@ .append("defaultContentIdStr: ", defaultContentIdStr) .append("activityTitle: ", activityTitle) .append("activityInstructions: ", activityInstructions) - .append("reportTitle: ", reportTitle) - .append("monitoringReportTitle: ", monitoringReportTitle) - .append("endLearningMessage: ", endLearningMessage) + .append("reflect: ", reflect) .append("onlineInstructions: ", onlineInstructions) .append("offlineInstructions: ", offlineInstructions) .append("usernameVisible: ", usernameVisible) .append("synchInMonitor: ", synchInMonitor) .append("questionsSequenced: ", questionsSequenced) .append("editActivityEditMode: ", editActivityEditMode) + .append("reflectionSubject: ", reflectionSubject) .append("requestedModule: ", requestedModule) .append("isDefineLater: ", isDefineLater) .append("monitoredContentInUse: ", monitoredContentInUse) @@ -357,31 +364,6 @@ this.activityTitle = activityTitle; } /** - * @return Returns the endLearningMessage. - */ - public String getEndLearningMessage() { - return endLearningMessage; - } - /** - * @param endLearningMessage The endLearningMessage to set. - */ - public void setEndLearningMessage(String endLearningMessage) { - this.endLearningMessage = endLearningMessage; - } - - /** - * @return Returns the monitoringReportTitle. - */ - public String getMonitoringReportTitle() { - return monitoringReportTitle; - } - /** - * @param monitoringReportTitle The monitoringReportTitle to set. - */ - public void setMonitoringReportTitle(String monitoringReportTitle) { - this.monitoringReportTitle = monitoringReportTitle; - } - /** * @return Returns the offlineInstructions. */ public String getOfflineInstructions() { @@ -417,19 +399,8 @@ public void setQuestionsSequenced(String questionsSequenced) { this.questionsSequenced = questionsSequenced; } + /** - * @return Returns the reportTitle. - */ - public String getReportTitle() { - return reportTitle; - } - /** - * @param reportTitle The reportTitle to set. - */ - public void setReportTitle(String reportTitle) { - this.reportTitle = reportTitle; - } - /** * @return Returns the synchInMonitor. */ public String getSynchInMonitor() { @@ -479,4 +450,67 @@ this.sbmtSuccess = sbmtSuccess; } + /** + * @return Returns the contentFolderID. + */ + public String getContentFolderID() { + return contentFolderID; + } + /** + * @param contentFolderID The contentFolderID to set. + */ + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + + /** + * @return Returns the editableQuestionText. + */ + public String getEditableQuestionText() { + return editableQuestionText; + } + /** + * @param editableQuestionText The editableQuestionText to set. + */ + public void setEditableQuestionText(String editableQuestionText) { + this.editableQuestionText = editableQuestionText; + } + + /** + * @return Returns the editableQuestionFeedback. + */ + public String getEditableQuestionFeedback() { + return editableQuestionFeedback; + } + /** + * @param editableQuestionFeedback The editableQuestionFeedback to set. + */ + public void setEditableQuestionFeedback(String editableQuestionFeedback) { + this.editableQuestionFeedback = editableQuestionFeedback; + } + + /** + * @return Returns the reflect. + */ + public String getReflect() { + return reflect; + } + /** + * @param reflect The reflect to set. + */ + public void setReflect(String reflect) { + this.reflect = reflect; + } + /** + * @return Returns the reflectionSubject. + */ + public String getReflectionSubject() { + return reflectionSubject; + } + /** + * @param reflectionSubject The reflectionSubject to set. + */ + public void setReflectionSubject(String reflectionSubject) { + this.reflectionSubject = reflectionSubject; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredAnswersDTO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredAnswersDTO.java (.../QaMonitoredAnswersDTO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredAnswersDTO.java (.../QaMonitoredAnswersDTO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredUserDTO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredUserDTO.java (.../QaMonitoredUserDTO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaMonitoredUserDTO.java (.../QaMonitoredUserDTO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaQueContent.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaQueContent.java (.../QaQueContent.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaQueContent.java (.../QaQueContent.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; @@ -60,6 +61,8 @@ /** nullable persistent field */ private int displayOrder; + private String feedback; + /** nullable persistent field */ private org.lamsfoundation.lams.tool.qa.QaContent qaContent; @@ -87,7 +90,7 @@ logger.debug(logger + " " + this.getClass().getName() + "in constructor: QaQueContent()"); } - /** full constructor */ + public QaQueContent(String question, int displayOrder, org.lamsfoundation.lams.tool.qa.QaContent qaContent, @@ -103,16 +106,33 @@ public QaQueContent(String question, int displayOrder, + String feedback, + org.lamsfoundation.lams.tool.qa.QaContent qaContent, Set qaQueUsers, Set qaUsrResps) -{ - this.question = question; - this.displayOrder = displayOrder; - this.qaQueUsers=qaQueUsers; - this.qaUsrResps=qaUsrResps; + { + this.question = question; + this.displayOrder = displayOrder; + this.feedback = feedback; + this.qaContent = qaContent; + this.qaQueUsers=qaQueUsers; + this.qaUsrResps=qaUsrResps; } + + public QaQueContent(String question, + int displayOrder, + Set qaQueUsers, + Set qaUsrResps) + { + this.question = question; + this.displayOrder = displayOrder; + this.qaQueUsers=qaQueUsers; + this.qaUsrResps=qaUsrResps; + } + + /** minimal constructor */ public QaQueContent(Set qaQueUsers, Set qaUsrResps) @@ -122,12 +142,7 @@ } - /** - * Copy constructor - * @param queContent the original qa question content - * @return the new qa question content object - */ - //part of the contract: make sure that this works! + /* public static QaQueContent newInstance(QaQueContent queContent, QaContent newQaContent, QaQueContent parentQuestion) @@ -141,7 +156,23 @@ return newQueContent; } + */ + public static QaQueContent newInstance(QaQueContent queContent, + QaContent newQaContent, + QaQueContent parentQuestion) + { + QaQueContent newQueContent = new QaQueContent(queContent.getQuestion(), + queContent.getDisplayOrder(), + queContent.getFeedback(), + newQaContent, + new TreeSet(), + new TreeSet()); + logger.debug(logger + " " + "QaQueContent" + " " + "returning newQueContent: " + newQueContent); + return newQueContent; + } + + public String toString() { return new ToStringBuilder(this) .append("qaQueContentId: ", getUid()) @@ -360,4 +391,23 @@ public void setUid(Long uid) { this.uid = uid; } + + /** + * @param isOptional The isOptional to set. + */ + public void setOptional(boolean isOptional) { + this.isOptional = isOptional; + } + /** + * @return Returns the feedback. + */ + public String getFeedback() { + return feedback; + } + /** + * @param feedback The feedback to set. + */ + public void setFeedback(String feedback) { + this.feedback = feedback; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaQueUsr.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaQueUsr.java (.../QaQueUsr.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaQueUsr.java (.../QaQueUsr.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaSession.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaSession.java (.../QaSession.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaSession.java (.../QaSession.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaStringComparator.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaStringComparator.java (.../QaStringComparator.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaStringComparator.java (.../QaStringComparator.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUploadedFile.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUploadedFile.java (.../QaUploadedFile.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUploadedFile.java (.../QaUploadedFile.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.java (.../QaUsrResp.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.java (.../QaUsrResp.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java (.../QaUtils.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUtils.java (.../QaUtils.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; @@ -67,15 +68,16 @@ qaGeneralAuthoringDTO.setActivityTitle(defaultQaContent.getTitle()); qaGeneralAuthoringDTO.setActivityInstructions(defaultQaContent.getInstructions()); - qaGeneralAuthoringDTO.setReportTitle(defaultQaContent.getReportTitle()); - qaGeneralAuthoringDTO.setMonitoringReportTitle(defaultQaContent.getMonitoringReportTitle()); qaGeneralAuthoringDTO.setOnlineInstructions(defaultQaContent.getOnlineInstructions()); qaGeneralAuthoringDTO.setOfflineInstructions(defaultQaContent.getOfflineInstructions()); /* set the status of radio boxes */ + /* qaGeneralAuthoringDTO.setUsernameVisible(defaultQaContent.isUsernameVisible()?ON:OFF); qaGeneralAuthoringDTO.setSynchInMonitor(defaultQaContent.isSynchInMonitor()?ON:OFF); qaGeneralAuthoringDTO.setQuestionsSequenced(defaultQaContent.isQuestionsSequenced()?ON:OFF); + qaGeneralAuthoringDTO.setReflect(defaultQaContent.isReflect()?ON:OFF); + */ } @@ -88,88 +90,13 @@ return newText; } - - - public static QaGeneralAuthoringDTO buildGeneralAuthoringDTO(HttpServletRequest request, IQaService qaService, QaContent qaContent, - QaAuthoringForm qaAuthoringForm) - { - logger.debug("start buildGeneralAuthoringDTO: " + qaContent); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); - qaGeneralAuthoringDTO.setToolContentID(qaContent.getQaContentId().toString()); - qaAuthoringForm.setToolContentID(qaContent.getQaContentId().toString()); - - Map mapQuestionContent= new TreeMap(new QaComparator()); - Iterator queIterator=qaContent.getQaQueContents().iterator(); - Long mapIndex=new Long(1); - logger.debug("mapQuestionContent: " + mapQuestionContent); - while (queIterator.hasNext()) - { - QaQueContent qaQueContent=(QaQueContent) queIterator.next(); - if (qaQueContent != null) - { - logger.debug("question: " + qaQueContent.getQuestion()); - mapQuestionContent.put(mapIndex.toString(),qaQueContent.getQuestion()); - - mapIndex=new Long(mapIndex.longValue()+1); - } - } - - logger.debug("mapQuestionContent: " + mapQuestionContent); - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); - qaAuthoringForm.setMapQuestionContent(mapQuestionContent); - - long defaultContentID=0; - logger.debug("attempt retrieving tool with signatute : " + MY_SIGNATURE); - defaultContentID=qaService.getToolDefaultContentIdBySignature(MY_SIGNATURE); - logger.debug("retrieved tool default contentId: " + defaultContentID); - - qaGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString()); - - if (qaContent.getTitle() == null) - { - qaGeneralAuthoringDTO.setActivityTitle("Q&A Title"); - } - else - { - qaGeneralAuthoringDTO.setActivityTitle(qaContent.getTitle()); - } - - if (qaContent.getInstructions() == null) - { - qaGeneralAuthoringDTO.setActivityInstructions("Q&A Instructions"); - } - else - { - qaGeneralAuthoringDTO.setActivityInstructions(qaContent.getInstructions()); - } - - - qaGeneralAuthoringDTO.setReportTitle(qaContent.getReportTitle()); - qaGeneralAuthoringDTO.setMonitoringReportTitle(qaContent.getMonitoringReportTitle()); - qaGeneralAuthoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); - qaGeneralAuthoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); - - qaGeneralAuthoringDTO.setUsernameVisible(qaContent.isUsernameVisible()?ON:OFF); - qaGeneralAuthoringDTO.setSynchInMonitor(qaContent.isSynchInMonitor()?ON:OFF); - qaGeneralAuthoringDTO.setQuestionsSequenced(qaContent.isQuestionsSequenced()?ON:OFF); - - qaAuthoringForm.setUsernameVisible(qaContent.isUsernameVisible()?ON:OFF); - qaAuthoringForm.setSynchInMonitor(qaContent.isSynchInMonitor()?ON:OFF); - qaAuthoringForm.setQuestionsSequenced(qaContent.isQuestionsSequenced()?ON:OFF); - - - logger.debug("ending buildGeneralAuthoringDTO with qaGeneralAuthoringDTO : " + qaGeneralAuthoringDTO); - logger.debug("ending buildGeneralAuthoringDTO with qaAuthoringForm: " + qaAuthoringForm); - return qaGeneralAuthoringDTO; - } - - public static void setFormProperties(HttpServletRequest request, IQaService qaService, QaContent qaContent, + public static void setFormProperties(HttpServletRequest request, IQaService qaService, QaAuthoringForm qaAuthoringForm, QaGeneralAuthoringDTO qaGeneralAuthoringDTO, String strToolContentID, String defaultContentIdStr, String activeModule, SessionMap sessionMap, String httpSessionID) { - logger.debug("starting setFormProperties: " + qaContent); + logger.debug("setFormProperties: "); logger.debug("using strToolContentID: " + strToolContentID); logger.debug("using defaultContentIdStr: " + defaultContentIdStr); logger.debug("using activeModule: " + activeModule); @@ -201,22 +128,6 @@ qaAuthoringForm.setQuestionsSequenced(questionsSequenced); qaGeneralAuthoringDTO.setQuestionsSequenced(questionsSequenced); - String reportTitle=request.getParameter(REPORT_TITLE); - logger.debug("reportTitle: " + reportTitle); - qaAuthoringForm.setReportTitle(reportTitle); - qaGeneralAuthoringDTO.setReportTitle(reportTitle); - - String monitoringReportTitle=request.getParameter(MONITORING_REPORT_TITLE); - logger.debug("monitoringReportTitle: " + monitoringReportTitle); - qaAuthoringForm.setMonitoringReportTitle(monitoringReportTitle); - qaGeneralAuthoringDTO.setMonitoringReportTitle(monitoringReportTitle); - - String endLearningMessage=request.getParameter(END_LEARNING_MESSSAGE); - logger.debug("endLearningMessage: " + endLearningMessage); - qaAuthoringForm.setEndLearningMessage(endLearningMessage); - qaGeneralAuthoringDTO.setEndLearningMessage(endLearningMessage); - - String offlineInstructions=request.getParameter(OFFLINE_INSTRUCTIONS); logger.debug("offlineInstructions: " + offlineInstructions); qaAuthoringForm.setOfflineInstructions(offlineInstructions); @@ -227,11 +138,25 @@ qaAuthoringForm.setOnlineInstructions(onlineInstructions); qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); + /* String defineLaterInEditMode=request.getParameter(DEFINE_LATER_IN_EDIT_MODE); logger.debug("defineLaterInEditMode: " + defineLaterInEditMode); qaAuthoringForm.setDefineLaterInEditMode(defineLaterInEditMode); qaGeneralAuthoringDTO.setDefineLaterInEditMode(defineLaterInEditMode); + */ + + String reflect=request.getParameter(REFLECT); + logger.debug("reflect: " + reflect); + qaAuthoringForm.setReflect(reflect); + qaGeneralAuthoringDTO.setReflect(reflect); + + + String reflectionSubject=request.getParameter(REFLECTION_SUBJECT); + logger.debug("reflectionSubject: " + reflectionSubject); + qaAuthoringForm.setReflectionSubject(reflectionSubject); + qaGeneralAuthoringDTO.setReflectionSubject(reflectionSubject); + logger.debug("ending setFormProperties with qaAuthoringForm: " + qaAuthoringForm); logger.debug("ending setFormProperties with qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/ReflectionDTO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/ReflectionDTO.java (.../ReflectionDTO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/ReflectionDTO.java (.../ReflectionDTO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,4 +1,4 @@ -/*************************************************************************** +/**************************************************************** * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) * ============================================================= * License Information: http://lamsfoundation.org/licensing/lams/2.0/ @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaContentDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaContentDAO.java (.../IQaContentDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaContentDAO.java (.../IQaContentDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueContentDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueContentDAO.java (.../IQaQueContentDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueContentDAO.java (.../IQaQueContentDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueUsrDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueUsrDAO.java (.../IQaQueUsrDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueUsrDAO.java (.../IQaQueUsrDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaSessionDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaSessionDAO.java (.../IQaSessionDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaSessionDAO.java (.../IQaSessionDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaUploadedFileDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaUploadedFileDAO.java (.../IQaUploadedFileDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaUploadedFileDAO.java (.../IQaUploadedFileDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaUsrRespDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaUsrRespDAO.java (.../IQaUsrRespDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaUsrRespDAO.java (.../IQaUsrRespDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaContentDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaContentDAO.java (.../QaContentDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaContentDAO.java (.../QaContentDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,8 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ - + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao.hibernate; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueContentDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueContentDAO.java (.../QaQueContentDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueContentDAO.java (.../QaQueContentDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,23 +18,19 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao.hibernate; import java.util.List; -import org.hibernate.FlushMode; -import org.hibernate.HibernateException; -import org.hibernate.Session; - import org.apache.log4j.Logger; - +import org.hibernate.FlushMode; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaQueContent; import org.lamsfoundation.lams.tool.qa.dao.IQaQueContentDAO; -import org.springframework.orm.hibernate3.HibernateCallback; import org.springframework.orm.hibernate3.HibernateTemplate; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; @@ -58,18 +54,6 @@ public QaQueContent getToolDefaultQuestionContent(final long qaContentId) { - /* - logger.debug("running getToolDefaultQuestionContent: " + qaContentId); - return (QaQueContent) getHibernateTemplate().execute(new HibernateCallback() - { - public Object doInHibernate(Session session) throws HibernateException - { - return session.createQuery(LOAD_QUESTION_CONTENT_BY_CONTENT_ID) - .setLong("qaContentId", qaContentId) - .uniqueResult(); - } - }); - */ HibernateTemplate templ = this.getHibernateTemplate(); List list = getSession().createQuery(LOAD_QUESTION_CONTENT_BY_CONTENT_ID) Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueUsrDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueUsrDAO.java (.../QaQueUsrDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueUsrDAO.java (.../QaQueUsrDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao.hibernate; @@ -148,6 +150,8 @@ List list = getSession().createQuery(strGetUser) .list(); logger.debug("strGetUser: " + strGetUser); + logger.debug("qa: " + qa); + logger.debug("list: " + list); int totalUserCount=0; if(list != null && list.size() > 0){ Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaSessionDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaSessionDAO.java (.../QaSessionDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaSessionDAO.java (.../QaSessionDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao.hibernate; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUploadedFileDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUploadedFileDAO.java (.../QaUploadedFileDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUploadedFileDAO.java (.../QaUploadedFileDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,8 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ - + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao.hibernate; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java (.../QaUsrRespDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java (.../QaUsrRespDAO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dao.hibernate; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.service; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.service; @@ -73,7 +74,6 @@ import org.lamsfoundation.lams.tool.qa.dao.IQaSessionDAO; import org.lamsfoundation.lams.tool.qa.dao.IQaUploadedFileDAO; import org.lamsfoundation.lams.tool.qa.dao.IQaUsrRespDAO; -import org.lamsfoundation.lams.tool.qa.util.QAConstants; import org.lamsfoundation.lams.tool.service.ILamsToolService; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; @@ -717,7 +717,7 @@ { try { - auditService.logChange(QAConstants.TOOL_SIGNATURE, + auditService.logChange(MY_SIGNATURE, resp.getQaQueUser().getQueUsrId(),resp.getQaQueUser().getUsername(), resp.getAnswer(), null); qaUsrRespDAO.removeUserResponse(resp); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServiceProxy.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServiceProxy.java (.../QaServiceProxy.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServiceProxy.java (.../QaServiceProxy.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.service; Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QAConstants.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaToolContentHandler.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaToolContentHandler.java (.../QaToolContentHandler.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaToolContentHandler.java (.../QaToolContentHandler.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.util; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,13 +18,15 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; import java.util.Date; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.TreeMap; @@ -38,6 +40,7 @@ import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.QaQueContent; +import org.lamsfoundation.lams.tool.qa.QaQuestionContentDTO; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.web.session.SessionManager; @@ -64,7 +67,7 @@ logger.debug("pre-add Map content: " + mapQuestionContent); logger.debug("pre-add Map size: " + mapQuestionContent.size()); - repopulateMap(mapQuestionContent, request); + //repopulateMap(mapQuestionContent, request); mapQuestionContent.put(new Long(mapQuestionContent.size()+1).toString(), ""); //request.getSession().setAttribute("mapQuestionContent", mapQuestionContent); @@ -92,8 +95,8 @@ long longQuestionIndex= new Long(questionIndex).longValue(); logger.debug("pre-delete count: " + mapQuestionContent.size()); - repopulateMap(mapQuestionContent, request); - logger.debug("post-repopulateMap questionIndex: " + questionIndex); + //repopulateMap(mapQuestionContent, request); + //logger.debug("post-repopulateMap questionIndex: " + questionIndex); mapQuestionContent.remove(new Long(longQuestionIndex).toString()); logger.debug("removed the question content with index: " + longQuestionIndex); @@ -104,6 +107,196 @@ } + protected static List swapNodes(List listQuestionContentDTO, String questionIndex, String direction) + { + logger.debug("swapNodes:"); + logger.debug("listQuestionContentDTO:" + listQuestionContentDTO); + logger.debug("questionIndex:" + questionIndex); + logger.debug("direction:" + direction); + + int intQuestionIndex=new Integer(questionIndex).intValue(); + int intOriginalQuestionIndex=intQuestionIndex; + logger.debug("intQuestionIndex:" + intQuestionIndex); + + int replacedNodeIndex=0; + if (direction.equals("down")) + { + logger.debug("direction down:"); + replacedNodeIndex=++intQuestionIndex; + } + else + { + logger.debug("direction up:"); + replacedNodeIndex=--intQuestionIndex; + + } + logger.debug("replacedNodeIndex:" + replacedNodeIndex); + logger.debug("replacing nodes:" + intOriginalQuestionIndex + " and " + replacedNodeIndex); + + QaQuestionContentDTO mainNode=extractNodeAtDisplayOrder(listQuestionContentDTO, intOriginalQuestionIndex); + logger.debug("mainNode:" + mainNode); + + + QaQuestionContentDTO replacedNode=extractNodeAtDisplayOrder(listQuestionContentDTO, replacedNodeIndex); + logger.debug("replacedNode:" + replacedNode); + + List listFinalQuestionContentDTO=new LinkedList(); + + listFinalQuestionContentDTO=reorderSwappedListQuestionContentDTO(listQuestionContentDTO, intOriginalQuestionIndex, + replacedNodeIndex, mainNode, replacedNode); + + + logger.debug("listFinalQuestionContentDTO:" + listFinalQuestionContentDTO); + return listFinalQuestionContentDTO; + } + + + + protected static List reorderSwappedListQuestionContentDTO(List listQuestionContentDTO, int intOriginalQuestionIndex, + int replacedNodeIndex, QaQuestionContentDTO mainNode, QaQuestionContentDTO replacedNode) + { + logger.debug("reorderSwappedListQuestionContentDTO: intOriginalQuestionIndex:" + intOriginalQuestionIndex); + logger.debug("reorderSwappedListQuestionContentDTO: replacedNodeIndex:" + replacedNodeIndex); + logger.debug("mainNode: " + mainNode); + logger.debug("replacedNode: " + replacedNode); + + + List listFinalQuestionContentDTO=new LinkedList(); + + int queIndex=0; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + queIndex++; + QaQuestionContentDTO tempNode=new QaQuestionContentDTO(); + + if ((!qaQuestionContentDTO.getDisplayOrder().equals(new Integer(intOriginalQuestionIndex).toString())) && + !qaQuestionContentDTO.getDisplayOrder().equals(new Integer(replacedNodeIndex).toString())) + { + logger.debug("normal copy "); + tempNode.setQuestion(qaQuestionContentDTO.getQuestion()); + tempNode.setDisplayOrder(qaQuestionContentDTO.getDisplayOrder()); + tempNode.setFeedback(qaQuestionContentDTO.getFeedback()); + } + else if (qaQuestionContentDTO.getDisplayOrder().equals(new Integer(intOriginalQuestionIndex).toString())) + { + logger.debug("move type 1 "); + tempNode.setQuestion(replacedNode.getQuestion()); + tempNode.setDisplayOrder(replacedNode.getDisplayOrder()); + tempNode.setFeedback(replacedNode.getFeedback()); + } + else if (qaQuestionContentDTO.getDisplayOrder().equals(new Integer(replacedNodeIndex).toString())) + { + logger.debug("move type 1 "); + tempNode.setQuestion(mainNode.getQuestion()); + tempNode.setDisplayOrder(mainNode.getDisplayOrder()); + tempNode.setFeedback(mainNode.getFeedback()); + } + + /* + if (qaQuestionContentDTO.getDisplayOrder().equals(new Integer(intOriginalQuestionIndex).toString())) + { + logger.debug("placing swapped content1"); + qaQuestionContentDTO.setQuestion(replacedNode.getQuestion()); + qaQuestionContentDTO.setDisplayOrder(replacedNode.getDisplayOrder()); + qaQuestionContentDTO.setFeedback(replacedNode.getFeedback()); + } + + if (qaQuestionContentDTO.getDisplayOrder().equals(new Integer(replacedNodeIndex).toString())) + { + logger.debug("placing swapped content2"); + qaQuestionContentDTO.setQuestion(mainNode.getQuestion()); + qaQuestionContentDTO.setDisplayOrder(mainNode.getDisplayOrder()); + qaQuestionContentDTO.setFeedback(mainNode.getFeedback()); + } + */ + + listFinalQuestionContentDTO.add(tempNode); + } + + + + logger.debug("final listFinalQuestionContentDTO:" + listFinalQuestionContentDTO); + return listFinalQuestionContentDTO; + } + + + + + + protected static QaQuestionContentDTO extractNodeAtDisplayOrder(List listQuestionContentDTO, int intOriginalQuestionIndex) + { + logger.debug("listQuestionContentDTO:" + listQuestionContentDTO); + logger.debug("intOriginalQuestionIndex:" + intOriginalQuestionIndex); + + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO=(QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + logger.debug("intOriginalQuestionIndex versus displayOrder:" + new Integer(intOriginalQuestionIndex).toString() + " versus " + + qaQuestionContentDTO.getDisplayOrder()); + if (new Integer(intOriginalQuestionIndex).toString().equals(qaQuestionContentDTO.getDisplayOrder())) + { + logger.debug("node found:" + qaQuestionContentDTO); + return qaQuestionContentDTO; + } + } + return null; + } + + + + protected static Map extractMapQuestionContent(List listQuestionContentDTO) + { + logger.debug("listQuestionContentDTO:" + listQuestionContentDTO); + Map mapQuestionContent= new TreeMap(new QaComparator()); + + Iterator listIterator=listQuestionContentDTO.iterator(); + int queIndex=0; + while (listIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO=(QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + queIndex++; + logger.debug("queIndex:" + queIndex); + mapQuestionContent.put(new Integer(queIndex).toString(), qaQuestionContentDTO.getQuestion()); + } + logger.debug("mapQuestionContent:" + mapQuestionContent); + return mapQuestionContent; + } + + protected static Map extractMapFeedback(List listQuestionContentDTO) + { + logger.debug("listQuestionContentDTO:" + listQuestionContentDTO); + Map mapFeedbackContent= new TreeMap(new QaComparator()); + + Iterator listIterator=listQuestionContentDTO.iterator(); + int queIndex=0; + while (listIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO=(QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO feedback:" + qaQuestionContentDTO.getFeedback()); + + queIndex++; + logger.debug("queIndex:" + queIndex); + mapFeedbackContent.put(new Integer(queIndex).toString(), qaQuestionContentDTO.getFeedback()); + } + logger.debug("mapFeedbackContent:" + mapFeedbackContent); + return mapFeedbackContent; + } + + + + /** * reconstructQuestionContentMapForSubmit(TreeMap mapQuestionContent, HttpServletRequest request) * return void @@ -114,7 +307,7 @@ logger.debug("pre-submit Map:" + mapQuestionContent); logger.debug("pre-submit Map size :" + mapQuestionContent.size()); - repopulateMap(mapQuestionContent, request); + //repopulateMap(mapQuestionContent, request); Map mapFinalQuestionContent = new TreeMap(new QaComparator()); Iterator itMap = mapQuestionContent.entrySet().iterator(); @@ -131,8 +324,184 @@ request.getSession().setAttribute("mapQuestionContent", mapQuestionContent); logger.debug("final mapQuestionContent:" + mapQuestionContent); } + + protected static Map reorderQuestionContentMap(Map mapQuestionContent) + { + logger.debug("reorderQuestionContentMap:" + mapQuestionContent); + + Map mapFinalQuestionContent = new TreeMap(new QaComparator()); + + int queIndex=0; + Iterator itMap = mapQuestionContent.entrySet().iterator(); + while (itMap.hasNext()) { + Map.Entry pairs = (Map.Entry)itMap.next(); + if ((pairs.getValue() != null) && (!pairs.getValue().equals(""))) + { + ++queIndex; + logger.debug("using queIndex:" + queIndex); + mapFinalQuestionContent.put(new Integer(queIndex).toString(), pairs.getValue()); + + } + } + + logger.debug("final mapFinalQuestionContent:" + mapFinalQuestionContent); + return mapFinalQuestionContent; + } + + + protected static List reorderListQuestionContentDTO(List listQuestionContentDTO, String excludeQuestionIndex) + { + logger.debug("reorderListQuestionContentDTO"); + logger.debug("listQuestionContentDTO:" + listQuestionContentDTO); + logger.debug("excludeQuestionIndex:" + excludeQuestionIndex); + + List listFinalQuestionContentDTO=new LinkedList(); + + int queIndex=0; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + String question=qaQuestionContentDTO.getQuestion(); + logger.debug("question:" + question); + + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + logger.debug("displayOrder:" + displayOrder); + + String feedback=qaQuestionContentDTO.getFeedback(); + logger.debug("feedback:" + feedback); + + logger.debug("displayOrder versus excludeQuestionIndex :" + displayOrder + " versus " + excludeQuestionIndex); + + if ((question != null) && (!question.equals(""))) + { + if (!displayOrder.equals(excludeQuestionIndex)) + { + ++queIndex; + logger.debug("using queIndex:" + queIndex); + + qaQuestionContentDTO.setQuestion(question); + qaQuestionContentDTO.setDisplayOrder(new Integer(queIndex).toString()); + qaQuestionContentDTO.setFeedback(feedback); + + listFinalQuestionContentDTO.add(qaQuestionContentDTO); + } + } + } + + + logger.debug("final listFinalQuestionContentDTO:" + listFinalQuestionContentDTO); + return listFinalQuestionContentDTO; + } + + protected static List reorderSimpleListQuestionContentDTO(List listQuestionContentDTO) + { + logger.debug("reorderListQuestionContentDTO"); + logger.debug("listQuestionContentDTO:" + listQuestionContentDTO); + List listFinalQuestionContentDTO=new LinkedList(); + + int queIndex=0; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + String question=qaQuestionContentDTO.getQuestion(); + logger.debug("question:" + question); + + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + logger.debug("displayOrder:" + displayOrder); + + String feedback=qaQuestionContentDTO.getFeedback(); + logger.debug("feedback:" + feedback); + + if ((question != null) && (!question.equals(""))) + { + ++queIndex; + logger.debug("using queIndex:" + queIndex); + + qaQuestionContentDTO.setQuestion(question); + qaQuestionContentDTO.setDisplayOrder(new Integer(queIndex).toString()); + qaQuestionContentDTO.setFeedback(feedback); + + listFinalQuestionContentDTO.add(qaQuestionContentDTO); + } + } + + + logger.debug("final listFinalQuestionContentDTO:" + listFinalQuestionContentDTO); + return listFinalQuestionContentDTO; + } + + + + protected static List reorderUpdateListQuestionContentDTO(List listQuestionContentDTO, + QaQuestionContentDTO qaQuestionContentDTONew, + String editableQuestionIndex) + { + logger.debug("reorderUpdateListQuestionContentDTO"); + logger.debug("listQuestionContentDTO:" + listQuestionContentDTO); + logger.debug("qaQuestionContentDTONew:" + qaQuestionContentDTONew); + logger.debug("editableQuestionIndex:" + editableQuestionIndex); + + + List listFinalQuestionContentDTO=new LinkedList(); + + int queIndex=0; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + ++queIndex; + logger.debug("using queIndex:" + queIndex); + String question=qaQuestionContentDTO.getQuestion(); + logger.debug("question:" + question); + + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + logger.debug("displayOrder:" + displayOrder); + + String feedback=qaQuestionContentDTO.getFeedback(); + logger.debug("feedback:" + feedback); + + if (displayOrder.equals(editableQuestionIndex)) + { + logger.debug("displayOrder equals editableQuestionIndex:" + editableQuestionIndex); + qaQuestionContentDTO.setQuestion(qaQuestionContentDTONew.getQuestion()); + qaQuestionContentDTO.setDisplayOrder(qaQuestionContentDTONew.getDisplayOrder()); + qaQuestionContentDTO.setFeedback(qaQuestionContentDTONew.getFeedback()); + + listFinalQuestionContentDTO.add(qaQuestionContentDTO); + } + else + { + logger.debug("displayOrder does not equal editableQuestionIndex:" + editableQuestionIndex); + qaQuestionContentDTO.setQuestion(question); + qaQuestionContentDTO.setDisplayOrder(displayOrder); + qaQuestionContentDTO.setFeedback(feedback); + + listFinalQuestionContentDTO.add(qaQuestionContentDTO); + + } + + } + + logger.debug("listFinalQuestionContentDTO:" + listFinalQuestionContentDTO); + return listFinalQuestionContentDTO; + } + + + + /** * repopulateMap(TreeMap mapQuestionContent, HttpServletRequest request) * return void @@ -165,7 +534,7 @@ } - public QaContent saveOrUpdateQaContent(Map mapQuestionContent, IQaService qaService, QaAuthoringForm qaAuthoringForm, + public QaContent saveOrUpdateQaContent(Map mapQuestionContent, Map mapFeedback, IQaService qaService, QaAuthoringForm qaAuthoringForm, HttpServletRequest request, QaContent qaContent, String strToolContentID) { UserDTO toolUser = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); @@ -186,8 +555,6 @@ logger.debug("usernameVisible: " + usernameVisible); String questionsSequenced=request.getParameter(QUESTIONS_SEQUENCED); logger.debug("questionsSequenced: " + questionsSequenced); - String reportTitle=request.getParameter(REPORT_TITLE); - String monitoringReportTitle=request.getParameter(MONITORING_REPORT_TITLE); String richTextOfflineInstructions=request.getParameter(OFFLINE_INSTRUCTIONS); String richTextOnlineInstructions=request.getParameter(ONLINE_INSTRUCTIONS); String reflect=request.getParameter(REFLECT); @@ -278,12 +645,10 @@ if (activeModule.equals(AUTHORING)) { logger.debug("setting other content values..."); - qaContent.setQuestionsSequenced(isQuestionsSequenced); /**the default question listing in learner mode will be all in the same page*/ + qaContent.setQuestionsSequenced(isQuestionsSequenced); qaContent.setSynchInMonitor(isSynchInMonitor); qaContent.setOnlineInstructions(richTextOnlineInstructions); qaContent.setOfflineInstructions(richTextOfflineInstructions); - qaContent.setReportTitle(reportTitle); - qaContent.setMonitoringReportTitle(monitoringReportTitle); qaContent.setUsernameVisible(usernameVisibleBoolean); qaContent.setQuestionsSequenced(questionsSequencedBoolean); qaContent.setSynchInMonitor(synchInMonitorBoolean); @@ -306,7 +671,7 @@ qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("qaContent: " + qaContent); - qaContent=createQuestionContent(mapQuestionContent, qaService, qaContent); + qaContent=createQuestionContent(mapQuestionContent, mapFeedback, qaService, qaContent); return qaContent; } @@ -337,32 +702,42 @@ logger.debug("allQuestions: " + allQuestions); Iterator listIterator=allQuestions.iterator(); - Long mapIndex=new Long(1); + int mapIndex=0; boolean entryUsed=false; while (listIterator.hasNext()) { + ++mapIndex; + logger.debug("current mapIndex: " + mapIndex); + QaQueContent queContent=(QaQueContent)listIterator.next(); logger.debug("queContent data: " + queContent); logger.debug("queContent: " + queContent.getQuestion() + " " + queContent.getDisplayOrder()); entryUsed=false; Iterator itMap = mapQuestionContent.entrySet().iterator(); - int diplayOrder=0; + int displayOrder=0; while (itMap.hasNext()) { + ++displayOrder; + logger.debug("current displayOrder: " + displayOrder); entryUsed=false; Map.Entry pairs = (Map.Entry)itMap.next(); logger.debug("using the pair: " + pairs.getKey() + " = " + pairs.getValue()); + if (pairs.getValue().toString().length() != 0) { logger.debug("text from map:" + pairs.getValue().toString()); logger.debug("text from db:" + queContent.getQuestion()); - if (pairs.getValue().toString().equals(queContent.getQuestion())) + + logger.debug("mapIndex versus displayOrder:" + mapIndex + " versus " + displayOrder); + if (mapIndex == displayOrder) { - logger.debug("used entry in db:" + queContent.getQuestion()); + //logger.debug("used entry in db:" + queContent.getQuestion()); + logger.debug("used displayOrder position:" + displayOrder); entryUsed=true; break; } + } } @@ -391,15 +766,19 @@ * * persist the questions in the Map the user has submitted */ - protected QaContent createQuestionContent(Map mapQuestionContent, IQaService qaService, QaContent qaContent) + protected QaContent createQuestionContent(Map mapQuestionContent, Map mapFeedback, IQaService qaService, QaContent qaContent) { + logger.debug("createQuestionContent: "); logger.debug("content uid is: " + qaContent.getUid()); List questions=qaService.retrieveQaQueContentsByToolContentId(qaContent.getUid().longValue()); logger.debug("questions: " + questions); + + logger.debug("mapQuestionContent: " + mapQuestionContent); + logger.debug("mapFeedback: " + mapFeedback); Iterator itMap = mapQuestionContent.entrySet().iterator(); - int diplayOrder=0; + int displayOrder=0; while (itMap.hasNext()) { Map.Entry pairs = (Map.Entry)itMap.next(); @@ -409,39 +788,56 @@ { logger.debug("starting createQuestionContent: pairs.getValue().toString():" + pairs.getValue().toString()); logger.debug("starting createQuestionContent: qaContent: " + qaContent); - logger.debug("starting createQuestionContent: diplayOrder: " + diplayOrder); + ++displayOrder; + logger.debug("starting createQuestionContent: displayOrder: " + displayOrder); + String currentFeedback=(String)mapFeedback.get(new Integer(displayOrder).toString()); + logger.debug("currentFeedback: " + currentFeedback); QaQueContent queContent= new QaQueContent(pairs.getValue().toString(), - ++diplayOrder, + displayOrder, + currentFeedback, qaContent, null, null); + logger.debug("queContent: " + queContent); + /* checks if the question is already recorded*/ logger.debug("question text is: " + pairs.getValue().toString()); logger.debug("content uid is: " + qaContent.getUid()); - logger.debug("question display order is: " + diplayOrder); - QaQueContent existingQaQueContent=qaService.getQuestionContentByDisplayOrder(new Long(diplayOrder), qaContent.getUid()); + logger.debug("question display order is: " + displayOrder); + QaQueContent existingQaQueContent=qaService.getQuestionContentByDisplayOrder(new Long(displayOrder), qaContent.getUid()); logger.debug("existingQaQueContent: " + existingQaQueContent); + if (existingQaQueContent == null) { /*make sure a question with the same question text is not already saved*/ QaQueContent duplicateQaQueContent=qaService.getQuestionContentByQuestionText(pairs.getValue().toString(), qaContent.getUid()); logger.debug("duplicateQaQueContent: " + duplicateQaQueContent); - if (duplicateQaQueContent == null) - { + //if (duplicateQaQueContent == null) + //{ logger.debug("adding a new question to content: " + queContent); qaContent.getQaQueContents().add(queContent); queContent.setQaContent(qaContent); qaService.createQaQue(queContent); - } + //} } else { + + String existingQuestion=existingQaQueContent.getQuestion(); + logger.debug("existingQuestion: " + existingQuestion); + + logger.debug("map question versus existingQuestion: " + pairs.getValue().toString() + + " versus db question value: " + existingQuestion); + existingQaQueContent.setQuestion(pairs.getValue().toString()); + existingQaQueContent.setFeedback(currentFeedback); + existingQaQueContent.setDisplayOrder(displayOrder); + logger.debug("updating the existing question content: " + existingQaQueContent); qaService.updateQaQueContent(existingQaQueContent); } @@ -451,6 +847,34 @@ } + public static boolean checkDuplicateQuestions(List listQuestionContentDTO, String newQuestion) + { + logger.debug("checkDuplicateQuestions: " + listQuestionContentDTO); + logger.debug("newQuestion: " + newQuestion); + + Map mapQuestionContent=extractMapQuestionContent(listQuestionContentDTO); + logger.debug("mapQuestionContent: " + mapQuestionContent); + + Iterator itMap = mapQuestionContent.entrySet().iterator(); + while (itMap.hasNext()) { + Map.Entry pairs = (Map.Entry)itMap.next(); + if ((pairs.getValue() != null) && (!pairs.getValue().equals(""))) + { + logger.debug("checking the pair: " + pairs.getKey() + " = " + pairs.getValue()); + + if (pairs.getValue().equals(newQuestion)) + { + logger.debug("entry found: " + newQuestion); + return true; + } + } + } + return false; + } + + + + /** * sorts the questions by the display order * reOrganizeDisplayOrder(Map mapQuestionContent, IQaService qaService, QaAuthoringForm qaAuthoringForm, QaContent qaContent) @@ -462,25 +886,29 @@ */ public void reOrganizeDisplayOrder(Map mapQuestionContent, IQaService qaService, QaAuthoringForm qaAuthoringForm, QaContent qaContent) { - logger.debug("content uid: " + qaContent.getUid()); - List sortedQuestions=qaService.getAllQuestionEntriesSorted(qaContent.getUid().longValue()); - logger.debug("sortedQuestions: " + sortedQuestions); - - Iterator listIterator=sortedQuestions.iterator(); - int displayOrder=1; - while (listIterator.hasNext()) - { - QaQueContent queContent=(QaQueContent)listIterator.next(); - logger.debug("queContent data: " + queContent); - logger.debug("queContent: " + queContent.getQuestion() + " " + queContent.getDisplayOrder()); - - QaQueContent existingQaQueContent=qaService.getQuestionContentByQuestionText(queContent.getQuestion(), qaContent.getUid()); - logger.debug("existingQaQueContent: " + existingQaQueContent); - existingQaQueContent.setDisplayOrder(displayOrder); - logger.debug("updating the existing question content for displayOrder: " + existingQaQueContent); - qaService.updateQaQueContent(existingQaQueContent); - displayOrder++; - } + logger.debug("qaContent: " + qaContent); + if (qaContent != null) + { + logger.debug("content uid: " + qaContent.getUid()); + List sortedQuestions=qaService.getAllQuestionEntriesSorted(qaContent.getUid().longValue()); + logger.debug("sortedQuestions: " + sortedQuestions); + + Iterator listIterator=sortedQuestions.iterator(); + int displayOrder=1; + while (listIterator.hasNext()) + { + QaQueContent queContent=(QaQueContent)listIterator.next(); + logger.debug("queContent data: " + queContent); + logger.debug("queContent: " + queContent.getQuestion() + " " + queContent.getDisplayOrder()); + + QaQueContent existingQaQueContent=qaService.getQuestionContentByQuestionText(queContent.getQuestion(), qaContent.getUid()); + logger.debug("existingQaQueContent: " + existingQaQueContent); + existingQaQueContent.setDisplayOrder(displayOrder); + logger.debug("updating the existing question content for displayOrder: " + existingQaQueContent); + qaService.updateQaQueContent(existingQaQueContent); + displayOrder++; + } + } logger.debug("done with reOrganizeDisplayOrder..."); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java (.../ClearSessionAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java (.../ClearSessionAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -4,8 +4,8 @@ * 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.0 - * as published by the Free Software Foundation. + * 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 Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -4,8 +4,8 @@ * 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.0 - * as published by the Free Software Foundation. + * 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 Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java (.../LearningUtil.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java (.../LearningUtil.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; @@ -101,6 +102,7 @@ logger.debug("final generalLearnerFlowDTO: " + generalLearnerFlowDTO); Map mapQuestions= new TreeMap(new QaComparator()); + Map mapFeedback= new TreeMap(new QaComparator()); Iterator contentIterator=qaContent.getQaQueContents().iterator(); while (contentIterator.hasNext()) @@ -115,10 +117,14 @@ * add the question to the questions Map in the displayOrder */ mapQuestions.put(new Integer(displayOrder).toString(),qaQueContent.getQuestion()); + mapFeedback.put(new Integer(displayOrder).toString(),qaQueContent.getFeedback()); } } } + logger.debug("mapFeedback: " + mapFeedback); + + generalLearnerFlowDTO.setMapFeedback(mapFeedback); generalLearnerFlowDTO.setMapQuestionContentLearner(mapQuestions); return generalLearnerFlowDTO; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; @@ -31,13 +32,16 @@ import javax.servlet.http.HttpServletRequest; 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.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaMonitoredAnswersDTO; import org.lamsfoundation.lams.tool.qa.QaMonitoredUserDTO; import org.lamsfoundation.lams.tool.qa.QaQueContent; import org.lamsfoundation.lams.tool.qa.QaQueUsr; import org.lamsfoundation.lams.tool.qa.QaSession; +import org.lamsfoundation.lams.tool.qa.QaStatsDTO; import org.lamsfoundation.lams.tool.qa.QaStringComparator; import org.lamsfoundation.lams.tool.qa.QaUsrResp; import org.lamsfoundation.lams.tool.qa.QaUtils; @@ -597,6 +601,101 @@ } return map; } + + + + public static boolean notebookEntriesExist(IQaService qaService, QaContent qaContent) + { + logger.debug("finding out about content level notebook entries: " + qaContent); + Iterator iteratorSession= qaContent.getQaSessions().iterator(); + while (iteratorSession.hasNext()) + { + QaSession qaSession=(QaSession) iteratorSession.next(); + logger.debug("qaSession: " + qaSession); + + if (qaSession != null) + { + logger.debug("qaSession id: " + qaSession.getQaSessionId()); + + Iterator iteratorUser=qaSession.getQaQueUsers().iterator(); + while (iteratorUser.hasNext()) + { + QaQueUsr qaQueUsr=(QaQueUsr) iteratorUser.next(); + logger.debug("qaQueUsr: " + qaQueUsr); + + if (qaQueUsr != null) + { + logger.debug("qaQueUsr id: " + qaQueUsr.getQueUsrId()); + + logger.debug("attempt getting notebookEntry: "); + NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), + CoreNotebookConstants.NOTEBOOK_TOOL, + MY_SIGNATURE, new Integer(qaQueUsr.getQueUsrId().intValue())); + + logger.debug("notebookEntry: " + notebookEntry); + if (notebookEntry != null) + { + logger.debug("found at least one notebookEntry: " + notebookEntry.getEntry()); + return true; + } + + } + } + } + } + return false; + } + + + public static void buildQaStatsDTO(HttpServletRequest request, IQaService qaService, QaContent qaContent) + { + logger.debug("building qaStatsDTO: " + qaContent); + QaStatsDTO qaStatsDTO= new QaStatsDTO(); + + int countSessionComplete=0; + int countAllUsers=0; + logger.debug("finding out about content level notebook entries: " + qaContent); + Iterator iteratorSession= qaContent.getQaSessions().iterator(); + while (iteratorSession.hasNext()) + { + QaSession qaSession=(QaSession) iteratorSession.next(); + logger.debug("qaSession: " + qaSession); + + if (qaSession != null) + { + logger.debug("qaSession id: " + qaSession.getQaSessionId()); + + if (qaSession.getSession_status().equals(COMPLETED)) + { + ++countSessionComplete; + } + + Iterator iteratorUser=qaSession.getQaQueUsers().iterator(); + while (iteratorUser.hasNext()) + { + QaQueUsr qaQueUsr=(QaQueUsr) iteratorUser.next(); + logger.debug("qaQueUsr: " + qaQueUsr); + + if (qaQueUsr != null) + { + logger.debug("qaQueUsr foundid"); + ++countAllUsers; + } + } + } + } + logger.debug("countAllUsers: " + countAllUsers); + logger.debug("countSessionComplete: " + countSessionComplete); + + + qaStatsDTO.setCountAllUsers(new Integer(countAllUsers).toString()); + qaStatsDTO.setCountSessionComplete(new Integer(countSessionComplete).toString()); + + logger.debug("qaStatsDTO: " + qaStatsDTO); + + request.setAttribute(QA_STATS_DTO, qaStatsDTO); + } + } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,14 +18,17 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -51,6 +54,8 @@ import org.lamsfoundation.lams.tool.qa.QaApplicationException; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaGeneralAuthoringDTO; +import org.lamsfoundation.lams.tool.qa.QaQueContent; +import org.lamsfoundation.lams.tool.qa.QaQuestionContentDTO; import org.lamsfoundation.lams.tool.qa.QaUploadedFile; import org.lamsfoundation.lams.tool.qa.QaUtils; import org.lamsfoundation.lams.tool.qa.service.IQaService; @@ -118,7 +123,20 @@ path="/authoring/AuthoringTabsHolder.jsp" redirect="false" /> - + + + + + + 0) + Map mapFeedback=AuthoringUtil.extractMapFeedback(listQuestionContentDTO); + logger.debug("extracted mapFeedback: " + mapFeedback); + + ActionMessages errors = new ActionMessages(); + logger.debug("mapQuestionContent size: " + mapQuestionContent.size()); + + if (mapQuestionContent.size() == 0) { - logger.debug("returning back to from to fix errors:"); - //qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); - return (mapping.findForward(LOAD_QUESTIONS)); + ActionMessage error = new ActionMessage("questions.none.submitted"); + errors.add(ActionMessages.GLOBAL_MESSAGE, error); } - */ - - - List attachmentListBackup= new ArrayList(); - List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); - logger.debug("attachmentList: " + attachmentList); - attachmentListBackup=attachmentList; + logger.debug("errors: " + errors); - List deletedAttachmentListBackup= new ArrayList(); - List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); - logger.debug("deletedAttachmentList: " + deletedAttachmentList); - deletedAttachmentListBackup=deletedAttachmentList; - AuthoringUtil authoringUtil= new AuthoringUtil(); - authoringUtil.reconstructQuestionContentMapForSubmit(mapQuestionContent, request); - logger.debug("before saveOrUpdateQaContent." + mapQuestionContent); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + List attachmentListBackup= new ArrayList(); + List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); + logger.debug("attachmentList: " + attachmentList); + attachmentListBackup=attachmentList; + + List deletedAttachmentListBackup= new ArrayList(); + List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); + logger.debug("deletedAttachmentList: " + deletedAttachmentList); + deletedAttachmentListBackup=deletedAttachmentList; + + String onlineInstructions=(String)sessionMap.get(ONLINE_INSTRUCTIONS_KEY); + logger.debug("onlineInstructions: " + onlineInstructions); + qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); + + String offlineInstructions=(String)sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); + logger.debug("offlineInstructions: " + offlineInstructions); + qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); + + qaGeneralAuthoringDTO.setAttachmentList(attachmentList); + qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList); + + String strOnlineInstructions= request.getParameter("onlineInstructions"); + String strOfflineInstructions= request.getParameter("offlineInstructions"); + logger.debug("onlineInstructions: " + strOnlineInstructions); + logger.debug("offlineInstructions: " + strOfflineInstructions); + qaAuthoringForm.setOfflineInstructions(strOfflineInstructions); + qaAuthoringForm.setOnlineInstructions(strOnlineInstructions); + + } + + + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + String richTextTitle = request.getParameter(TITLE); String richTextInstructions = request.getParameter(INSTRUCTIONS); logger.debug("richTextTitle: " + richTextTitle); logger.debug("richTextInstructions: " + richTextInstructions); qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); - - String onlineInstructions=(String)sessionMap.get(ONLINE_INSTRUCTIONS_KEY); - logger.debug("onlineInstructions: " + onlineInstructions); - qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); - - String offlineInstructions=(String)sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); - logger.debug("offlineInstructions: " + offlineInstructions); - qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); - qaGeneralAuthoringDTO.setAttachmentList(attachmentList); - qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList); - - String defaultQuestionContent=request.getParameter("questionContent0"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - - String reportTitle=request.getParameter(REPORT_TITLE); - logger.debug("reportTitle: " + reportTitle); - qaAuthoringForm.setReportTitle(reportTitle); - qaGeneralAuthoringDTO.setReportTitle(reportTitle); - - String monitoringReportTitle=request.getParameter(MONITORING_REPORT_TITLE); - logger.debug("monitoringReportTitle: " + monitoringReportTitle); - qaAuthoringForm.setMonitoringReportTitle(monitoringReportTitle); - qaGeneralAuthoringDTO.setMonitoringReportTitle(monitoringReportTitle); - - String endLearningMessage=request.getParameter(END_LEARNING_MESSSAGE); - logger.debug("endLearningMessage: " + endLearningMessage); - qaAuthoringForm.setEndLearningMessage(endLearningMessage); - qaGeneralAuthoringDTO.setEndLearningMessage(endLearningMessage); - - logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - - boolean verifyDuplicatesOptionsMap=AuthoringUtil.verifyDuplicatesOptionsMap(mapQuestionContent); - logger.debug("verifyDuplicatesOptionsMap: " + verifyDuplicatesOptionsMap); - - if (verifyDuplicatesOptionsMap == false) - { - errors= new ActionMessages(); - errors.add(Globals.ERROR_KEY,new ActionMessage("error.questions.duplicate")); - saveErrors(request,errors); - qaGeneralAuthoringDTO.setUserExceptionQuestionsDuplicate(new Boolean(true).toString()); - - logger.debug("error: qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); - request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - - qaAuthoringForm.resetUserAction(); - logger.debug("going back to form to fix error: " + LOAD_QUESTIONS); - return (mapping.findForward(LOAD_QUESTIONS)); - } - - logger.debug("there are no issues with input, continue and submit data"); - /*to remove deleted entries in the questions table based on mapQuestionContent */ - authoringUtil.removeRedundantQuestions(mapQuestionContent, qaService, qaAuthoringForm, request, strToolContentID); - logger.debug("end of removing unused entries... "); QaContent qaContentTest=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("qaContentTest: " + qaContentTest); - QaContent qaContent=authoringUtil.saveOrUpdateQaContent(mapQuestionContent, qaService, qaAuthoringForm, - request, qaContentTest, strToolContentID); - logger.debug("qaContent: " + qaContent); - - qaGeneralAuthoringDTO= QaUtils.buildGeneralAuthoringDTO(request, qaService, qaContent, qaAuthoringForm); - logger.debug("updated qaGeneralAuthoringDTO to: " + qaGeneralAuthoringDTO); - - authoringUtil.reOrganizeDisplayOrder(mapQuestionContent, qaService, qaAuthoringForm, qaContent); + logger.debug("errors: " + errors); + if(!errors.isEmpty()){ + saveErrors(request, errors); + logger.debug("errors saved: " + errors); + } + - logger.debug("activeModule: " + activeModule); - if (activeModule.equals(AUTHORING)) - { - List attacments=saveAttachments(qaContent, attachmentList, deletedAttachmentList, mapping, request); - logger.debug("attacments: " + attacments); - } + QaContent qaContent=qaContentTest; + if(errors.isEmpty()){ + logger.debug("errors is empty: " + errors); + /*to remove deleted entries in the questions table based on mapQuestionContent */ + authoringUtil.removeRedundantQuestions(mapQuestionContent, qaService, qaAuthoringForm, request, strToolContentID); + logger.debug("end of removing unused entries... "); - errors.clear(); - errors.add(Globals.ERROR_KEY, new ActionMessage("submit.successful")); + qaContent=authoringUtil.saveOrUpdateQaContent(mapQuestionContent, mapFeedback, qaService, qaAuthoringForm, request, qaContentTest, strToolContentID); + logger.debug("qaContent: " + qaContent); + + + long defaultContentID=0; + logger.debug("attempt retrieving tool with signatute : " + MY_SIGNATURE); + defaultContentID=qaService.getToolDefaultContentIdBySignature(MY_SIGNATURE); + logger.debug("retrieved tool default contentId: " + defaultContentID); + + if (qaContent != null) + { + qaGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString()); + } + logger.debug("updated qaGeneralAuthoringDTO to: " + qaGeneralAuthoringDTO); + + authoringUtil.reOrganizeDisplayOrder(mapQuestionContent, qaService, qaAuthoringForm, qaContent); + + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + + List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); + logger.debug("attachmentList: " + attachmentList); + + List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); + + List attachments=saveAttachments(qaContent, attachmentList, deletedAttachmentList, mapping, request); + logger.debug("attachments: " + attachments); + } + + logger.debug("strToolContentID: " + strToolContentID); + QaUtils.setDefineLater(request, false, strToolContentID, qaService); + logger.debug("define later set to false"); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + if (activeModule.equals(AUTHORING)) + { + logger.debug("standard authoring close"); + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE); + qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + } + else + { + logger.debug("go back to view only screen"); + qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); + } + + } + else + { + logger.debug("errors is not empty: " + errors); + + if (qaContent != null) + { + long defaultContentID=0; + logger.debug("attempt retrieving tool with signatute : " + MY_SIGNATURE); + defaultContentID=qaService.getToolDefaultContentIdBySignature(MY_SIGNATURE); + logger.debug("retrieved tool default contentId: " + defaultContentID); + + if (qaContent != null) + { + qaGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString()); + } + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + } + } + + qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(1).toString()); - logger.debug("setting SUBMIT_SUCCESS to 1."); - - logger.debug("strToolContentID: " + strToolContentID); - QaUtils.setDefineLater(request, false, strToolContentID, qaService); - - saveErrors(request,errors); - - QaUtils.setDefineLater(request, false, qaService, strToolContentID); - logger.debug("define later set to false"); - qaAuthoringForm.resetUserAction(); - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); - QaUtils.setFormProperties(request, qaService, qaContent, - qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); - - - qaGeneralAuthoringDTO.setAttachmentList(attachmentListBackup); - qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentListBackup); - - defaultQuestionContent=request.getParameter("questionContent0"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - - - logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE); + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + request.getSession().setAttribute(httpSessionID, sessionMap); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("1"); + + logger.debug("forwarding to :" + LOAD_QUESTIONS); return mapping.findForward(LOAD_QUESTIONS); } /** - * adds a new question to the questions map - * ActionForward addNewQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException - * + * saveSingleQuestion * @param mapping * @param form * @param request @@ -375,12 +430,12 @@ * @throws IOException * @throws ServletException */ - public ActionForward addNewQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - - logger.debug("dispathcing addNewQuestion"); - QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; - + public ActionForward saveSingleQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + + logger.debug("dispathcing saveSingleQuestion"); + QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); logger.debug("qaService: " + qaService); @@ -389,73 +444,398 @@ SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); logger.debug("sessionMap: " + sessionMap); - + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + String activeModule=request.getParameter(ACTIVE_MODULE); logger.debug("activeModule: " + activeModule); - + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); logger.debug("strToolContentID: " + strToolContentID); String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); logger.debug("defaultContentIdStr: " + defaultContentIdStr); + String editQuestionBoxRequest=request.getParameter("editQuestionBoxRequest"); + logger.debug("editQuestionBoxRequest: " + editQuestionBoxRequest); + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("qaContent: " + qaContent); + /* if (qaContent == null) { logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); } - logger.debug("final qaContent: " + qaContent); - - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= QaUtils.buildGeneralAuthoringDTO(request, qaService, qaContent, qaAuthoringForm); + */ + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString()); - AuthoringUtil authoringUtil= new AuthoringUtil(); + AuthoringUtil authoringUtil= new AuthoringUtil(); + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); - Map mapQuestionContent=(Map)sessionMap.get(MAP_QUESTION_CONTENT_KEY); - logger.debug("mapQuestionContent: " + mapQuestionContent); - logger.debug("mapQuestionContent size: " + mapQuestionContent.size()); - String richTextTitle = request.getParameter(TITLE); - String richTextInstructions = request.getParameter(INSTRUCTIONS); + String newQuestion=request.getParameter("newQuestion"); + logger.debug("newQuestion: " + newQuestion); + + String feedback=request.getParameter("feedback"); + logger.debug("feedback: " + feedback); - logger.debug("richTextTitle: " + richTextTitle); - logger.debug("richTextInstructions: " + richTextInstructions); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - - sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); - sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + String editableQuestionIndex=request.getParameter("editableQuestionIndex"); + logger.debug("editableQuestionIndex: " + editableQuestionIndex); + - String defaultQuestionContent=request.getParameter("questionContent0"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - - - String onlineInstructions=(String)sessionMap.get(ONLINE_INSTRUCTIONS_KEY); - logger.debug("onlineInstructions: " + onlineInstructions); - qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); + if ((newQuestion != null) && (newQuestion.length() > 0)) + { + if ((editQuestionBoxRequest != null) && (editQuestionBoxRequest.equals("false"))) + { + logger.debug("request for add and save"); + boolean duplicates=AuthoringUtil.checkDuplicateQuestions(listQuestionContentDTO, newQuestion); + logger.debug("duplicates: " + duplicates); + + if (!duplicates) + { + QaQuestionContentDTO qaQuestionContentDTO= null; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + String question=qaQuestionContentDTO.getQuestion(); + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + logger.debug("displayOrder:" + displayOrder); + + if ((displayOrder != null) && (!displayOrder.equals(""))) + { + if (displayOrder.equals(editableQuestionIndex)) + { + break; + } + + } + } + logger.debug("qaQuestionContentDTO found:" + qaQuestionContentDTO); + + qaQuestionContentDTO.setQuestion(newQuestion); + qaQuestionContentDTO.setFeedback(feedback); + qaQuestionContentDTO.setDisplayOrder(editableQuestionIndex); + + listQuestionContentDTO=AuthoringUtil.reorderUpdateListQuestionContentDTO(listQuestionContentDTO, qaQuestionContentDTO, editableQuestionIndex); + logger.debug("post reorderUpdateListQuestionContentDTO listQuestionContentDTO: " + listQuestionContentDTO); + } + else + { + logger.debug("duplicate question entry, not adding"); + } + } + else + { + logger.debug("request for edit and save."); + QaQuestionContentDTO qaQuestionContentDTO= null; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + String question=qaQuestionContentDTO.getQuestion(); + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + logger.debug("displayOrder:" + displayOrder); + + if ((displayOrder != null) && (!displayOrder.equals(""))) + { + if (displayOrder.equals(editableQuestionIndex)) + { + break; + } + + } + } + logger.debug("qaQuestionContentDTO found:" + qaQuestionContentDTO); + + qaQuestionContentDTO.setQuestion(newQuestion); + qaQuestionContentDTO.setFeedback(feedback); + qaQuestionContentDTO.setDisplayOrder(editableQuestionIndex); + + listQuestionContentDTO=AuthoringUtil.reorderUpdateListQuestionContentDTO(listQuestionContentDTO, qaQuestionContentDTO, editableQuestionIndex); + logger.debug("post reorderUpdateListQuestionContentDTO listQuestionContentDTO: " + listQuestionContentDTO); + } + } + else + { + logger.debug("entry blank, not adding"); + } + + + - String offlineInstructions=(String)sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); - logger.debug("offlineInstructions: " + offlineInstructions); - qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + logger.debug("listQuestionContentDTO now: " + listQuestionContentDTO); + + + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + String onlineInstructions=(String)sessionMap.get(ONLINE_INSTRUCTIONS_KEY); + logger.debug("onlineInstructions: " + onlineInstructions); + qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); + + String offlineInstructions=(String)sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); + logger.debug("offlineInstructions: " + offlineInstructions); + qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); + + List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); + logger.debug("attachmentList: " + attachmentList); + + List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); + logger.debug("deletedAttachmentList: " + deletedAttachmentList); + + qaGeneralAuthoringDTO.setAttachmentList(attachmentList); + qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList); + + String strOnlineInstructions= request.getParameter("onlineInstructions"); + String strOfflineInstructions= request.getParameter("offlineInstructions"); + logger.debug("onlineInstructions: " + strOnlineInstructions); + logger.debug("offlineInstructions: " + strOfflineInstructions); + qaAuthoringForm.setOnlineInstructions(strOnlineInstructions); + qaAuthoringForm.setOfflineInstructions(strOfflineInstructions); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + } + + + qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + + request.getSession().setAttribute(httpSessionID, sessionMap); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("1"); + + qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + + logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + logger.debug("httpSessionID: " + httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + request.getSession().setAttribute(httpSessionID, sessionMap); + logger.debug("qaGeneralAuthoringDTO.getMapQuestionContent(); " + qaGeneralAuthoringDTO.getMapQuestionContent()); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + + logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); + return (mapping.findForward(LOAD_QUESTIONS)); + } + + + + /** + * addSingleQuestion + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws IOException + * @throws ServletException + */ + public ActionForward addSingleQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + + logger.debug("dispathcing addSingleQuestion"); + QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=qaAuthoringForm.getHttpSessionID(); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + /* + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + */ + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString()); + + AuthoringUtil authoringUtil= new AuthoringUtil(); + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); - authoringUtil.reconstructQuestionContentMapForAdd(mapQuestionContent, qaGeneralAuthoringDTO, request); - - sessionMap.put(MAP_QUESTION_CONTENT_KEY, mapQuestionContent); - request.getSession().setAttribute(httpSessionID, sessionMap); - - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); + String newQuestion=request.getParameter("newQuestion"); + logger.debug("newQuestion: " + newQuestion); + + String feedback=request.getParameter("feedback"); + logger.debug("feedback: " + feedback); + + + int listSize=listQuestionContentDTO.size(); + logger.debug("listSize: " + listSize); + + if ((newQuestion != null) && (newQuestion.length() > 0)) + { + boolean duplicates=AuthoringUtil.checkDuplicateQuestions(listQuestionContentDTO, newQuestion); + logger.debug("duplicates: " + duplicates); + + if (!duplicates) + { + QaQuestionContentDTO qaQuestionContentDTO=new QaQuestionContentDTO(); + qaQuestionContentDTO.setDisplayOrder(new Long(listSize+1).toString()); + qaQuestionContentDTO.setFeedback(feedback); + qaQuestionContentDTO.setQuestion(newQuestion); + + listQuestionContentDTO.add(qaQuestionContentDTO); + logger.debug("updated listQuestionContentDTO: " + listQuestionContentDTO); + } + else + { + logger.debug("entry duplicate, not adding"); + /* + ActionMessages errors = new ActionMessages(); + ActionMessage error = new ActionMessage("question.duplicate"); + errors.add(ActionMessages.GLOBAL_MESSAGE, error); + saveErrors(request, errors); + logger.debug("errors saved: " + errors); + */ + } + } + else + { + logger.debug("entry blank, not adding"); + /* + ActionMessages errors = new ActionMessages(); + ActionMessage error = new ActionMessage("question.blank"); + errors.add(ActionMessages.GLOBAL_MESSAGE, error); + saveErrors(request, errors); + logger.debug("errors saved: " + errors); + */ + } + + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + String onlineInstructions=(String)sessionMap.get(ONLINE_INSTRUCTIONS_KEY); + logger.debug("onlineInstructions: " + onlineInstructions); + qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); - QaUtils.setFormProperties(request, qaService, qaContent, - qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + String offlineInstructions=(String)sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); + logger.debug("offlineInstructions: " + offlineInstructions); + qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); + + List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); + logger.debug("attachmentList: " + attachmentList); + + List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); + logger.debug("deletedAttachmentList: " + deletedAttachmentList); + + qaGeneralAuthoringDTO.setAttachmentList(attachmentList); + qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList); + + String strOnlineInstructions= request.getParameter("onlineInstructions"); + String strOfflineInstructions= request.getParameter("offlineInstructions"); + logger.debug("onlineInstructions: " + strOnlineInstructions); + logger.debug("offlineInstructions: " + strOfflineInstructions); + qaAuthoringForm.setOnlineInstructions(strOnlineInstructions); + qaAuthoringForm.setOfflineInstructions(strOfflineInstructions); + } + + qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + request.getSession().setAttribute(httpSessionID, sessionMap); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); @@ -468,22 +848,256 @@ qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); qaAuthoringForm.setCurrentTab("1"); + qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + + logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + logger.debug("httpSessionID: " + httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + request.getSession().setAttribute(httpSessionID, sessionMap); - List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); - logger.debug("attachmentList: " + attachmentList); + logger.debug("qaGeneralAuthoringDTO.getMapQuestionContent(); " + qaGeneralAuthoringDTO.getMapQuestionContent()); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + - List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); - logger.debug("deletedAttachmentList: " + deletedAttachmentList); + logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); + return (mapping.findForward(LOAD_QUESTIONS)); + } + + /** + * opens up an new screen within the current page for adding a new question + * newQuestionBox + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws IOException + * @throws ServletException + */ + public ActionForward newQuestionBox(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException + { + logger.debug("dispathcing newQuestionBox"); + QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=qaAuthoringForm.getHttpSessionID(); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); - qaGeneralAuthoringDTO.setAttachmentList(attachmentList); - qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList); + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + /* + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + */ + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + String strOnlineInstructions= request.getParameter("onlineInstructions"); + String strOfflineInstructions= request.getParameter("offlineInstructions"); + logger.debug("onlineInstructions: " + strOnlineInstructions); + logger.debug("offlineInstructions: " + strOnlineInstructions); + qaAuthoringForm.setOnlineInstructions(strOnlineInstructions); + qaAuthoringForm.setOfflineInstructions(strOfflineInstructions); + } + + + qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); - return (mapping.findForward(LOAD_QUESTIONS)); + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + logger.debug("fwd ing to newQuestionBox: "); + return (mapping.findForward("newQuestionBox")); } + + + /** + * opens up an new screen within the current page for editing a question + * newEditableQuestionBox + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws IOException + * @throws ServletException + */ + public ActionForward newEditableQuestionBox(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException + { + logger.debug("dispathcing newEditableQuestionBox"); + QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=qaAuthoringForm.getHttpSessionID(); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + + String questionIndex=request.getParameter("questionIndex"); + logger.debug("questionIndex: " + questionIndex); + + qaAuthoringForm.setEditableQuestionIndex(questionIndex); + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + String editableQuestion=""; + String editableFeedback=""; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + String question=qaQuestionContentDTO.getQuestion(); + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + + if ((displayOrder != null) && (!displayOrder.equals(""))) + { + if (displayOrder.equals(questionIndex)) + { + editableFeedback=qaQuestionContentDTO.getFeedback(); + editableQuestion=qaQuestionContentDTO.getQuestion(); + logger.debug("editableFeedback found :" + editableFeedback); + break; + } + + } + } + logger.debug("editableFeedback found :" + editableFeedback); + logger.debug("editableQuestion found :" + editableQuestion); + + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + /* + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + */ + + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + qaGeneralAuthoringDTO.setEditableQuestionText(editableQuestion); + qaGeneralAuthoringDTO.setEditableQuestionFeedback (editableFeedback); + qaAuthoringForm.setFeedback(editableFeedback); + + qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + + logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + String strOnlineInstructions= request.getParameter("onlineInstructions"); + String strOfflineInstructions= request.getParameter("offlineInstructions"); + logger.debug("onlineInstructions: " + strOnlineInstructions); + logger.debug("offlineInstructions: " + strOnlineInstructions); + qaAuthoringForm.setOnlineInstructions(strOnlineInstructions); + qaAuthoringForm.setOfflineInstructions(strOfflineInstructions); + } + + logger.debug("fwd ing to editQuestionBox: "); + return (mapping.findForward("editQuestionBox")); + } + /** @@ -513,6 +1127,51 @@ SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); logger.debug("sessionMap: " + sessionMap); + String questionIndex=request.getParameter("questionIndex"); + logger.debug("questionIndex: " + questionIndex); + + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + QaQuestionContentDTO qaQuestionContentDTO= null; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + String question=qaQuestionContentDTO.getQuestion(); + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + logger.debug("displayOrder:" + displayOrder); + + if ((displayOrder != null) && (!displayOrder.equals(""))) + { + if (displayOrder.equals(questionIndex)) + { + break; + } + + } + } + + logger.debug("qaQuestionContentDTO found:" + qaQuestionContentDTO); + qaQuestionContentDTO.setQuestion(""); + logger.debug("listQuestionContentDTO after remove:" + listQuestionContentDTO); + + + listQuestionContentDTO=AuthoringUtil.reorderListQuestionContentDTO(listQuestionContentDTO, questionIndex ); + logger.debug("listQuestionContentDTO reordered:" + listQuestionContentDTO); + + + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + String activeModule=request.getParameter(ACTIVE_MODULE); logger.debug("activeModule: " + activeModule); @@ -543,40 +1202,50 @@ } logger.debug("final qaContent: " + qaContent); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= QaUtils.buildGeneralAuthoringDTO(request, qaService, qaContent, qaAuthoringForm); + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - String defaultQuestionContent=request.getParameter("questionContent0"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - - String onlineInstructions=(String)sessionMap.get(ONLINE_INSTRUCTIONS_KEY); - logger.debug("onlineInstructions: " + onlineInstructions); - qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + String onlineInstructions=(String)sessionMap.get(ONLINE_INSTRUCTIONS_KEY); + logger.debug("onlineInstructions: " + onlineInstructions); + qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); - String offlineInstructions=(String)sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); - logger.debug("offlineInstructions: " + offlineInstructions); - qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); + String offlineInstructions=(String)sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); + logger.debug("offlineInstructions: " + offlineInstructions); + qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); + + + List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); + logger.debug("attachmentList: " + attachmentList); + List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); + logger.debug("deletedAttachmentList: " + deletedAttachmentList); + + qaGeneralAuthoringDTO.setAttachmentList(attachmentList); + qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList); + + String strOnlineInstructions= request.getParameter("onlineInstructions"); + String strOfflineInstructions= request.getParameter("offlineInstructions"); + logger.debug("onlineInstructions: " + strOnlineInstructions); + logger.debug("offlineInstructions: " + strOnlineInstructions); + qaAuthoringForm.setOnlineInstructions(strOnlineInstructions); + qaAuthoringForm.setOfflineInstructions(strOfflineInstructions); + } AuthoringUtil authoringUtil= new AuthoringUtil(); - Map mapQuestionContent=(Map)sessionMap.get(MAP_QUESTION_CONTENT_KEY); - logger.debug("mapQuestionContent: " + mapQuestionContent); - logger.debug("mapQuestionContent size: " + mapQuestionContent.size()); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); - mapQuestionContent=authoringUtil.reconstructQuestionContentMapForRemove(mapQuestionContent, request, qaAuthoringForm, activeModule); - logger.debug("final mapQuestionContent: " + mapQuestionContent); - sessionMap.put(MAP_QUESTION_CONTENT_KEY, mapQuestionContent); request.getSession().setAttribute(httpSessionID, sessionMap); - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); - QaUtils.setFormProperties(request, qaService, qaContent, + QaUtils.setFormProperties(request, qaService, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); @@ -590,24 +1259,325 @@ qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); qaAuthoringForm.setCurrentTab("1"); - List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); - logger.debug("attachmentList: " + attachmentList); - List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); - logger.debug("deletedAttachmentList: " + deletedAttachmentList); + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + logger.debug("qaQuestionContentDTO now: " + qaQuestionContentDTO); + logger.debug("listQuestionContentDTO now: " + listQuestionContentDTO); + + qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + + logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - qaGeneralAuthoringDTO.setAttachmentList(attachmentList); - qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList); + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); + return (mapping.findForward(LOAD_QUESTIONS)); + } + + + /** + * moves a question down in the list + * moveQuestionDown + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws IOException + * @throws ServletException + */ + public ActionForward moveQuestionDown(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + logger.debug("dispatching moveQuestionDown"); + QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=qaAuthoringForm.getHttpSessionID(); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String questionIndex=request.getParameter("questionIndex"); + logger.debug("questionIndex: " + questionIndex); + + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + listQuestionContentDTO=AuthoringUtil.swapNodes(listQuestionContentDTO, questionIndex, "down"); + logger.debug("listQuestionContentDTO after swap: " + listQuestionContentDTO); + + listQuestionContentDTO=AuthoringUtil.reorderSimpleListQuestionContentDTO(listQuestionContentDTO); + logger.debug("listQuestionContentDTO after reordersimple: " + listQuestionContentDTO); + + + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String richTextTitle = request.getParameter(TITLE); + logger.debug("richTextTitle: " + richTextTitle); + + String richTextInstructions = request.getParameter(INSTRUCTIONS); + logger.debug("richTextInstructions: " + richTextInstructions); + + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + /* + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + */ + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + String onlineInstructions=(String)sessionMap.get(ONLINE_INSTRUCTIONS_KEY); + logger.debug("onlineInstructions: " + onlineInstructions); + qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); + + String offlineInstructions=(String)sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); + logger.debug("offlineInstructions: " + offlineInstructions); + qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); + + List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); + logger.debug("attachmentList: " + attachmentList); + List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); + logger.debug("deletedAttachmentList: " + deletedAttachmentList); + + qaGeneralAuthoringDTO.setAttachmentList(attachmentList); + qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList); + + String strOnlineInstructions= request.getParameter("onlineInstructions"); + String strOfflineInstructions= request.getParameter("offlineInstructions"); + logger.debug("onlineInstructions: " + strOnlineInstructions); + logger.debug("offlineInstructions: " + strOnlineInstructions); + qaAuthoringForm.setOnlineInstructions(strOnlineInstructions); + qaAuthoringForm.setOfflineInstructions(strOfflineInstructions); + } + + AuthoringUtil authoringUtil= new AuthoringUtil(); + + qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + + request.getSession().setAttribute(httpSessionID, sessionMap); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("1"); + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + logger.debug("listQuestionContentDTO now: " + listQuestionContentDTO); + + qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); - - return (mapping.findForward(LOAD_QUESTIONS)); + return (mapping.findForward(LOAD_QUESTIONS)); } /** + * moves a question up in the list + * moveQuestionUp + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws IOException + * @throws ServletException + */ + public ActionForward moveQuestionUp(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + logger.debug("dispatching moveQuestionUp"); + QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=qaAuthoringForm.getHttpSessionID(); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String questionIndex=request.getParameter("questionIndex"); + logger.debug("questionIndex: " + questionIndex); + + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + listQuestionContentDTO=AuthoringUtil.swapNodes(listQuestionContentDTO, questionIndex, "up"); + logger.debug("listQuestionContentDTO after swap: " + listQuestionContentDTO); + + listQuestionContentDTO=AuthoringUtil.reorderSimpleListQuestionContentDTO(listQuestionContentDTO); + logger.debug("listQuestionContentDTO after reordersimple: " + listQuestionContentDTO); + + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String richTextTitle = request.getParameter(TITLE); + logger.debug("richTextTitle: " + richTextTitle); + + String richTextInstructions = request.getParameter(INSTRUCTIONS); + logger.debug("richTextInstructions: " + richTextInstructions); + + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + /* + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + */ + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + String onlineInstructions=(String)sessionMap.get(ONLINE_INSTRUCTIONS_KEY); + logger.debug("onlineInstructions: " + onlineInstructions); + qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); + + String offlineInstructions=(String)sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); + logger.debug("offlineInstructions: " + offlineInstructions); + qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); + + List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); + logger.debug("attachmentList: " + attachmentList); + List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); + logger.debug("deletedAttachmentList: " + deletedAttachmentList); + + qaGeneralAuthoringDTO.setAttachmentList(attachmentList); + qaGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList); + + String strOnlineInstructions= request.getParameter("onlineInstructions"); + String strOfflineInstructions= request.getParameter("offlineInstructions"); + logger.debug("onlineInstructions: " + strOnlineInstructions); + logger.debug("offlineInstructions: " + strOnlineInstructions); + qaAuthoringForm.setOnlineInstructions(strOnlineInstructions); + qaAuthoringForm.setOfflineInstructions(strOfflineInstructions); + } + + AuthoringUtil authoringUtil= new AuthoringUtil(); + + qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + + request.getSession().setAttribute(httpSessionID, sessionMap); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("1"); + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + logger.debug("listQuestionContentDTO now: " + listQuestionContentDTO); + + qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + + logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + + logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); + return (mapping.findForward(LOAD_QUESTIONS)); + } + + + + /** * adds a new file to content repository * ActionForward addNewFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException @@ -633,7 +1603,12 @@ SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); logger.debug("sessionMap: " + sessionMap); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + String activeModule=request.getParameter(ACTIVE_MODULE); logger.debug("activeModule: " + activeModule); @@ -646,7 +1621,11 @@ sessionMap.put(ONLINE_INSTRUCTIONS_KEY, onlineInstructions); sessionMap.put(OFFLINE_INSTRUCTIONS, offlineInstructions); - + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); logger.debug("strToolContentID: " + strToolContentID); @@ -655,42 +1634,39 @@ QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("qaContent: " + qaContent); - + + /* if (qaContent == null) { logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); } logger.debug("final qaContent: " + qaContent); + */ - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= QaUtils.buildGeneralAuthoringDTO(request, qaService, qaContent, qaAuthoringForm); + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); - - Map mapQuestionContent=(Map)sessionMap.get(MAP_QUESTION_CONTENT_KEY); - logger.debug("mapQuestionContent: " + mapQuestionContent); - logger.debug("mapQuestionContent size: " + mapQuestionContent.size()); - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); - - String defaultQuestionContent=request.getParameter("questionContent0"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString()); - String richTextTitle = (String)sessionMap.get(ACTIVITY_TITLE_KEY); - String richTextInstructions = (String)sessionMap.get(ACTIVITY_INSTRUCTIONS_KEY); - - logger.debug("richTextTitle: " + richTextTitle); - logger.debug("richTextInstructions: " + richTextInstructions); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); - List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); logger.debug("attachmentList: " + attachmentList); List deletedAttachmentList=(List)sessionMap.get(DELETED_ATTACHMENT_LIST_KEY); @@ -707,7 +1683,7 @@ request.getSession().setAttribute(httpSessionID, sessionMap); - QaUtils.setFormProperties(request, qaService, qaContent, + QaUtils.setFormProperties(request, qaService, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); @@ -727,7 +1703,17 @@ request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); qaAuthoringForm.resetUserAction(); - logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); + + String strOnlineInstructions= request.getParameter("onlineInstructions"); + String strOfflineInstructions= request.getParameter("offlineInstructions"); + logger.debug("onlineInstructions: " + strOnlineInstructions); + logger.debug("offlineInstructions: " + strOnlineInstructions); + qaAuthoringForm.setOnlineInstructions(strOnlineInstructions); + qaAuthoringForm.setOfflineInstructions(strOfflineInstructions); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); return (mapping.findForward(LOAD_QUESTIONS)); } @@ -765,7 +1751,12 @@ SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); logger.debug("sessionMap: " + sessionMap); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + String activeModule=request.getParameter(ACTIVE_MODULE); logger.debug("activeModule: " + activeModule); @@ -776,58 +1767,55 @@ String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); logger.debug("defaultContentIdStr: " + defaultContentIdStr); + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("qaContent: " + qaContent); - - - + /* if (qaContent == null) { logger.debug("using defaultContentIdStr: " + defaultContentIdStr); qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); } logger.debug("final qaContent: " + qaContent); + */ - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= QaUtils.buildGeneralAuthoringDTO(request, qaService, qaContent, qaAuthoringForm); + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); - + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); qaGeneralAuthoringDTO.setSbmtSuccess( new Integer(0).toString()); - Map mapQuestionContent=(Map)sessionMap.get(MAP_QUESTION_CONTENT_KEY); - logger.debug("mapQuestionContent: " + mapQuestionContent); - logger.debug("mapQuestionContent size: " + mapQuestionContent.size()); - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); - if ((mapQuestionContent != null) && (mapQuestionContent.size() > 0)) - { - String defaultQuestionContent = (String)mapQuestionContent.get("1"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - } - - QaUtils.setFormProperties(request, qaService, qaContent, + QaUtils.setFormProperties(request, qaService, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); String onlineInstructions=(String) sessionMap.get(ONLINE_INSTRUCTIONS_KEY); logger.debug("onlineInstructions: " + onlineInstructions); - String offlineInstructions=(String) sessionMap.get(OFFLINE_INSTRUCTIONS); + String offlineInstructions=(String) sessionMap.get(OFFLINE_INSTRUCTIONS_KEY); logger.debug("offlineInstructions: " + offlineInstructions); qaGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions); qaGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions); + qaAuthoringForm.setOnlineInstructions(onlineInstructions); + qaAuthoringForm.setOfflineInstructions(offlineInstructions); - - String richTextTitle = (String)sessionMap.get(ACTIVITY_TITLE_KEY); - String richTextInstructions = (String)sessionMap.get(ACTIVITY_INSTRUCTIONS_KEY); - - logger.debug("richTextTitle: " + richTextTitle); - logger.debug("richTextInstructions: " + richTextInstructions); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - + + String richTextTitle=(String)sessionMap.get(ACTIVITY_TITLE_KEY); + String richTextInstructions=(String)sessionMap.get(ACTIVITY_INSTRUCTIONS_KEY); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + long uuid = WebUtil.readLongParam(request, UUID); List attachmentList=(List)sessionMap.get(ATTACHMENT_LIST_KEY); @@ -856,8 +1844,6 @@ request.getSession().setAttribute(httpSessionID, sessionMap); - - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); qaGeneralAuthoringDTO.setActiveModule(activeModule); @@ -872,74 +1858,14 @@ logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + qaAuthoringForm.resetUserAction(); - logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); + logger.debug("fwd ing to LOAD_QUESTIONS: " + LOAD_QUESTIONS); return (mapping.findForward(LOAD_QUESTIONS)); } - - /** - * performs error validation on form submit - * - * ActionMessages validateSubmit(HttpServletRequest request, ActionMessages errors, QaAuthoringForm qaAuthoringForm) - * @param request - * @param errors - * @param qaAuthoringForm - * @return ActionMessages - */ - protected ActionMessages validateSubmit(HttpServletRequest request, ActionMessages errors, QaAuthoringForm qaAuthoringForm) - - { - String richTextTitle = request.getParameter(TITLE); - String richTextInstructions = request.getParameter(INSTRUCTIONS); - logger.debug("richTextTitle: " + richTextTitle); - logger.debug("richTextInstructions: " + richTextInstructions); - - if ((richTextTitle == null) || (richTextTitle.trim().length() == 0) || richTextTitle.equalsIgnoreCase(RICHTEXT_BLANK)) - { - errors.add(Globals.ERROR_KEY,new ActionMessage("error.title")); - logger.debug("add error.title to ActionMessages"); - } - - if ((richTextInstructions == null) || (richTextInstructions.trim().length() == 0) || richTextInstructions.equalsIgnoreCase(RICHTEXT_BLANK)) - { - errors.add(Globals.ERROR_KEY, new ActionMessage("error.instructions")); - logger.debug("add error.instructions to ActionMessages: "); - } - - /* - * enforce that the first (default) question entry is not empty - */ - String defaultQuestionEntry =request.getParameter("questionContent0"); - if ((defaultQuestionEntry == null) || (defaultQuestionEntry.length() == 0)) - { - errors.add(Globals.ERROR_KEY, new ActionMessage("error.defaultquestion.empty")); - logger.debug("add error.defaultquestion.empty to ActionMessages: "); - } - - - // check this again in Monitoring - Boolean renderMonitoringEditActivity=(Boolean)request.getSession().getAttribute(RENDER_MONITORING_EDITACTIVITY); - if ((renderMonitoringEditActivity != null) && (!renderMonitoringEditActivity.booleanValue())) - { - - if ((qaAuthoringForm.getReportTitle() == null) || (qaAuthoringForm.getReportTitle().length() == 0)) - { - errors.add(Globals.ERROR_KEY, new ActionMessage("error.reportTitle")); - logger.debug("add reportTitle to ActionMessages: "); - } - - if ((qaAuthoringForm.getMonitoringReportTitle() == null) || (qaAuthoringForm.getMonitoringReportTitle().length() == 0)) - { - errors.add(Globals.ERROR_KEY, new ActionMessage("error.monitorReportTitle")); - logger.debug("add monitorReportTitle to ActionMessages: "); - } - } - - saveErrors(request,errors); - return errors; - } /** * persists error messages to request scope @@ -1270,9 +2196,19 @@ IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); logger.debug("qaService: " + qaService); + String httpSessionID=qaAuthoringForm.getHttpSessionID(); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + String activeModule=request.getParameter(ACTIVE_MODULE); logger.debug("activeModule: " + activeModule); - String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); logger.debug("strToolContentID: " + strToolContentID); @@ -1283,24 +2219,22 @@ QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("qaContent: " + qaContent); - if (qaContent == null) - { - logger.debug("using defaultContentIdStr: " + defaultContentIdStr); - qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); - } - logger.debug("final qaContent: " + qaContent); - - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= QaUtils.buildGeneralAuthoringDTO(request, qaService, qaContent, qaAuthoringForm); + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); - Map mapQuestionContent=qaAuthoringForm.getMapQuestionContent(); - logger.debug("mapQuestionContent: " + mapQuestionContent); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + - if ((mapQuestionContent != null) && (mapQuestionContent.size() > 0)) - { - String defaultQuestionContent = (String)mapQuestionContent.get("1"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - } + logger.debug("title: " + qaContent.getTitle()); + logger.debug("instructions: " + qaContent.getInstructions()); + + qaGeneralAuthoringDTO.setActivityTitle(qaContent.getTitle()); + qaAuthoringForm.setTitle(qaContent.getTitle()); + + qaGeneralAuthoringDTO.setActivityInstructions(qaContent.getInstructions()); + + sessionMap.put(ACTIVITY_TITLE_KEY, qaContent.getTitle()); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, qaContent.getInstructions()); + /* determine whether the request is from Monitoring url Edit Activity*/ @@ -1309,7 +2243,6 @@ qaAuthoringForm.setDefineLaterInEditMode(new Boolean(true).toString()); qaGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); - qaGeneralAuthoringDTO.setShowAuthoringTabs(new Boolean(false).toString()); boolean isContentInUse=QaUtils.isContentInUse(qaContent); logger.debug("isContentInUse:" + isContentInUse); @@ -1332,6 +2265,10 @@ QaUtils.setDefineLater(request, true, strToolContentID, qaService); + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); qaGeneralAuthoringDTO.setActiveModule(activeModule); qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); @@ -1340,6 +2277,33 @@ qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); qaAuthoringForm.setCurrentTab("1"); + List listQuestionContentDTO= new LinkedList(); + + Iterator queIterator=qaContent.getQaQueContents().iterator(); + while (queIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO=new QaQuestionContentDTO(); + + QaQueContent qaQueContent=(QaQueContent) queIterator.next(); + if (qaQueContent != null) + { + logger.debug("question: " + qaQueContent.getQuestion()); + logger.debug("displayorder: " + new Integer(qaQueContent.getDisplayOrder()).toString()); + logger.debug("feedback: " + qaQueContent.getFeedback()); + + qaQuestionContentDTO.setQuestion(qaQueContent.getQuestion()); + qaQuestionContentDTO.setDisplayOrder(new Integer(qaQueContent.getDisplayOrder()).toString()); + qaQuestionContentDTO.setFeedback(qaQueContent.getFeedback()); + listQuestionContentDTO.add(qaQuestionContentDTO); + } + } + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + request.getSession().setAttribute(httpSessionID, sessionMap); + logger.debug("before fwding to jsp, qaAuthoringForm: " + qaAuthoringForm); logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); @@ -1348,7 +2312,12 @@ return mapping.findForward(LOAD_QUESTIONS); } - + /** + * existsContent + * @param toolContentID + * @param qaService + * @return + */ protected boolean existsContent(long toolContentID, IQaService qaService) { QaContent qaContent=qaService.loadQa(toolContentID); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java (.../QaAuthoringForm.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java (.../QaAuthoringForm.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; @@ -84,6 +85,11 @@ protected String statsMonitoring; protected String edit; + private String contentFolderID; + private String addSingleQuestion; + private String editableQuestionIndex; + private String feedback; + private String editQuestionBoxRequest; protected String defineLaterInEditMode; protected String defaultContentIdStr; @@ -675,4 +681,67 @@ public void setReflectionSubject(String reflectionSubject) { this.reflectionSubject = reflectionSubject; } + + /** + * @return Returns the contentFolderID. + */ + public String getContentFolderID() { + return contentFolderID; + } + /** + * @param contentFolderID The contentFolderID to set. + */ + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + /** + * @return Returns the addSingleQuestion. + */ + public String getAddSingleQuestion() { + return addSingleQuestion; + } + /** + * @param addSingleQuestion The addSingleQuestion to set. + */ + public void setAddSingleQuestion(String addSingleQuestion) { + this.addSingleQuestion = addSingleQuestion; + } + /** + * @return Returns the editableQuestionIndex. + */ + public String getEditableQuestionIndex() { + return editableQuestionIndex; + } + /** + * @param editableQuestionIndex The editableQuestionIndex to set. + */ + public void setEditableQuestionIndex(String editableQuestionIndex) { + this.editableQuestionIndex = editableQuestionIndex; + } + + /** + * @return Returns the feedback. + */ + public String getFeedback() { + return feedback; + } + /** + * @param feedback The feedback to set. + */ + public void setFeedback(String feedback) { + this.feedback = feedback; + } + + /** + * @return Returns the editQuestionBoxRequest. + */ + public String getEditQuestionBoxRequest() { + return editQuestionBoxRequest; + } + /** + * @param editQuestionBoxRequest The editQuestionBoxRequest to set. + */ + public void setEditQuestionBoxRequest(String editQuestionBoxRequest) { + this.editQuestionBoxRequest = editQuestionBoxRequest; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaDLStarterAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaDLStarterAction.java (.../QaDLStarterAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaDLStarterAction.java (.../QaDLStarterAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,25 +1,24 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ + /** * @author Ozgur Demirtas * Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaEmptyForm.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaEmptyForm.java (.../QaEmptyForm.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaEmptyForm.java (.../QaEmptyForm.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,24 +1,24 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ + /** * @author Ozgur Demirtas * @@ -102,7 +102,6 @@ import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; -import org.lamsfoundation.lams.notebook.model.NotebookEntry; import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.qa.GeneralLearnerFlowDTO; @@ -188,6 +187,7 @@ Map mapAnswers= new TreeMap(new QaComparator()); Map mapAnswersPresentable= new TreeMap(new QaComparator()); + Map mapFeedback= new TreeMap(new QaComparator()); /* if the listing mode is QUESTION_LISTING_MODE_COMBINED populate the answers here*/ if (questionListingMode.equalsIgnoreCase(QUESTION_LISTING_MODE_COMBINED)) { @@ -228,17 +228,18 @@ logger.debug("using mapAnswers:" + mapAnswers); generalLearnerFlowDTO.setMapAnswers(mapAnswers); + logger.debug("using mapFeedback:" + generalLearnerFlowDTO.getMapFeedback()); + logger.debug("using mapAnswersPresentable:" + mapAnswersPresentable);; generalLearnerFlowDTO.setMapAnswersPresentable(mapAnswersPresentable); - /*mapAnswers will be used in the viewAllAnswers screen*/ SessionMap sessionMap = new SessionMap(); sessionMap.put(MAP_ALL_RESULTS_KEY, mapAnswers); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); qaLearningForm.setHttpSessionID(sessionMap.getSessionID()); generalLearnerFlowDTO.setHttpSessionID(sessionMap.getSessionID()); - + request.setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); logger.debug("fwd'ing to." + INDIVIDUAL_LEARNER_RESULTS); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningForm.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningForm.java (.../QaLearningForm.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningForm.java (.../QaLearningForm.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; import java.io.IOException; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,61 +1,51 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ + /** * @author Ozgur Demirtas * - * + validate="true"> - - - + @@ -64,20 +54,40 @@ path="/authoring/AuthoringTabsHolder.jsp" redirect="false" /> + + + + + + + + */ /* $$Id$$ */ @@ -90,7 +100,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.TreeMap; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -103,26 +112,25 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; -import org.lamsfoundation.lams.authoring.web.AuthoringConstants; import org.lamsfoundation.lams.notebook.model.NotebookEntry; import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.qa.EditActivityDTO; import org.lamsfoundation.lams.tool.qa.GeneralLearnerFlowDTO; import org.lamsfoundation.lams.tool.qa.GeneralMonitoringDTO; import org.lamsfoundation.lams.tool.qa.QaAppConstants; -import org.lamsfoundation.lams.tool.qa.QaComparator; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.QaQueContent; import org.lamsfoundation.lams.tool.qa.QaQueUsr; +import org.lamsfoundation.lams.tool.qa.QaQuestionContentDTO; import org.lamsfoundation.lams.tool.qa.QaSession; import org.lamsfoundation.lams.tool.qa.QaUsrResp; import org.lamsfoundation.lams.tool.qa.QaUtils; import org.lamsfoundation.lams.tool.qa.ReflectionDTO; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; -import org.lamsfoundation.lams.tool.qa.util.QAConstants; +import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.action.LamsDispatchAction; import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; @@ -196,6 +204,12 @@ 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); @@ -241,11 +255,40 @@ prepareReflectionData(request, qaContent, qaService, null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); + + /*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*/ + + + /**getting instructions screen content from here... */ + generalMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + generalMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + generalMonitoringDTO.setAttachmentList(attachmentList); + generalMonitoringDTO.setDeletedAttachmentList(new ArrayList()); + /** ...till here **/ + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); logger.debug("ending initStatsContent..."); + + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); } @@ -305,6 +348,11 @@ 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); @@ -339,7 +387,7 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse=QaUtils.isContentInUse(qaContent); @@ -350,8 +398,35 @@ } 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*/ + + /**getting instructions screen content from here... */ + generalMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + generalMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + generalMonitoringDTO.setAttachmentList(attachmentList); + generalMonitoringDTO.setDeletedAttachmentList(new ArrayList()); + /** ...till here **/ + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); logger.debug("ending initInstructionsContent..."); } @@ -395,6 +470,11 @@ 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); @@ -449,13 +529,40 @@ } request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); + /**getting instructions screen content from here... */ + generalMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + generalMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + generalMonitoringDTO.setAttachmentList(attachmentList); + generalMonitoringDTO.setDeletedAttachmentList(new ArrayList()); + /** ...till here **/ + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); + + + /*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); + /* 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); @@ -518,6 +625,11 @@ 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); @@ -564,11 +676,39 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); + + + /*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*/ + + /*getting instructions screen content from here... */ + generalMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + generalMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + generalMonitoringDTO.setAttachmentList(attachmentList); + generalMonitoringDTO.setDeletedAttachmentList(new ArrayList()); + /* ...till here */ + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); + logger.debug("end initSummaryContent..."); } @@ -581,6 +721,10 @@ ToolException { logger.debug("dispatching editActivityQuestions..."); + + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + logger.debug("qaMonitoringForm: " + qaMonitoringForm); + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); logger.debug("qaService: " + qaService); @@ -594,18 +738,31 @@ generalMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); 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 httpSessionID=request.getParameter("httpSessionID"); + logger.debug("httpSessionID: " + httpSessionID); + qaMonitoringForm.setHttpSessionID(httpSessionID); + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); + + qaMonitoringForm.setTitle(qaContent.getTitle()); QaUtils.setDefineLater(request, true,strToolContentID, qaService); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); prepareReflectionData(request, qaContent, qaService, null, false); @@ -620,373 +777,78 @@ generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } - logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); - request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + /**getting instructions screen content from here... */ + generalMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + generalMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); - - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = (QaGeneralAuthoringDTO)request.getAttribute(QA_GENERAL_AUTHORING_DTO); - qaGeneralAuthoringDTO.setActiveModule(MONITORING); - request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - - - return (mapping.findForward(LOAD_MONITORING)); - } - - public ActionForward addNewQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException - { - logger.debug("dispatching proxy addNewQuestion..."); - QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + generalMonitoringDTO.setAttachmentList(attachmentList); + generalMonitoringDTO.setDeletedAttachmentList(new ArrayList()); + /** ...till here **/ - IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); - logger.debug("qaService: " + qaService); - - String httpSessionID=qaAuthoringForm.getHttpSessionID(); - logger.debug("httpSessionID: " + httpSessionID); - - SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); - logger.debug("sessionMap: " + sessionMap); - - String activeModule=MONITORING; - logger.debug("activeModule: " + activeModule); - - String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - logger.debug("strToolContentID: " + strToolContentID); - - String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); - logger.debug("defaultContentIdStr: " + defaultContentIdStr); - - QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); - logger.debug("qaContent: " + qaContent); - - if (qaContent == null) - { - logger.debug("using defaultContentIdStr: " + defaultContentIdStr); - qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); - } - logger.debug("final qaContent: " + qaContent); - - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= QaUtils.buildGeneralAuthoringDTO(request, qaService, qaContent, qaAuthoringForm); - logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); - - qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString()); - - AuthoringUtil authoringUtil= new AuthoringUtil(); - Map mapQuestionContent=(Map)sessionMap.get(MAP_QUESTION_CONTENT_KEY); - logger.debug("mapQuestionContent: " + mapQuestionContent); - logger.debug("mapQuestionContent size: " + mapQuestionContent.size()); - - String richTextTitle = request.getParameter(TITLE); - String richTextInstructions = request.getParameter(INSTRUCTIONS); - - logger.debug("richTextTitle: " + richTextTitle); - logger.debug("richTextInstructions: " + richTextInstructions); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - - sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); - sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); - - String defaultQuestionContent=request.getParameter("questionContent0"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); - - authoringUtil.reconstructQuestionContentMapForAdd(mapQuestionContent, qaGeneralAuthoringDTO, request); - - sessionMap.put(MAP_QUESTION_CONTENT_KEY, mapQuestionContent); - request.getSession().setAttribute(httpSessionID, sessionMap); - - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); - QaUtils.setFormProperties(request, qaService, qaContent, - qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); - + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); - qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); - qaGeneralAuthoringDTO.setActiveModule(MONITORING); - qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setToolContentID(strToolContentID); - qaAuthoringForm.setHttpSessionID(httpSessionID); - qaAuthoringForm.setActiveModule(MONITORING); - qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setCurrentTab("3"); - - - logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); - request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - - GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); - qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); - - if (qaService.studentActivityOccurredGlobal(qaContent)) - { - logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } - else - { - logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); - request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + List listQuestionContentDTO= new LinkedList(); - prepareReflectionData(request, qaContent, qaService, null, false); - - logger.debug("fwd ing to LOAD_MONITORING: " + LOAD_MONITORING); - return (mapping.findForward(LOAD_MONITORING)); - } - - - public ActionForward removeQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - logger.debug("dispatching proxy removeQuestion..."); - QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; - - IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); - logger.debug("qaService: " + qaService); - - String httpSessionID=qaAuthoringForm.getHttpSessionID(); - logger.debug("httpSessionID: " + httpSessionID); - - SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); - logger.debug("sessionMap: " + sessionMap); - - String activeModule=MONITORING; - logger.debug("activeModule: " + activeModule); - - String richTextTitle = request.getParameter(TITLE); - logger.debug("richTextTitle: " + richTextTitle); - - String richTextInstructions = request.getParameter(INSTRUCTIONS); - logger.debug("richTextInstructions: " + richTextInstructions); - - - sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); - sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); - - - String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - logger.debug("strToolContentID: " + strToolContentID); - - String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); - logger.debug("defaultContentIdStr: " + defaultContentIdStr); - - QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); - logger.debug("qaContent: " + qaContent); - - if (qaContent == null) + Iterator queIterator=qaContent.getQaQueContents().iterator(); + while (queIterator.hasNext()) { - logger.debug("using defaultContentIdStr: " + defaultContentIdStr); - qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + QaQuestionContentDTO qaQuestionContentDTO=new QaQuestionContentDTO(); + + QaQueContent qaQueContent=(QaQueContent) queIterator.next(); + if (qaQueContent != null) + { + logger.debug("question: " + qaQueContent.getQuestion()); + logger.debug("displayorder: " + new Integer(qaQueContent.getDisplayOrder()).toString()); + logger.debug("feedback: " + qaQueContent.getFeedback()); + + qaQuestionContentDTO.setQuestion(qaQueContent.getQuestion()); + qaQuestionContentDTO.setDisplayOrder(new Integer(qaQueContent.getDisplayOrder()).toString()); + qaQuestionContentDTO.setFeedback(qaQueContent.getFeedback()); + listQuestionContentDTO.add(qaQuestionContentDTO); + } } - logger.debug("final qaContent: " + qaContent); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= QaUtils.buildGeneralAuthoringDTO(request, qaService, qaContent, qaAuthoringForm); - logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); - String defaultQuestionContent=request.getParameter("questionContent0"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - - AuthoringUtil authoringUtil= new AuthoringUtil(); - - Map mapQuestionContent=(Map)sessionMap.get(MAP_QUESTION_CONTENT_KEY); - logger.debug("mapQuestionContent: " + mapQuestionContent); - logger.debug("mapQuestionContent size: " + mapQuestionContent.size()); - - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); - mapQuestionContent=authoringUtil.reconstructQuestionContentMapForRemove(mapQuestionContent, request, qaAuthoringForm, activeModule); - logger.debug("final mapQuestionContent: " + mapQuestionContent); - - sessionMap.put(MAP_QUESTION_CONTENT_KEY, mapQuestionContent); - request.getSession().setAttribute(httpSessionID, sessionMap); - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); - - QaUtils.setFormProperties(request, qaService, qaContent, - qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); - + QaGeneralAuthoringDTO qaGeneralAuthoringDTO = (QaGeneralAuthoringDTO)request.getAttribute(QA_GENERAL_AUTHORING_DTO); + qaGeneralAuthoringDTO.setActiveModule(MONITORING); qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); - qaGeneralAuthoringDTO.setActiveModule(MONITORING); - qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setToolContentID(strToolContentID); - qaAuthoringForm.setHttpSessionID(httpSessionID); - qaAuthoringForm.setActiveModule(MONITORING); - qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setCurrentTab("3"); - - logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - - GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); - qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); - - if (qaService.studentActivityOccurredGlobal(qaContent)) - { - logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } - else - { - logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); - request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - - prepareReflectionData(request, qaContent, qaService, null, false); - logger.debug("fwd ing to LOAD_MONITORING: " + LOAD_MONITORING); - return (mapping.findForward(LOAD_MONITORING)); - } - - - public ActionForward submitAllContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - logger.debug("dispatching proxy submitAllContent..."); - - QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; - - IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); - logger.debug("qaService: " + qaService); + /*find out if there are any reflection entries, from here*/ + boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(qaService, qaContent); + logger.debug("notebookEntriesExist : " + notebookEntriesExist); - String httpSessionID=qaAuthoringForm.getHttpSessionID(); - logger.debug("httpSessionID: " + httpSessionID); - qaAuthoringForm.setHttpSessionID(httpSessionID); - - SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); - logger.debug("sessionMap: " + sessionMap); - - String activeModule=MONITORING; - qaAuthoringForm.setActiveModule(activeModule); - - String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - logger.debug("strToolContentID: " + strToolContentID); - qaAuthoringForm.setToolContentID(strToolContentID); - - String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); - logger.debug("defaultContentIdStr: " + defaultContentIdStr); - - Map mapQuestionContent=(Map)sessionMap.get(MAP_QUESTION_CONTENT_KEY); - logger.debug("mapQuestionContent: " + mapQuestionContent); - logger.debug("mapQuestionContent size: " + mapQuestionContent.size()); - - ActionMessages errors= new ActionMessages(); - - AuthoringUtil authoringUtil= new AuthoringUtil(); - authoringUtil.reconstructQuestionContentMapForSubmit(mapQuestionContent, request); - logger.debug("before saveOrUpdateQaContent." + mapQuestionContent); - - QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); - String richTextTitle = request.getParameter(TITLE); - String richTextInstructions = request.getParameter(INSTRUCTIONS); - - logger.debug("richTextTitle: " + richTextTitle); - logger.debug("richTextInstructions: " + richTextInstructions); - - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - - sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); - sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); - - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); - logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); - - String defaultQuestionContent=request.getParameter("questionContent0"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - - logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); - request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - - /*to remove deleted entries in the questions table based on mapQuestionContent */ - authoringUtil.removeRedundantQuestions(mapQuestionContent, qaService, qaAuthoringForm, request, strToolContentID); - logger.debug("end of removing unused entries... "); - - QaContent qaContentTest=qaService.loadQa(new Long(strToolContentID).longValue()); - logger.debug("qaContentTest: " + qaContentTest); - - QaContent qaContent=authoringUtil.saveOrUpdateQaContent(mapQuestionContent, qaService, qaAuthoringForm, - request, qaContentTest, strToolContentID); - logger.debug("qaContent: " + qaContent); - - qaGeneralAuthoringDTO= QaUtils.buildGeneralAuthoringDTO(request, qaService, qaContent, qaAuthoringForm); - logger.debug("updated qaGeneralAuthoringDTO to: " + qaGeneralAuthoringDTO); - - authoringUtil.reOrganizeDisplayOrder(mapQuestionContent, qaService, qaAuthoringForm, qaContent); - - errors.clear(); - errors.add(Globals.ERROR_KEY, new ActionMessage("submit.successful")); - qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(1).toString()); - - logger.debug("setting SUBMIT_SUCCESS to 1."); - - logger.debug("strToolContentID: " + strToolContentID); - QaUtils.setDefineLater(request, false, strToolContentID, qaService); - - saveErrors(request,errors); - - QaUtils.setDefineLater(request, false, qaService, strToolContentID); - logger.debug("define later set to false"); - - qaAuthoringForm.resetUserAction(); - - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); - - QaUtils.setFormProperties(request, qaService, qaContent, - qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); - - - defaultQuestionContent=request.getParameter("questionContent0"); - logger.debug("defaultQuestionContent: " + defaultQuestionContent); - qaGeneralAuthoringDTO.setDefaultQuestionContent(defaultQuestionContent); - - - logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); - request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - - request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE); - - request.getSession().setAttribute(httpSessionID, sessionMap); - qaAuthoringForm.setCurrentTab("3"); - - - GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); - qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); - - if (qaService.studentActivityOccurredGlobal(qaContent)) + if (notebookEntriesExist) { - logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); } else { - logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); } - - logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); - request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + /* ... till here*/ - prepareReflectionData(request, qaContent, qaService, null, false); + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); - return mapping.findForward(LOAD_MONITORING); + + return (mapping.findForward(LOAD_MONITORING)); } - + + /** * gets called when the user selects a group from dropdown box in the summary tab * @@ -1026,7 +888,6 @@ } else { - /* SELECTION_CASE == 1 indicates a selected group other than "All" */ request.setAttribute(SELECTION_CASE, new Long(1)); } @@ -1036,6 +897,11 @@ 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); @@ -1060,7 +926,7 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse=QaUtils.isContentInUse(qaContent); @@ -1072,7 +938,24 @@ request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); + + /*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); + return (mapping.findForward(LOAD_MONITORING)); } @@ -1109,7 +992,12 @@ logger.debug("editResponse: " + editResponse); qaMonitoringForm.setEditResponse(editResponse); - + + 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); @@ -1159,7 +1047,7 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse=QaUtils.isContentInUse(qaContent); @@ -1169,6 +1057,23 @@ 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); return (mapping.findForward(LOAD_MONITORING)); } @@ -1202,6 +1107,12 @@ 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); @@ -1218,7 +1129,7 @@ /* 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(QAConstants.TOOL_SIGNATURE, + qaService.getAuditService().logChange(MY_SIGNATURE, qaUsrResp.getQaQueUser().getQueUsrId(),qaUsrResp.getQaQueUser().getUsername(), qaUsrResp.getAnswer(), updatedResponse); @@ -1267,7 +1178,7 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse=QaUtils.isContentInUse(qaContent); @@ -1278,6 +1189,23 @@ } 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); + return (mapping.findForward(LOAD_MONITORING)); } @@ -1309,7 +1237,12 @@ 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); @@ -1367,7 +1300,7 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse=QaUtils.isContentInUse(qaContent); @@ -1378,6 +1311,23 @@ } 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); + return (mapping.findForward(LOAD_MONITORING)); } @@ -1402,7 +1352,12 @@ 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); + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); @@ -1416,7 +1371,7 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); EditActivityDTO editActivityDTO = new EditActivityDTO(); @@ -1428,37 +1383,26 @@ } 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*/ + request.setAttribute(SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); + + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); } - /** - * ?TEMPORARY: allows to exit monitoring url - * ActionForward doneMonitoring(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 doneMonitoring(ActionMapping mapping, - ActionForm form, - HttpServletRequest request, - HttpServletResponse response) throws IOException, - ServletException - { - QaUtils.cleanUpSessionAbsolute(request); - return (mapping.findForward(LOAD_MONITORING)); - } - /** * persists error messages to request scope @@ -1475,38 +1419,7 @@ } - /** - * calls learning action endLearning functionality - * ActionForward endLearning(ActionMapping mapping, - ActionForm form, - HttpServletRequest request, - HttpServletResponse response) throws IOException, - ServletException, ToolException - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - * @throws ToolException - */ - public ActionForward endLearning(ActionMapping mapping, - ActionForm form, - HttpServletRequest request, - HttpServletResponse response) throws IOException, - ServletException, ToolException - { - logger.debug("dispatching proxy endLearning to learnng module..."); - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - logger.debug("qaService: " + qaService); - - QaLearningAction qaLearningAction= new QaLearningAction(); - return null; - } - /** * populates data for summary screen * refreshSummaryData(HttpServletRequest request, QaContent qaContent, IQaService qaService, @@ -1538,7 +1451,6 @@ logger.debug("summaryToolSessions: " + summaryToolSessions); request.setAttribute(SUMMARY_TOOL_SESSIONS, summaryToolSessions); - if (qaContent.getTitle() == null) { generalMonitoringDTO.setActivityTitle("Questions and Answers"); @@ -1619,6 +1531,7 @@ generalMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); generalMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + /* if ((generalMonitoringDTO.getOnlineInstructions() == null) || (generalMonitoringDTO.getOnlineInstructions().length() == 0)) { generalMonitoringDTO.setOnlineInstructions(DEFAULT_ONLINE_INST); @@ -1628,6 +1541,7 @@ { generalMonitoringDTO.setOfflineInstructions(DEFAULT_OFFLINE_INST); } + */ List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); logger.debug("attachmentList: " + attachmentList); @@ -1654,11 +1568,27 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); + /*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*/ + + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - /* ends here. */ + + MonitoringUtil.buildQaStatsDTO(request,qaService, qaContent); } @@ -1711,7 +1641,7 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse=QaUtils.isContentInUse(qaContent); @@ -1720,9 +1650,33 @@ { editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); } + + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + generalMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + + request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); logger.debug("ending refreshStatsData with generalMonitoringDTO: " + generalMonitoringDTO); request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + + /*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); } @@ -1753,6 +1707,11 @@ 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); @@ -1781,6 +1740,7 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); @@ -1797,7 +1757,7 @@ prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse=QaUtils.isContentInUse(qaContent); @@ -1807,7 +1767,24 @@ 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); + logger.debug("submitting session to refresh the data from the database: "); return (mapping.findForward(LOAD_MONITORING)); } @@ -1824,7 +1801,12 @@ 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)); @@ -1878,11 +1860,12 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); + refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false); prepareReflectionData(request, qaContent, qaService,null, false); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse=QaUtils.isContentInUse(qaContent); @@ -1892,8 +1875,22 @@ 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); + logger.debug("submitting session to refresh the data from the database: "); return (mapping.findForward(LOAD_MONITORING)); } @@ -1905,9 +1902,16 @@ ServletException, ToolException { logger.debug("dispatching openNotebook..."); + QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); logger.debug("qaService: " + qaService); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaMonitoringForm.setContentFolderID(contentFolderID); + String uid=request.getParameter("uid"); logger.debug("uid: " + uid); @@ -1944,8 +1948,32 @@ QaContent qaContent=qaSession.getQaContent(); logger.debug("qaContent: " + qaContent); - preparEditActivityScreenData(request, qaContent); + prepareEditActivityScreenData(request, qaContent); + GeneralMonitoringDTO generalMonitoringDTO= new GeneralMonitoringDTO(); + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + generalMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + + + /*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); + return mapping.findForward(LEARNER_NOTEBOOK); } @@ -2036,9 +2064,9 @@ } - public void preparEditActivityScreenData(HttpServletRequest request, QaContent qaContent) + public void prepareEditActivityScreenData(HttpServletRequest request, QaContent qaContent) { - logger.debug("starting preparEditActivityScreenData: " + qaContent); + logger.debug("starting prepareEditActivityScreenData: " + qaContent); QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); if (qaContent.getTitle() == null) @@ -2060,30 +2088,1445 @@ qaGeneralAuthoringDTO.setActivityInstructions(qaContent.getInstructions()); } - Map mapQuestionContent= new TreeMap(new QaComparator()); + + logger.debug("final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + } + + + + public ActionForward submitAllContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + logger.debug("dispatching proxy submitAllContent..."); + + /*start authoring code*/ + QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; + logger.debug("dispathcing submitAllContent :" +form); + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); - Iterator queIterator=qaContent.getQaQueContents().iterator(); - Long mapIndex=new Long(1); - while (queIterator.hasNext()) + String httpSessionID=request.getParameter("httpSessionID"); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + Map mapQuestionContent=AuthoringUtil.extractMapQuestionContent(listQuestionContentDTO); + logger.debug("extracted mapQuestionContent: " + mapQuestionContent); + + + Map mapFeedback=AuthoringUtil.extractMapFeedback(listQuestionContentDTO); + logger.debug("extracted mapFeedback: " + mapFeedback); + + ActionMessages errors = new ActionMessages(); + logger.debug("mapQuestionContent size: " + mapQuestionContent.size()); + + if (mapQuestionContent.size() == 0) + { + ActionMessage error = new ActionMessage("questions.none.submitted"); + errors.add(ActionMessages.GLOBAL_MESSAGE, error); + } + logger.debug("errors: " + errors); + + AuthoringUtil authoringUtil= new AuthoringUtil(); + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + + + logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + logger.debug("there are no issues with input, continue and submit data"); + + QaContent qaContentTest=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContentTest: " + qaContentTest); + + logger.debug("errors: " + errors); + if(!errors.isEmpty()){ + saveErrors(request, errors); + logger.debug("errors saved: " + errors); + } + + + GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); + + QaContent qaContent=qaContentTest; + if(errors.isEmpty()){ + logger.debug("errors is empty: " + errors); + /*to remove deleted entries in the questions table based on mapQuestionContent */ + authoringUtil.removeRedundantQuestions(mapQuestionContent, qaService, qaAuthoringForm, request, strToolContentID); + logger.debug("end of removing unused entries... "); + + qaContent=authoringUtil.saveOrUpdateQaContent(mapQuestionContent, mapFeedback, qaService, qaAuthoringForm, request, qaContentTest, strToolContentID); + logger.debug("qaContent: " + qaContent); + + + long defaultContentID=0; + logger.debug("attempt retrieving tool with signatute : " + MY_SIGNATURE); + defaultContentID=qaService.getToolDefaultContentIdBySignature(MY_SIGNATURE); + logger.debug("retrieved tool default contentId: " + defaultContentID); + + if (qaContent != null) + { + qaGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString()); + } + logger.debug("updated qaGeneralAuthoringDTO to: " + qaGeneralAuthoringDTO); + + authoringUtil.reOrganizeDisplayOrder(mapQuestionContent, qaService, qaAuthoringForm, qaContent); + + logger.debug("strToolContentID: " + strToolContentID); + QaUtils.setDefineLater(request, false, strToolContentID, qaService); + logger.debug("define later set to false"); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); + } + else + { + logger.debug("errors is not empty: " + errors); + + if (qaContent != null) + { + long defaultContentID=0; + logger.debug("attempt retrieving tool with signatute : " + MY_SIGNATURE); + defaultContentID=qaService.getToolDefaultContentIdBySignature(MY_SIGNATURE); + logger.debug("retrieved tool default contentId: " + defaultContentID); + + if (qaContent != null) + { + qaGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString()); + } + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + } + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + } + + qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(1).toString()); + + qaAuthoringForm.resetUserAction(); + qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); + + logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + request.getSession().setAttribute(httpSessionID, sessionMap); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("3"); + + + /*start monitoring code*/ + + if (qaService.studentActivityOccurredGlobal(qaContent)) { - QaQueContent qaQueContent=(QaQueContent) queIterator.next(); - if (qaQueContent != null) + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + } + else + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + } + + qaGeneralMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaGeneralMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + qaGeneralMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final qaGeneralMonitoringDTO: " + qaGeneralMonitoringDTO ); + + logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + + prepareReflectionData(request, qaContent, qaService, null, false); + + /*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); + + return mapping.findForward(LOAD_MONITORING); + } + + + + public ActionForward saveSingleQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + + logger.debug("dispathcing proxy saveSingleQuestion"); + + /*start authoring code*/ + QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; + logger.debug("dispathcing saveSingleQuestion"); + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=request.getParameter("httpSessionID"); + logger.debug("httpSessionID: " + httpSessionID); + + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + String editQuestionBoxRequest=request.getParameter("editQuestionBoxRequest"); + logger.debug("editQuestionBoxRequest: " + editQuestionBoxRequest); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString()); + + AuthoringUtil authoringUtil= new AuthoringUtil(); + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + + String newQuestion=request.getParameter("newQuestion"); + logger.debug("newQuestion: " + newQuestion); + + String feedback=request.getParameter("feedback"); + logger.debug("feedback: " + feedback); + + + String editableQuestionIndex=request.getParameter("editableQuestionIndex"); + logger.debug("editableQuestionIndex: " + editableQuestionIndex); + + + if ((newQuestion != null) && (newQuestion.length() > 0)) + { + if ((editQuestionBoxRequest != null) && (editQuestionBoxRequest.equals("false"))) + { + logger.debug("request for add and save"); + boolean duplicates=AuthoringUtil.checkDuplicateQuestions(listQuestionContentDTO, newQuestion); + logger.debug("duplicates: " + duplicates); + + if (!duplicates) + { + QaQuestionContentDTO qaQuestionContentDTO= null; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + String question=qaQuestionContentDTO.getQuestion(); + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + logger.debug("displayOrder:" + displayOrder); + + if ((displayOrder != null) && (!displayOrder.equals(""))) + { + if (displayOrder.equals(editableQuestionIndex)) + { + break; + } + + } + } + logger.debug("qaQuestionContentDTO found:" + qaQuestionContentDTO); + + qaQuestionContentDTO.setQuestion(newQuestion); + qaQuestionContentDTO.setFeedback(feedback); + qaQuestionContentDTO.setDisplayOrder(editableQuestionIndex); + + listQuestionContentDTO=AuthoringUtil.reorderUpdateListQuestionContentDTO(listQuestionContentDTO, qaQuestionContentDTO, editableQuestionIndex); + logger.debug("post reorderUpdateListQuestionContentDTO listQuestionContentDTO: " + listQuestionContentDTO); + } + else + { + logger.debug("duplicate question entry, not adding"); + } + } + else + { + logger.debug("request for edit and save."); + QaQuestionContentDTO qaQuestionContentDTO= null; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + String question=qaQuestionContentDTO.getQuestion(); + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + logger.debug("displayOrder:" + displayOrder); + + if ((displayOrder != null) && (!displayOrder.equals(""))) + { + if (displayOrder.equals(editableQuestionIndex)) + { + break; + } + + } + } + logger.debug("qaQuestionContentDTO found:" + qaQuestionContentDTO); + + qaQuestionContentDTO.setQuestion(newQuestion); + qaQuestionContentDTO.setFeedback(feedback); + qaQuestionContentDTO.setDisplayOrder(editableQuestionIndex); + + listQuestionContentDTO=AuthoringUtil.reorderUpdateListQuestionContentDTO(listQuestionContentDTO, qaQuestionContentDTO, editableQuestionIndex); + logger.debug("post reorderUpdateListQuestionContentDTO listQuestionContentDTO: " + listQuestionContentDTO); + } + } + else + { + logger.debug("entry blank, not adding"); + } + + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + logger.debug("listQuestionContentDTO now: " + listQuestionContentDTO); + + + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + + request.getSession().setAttribute(httpSessionID, sessionMap); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("3"); + + + logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + logger.debug("httpSessionID: " + httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + request.getSession().setAttribute(httpSessionID, sessionMap); + logger.debug("qaGeneralAuthoringDTO.getMapQuestionContent(); " + qaGeneralAuthoringDTO.getMapQuestionContent()); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + /*start monitoring code*/ + GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); + + if (qaService.studentActivityOccurredGlobal(qaContent)) + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + } + else + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + } + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + + qaGeneralMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaGeneralMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + qaGeneralMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final qaGeneralMonitoringDTO: " + qaGeneralMonitoringDTO ); + + + logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + + prepareReflectionData(request, qaContent, qaService, null, false); + + /*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); + + return mapping.findForward(LOAD_MONITORING); + } + + + + public ActionForward addSingleQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException + { + logger.debug("dispathcing proxy addSingleQuestion"); + + /*start authoring code*/ + QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; + logger.debug("dispathcing addSingleQuestion"); + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=request.getParameter("httpSessionID"); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString()); + + AuthoringUtil authoringUtil= new AuthoringUtil(); + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + String newQuestion=request.getParameter("newQuestion"); + logger.debug("newQuestion: " + newQuestion); + + String feedback=request.getParameter("feedback"); + logger.debug("feedback: " + feedback); + + + int listSize=listQuestionContentDTO.size(); + logger.debug("listSize: " + listSize); + + if ((newQuestion != null) && (newQuestion.length() > 0)) + { + boolean duplicates=AuthoringUtil.checkDuplicateQuestions(listQuestionContentDTO, newQuestion); + logger.debug("duplicates: " + duplicates); + + if (!duplicates) + { + QaQuestionContentDTO qaQuestionContentDTO=new QaQuestionContentDTO(); + qaQuestionContentDTO.setDisplayOrder(new Long(listSize+1).toString()); + qaQuestionContentDTO.setFeedback(feedback); + qaQuestionContentDTO.setQuestion(newQuestion); + + listQuestionContentDTO.add(qaQuestionContentDTO); + logger.debug("updated listQuestionContentDTO: " + listQuestionContentDTO); + } + else + { + logger.debug("entry duplicate, not adding"); + } + } + else + { + logger.debug("entry blank, not adding"); + } + + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + request.getSession().setAttribute(httpSessionID, sessionMap); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("3"); + + logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + logger.debug("httpSessionID: " + httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + request.getSession().setAttribute(httpSessionID, sessionMap); + + logger.debug("qaGeneralAuthoringDTO.getMapQuestionContent(); " + qaGeneralAuthoringDTO.getMapQuestionContent()); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + /*start monitoring code*/ + GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); + + if (qaService.studentActivityOccurredGlobal(qaContent)) + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + } + else + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + } + + qaGeneralMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaGeneralMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + qaGeneralMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final qaGeneralMonitoringDTO: " + qaGeneralMonitoringDTO ); + + + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + + prepareReflectionData(request, qaContent, qaService, null, false); + + /*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); + + return mapping.findForward(LOAD_MONITORING); + } + + + + public ActionForward newQuestionBox(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException + { + logger.debug("dispathcing proxy newQuestionBox"); + + /*start authoring code*/ + QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; + logger.debug("dispathcing newQuestionBox"); + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=request.getParameter("httpSessionID"); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + /*start monitoring code*/ + GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); + + if (qaService.studentActivityOccurredGlobal(qaContent)) + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + } + else + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + } + + + qaGeneralMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaGeneralMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + qaGeneralMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final qaGeneralMonitoringDTO: " + qaGeneralMonitoringDTO ); + + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + + prepareReflectionData(request, qaContent, qaService, null, false); + + /*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); + + logger.debug("fwd ing to newQuestionBox: "); + return (mapping.findForward("newQuestionBox")); + } + + + + public ActionForward newEditableQuestionBox(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException + { + logger.debug("dispathcing proxy newEditableQuestionBox"); + + /*start authoring code*/ + QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; + logger.debug("dispathcing newEditableQuestionBox"); + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=request.getParameter("httpSessionID"); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + + String questionIndex=request.getParameter("questionIndex"); + logger.debug("questionIndex: " + questionIndex); + + qaAuthoringForm.setEditableQuestionIndex(questionIndex); + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + String editableQuestion=""; + String editableFeedback=""; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + String question=qaQuestionContentDTO.getQuestion(); + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + + if ((displayOrder != null) && (!displayOrder.equals(""))) + { + if (displayOrder.equals(questionIndex)) + { + editableFeedback=qaQuestionContentDTO.getFeedback(); + editableQuestion=qaQuestionContentDTO.getQuestion(); + logger.debug("editableFeedback found :" + editableFeedback); + break; + } + + } + } + logger.debug("editableFeedback found :" + editableFeedback); + logger.debug("editableQuestion found :" + editableQuestion); + + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + logger.debug("richTextTitle: " + richTextTitle); + logger.debug("richTextInstructions: " + richTextInstructions); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + qaGeneralAuthoringDTO.setEditableQuestionText(editableQuestion); + qaGeneralAuthoringDTO.setEditableQuestionFeedback (editableFeedback); + qaAuthoringForm.setFeedback(editableFeedback); + + logger.debug("qaGeneralAuthoringDTO now: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + /*start monitoring code*/ + GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); + + if (qaService.studentActivityOccurredGlobal(qaContent)) + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + } + else + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + } + + qaGeneralMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaGeneralMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + qaGeneralMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final qaGeneralMonitoringDTO: " + qaGeneralMonitoringDTO ); + + + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + + prepareReflectionData(request, qaContent, qaService, null, false); + + /*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); + + logger.debug("fwd ing to editQuestionBox: "); + return (mapping.findForward("editQuestionBox")); + } + + + + + public ActionForward removeQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + logger.debug("dispathcing proxy removeQuestion"); + + /*start authoring code*/ + QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; + logger.debug("dispathcing removeQuestion"); + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=request.getParameter("httpSessionID"); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String questionIndex=request.getParameter("questionIndex"); + logger.debug("questionIndex: " + questionIndex); + + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + QaQuestionContentDTO qaQuestionContentDTO= null; + Iterator listIterator=listQuestionContentDTO.iterator(); + while (listIterator.hasNext()) + { + qaQuestionContentDTO= (QaQuestionContentDTO)listIterator.next(); + logger.debug("qaQuestionContentDTO:" + qaQuestionContentDTO); + logger.debug("qaQuestionContentDTO question:" + qaQuestionContentDTO.getQuestion()); + + String question=qaQuestionContentDTO.getQuestion(); + String displayOrder=qaQuestionContentDTO.getDisplayOrder(); + logger.debug("displayOrder:" + displayOrder); + + if ((displayOrder != null) && (!displayOrder.equals(""))) { - logger.debug("question: " + qaQueContent.getQuestion()); - mapQuestionContent.put(mapIndex.toString(),qaQueContent.getQuestion()); - /** - * make the first entry the default(first) one for jsp - */ - if (mapIndex.longValue() == 1) - qaGeneralAuthoringDTO.setDefaultQuestionContent(qaQueContent.getQuestion()); - mapIndex=new Long(mapIndex.longValue()+1); + if (displayOrder.equals(questionIndex)) + { + break; + } + } + } + + logger.debug("qaQuestionContentDTO found:" + qaQuestionContentDTO); + qaQuestionContentDTO.setQuestion(""); + logger.debug("listQuestionContentDTO after remove:" + listQuestionContentDTO); + + + listQuestionContentDTO=AuthoringUtil.reorderListQuestionContentDTO(listQuestionContentDTO, questionIndex ); + logger.debug("listQuestionContentDTO reordered:" + listQuestionContentDTO); + + + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String richTextTitle = request.getParameter(TITLE); + logger.debug("richTextTitle: " + richTextTitle); + + String richTextInstructions = request.getParameter(INSTRUCTIONS); + logger.debug("richTextInstructions: " + richTextInstructions); + + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); } - logger.debug("Map initialized with mapQuestionContent: " + mapQuestionContent); - qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); + logger.debug("final qaContent: " + qaContent); + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - logger.debug("final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + + AuthoringUtil authoringUtil= new AuthoringUtil(); + + qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + + request.getSession().setAttribute(httpSessionID, sessionMap); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("3"); + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + logger.debug("qaQuestionContentDTO now: " + qaQuestionContentDTO); + logger.debug("listQuestionContentDTO now: " + listQuestionContentDTO); + + + logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - } + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + /*start monitoring code*/ + GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); + + if (qaService.studentActivityOccurredGlobal(qaContent)) + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + } + else + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + } + + qaGeneralMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaGeneralMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + qaGeneralMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final qaGeneralMonitoringDTO: " + qaGeneralMonitoringDTO ); + + + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + + prepareReflectionData(request, qaContent, qaService, null, false); + + /*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); + + return mapping.findForward(LOAD_MONITORING); + } + + + + + public ActionForward moveQuestionDown(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + logger.debug("dispathcing proxy moveQuestionDown"); + + /*start authoring code*/ + QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; + logger.debug("dispathcing moveQuestionDown"); + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=request.getParameter("httpSessionID"); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String questionIndex=request.getParameter("questionIndex"); + logger.debug("questionIndex: " + questionIndex); + + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + listQuestionContentDTO=AuthoringUtil.swapNodes(listQuestionContentDTO, questionIndex, "down"); + logger.debug("listQuestionContentDTO after swap: " + listQuestionContentDTO); + + listQuestionContentDTO=AuthoringUtil.reorderSimpleListQuestionContentDTO(listQuestionContentDTO); + logger.debug("listQuestionContentDTO after reordersimple: " + listQuestionContentDTO); + + + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String richTextTitle = request.getParameter(TITLE); + logger.debug("richTextTitle: " + richTextTitle); + + String richTextInstructions = request.getParameter(INSTRUCTIONS); + logger.debug("richTextInstructions: " + richTextInstructions); + + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + AuthoringUtil authoringUtil= new AuthoringUtil(); + + qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + request.getSession().setAttribute(httpSessionID, sessionMap); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("3"); + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + logger.debug("listQuestionContentDTO now: " + listQuestionContentDTO); + + + logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + /*start monitoring code*/ + GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); + + if (qaService.studentActivityOccurredGlobal(qaContent)) + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + } + else + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + } + + qaGeneralMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaGeneralMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + qaGeneralMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final qaGeneralMonitoringDTO: " + qaGeneralMonitoringDTO ); + + + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + + prepareReflectionData(request, qaContent, qaService, null, false); + + /*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); + + return mapping.findForward(LOAD_MONITORING); + + } + + + + public ActionForward moveQuestionUp(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + logger.debug("dispathcing proxy moveQuestionUp"); + + /*start authoring code*/ + QaAuthoringForm qaAuthoringForm = (QaMonitoringForm) form; + logger.debug("dispathcing moveQuestionDown"); + + IQaService qaService =QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String httpSessionID=request.getParameter("httpSessionID"); + logger.debug("httpSessionID: " + httpSessionID); + + SessionMap sessionMap=(SessionMap)request.getSession().getAttribute(httpSessionID); + logger.debug("sessionMap: " + sessionMap); + + String questionIndex=request.getParameter("questionIndex"); + logger.debug("questionIndex: " + questionIndex); + + + List listQuestionContentDTO=(List)sessionMap.get(LIST_QUESTION_CONTENT_DTO_KEY); + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + + listQuestionContentDTO=AuthoringUtil.swapNodes(listQuestionContentDTO, questionIndex, "up"); + logger.debug("listQuestionContentDTO after swap: " + listQuestionContentDTO); + + listQuestionContentDTO=AuthoringUtil.reorderSimpleListQuestionContentDTO(listQuestionContentDTO); + logger.debug("listQuestionContentDTO after reordersimple: " + listQuestionContentDTO); + + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + + + String activeModule=request.getParameter(ACTIVE_MODULE); + logger.debug("activeModule: " + activeModule); + + String richTextTitle = request.getParameter(TITLE); + logger.debug("richTextTitle: " + richTextTitle); + + String richTextInstructions = request.getParameter(INSTRUCTIONS); + logger.debug("richTextInstructions: " + richTextInstructions); + + + sessionMap.put(ACTIVITY_TITLE_KEY, richTextTitle); + sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); + + + String strToolContentID=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + logger.debug("strToolContentID: " + strToolContentID); + + String defaultContentIdStr=request.getParameter(DEFAULT_CONTENT_ID_STR); + logger.debug("defaultContentIdStr: " + defaultContentIdStr); + + QaContent qaContent=qaService.loadQa(new Long(strToolContentID).longValue()); + logger.debug("qaContent: " + qaContent); + + if (qaContent == null) + { + logger.debug("using defaultContentIdStr: " + defaultContentIdStr); + qaContent=qaService.loadQa(new Long(defaultContentIdStr).longValue()); + } + logger.debug("final qaContent: " + qaContent); + + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); + logger.debug("qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + + qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); + qaAuthoringForm.setTitle(richTextTitle); + + qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + + AuthoringUtil authoringUtil= new AuthoringUtil(); + + qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + + request.getSession().setAttribute(httpSessionID, sessionMap); + + QaUtils.setFormProperties(request, qaService, + qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule, sessionMap, httpSessionID); + + + qaGeneralAuthoringDTO.setToolContentID(strToolContentID); + qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + qaGeneralAuthoringDTO.setActiveModule(activeModule); + qaGeneralAuthoringDTO.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setToolContentID(strToolContentID); + qaAuthoringForm.setHttpSessionID(httpSessionID); + qaAuthoringForm.setActiveModule(activeModule); + qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); + qaAuthoringForm.setCurrentTab("3"); + + + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + logger.debug("listQuestionContentDTO now: " + listQuestionContentDTO); + + + logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); + + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + /*start monitoring code*/ + GeneralMonitoringDTO qaGeneralMonitoringDTO=new GeneralMonitoringDTO(); + + if (qaService.studentActivityOccurredGlobal(qaContent)) + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + } + else + { + logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true"); + qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + } + + qaGeneralMonitoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaGeneralMonitoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); + logger.debug("attachmentList: " + attachmentList); + qaGeneralMonitoringDTO.setAttachmentList(attachmentList); + logger.debug("final qaGeneralMonitoringDTO: " + qaGeneralMonitoringDTO ); + + + qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); + logger.debug("final generalMonitoringDTO: " + qaGeneralMonitoringDTO ); + request.setAttribute(QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); + + prepareReflectionData(request, qaContent, qaService, null, false); + + /*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); + + return mapping.findForward(LOAD_MONITORING); + } + } \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java (.../QaMonitoringForm.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringForm.java (.../QaMonitoringForm.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,9 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -4,8 +4,8 @@ * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -27,9 +27,8 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; -import java.util.Map; -import java.util.TreeMap; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -48,12 +47,13 @@ import org.lamsfoundation.lams.tool.qa.GeneralMonitoringDTO; import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaApplicationException; -import org.lamsfoundation.lams.tool.qa.QaComparator; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaQueContent; +import org.lamsfoundation.lams.tool.qa.QaQuestionContentDTO; import org.lamsfoundation.lams.tool.qa.QaUtils; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; +import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; @@ -103,7 +103,12 @@ logger.debug("qaService: " + qaService); qaMonitoringForm.setQaService(qaService); + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaMonitoringForm.setContentFolderID(contentFolderID); + + ActionForward validateParameters=validateParameters(request, mapping, qaMonitoringForm); logger.debug("validateParamaters: " + validateParameters); if (validateParameters != null) @@ -122,7 +127,9 @@ logger.debug("setting current tab to 1: "); generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + generalMonitoringDTO.setContentFolderID(contentFolderID); + QaMonitoringAction qaMonitoringAction= new QaMonitoringAction(); logger.debug("calling initSummaryContent."); qaMonitoringAction.initSummaryContent(mapping, form, request, response); @@ -138,36 +145,6 @@ QaContent qaContent=qaService.loadQa(new Long(toolContentID).longValue()); logger.debug("existing qaContent:" + qaContent); - Map mapQuestionContent= new TreeMap(new QaComparator()); - logger.debug("mapQuestionContent: " + mapQuestionContent); - /* - * get the existing question content - */ - logger.debug("setting existing content data from the db"); - mapQuestionContent.clear(); - Iterator queIterator=qaContent.getQaQueContents().iterator(); - Long mapIndex=new Long(1); - logger.debug("mapQuestionContent: " + mapQuestionContent); - while (queIterator.hasNext()) - { - QaQueContent qaQueContent=(QaQueContent) queIterator.next(); - if (qaQueContent != null) - { - logger.debug("question: " + qaQueContent.getQuestion()); - mapQuestionContent.put(mapIndex.toString(),qaQueContent.getQuestion()); - /** - * make the first entry the default(first) one for jsp - */ - if (mapIndex.longValue() == 1) - generalMonitoringDTO.setDefaultQuestionContent(qaQueContent.getQuestion()); - mapIndex=new Long(mapIndex.longValue()+1); - } - } - logger.debug("Map initialized with existing contentid to: " + mapQuestionContent); - logger.debug("callling presentInitialUserInterface for the existing content."); - - generalMonitoringDTO.setMapQuestionContent(mapQuestionContent); - /*true means there is at least 1 response*/ if (qaService.studentActivityOccurredGlobal(qaContent)) { @@ -190,16 +167,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); generalMonitoringDTO.setAttachmentList(attachmentList); @@ -225,19 +192,60 @@ /*for Edit Activity screen, BasicTab-ViewOnly*/ - qaMonitoringAction.preparEditActivityScreenData(request, qaContent); + qaMonitoringAction.prepareEditActivityScreenData(request, qaContent); SessionMap sessionMap = new SessionMap(); sessionMap.put(ACTIVITY_TITLE_KEY, qaContent.getTitle()); sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, qaContent.getInstructions()); - sessionMap.put(MAP_QUESTION_CONTENT_KEY, mapQuestionContent); - + qaMonitoringForm.setHttpSessionID(sessionMap.getSessionID()); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + + List listQuestionContentDTO= new LinkedList(); + + Iterator queIterator=qaContent.getQaQueContents().iterator(); + while (queIterator.hasNext()) + { + QaQuestionContentDTO qaQuestionContentDTO=new QaQuestionContentDTO(); + + QaQueContent qaQueContent=(QaQueContent) queIterator.next(); + if (qaQueContent != null) + { + logger.debug("question: " + qaQueContent.getQuestion()); + logger.debug("displayorder: " + new Integer(qaQueContent.getDisplayOrder()).toString()); + logger.debug("feedback: " + qaQueContent.getFeedback()); + + qaQuestionContentDTO.setQuestion(qaQueContent.getQuestion()); + qaQuestionContentDTO.setDisplayOrder(new Integer(qaQueContent.getDisplayOrder()).toString()); + qaQuestionContentDTO.setFeedback(qaQueContent.getFeedback()); + listQuestionContentDTO.add(qaQuestionContentDTO); + } + } + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + + 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); + + logger.debug("fwding to : " + LOAD_MONITORING); return (mapping.findForward(LOAD_MONITORING)); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,11 +1,11 @@ -/*************************************************************************** +/**************************************************************** * 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.0 - * as published by the Free Software Foundation. + * 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 @@ -18,7 +18,8 @@ * USA * * http://www.gnu.org/licenses/gpl.txt - * ***********************************************************************/ + * **************************************************************** + */ /** * @author Ozgur Demirtas @@ -153,9 +154,11 @@ import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.QaQueContent; +import org.lamsfoundation.lams.tool.qa.QaQuestionContentDTO; import org.lamsfoundation.lams.tool.qa.QaUtils; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; +import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; @@ -178,9 +181,14 @@ logger.debug("init authoring mode."); QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form; logger.debug("qaAuthoringForm: " + qaAuthoringForm); - + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + logger.debug("contentFolderID: " + contentFolderID); + qaAuthoringForm.setContentFolderID(contentFolderID); + QaGeneralAuthoringDTO qaGeneralAuthoringDTO= new QaGeneralAuthoringDTO(); - + qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); + Map mapQuestionContent= new TreeMap(new QaComparator()); logger.debug("mapQuestionContent: " + mapQuestionContent); @@ -300,8 +308,7 @@ if ((strToolContentID == null) || (strToolContentID.equals(""))) { QaUtils.cleanUpSessionAbsolute(request); - //persistError(request,"error.contentId.required"); - logger.debug("forwarding to: " + ERROR_LIST); + logger.debug("forwarding to: " + ERROR_LIST); return (mapping.findForward(ERROR_LIST)); } @@ -349,15 +356,20 @@ logger.debug("post retrive content :" + sessionMap); } + logger.debug("qaGeneralAuthoringDTO.getOnlineInstructions() :" + qaGeneralAuthoringDTO.getOnlineInstructions()); + logger.debug("qaGeneralAuthoringDTO.getOfflineInstructions():" + qaGeneralAuthoringDTO.getOfflineInstructions()); + if ((qaGeneralAuthoringDTO.getOnlineInstructions() == null) || (qaGeneralAuthoringDTO.getOnlineInstructions().length() == 0)) { qaGeneralAuthoringDTO.setOnlineInstructions(DEFAULT_ONLINE_INST); + qaAuthoringForm.setOnlineInstructions(DEFAULT_ONLINE_INST); sessionMap.put(ONLINE_INSTRUCTIONS_KEY, DEFAULT_ONLINE_INST); } if ((qaGeneralAuthoringDTO.getOfflineInstructions() == null) || (qaGeneralAuthoringDTO.getOfflineInstructions().length() == 0)) { qaGeneralAuthoringDTO.setOfflineInstructions(DEFAULT_OFFLINE_INST); + qaAuthoringForm.setOfflineInstructions(DEFAULT_OFFLINE_INST); sessionMap.put(OFFLINE_INSTRUCTIONS_KEY, DEFAULT_OFFLINE_INST); } @@ -370,6 +382,7 @@ Map mapQuestionContentLocal=qaGeneralAuthoringDTO.getMapQuestionContent(); logger.debug("mapQuestionContentLocal: " + mapQuestionContentLocal); + logger.debug("mapQuestionContent: " + mapQuestionContent); sessionMap.put(MAP_QUESTION_CONTENT_KEY, mapQuestionContent); logger.debug("persisting sessionMap into session: " + sessionMap); @@ -409,19 +422,16 @@ QaUtils.populateAuthoringDTO(request, qaContent, qaGeneralAuthoringDTO); - //qaAuthoringForm.setUsernameVisible(qaContent.isUsernameVisible()?ON:OFF); qaAuthoringForm.setUsernameVisible(qaContent.isUsernameVisible()?"1":"0"); - - //qaAuthoringForm.setSynchInMonitor(qaContent.isSynchInMonitor()?ON:OFF); qaAuthoringForm.setSynchInMonitor(qaContent.isSynchInMonitor()?"1":"0"); - - //qaAuthoringForm.setQuestionsSequenced(qaContent.isQuestionsSequenced()?ON:OFF); qaAuthoringForm.setQuestionsSequenced(qaContent.isQuestionsSequenced()?"1":"0"); + qaGeneralAuthoringDTO.setReflect(qaContent.isReflect()?"1":"0"); logger.debug("QaContent isReflect: " + qaContent.isReflect()); qaAuthoringForm.setReflect(qaContent.isReflect()?"1":"0"); qaAuthoringForm.setReflectionSubject(qaContent.getReflectionSubject()); + qaGeneralAuthoringDTO.setReflectionSubject(qaContent.getReflectionSubject()); List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); qaGeneralAuthoringDTO.setAttachmentList(attachmentList); @@ -436,25 +446,31 @@ if (qaContent.getTitle() == null) { qaGeneralAuthoringDTO.setActivityTitle(DEFAULT_QA_TITLE); + qaAuthoringForm.setTitle(DEFAULT_QA_TITLE); } else { qaGeneralAuthoringDTO.setActivityTitle(qaContent.getTitle()); + qaAuthoringForm.setTitle(qaContent.getTitle()); } if (qaContent.getInstructions() == null) { qaGeneralAuthoringDTO.setActivityInstructions(DEFAULT_QA_INSTRUCTIONS); + qaAuthoringForm.setInstructions(DEFAULT_QA_INSTRUCTIONS); } else { qaGeneralAuthoringDTO.setActivityInstructions( qaContent.getInstructions()); + qaAuthoringForm.setInstructions(qaContent.getInstructions()); } sessionMap.put(ACTIVITY_TITLE_KEY, qaGeneralAuthoringDTO.getActivityTitle()); sessionMap.put(ACTIVITY_INSTRUCTIONS_KEY, qaGeneralAuthoringDTO.getActivityInstructions()); + + List listQuestionContentDTO= new LinkedList(); /* * get the existing question content @@ -466,11 +482,21 @@ logger.debug("mapQuestionContent: " + mapQuestionContent); while (queIterator.hasNext()) { + QaQuestionContentDTO qaQuestionContentDTO=new QaQuestionContentDTO(); + QaQueContent qaQueContent=(QaQueContent) queIterator.next(); if (qaQueContent != null) { logger.debug("question: " + qaQueContent.getQuestion()); - mapQuestionContent.put(mapIndex.toString(),qaQueContent.getQuestion()); + logger.debug("displayorder: " + new Integer(qaQueContent.getDisplayOrder()).toString()); + logger.debug("feedback: " + qaQueContent.getFeedback()); + + mapQuestionContent.put(mapIndex.toString(),qaQueContent.getQuestion()); + + qaQuestionContentDTO.setQuestion(qaQueContent.getQuestion()); + qaQuestionContentDTO.setDisplayOrder(new Integer(qaQueContent.getDisplayOrder()).toString()); + qaQuestionContentDTO.setFeedback(qaQueContent.getFeedback()); + listQuestionContentDTO.add(qaQuestionContentDTO); /** * make the first entry the default(first) one for jsp */ @@ -481,7 +507,14 @@ } logger.debug("Map initialized with existing contentid to: " + mapQuestionContent); + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(mapQuestionContent.size())); + + logger.debug("listQuestionContentDTO: " + listQuestionContentDTO); + request.setAttribute(LIST_QUESTION_CONTENT_DTO,listQuestionContentDTO); + sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + + if (isDefaultContent) { logger.debug("overwriting default question."); @@ -492,6 +525,19 @@ logger.debug("mapQuestionContent is:" + mapQuestionContent); qaGeneralAuthoringDTO.setMapQuestionContent(mapQuestionContent); + + logger.debug("qaContent.getOnlineInstructions():" + qaContent.getOnlineInstructions()); + logger.debug("qaContent.getOfflineInstructions():" + qaContent.getOfflineInstructions()); + qaGeneralAuthoringDTO.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaGeneralAuthoringDTO.setOfflineInstructions(qaContent.getOfflineInstructions()); + + qaAuthoringForm.setOnlineInstructions(qaContent.getOnlineInstructions()); + qaAuthoringForm.setOfflineInstructions(qaContent.getOfflineInstructions()); + sessionMap.put(ONLINE_INSTRUCTIONS_KEY, qaContent.getOnlineInstructions()); + sessionMap.put(OFFLINE_INSTRUCTIONS_KEY, qaContent.getOfflineInstructions()); + + logger.debug("ACTIVITY_TITLE_KEY set to:" + sessionMap.get(ACTIVITY_TITLE_KEY )); + qaAuthoringForm.resetUserAction(); logger.debug("returning qaContent:" + qaContent); return qaContent; @@ -525,7 +571,6 @@ { QaUtils.cleanUpSessionAbsolute(request); logger.debug("default content id has not been setup"); - //persistError(request,"error.defaultContent.notSetup"); return (mapping.findForward(ERROR_LIST)); } } Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/AbstractQaTestCase.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/AbstractQaTestCase.java (.../AbstractQaTestCase.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/AbstractQaTestCase.java (.../AbstractQaTestCase.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -14,7 +14,7 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/AllTests.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/AllTests.java (.../AllTests.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/AllTests.java (.../AllTests.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,24 +1,23 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaDataAccessTestCase.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaDataAccessTestCase.java (.../QaDataAccessTestCase.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaDataAccessTestCase.java (.../QaDataAccessTestCase.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,24 +1,23 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaContent.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaContent.java (.../TestQaContent.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaContent.java (.../TestQaContent.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,24 +1,23 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaQueContent.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaQueContent.java (.../TestQaQueContent.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaQueContent.java (.../TestQaQueContent.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,25 +1,24 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; /* Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaQueUsr.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaQueUsr.java (.../TestQaQueUsr.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaQueUsr.java (.../TestQaQueUsr.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,25 +1,24 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaSession.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaSession.java (.../TestQaSession.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaSession.java (.../TestQaSession.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,25 +1,24 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaUsrResp.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaUsrResp.java (.../TestQaUsrResp.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/TestQaUsrResp.java (.../TestQaUsrResp.java) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,25 +1,24 @@ /*************************************************************************** - * 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.0 - * 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 - * ***********************************************************************/ +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 +* ***********************************************************************/ + /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa; Index: lams_tool_laqa/test/web/WEB-INF/tiles/tiles-defs.xml =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/test/web/WEB-INF/tiles/tiles-defs.xml (.../tiles-defs.xml) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/test/web/WEB-INF/tiles/tiles-defs.xml (.../tiles-defs.xml) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -15,7 +15,7 @@ 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 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA http://www.gnu.org/licenses/gpl.txt Index: lams_tool_laqa/web/AuthoringMaincontent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/AuthoringMaincontent.jsp (.../AuthoringMaincontent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/AuthoringMaincontent.jsp (.../AuthoringMaincontent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,23 +13,13 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> <%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> - -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> - Index: lams_tool_laqa/web/BaseContent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/BaseContent.jsp (.../BaseContent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/BaseContent.jsp (.../BaseContent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/Errorbox.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/Errorbox.jsp (.../Errorbox.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/Errorbox.jsp (.../Errorbox.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/Footer.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/Footer.jsp (.../Footer.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/Footer.jsp (.../Footer.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> \ No newline at end of file Index: lams_tool_laqa/web/Header.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/Header.jsp (.../Header.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/Header.jsp (.../Header.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,16 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> - Index: lams_tool_laqa/web/QaErrorBox.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/QaErrorBox.jsp (.../QaErrorBox.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/QaErrorBox.jsp (.../QaErrorBox.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,12 +13,10 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> - Index: lams_tool_laqa/web/SystemErrorContent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/SystemErrorContent.jsp (.../SystemErrorContent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/SystemErrorContent.jsp (.../SystemErrorContent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,21 +13,12 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> - -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> - + + + -
Index: lams_tool_laqa/web/Template.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/Template.jsp (.../Template.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/Template.jsp (.../Template.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,21 +13,11 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> -<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> - Index: lams_tool_laqa/web/WEB-INF/fckeditor/tlds/FCKeditor.tld =================================================================== diff -u -r673efe2cf1287003e7962dca49626c1ebe8ae9e1 -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/fckeditor/tlds/FCKeditor.tld (.../FCKeditor.tld) (revision 673efe2cf1287003e7962dca49626c1ebe8ae9e1) +++ lams_tool_laqa/web/WEB-INF/fckeditor/tlds/FCKeditor.tld (.../FCKeditor.tld) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -14,6 +14,7 @@ id true + true basePath Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/jstl/tlds/permittedTaglibs.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/jstl/tlds/scriptfree.tld'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/web/WEB-INF/lams.tld =================================================================== diff -u -r6b48d7643dda77bdad77a24c3af3f0b3d9cec1c2 -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/lams.tld (.../lams.tld) (revision 6b48d7643dda77bdad77a24c3af3f0b3d9cec1c2) +++ lams_tool_laqa/web/WEB-INF/lams.tld (.../lams.tld) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -24,6 +24,46 @@ + converts text from \n or \r\n to <BR> before rendering + converts text from \n or \r\n to <BR> before rendering + + + out + org.lamsfoundation.lams.web.tag.MultiLinesOutputTag + empty + + + converts text from \n or \r\n to <BR> before rendering + value + true + + true + + + + + + + Render html tag with direction and language + Render html tag with direction and language + + + html + org.lamsfoundation.lams.web.tag.HtmlTag + JSP + + + Render html tag with direction and language + xhtml + false + + true + + + + + + Output a random number for the learner and passon flash movies to communicate directly. generate unique ID @@ -287,14 +327,10 @@ /WEB-INF/tags/TabBody.tag - HTMLEditor - /WEB-INF/tags/HTMLEditor.tag + FCKEditor + /WEB-INF/tags/FCKEditor.tag - SetEditor - /WEB-INF/tags/SetEditor.tag - - AuthoringButton /WEB-INF/tags/AuthoringButton.tag @@ -314,5 +350,9 @@ Date /WEB-INF/tags/Date.tag + + DefineLater + /WEB-INF/tags/DefineLater.tag + Index: lams_tool_laqa/web/WEB-INF/struts-config.xml =================================================================== diff -u -r09d8bc5a449269ac83f198afa78137b58305080c -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 09d8bc5a449269ac83f198afa78137b58305080c) +++ lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -113,7 +113,20 @@ path="/authoring/AuthoringTabsHolder.jsp" redirect="false" /> - + + + + + + @@ -334,7 +347,7 @@ type="org.lamsfoundation.lams.tool.qa.web.QaMonitoringAction" name="QaMonitoringForm" scope="request" - parameter="method" + parameter="dispatch" unknown="false" validate="true"> @@ -361,6 +374,18 @@ path="/authoring/AuthoringTabsHolder.jsp" redirect="false" /> + + + + <%@ attribute name="toolSignature" required="true" rtexprvalue="true" %> <%@ attribute name="toolContentID" required="true" rtexprvalue="true" %> +<%@ attribute name="contentFolderID" required="true" rtexprvalue="true" %> <%@ attribute name="clearSessionActionUrl" required="true" rtexprvalue="true" %> <%-- Optional attribute --%> @@ -45,6 +46,7 @@ <%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> <%@ attribute name="cancelConfirmMsgKey" required="false" rtexprvalue="true" %> <%@ attribute name="defineLater" required="false" rtexprvalue="true" %> +<%@ attribute name="customiseSessionID" required="false" rtexprvalue="true" %> <%-- Default value for message key --%> @@ -63,14 +65,14 @@ -

+

Index: lams_tool_laqa/web/WEB-INF/tags/Date.tag =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/tags/Date.tag (.../Date.tag) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/WEB-INF/tags/Date.tag (.../Date.tag) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt Index: lams_tool_laqa/web/WEB-INF/tags/DefineLater.tag =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/tags/DefineLater.tag (.../DefineLater.tag) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/WEB-INF/tags/DefineLater.tag (.../DefineLater.tag) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt Index: lams_tool_laqa/web/WEB-INF/tags/ExportPortOutput.tag =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/tags/ExportPortOutput.tag (.../ExportPortOutput.tag) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/WEB-INF/tags/ExportPortOutput.tag (.../ExportPortOutput.tag) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/tags/HTMLEditor.tag'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/web/WEB-INF/tags/Passon.tag =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/tags/Passon.tag (.../Passon.tag) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/WEB-INF/tags/Passon.tag (.../Passon.tag) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt @@ -33,16 +33,20 @@ <%@ tag body-content="empty" %> <%@ attribute name="progress" required="true" rtexprvalue="true" type="java.lang.String" %> <%@ attribute name="id" required="true" rtexprvalue="true" %> +<%@ attribute name="redirect" required="false" rtexprvalue="true" %> <%@ taglib uri="tags-core" prefix="c" %> <%@ taglib uri="tags-lams" prefix="lams" %> - - - + + + + + + Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/WEB-INF/tags/SetEditor.tag'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/web/WEB-INF/tags/Tab.tag =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/tags/Tab.tag (.../Tab.tag) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/WEB-INF/tags/Tab.tag (.../Tab.tag) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -14,7 +14,7 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt Index: lams_tool_laqa/web/WEB-INF/tags/TabBody.tag =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/tags/TabBody.tag (.../TabBody.tag) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/WEB-INF/tags/TabBody.tag (.../TabBody.tag) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -14,7 +14,7 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt Index: lams_tool_laqa/web/WEB-INF/tags/Tabs.tag =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/tags/Tabs.tag (.../Tabs.tag) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/WEB-INF/tags/Tabs.tag (.../Tabs.tag) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -14,7 +14,7 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt Index: lams_tool_laqa/web/WEB-INF/tags/headItems.tag =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/tags/headItems.tag (.../headItems.tag) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/WEB-INF/tags/headItems.tag (.../headItems.tag) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -14,7 +14,7 @@ * * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt Index: lams_tool_laqa/web/WEB-INF/tiles/tiles-defs.xml =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/tiles/tiles-defs.xml (.../tiles-defs.xml) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/WEB-INF/tiles/tiles-defs.xml (.../tiles-defs.xml) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -15,7 +15,7 @@ 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 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA http://www.gnu.org/licenses/gpl.txt Index: lams_tool_laqa/web/WEB-INF/web.xml =================================================================== diff -u -r0409f98dc17dfd380badf33ae103a47d0fffc4e5 -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/WEB-INF/web.xml (.../web.xml) (revision 0409f98dc17dfd380badf33ae103a47d0fffc4e5) +++ lams_tool_laqa/web/WEB-INF/web.xml (.../web.xml) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -215,28 +215,129 @@ tags-xml /WEB-INF/jstl/tlds/x.tld - - - - - tags-permittedTaglibs - /WEB-INF/jstl/tlds/permittedTaglibs.tld - - - tags-scriptfree - /WEB-INF/jstl/tlds/scriptfree.tld - - - - - - fck-editor - /WEB-INF/fckeditor/tlds/FCKeditor.tld - - - tags-lams - /WEB-INF/lams.tld - + + + + + fck-editor + /WEB-INF/fckeditor/tlds/FCKeditor.tld + + + tags-lams + /WEB-INF/lams.tld + + + + + + Secure Content + /* + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + + + + + + Authoring Update + /authoring.do + + + AUTHOR + + + + + Staff Content + /monitoring.do + + + MONITOR + TEACHER + + + + + + Adminstrator Content + /admin.do + + + ADMIN + + + + + LAMS System Adminstrator Content + /sysadmin.do + + + SYSADMIN + + + + + + Download Files + /download/ + + + AUTHOR + MONITOR + TEACHER + ADMIN + SYSADMIN + + + + + + + + Student + LEARNER + + + Student + TEACHER + + + + Can create/modify a learning design + AUTHOR + + + + Can running and monitoring a learning session + MONITOR + + + + Can add/remove users to the system, set up classes of users for sessions + ADMIN + + + + Can add/remove users to the system, set up classes of users for sessions + SYSADMIN + + + + FORM + LAMS + + /login.jsp + /login.jsp?failed=y + + + + Index: lams_tool_laqa/web/authoring/AdvancedContent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/authoring/AdvancedContent.jsp (.../AdvancedContent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/authoring/AdvancedContent.jsp (.../AdvancedContent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,21 +13,13 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> +<%@ include file="/common/taglibs.jsp"%> -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> -

Index: lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp (.../AuthoringTabsHolder.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp (.../AuthoringTabsHolder.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,10 +1,9 @@ - -<%-- +<%-- 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 + 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, @@ -14,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> @@ -42,21 +40,32 @@ pageContext.setAttribute("tabsBasic", tabsBasic); %> - + <fmt:message key="activity.title" /> - + <%@ include file="/common/header.jsp"%> - <%@ include file="/common/fckeditorheader.jsp"%> - + + + - + +
@@ -137,8 +135,11 @@ + + <%@ include file="/common/messages.jsp"%> + @@ -167,10 +168,13 @@
- - + +
+ + + Index: lams_tool_laqa/web/authoring/BasicContent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,102 +13,124 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> +<%@ include file="/common/taglibs.jsp"%> + + +
-
- - - - + + + + - - + + - - - - - - - - - - - - - - - + + + - - - - images/delete.gif" align=left onclick="removeQuestion(${queIndex});"> - - - - images/delete.gif" align=left onclick="removeMonitoringQuestion(${queIndex});"> - - - - - - + + + + + + + + + + - - - - - - - -
- -
+
+ +
+ +
- -
+
+ +
+ +
- -
+ +
+
+ + <%@ include file="/authoring/itemlist.jsp"%> + + + <%@ include file="/monitoring/itemlist.jsp"%> + +
+
+ ');" + style="float:right;width:150px" class="button-add-item"> +
+ ');" + style="float:right;width:150px" class="button-add-item"> +
- - - -
+
+ +
+
+ + + + +
 
@@ -117,33 +139,19 @@

+ - + cancelButtonLabelKey="label.cancel" saveButtonLabelKey="label.save" toolContentID="${formBean.toolContentID}" + contentFolderID="${formBean.contentFolderID}" />
- - - - \ No newline at end of file + \ No newline at end of file Index: lams_tool_laqa/web/authoring/BasicContentViewOnly.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/authoring/BasicContentViewOnly.jsp (.../BasicContentViewOnly.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/authoring/BasicContentViewOnly.jsp (.../BasicContentViewOnly.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,70 +13,62 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> +<%@ include file="/common/taglibs.jsp"%> -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> + + -
- - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - + + + + +
: - -
: - -
- : - - -
+
+ +
+ +
+
+ +
+ +
: - -
+
+ <%@ include file="/authoring/itemlistViewOnly.jsp"%> +
+
+ - + + + + + + + \ No newline at end of file Index: lams_tool_laqa/web/authoring/InstructionsContent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/authoring/InstructionsContent.jsp (.../InstructionsContent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/authoring/InstructionsContent.jsp (.../InstructionsContent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,3 +1,4 @@ + <%-- Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) License Information: http://lamsfoundation.org/licensing/lams/2.0/ @@ -13,7 +14,7 @@ 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 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA http://www.gnu.org/licenses/gpl.txt @@ -22,12 +23,17 @@ <%@ include file="/common/taglibs.jsp" %> - + + +
+ +
+ + + Index: lams_tool_laqa/web/learning/LearnerRep.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/learning/Notebook.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/learning/Notebook.jsp (.../Notebook.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/learning/Notebook.jsp (.../Notebook.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/learning/RunOffline.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/learning/RunOffline.jsp (.../RunOffline.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/learning/RunOffline.jsp (.../RunOffline.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/learning/SequentialAnswersContent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/learning/SequentialAnswersContent.jsp (.../SequentialAnswersContent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/learning/SequentialAnswersContent.jsp (.../SequentialAnswersContent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/learning/defineLater.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/learning/defineLater.jsp (.../defineLater.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/learning/defineLater.jsp (.../defineLater.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,10 +1,9 @@ - -<%-- +<%-- 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 + 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, @@ -14,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> @@ -47,7 +45,7 @@
- +
Index: lams_tool_laqa/web/learningIndex.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/learningIndex.jsp (.../learningIndex.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/learningIndex.jsp (.../learningIndex.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,19 +13,12 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> + <% String toolSessionID="88888888"; String toolUrl="/learningStarter?toolSessionID=" + toolSessionID + "&mode=learner"; Index: lams_tool_laqa/web/monitoring/Edit.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/monitoring/Edit.jsp (.../Edit.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/monitoring/Edit.jsp (.../Edit.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,24 +13,18 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> +<%@ include file="/common/taglibs.jsp"%> -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> - + <%@ include file="/common/messages.jsp"%> + @@ -40,11 +34,3 @@ - - -
- -
@@ -58,7 +64,7 @@    - @@ -99,10 +105,15 @@ - - + + + + @@ -136,7 +147,7 @@    - Index: lams_tool_laqa/web/export/exportportfolio.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/export/exportportfolio.jsp (.../exportportfolio.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/export/exportportfolio.jsp (.../exportportfolio.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,11 +13,11 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> + Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/css/rsrc.css'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/javascript/fckcontroller.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/javascript/rsrccommon.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/javascript/rsrcresourceitem.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/javascript/tabcontroller.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/javascript/tree.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0db83894504dc7652d3670a6ce496605b961faa1 refers to a dead (removed) revision in file `lams_tool_laqa/web/includes/javascript/tree_tpl.js'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/web/index.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/index.jsp (.../index.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/index.jsp (.../index.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,18 +13,10 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> Index: lams_tool_laqa/web/learning/AnswersContent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/learning/CombinedAnswersContent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/learning/CombinedAnswersContent.jsp (.../CombinedAnswersContent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/learning/CombinedAnswersContent.jsp (.../CombinedAnswersContent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/learning/IndividualLearnerResults.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,13 +13,11 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> - @@ -72,7 +70,7 @@
- -
+
+ +
+ +
@@ -104,11 +102,28 @@ + + + + + + + + + + + + + +
- +
: +
+ +
 
 
- -
- -
- Index: lams_tool_laqa/web/monitoring/Instructions.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/monitoring/Instructions.jsp (.../Instructions.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/monitoring/Instructions.jsp (.../Instructions.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,22 +13,14 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> -<%@ taglib uri="tags-bean" prefix="bean"%> -<%@ taglib uri="tags-html" prefix="html"%> -<%@ taglib uri="tags-logic" prefix="logic" %> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="fck-editor" prefix="FCK" %> -<%@ taglib uri="tags-lams" prefix="lams" %> +<%@ include file="/common/taglibs.jsp"%> -
@@ -68,13 +60,6 @@ -    - - -
@@ -130,13 +115,6 @@ -    - - - Index: lams_tool_laqa/web/monitoring/LearnerNotebook.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/monitoring/LearnerNotebook.jsp (.../LearnerNotebook.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/monitoring/LearnerNotebook.jsp (.../LearnerNotebook.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/monitoring/LearnerRep.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/monitoring/LearnerRep.jsp (.../LearnerRep.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/monitoring/LearnerRep.jsp (.../LearnerRep.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> Index: lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r0db83894504dc7652d3670a6ce496605b961faa1 --- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 0db83894504dc7652d3670a6ce496605b961faa1) @@ -1,9 +1,9 @@ -<%-- +<%-- 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 + 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, @@ -13,8 +13,7 @@ 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 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> @@ -42,14 +41,15 @@ <fmt:message key="activity.title" /> <%@ include file="/common/header.jsp"%> - <%@ include file="/common/fckeditorheader.jsp"%> + +