Index: lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -red84afe5b317b35b156848df66a1a9332af0f4b1 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision ed84afe5b317b35b156848df66a1a9332af0f4b1) +++ lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -257,6 +257,7 @@ label.users.from.group =Other learners participating in current group: label.use.select.leader.tool.output =Use leaders from Select Leader tool label.group.leader =Group Leader: {0} +label.modify.users.response =Modify user's response +label.info.use.select.leader.outputs =Group leader's option is enabled - #======= End labels: Exported 251 labels for en AU ===== Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r1caf9e1e75a249a528bd0d7a55851b4136692d65 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 1caf9e1e75a249a528bd0d7a55851b4136692d65) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -59,8 +59,9 @@ public static final String LOAD_MONITORING = "refreshMonitoring"; public static final String SOURCE_QA_STARTER = "sourceQaStarter"; public static final String LOAD_VIEW_ONLY = "loadViewOnly"; - public static final String EDIT_RESPONSE = "editResponse"; public static final String EDITABLE_RESPONSE_ID = "editableResponseId"; + public static final String RESPONSE_UID = "responseUid"; + public static final String IS_HIDE_ITEM = "isHideItem"; public static final String COPY_TOOL_CONTENT = "copyToolContent"; public static final String MAP_SEQUENTIAL_ANSWERS_KEY = "mapSequentialAnswersKey"; public static final String DEFAULT_CONTENT_ID_STR = "defaultContentIdStr"; @@ -70,11 +71,9 @@ 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 NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST = "noSessionsNotebookEntriesExist"; public static final String QA_STATS_DTO = "qaStatsDTO"; public static final String LIST_ALL_GROUPS_DTO = "listAllGroupsDTO"; - public static final String CURRENT_SESSION_NAME = "currentSessionName"; + public static final String IS_TOOL_SESSION_AVAILABLE = "isToolSessionAvailable"; public static final String ACTIVE_MODULE = "activeModule"; public static final String AUTHORING = "authoring"; @@ -123,7 +122,6 @@ public static final String IS_ADD_QUESTION = "isAddQuestion"; public static final String IS_REMOVE_QUESTION = "isRemoveQuestion"; public static final String IS_REMOVE_CONTENT = "isRemoveContent"; - public static final String SELECTION_CASE = "selectionCase"; /* * authoring mode constants @@ -172,12 +170,10 @@ public static final String USER_EXCEPTION_MODE_INVALID = "userExceptionModeInvalid"; public static final String USER_EXCEPTION_QUESTIONS_DUPLICATE = "userExceptionQuestionsDuplicate"; public static final String COUNT_SESSION_COMPLETE = "countSessionComplete"; - public static final String CURRENT_MONITORED_TOOL_SESSION = "currentMonitoredToolSession"; public static final String COUNT_ALL_USERS = "countAllUsers"; public static final String LIST_MONITORED_ANSWERS_CONTAINER_DTO = "listMonitoredAnswersContainerDto"; public static final String SUMMARY_TOOL_SESSIONS = "summaryToolSessions"; - public static final String SUMMARY_TOOL_SESSIONS_ID = "summaryToolSessionsId"; public static final String EDIT_ACTIVITY_DTO = "editActivityDTO"; public static final String ACTIVITY_TITLE = "activityTitle"; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.java =================================================================== diff -u -r501ddb69e1c739b90388262f41b4927356cb0449 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.java (.../QaUsrResp.java) (revision 501ddb69e1c739b90388262f41b4927356cb0449) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.java (.../QaUsrResp.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -75,15 +75,6 @@ } public QaUsrResp(String answer, Date attemptTime, String timezone, QaQueContent qaQuestion, - QaQueUsr qaQueUser) { - this.answer = answer; - this.attemptTime = attemptTime; - this.timezone = timezone; - this.qaQuestion = qaQuestion; - this.qaQueUser = qaQueUser; - } - - public QaUsrResp(String answer, Date attemptTime, String timezone, QaQueContent qaQuestion, QaQueUsr qaQueUser, boolean visible) { this.answer = answer; this.attemptTime = attemptTime; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/ResponseRatingDAO.java =================================================================== diff -u -r15045d0b9b0dbb930f42a9da7757207e7a325341 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/ResponseRatingDAO.java (.../ResponseRatingDAO.java) (revision 15045d0b9b0dbb930f42a9da7757207e7a325341) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/ResponseRatingDAO.java (.../ResponseRatingDAO.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -29,7 +29,6 @@ import org.hibernate.FlushMode; import org.lamsfoundation.lams.dao.hibernate.BaseDAO; -import org.lamsfoundation.lams.tool.qa.QaUsrResp; import org.lamsfoundation.lams.tool.qa.ResponseRating; import org.lamsfoundation.lams.tool.qa.dao.IResponseRatingDAO; import org.lamsfoundation.lams.tool.qa.dto.AverageRatingDTO; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralMonitoringDTO.java =================================================================== diff -u -rbe07c35c372d904a65581d98660e73f3b13b69db -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralMonitoringDTO.java (.../GeneralMonitoringDTO.java) (revision be07c35c372d904a65581d98660e73f3b13b69db) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralMonitoringDTO.java (.../GeneralMonitoringDTO.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -23,209 +23,198 @@ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dto; - import org.apache.commons.lang.builder.ToStringBuilder; - /** - *

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

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

* * @author Ozgur Demirtas */ -public class GeneralMonitoringDTO implements Comparable -{ - protected String userExceptionNoToolSessions; +public class GeneralMonitoringDTO implements Comparable { protected String userExceptionNoStudentActivity; protected String userExceptionContentInUse; protected String monitoredContentInUse; - + protected String defineLaterInEditMode; - + protected String countAllUsers; protected String countSessionComplete; - + protected String activityTitle; protected String activityInstructions; - - protected String editResponse; - + protected String defaultQuestionContent; - + protected String contentFolderID; - - - public String toString() { - return new ToStringBuilder(this) - .append("userExceptionNoToolSessions: ", userExceptionNoToolSessions) - .append("userExceptionNoStudentActivity: ", userExceptionNoStudentActivity) - .append("userExceptionContentInUse: ", userExceptionContentInUse) - .append("defineLaterInEditMode: ", defineLaterInEditMode) - .append("monitoredContentInUse: ", monitoredContentInUse) - .append("activityTitle: ", activityTitle) - .append("activityInstructions: ", activityInstructions) - .append("editResponse: ", editResponse) - .append("defaultQuestionContent: ", defaultQuestionContent) - .append("countAllUsers: ", countAllUsers) - .append("countSessionComplete: ", countSessionComplete) - .toString(); + + public String toString() { + return new ToStringBuilder(this).append("userExceptionNoStudentActivity: ", userExceptionNoStudentActivity) + .append("userExceptionContentInUse: ", userExceptionContentInUse) + .append("defineLaterInEditMode: ", defineLaterInEditMode) + .append("monitoredContentInUse: ", monitoredContentInUse).append("activityTitle: ", activityTitle) + .append("activityInstructions: ", activityInstructions) + .append("defaultQuestionContent: ", defaultQuestionContent).append("countAllUsers: ", countAllUsers) + .append("countSessionComplete: ", countSessionComplete).toString(); } - public int compareTo(Object o) - { - GeneralMonitoringDTO generalMonitoringDTO = (GeneralMonitoringDTO) o; - - if (generalMonitoringDTO == null) - return 1; - else - return 0; + public int compareTo(Object o) { + GeneralMonitoringDTO generalMonitoringDTO = (GeneralMonitoringDTO) o; + + if (generalMonitoringDTO == null) + return 1; + else + return 0; } - /** * @return Returns the defineLaterInEditMode. */ public String getDefineLaterInEditMode() { - return defineLaterInEditMode; + return defineLaterInEditMode; } + /** - * @param defineLaterInEditMode The defineLaterInEditMode to set. + * @param defineLaterInEditMode + * The defineLaterInEditMode to set. */ public void setDefineLaterInEditMode(String defineLaterInEditMode) { - this.defineLaterInEditMode = defineLaterInEditMode; + this.defineLaterInEditMode = defineLaterInEditMode; } + /** * @return Returns the monitoredContentInUse. */ public String getMonitoredContentInUse() { - return monitoredContentInUse; + return monitoredContentInUse; } + /** - * @param monitoredContentInUse The monitoredContentInUse to set. + * @param monitoredContentInUse + * The monitoredContentInUse to set. */ public void setMonitoredContentInUse(String monitoredContentInUse) { - this.monitoredContentInUse = monitoredContentInUse; + this.monitoredContentInUse = monitoredContentInUse; } + /** * @return Returns the userExceptionContentInUse. */ public String getUserExceptionContentInUse() { - return userExceptionContentInUse; + return userExceptionContentInUse; } + /** - * @param userExceptionContentInUse The userExceptionContentInUse to set. + * @param userExceptionContentInUse + * The userExceptionContentInUse to set. */ public void setUserExceptionContentInUse(String userExceptionContentInUse) { - this.userExceptionContentInUse = userExceptionContentInUse; + this.userExceptionContentInUse = userExceptionContentInUse; } + /** - * @return Returns the editResponse. - */ - public String getEditResponse() { - return editResponse; - } - /** - * @param editResponse The editResponse to set. - */ - public void setEditResponse(String editResponse) { - this.editResponse = editResponse; - } - /** * @return Returns the defaultQuestionContent. */ public String getDefaultQuestionContent() { - return defaultQuestionContent; + return defaultQuestionContent; } + /** - * @param defaultQuestionContent The defaultQuestionContent to set. + * @param defaultQuestionContent + * The defaultQuestionContent to set. */ public void setDefaultQuestionContent(String defaultQuestionContent) { - this.defaultQuestionContent = defaultQuestionContent; + this.defaultQuestionContent = defaultQuestionContent; } + /** * @return Returns the userExceptionNoStudentActivity. */ public String getUserExceptionNoStudentActivity() { - return userExceptionNoStudentActivity; + return userExceptionNoStudentActivity; } + /** - * @param userExceptionNoStudentActivity The userExceptionNoStudentActivity to set. + * @param userExceptionNoStudentActivity + * The userExceptionNoStudentActivity to set. */ - public void setUserExceptionNoStudentActivity( - String userExceptionNoStudentActivity) { - this.userExceptionNoStudentActivity = userExceptionNoStudentActivity; + public void setUserExceptionNoStudentActivity(String userExceptionNoStudentActivity) { + this.userExceptionNoStudentActivity = userExceptionNoStudentActivity; } + /** * @return Returns the countAllUsers. */ public String getCountAllUsers() { - return countAllUsers; + return countAllUsers; } + /** - * @param countAllUsers The countAllUsers to set. + * @param countAllUsers + * The countAllUsers to set. */ public void setCountAllUsers(String countAllUsers) { - this.countAllUsers = countAllUsers; + this.countAllUsers = countAllUsers; } + /** * @return Returns the countSessionComplete. */ public String getCountSessionComplete() { - return countSessionComplete; + return countSessionComplete; } + /** - * @param countSessionComplete The countSessionComplete to set. + * @param countSessionComplete + * The countSessionComplete to set. */ public void setCountSessionComplete(String countSessionComplete) { - this.countSessionComplete = countSessionComplete; + this.countSessionComplete = countSessionComplete; } + /** - * @return Returns the userExceptionNoToolSessions. - */ - public String getUserExceptionNoToolSessions() { - return userExceptionNoToolSessions; - } - /** - * @param userExceptionNoToolSessions The userExceptionNoToolSessions to set. - */ - public void setUserExceptionNoToolSessions( - String userExceptionNoToolSessions) { - this.userExceptionNoToolSessions = userExceptionNoToolSessions; - } - /** * @return Returns the activityInstructions. */ public String getActivityInstructions() { - return activityInstructions; + return activityInstructions; } + /** - * @param activityInstructions The activityInstructions to set. + * @param activityInstructions + * The activityInstructions to set. */ public void setActivityInstructions(String activityInstructions) { - this.activityInstructions = activityInstructions; + this.activityInstructions = activityInstructions; } + /** * @return Returns the activityTitle. */ public String getActivityTitle() { - return activityTitle; + return activityTitle; } + /** - * @param activityTitle The activityTitle to set. + * @param activityTitle + * The activityTitle to set. */ public void setActivityTitle(String activityTitle) { - this.activityTitle = activityTitle; + this.activityTitle = activityTitle; } + /** * @return Returns the contentFolderID. */ public String getContentFolderID() { - return contentFolderID; + return contentFolderID; } + /** - * @param contentFolderID The contentFolderID to set. + * @param contentFolderID + * The contentFolderID to set. */ public void setContentFolderID(String contentFolderID) { - this.contentFolderID = contentFolderID; + this.contentFolderID = contentFolderID; } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GroupDTO.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GroupDTO.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GroupDTO.java (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -0,0 +1,104 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.qa.dto; + +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + *

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

+ * + * @author Ozgur Demirtas + */ +public class GroupDTO implements Comparable { + + private String sessionId; + + private String sessionName; + + private List groupData; + + public String toString() { + return new ToStringBuilder(this).append("sessionId:", sessionId).append("sessionName:", sessionName).append( + "groupData: ", groupData).toString(); + } + + public int compareTo(Object o) { + GroupDTO groupDTO = (GroupDTO) o; + + if (groupDTO == null) + return 1; + else + return 0; + } + + /** + * @return Returns the groupData. + */ + public List getGroupData() { + return groupData; + } + + /** + * @param groupData + * The groupData to set. + */ + public void setGroupData(List groupData) { + this.groupData = groupData; + } + + /** + * @return Returns the sessionName. + */ + public String getSessionName() { + return sessionName; + } + + /** + * @param sessionName + * The sessionName to set. + */ + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + /** + * @return Returns the sessionId. + */ + public String getSessionId() { + return sessionId; + } + + /** + * @param sessionId + * The sessionId to set. + */ + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } +} Fisheye: Tag 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 refers to a dead (removed) revision in file `lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/QaAllGroupsDTO.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/ReflectionDTO.java =================================================================== diff -u -r91f0740e75daa643981b757e49d1ed2ed7f0a528 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/ReflectionDTO.java (.../ReflectionDTO.java) (revision 91f0740e75daa643981b757e49d1ed2ed7f0a528) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/ReflectionDTO.java (.../ReflectionDTO.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -23,6 +23,8 @@ /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.dto; +import java.util.Date; + import org.apache.commons.lang.builder.ToStringBuilder; /** @@ -42,6 +44,8 @@ protected String reflectionUid; protected String entry; + + protected Date date; public int compareTo(Object o) { ReflectionDTO reflectionDTO = (ReflectionDTO) o; @@ -131,4 +135,12 @@ public void setUserName(String userName) { this.userName = userName; } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java =================================================================== diff -u -rbe07c35c372d904a65581d98660e73f3b13b69db -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision be07c35c372d904a65581d98660e73f3b13b69db) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -163,10 +163,8 @@ void createQa(QaContent qa) throws QaApplicationException; - void hideResponse(QaUsrResp qaUsrResp) throws QaApplicationException; + void updateResponseVisibility(Long responseUid, boolean visible); - void showResponse(QaUsrResp qaUsrResp) throws QaApplicationException; - QaContent retrieveQaBySession(long qaSessionId) throws QaApplicationException; QaQueUsr getUserByIdAndSession(final Long queUsrId, final Long qaSessionId) throws QaApplicationException; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java =================================================================== diff -u -r567af22fafd6a56534cc071f3650eda4495d05ef -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision 567af22fafd6a56534cc071f3650eda4495d05ef) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -494,23 +494,29 @@ "Exception occured when lams is deleting" + " the resp: " + e.getMessage(), e); } } - - /** - * logs hiding of a user entered vote - */ - public void hideResponse(QaUsrResp qaUsrResp) throws QaApplicationException { - auditService.logHideEntry(QaAppConstants.MY_SIGNATURE, qaUsrResp.getQaQueUser().getQueUsrId(), qaUsrResp.getQaQueUser() - .getUsername(), qaUsrResp.getAnswer()); + + @Override + public void updateResponseVisibility(Long responseUid, boolean isHideItem) { + + QaUsrResp response = getResponseById(responseUid); + if (response != null) { + // createBy should be null for system default value. + Long userId = 0L; + String loginName = "No user"; + if (response.getQaQueUser() != null) { + userId = response.getQaQueUser().getQueUsrId(); + loginName = response.getQaQueUser().getUsername(); + } + if (isHideItem) { + auditService.logHideEntry(QaAppConstants.MY_SIGNATURE, userId, loginName, response.getAnswer()); + } else { + auditService.logShowEntry(QaAppConstants.MY_SIGNATURE, userId, loginName, response.getAnswer()); + } + response.setVisible(!isHideItem); + updateUserResponse(response); + } } - /** - * logs showing of a user entered vote - */ - public void showResponse(QaUsrResp qaUsrResp) throws QaApplicationException { - auditService.logShowEntry(QaAppConstants.MY_SIGNATURE, qaUsrResp.getQaQueUser().getQueUsrId(), qaUsrResp.getQaQueUser() - .getUsername(), qaUsrResp.getAnswer()); - } - public int getTotalNumberOfUsers(QaContent qa) { try { return qaQueUsrDAO.getTotalNumberOfUsers(qa); @@ -744,8 +750,7 @@ // all users mode for (QaSession session : sessions) { - for (Iterator userIter = session.getQaQueUsers().iterator(); userIter.hasNext();) { - QaQueUsr user = (QaQueUsr) userIter.next(); + for (QaQueUsr user : (Set) session.getQaQueUsers()) { NotebookEntry notebookEntry = this.getEntry(session.getQaSessionId(), CoreNotebookConstants.NOTEBOOK_TOOL, QaAppConstants.MY_SIGNATURE, new Integer(user @@ -757,6 +762,9 @@ reflectionDTO.setSessionId(session.getQaSessionId().toString()); reflectionDTO.setUserName(user.getFullname()); reflectionDTO.setReflectionUid(notebookEntry.getUid().toString()); + Date postedDate = (notebookEntry.getLastModified() != null) ? notebookEntry.getLastModified() + : notebookEntry.getCreateDate(); + reflectionDTO.setDate(postedDate); String notebookEntryPresentable = QaUtils.replaceNewLines(notebookEntry.getEntry()); reflectionDTO.setEntry(notebookEntryPresentable); reflectionDTOs.add(reflectionDTO); @@ -767,8 +775,7 @@ // single user mode for (QaSession session : sessions) { - for (Iterator userIter = session.getQaQueUsers().iterator(); userIter.hasNext();) { - QaQueUsr user = (QaQueUsr) userIter.next(); + for (QaQueUsr user : (Set) session.getQaQueUsers()) { if (user.getQueUsrId().toString().equals(userID)) { NotebookEntry notebookEntry = this.getEntry(session.getQaSessionId(), @@ -781,6 +788,9 @@ reflectionDTO.setSessionId(session.getQaSessionId().toString()); reflectionDTO.setUserName(user.getFullname()); reflectionDTO.setReflectionUid(notebookEntry.getUid().toString()); + Date postedDate = (notebookEntry.getLastModified() != null) ? notebookEntry + .getLastModified() : notebookEntry.getCreateDate(); + reflectionDTO.setDate(postedDate); String notebookEntryPresentable = QaUtils.replaceNewLines(notebookEntry.getEntry()); reflectionDTO.setEntry(notebookEntryPresentable); reflectionDTOs.add(reflectionDTO); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java =================================================================== diff -u -r1caf9e1e75a249a528bd0d7a55851b4136692d65 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java (.../QaUtils.java) (revision 1caf9e1e75a249a528bd0d7a55851b4136692d65) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java (.../QaUtils.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -215,7 +215,6 @@ request.getSession().removeAttribute(LEARNING_STARTER); request.getSession().removeAttribute(MONITORING_STARTER); request.getSession().removeAttribute(LOAD_MONITORING); - request.getSession().removeAttribute(EDIT_RESPONSE); request.getSession().removeAttribute(EDITABLE_RESPONSE_ID); request.getSession().removeAttribute(COPY_TOOL_CONTENT); request.getSession().removeAttribute(DEFAULT_CONTENT_ID_STR); @@ -228,7 +227,6 @@ request.getSession().removeAttribute(IS_ADD_QUESTION); request.getSession().removeAttribute(IS_REMOVE_QUESTION); request.getSession().removeAttribute(IS_REMOVE_CONTENT); - request.getSession().removeAttribute(SELECTION_CASE); request.getSession().removeAttribute(MAP_QUESTION_CONTENT); request.getSession().removeAttribute(DEFAULT_QUESTION_CONTENT); request.getSession().removeAttribute(END_LEARNING_MESSSAGE); @@ -245,11 +243,9 @@ request.getSession().removeAttribute(MAX_TOOL_SESSION_COUNT.toString()); request.getSession().removeAttribute(IS_TOOL_SESSION_CHANGED); request.getSession().removeAttribute(COUNT_SESSION_COMPLETE); - request.getSession().removeAttribute(CURRENT_MONITORED_TOOL_SESSION); request.getSession().removeAttribute(COUNT_ALL_USERS); request.getSession().removeAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO); request.getSession().removeAttribute(SUMMARY_TOOL_SESSIONS); - request.getSession().removeAttribute(SUMMARY_TOOL_SESSIONS_ID); request.getSession().removeAttribute(MODE); request.getSession().removeAttribute(LEARNER); request.getSession().removeAttribute(TEACHER); @@ -366,17 +362,6 @@ } } - public static void setDefineLater(HttpServletRequest request, boolean value, IQaService qaService, - String toolContentID) { - - QaContent qaContent = qaService.getQa(new Long(toolContentID).longValue()); - - if (qaContent != null) { - qaContent.setDefineLater(value); - qaService.updateQa(qaContent); - } - } - public static String getCurrentLearnerID() { String userID = ""; HttpSession ss = SessionManager.getSession(); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java =================================================================== diff -u -rbe07c35c372d904a65581d98660e73f3b13b69db -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision be07c35c372d904a65581d98660e73f3b13b69db) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ExportServlet.java (.../ExportServlet.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -60,20 +60,19 @@ public String doExport(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { - String basePath =WebUtil.getBaseServerURL() - + request.getContextPath(); + String basePath = WebUtil.getBaseServerURL() + request.getContextPath(); if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) { learner(request, response, directoryName, cookies); } else if (StringUtils.equals(mode, ToolAccessMode.TEACHER.toString())) { teacher(request, response, directoryName, cookies); } - + // Attempting to export required images try { QaBundler qaBundler = new QaBundler(); qaBundler.bundle(request, cookies, directoryName); - + } catch (Exception e) { logger.error("Could not export Q&A javascript files, some files may be missing in export portfolio", e); } @@ -95,7 +94,7 @@ QaSession qaSession = qaService.getSessionById(toolSessionID.longValue()); // If the learner hasn't answered yet, then they won't exist in the session. - // Yet we might be asked for their page, as the activity has been commenced. + // Yet we might be asked for their page, as the activity has been commenced. // So need to do a "blank" page in that case QaQueUsr learner = qaService.getUserByIdAndSession(userID, qaSession.getQaSessionId()); QaContent content = qaSession.getQaContent(); @@ -106,27 +105,25 @@ throw new QaApplicationException(error); } - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(content); - generalLearnerFlowDTO.setUserUid(learner != null ? learner.getQueUsrId().toString() : null); - // if learner is null, don't want to show other people's answers if (learner != null) { - qaMonitoringAction - .refreshSummaryData(request, content, qaService, content.isUsernameVisible(), true, toolSessionID - .toString(), userID.toString(), generalLearnerFlowDTO, false, toolSessionID.toString()); + boolean isNoToolSessions = qaService.isStudentActivityOccurredGlobal(content); + request.getSession().setAttribute(QaAppConstants.IS_TOOL_SESSION_AVAILABLE, isNoToolSessions); + GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(content); + List listMonitoredAnswersContainerDTO = MonitoringUtil.buildGroupsQuestionData(request, content, qaService, + content.isUsernameVisible(), true, toolSessionID.toString(), userID.toString()); + generalLearnerFlowDTO.setListMonitoredAnswersContainerDTO(listMonitoredAnswersContainerDTO); + generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); + generalLearnerFlowDTO.setUserUid(userID.toString()); + request.getSession().setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); + + MonitoringUtil.setUpMonitoring(request, qaService, content); + List reflectionDTOs = qaService.getReflectList(content, userID.toString()); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); request.getSession().setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); } - generalLearnerFlowDTO = (GeneralLearnerFlowDTO) request.getAttribute(GENERAL_LEARNER_FLOW_DTO); - - //for the special case of export portfolio we place generalLearnerFlowDTO into session scope - request.getSession().setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - request.getSession().setAttribute(PORTFOLIO_EXPORT_MODE, "learner"); } @@ -147,22 +144,22 @@ throw new QaApplicationException(error); } - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(content); - qaMonitoringAction.refreshSummaryData(request, content, qaService, true, false, null, null, - generalLearnerFlowDTO, false, "All"); - generalLearnerFlowDTO = (GeneralLearnerFlowDTO) request.getAttribute(GENERAL_LEARNER_FLOW_DTO); + boolean isToolSessionAvailable = qaService.isStudentActivityOccurredGlobal(content); + request.getSession().setAttribute(QaAppConstants.IS_TOOL_SESSION_AVAILABLE, isToolSessionAvailable); + GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(content); request.getSession().setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); + + MonitoringUtil.setUpMonitoring(request, qaService, content); + request.getSession().setAttribute(PORTFOLIO_EXPORT_MODE, "teacher"); List reflectionDTOs = qaService.getReflectList(content, userID.toString()); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); request.getSession().setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); request.setAttribute("currentMonitoredToolSession", "All"); - - //generateGroupsSessionData + + // generateGroupsSessionData List listAllGroupsDTO = MonitoringUtil.buildGroupBasedSessionData(request, content, qaService); request.setAttribute(LIST_ALL_GROUPS_DTO, listAllGroupsDTO); request.getSession().setAttribute(LIST_ALL_GROUPS_DTO, listAllGroupsDTO); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java =================================================================== diff -u -r6c5d0c6b8ff17d661580df2c265f2dcabfe7d76c -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 6c5d0c6b8ff17d661580df2c265f2dcabfe7d76c) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -37,19 +37,18 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -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.QaQueContent; import org.lamsfoundation.lams.tool.qa.QaQueUsr; import org.lamsfoundation.lams.tool.qa.QaSession; import org.lamsfoundation.lams.tool.qa.QaUsrResp; import org.lamsfoundation.lams.tool.qa.dto.AverageRatingDTO; -import org.lamsfoundation.lams.tool.qa.dto.QaAllGroupsDTO; +import org.lamsfoundation.lams.tool.qa.dto.GroupDTO; import org.lamsfoundation.lams.tool.qa.dto.QaMonitoredAnswersDTO; import org.lamsfoundation.lams.tool.qa.dto.QaMonitoredUserDTO; import org.lamsfoundation.lams.tool.qa.dto.QaStatsDTO; +import org.lamsfoundation.lams.tool.qa.dto.ReflectionDTO; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.util.QaSessionComparator; import org.lamsfoundation.lams.tool.qa.util.QaStringComparator; @@ -107,136 +106,47 @@ } /** - * ends up populating the attempt history for all the users of all the tool - * sessions for a content - * - * User id is needed if isUserNamesVisible is false && is learnerRequest = - * true, as it is required to work out if the data being analysed is the - * current user. - * - * @param request - * @param mcContent - * @return List - */ - public static List buildGroupsQuestionData(HttpServletRequest request, QaContent qaContent, IQaService qaService, - boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId) { - List listQuestions = qaService.getAllQuestionEntries(qaContent.getUid()); - - String sessionName = ""; - if ((currentSessionId != null) && (!currentSessionId.equals("All"))) { - QaSession qaSession = qaService.getSessionById(new Long(currentSessionId).longValue()); - sessionName = qaSession.getSession_name(); - } - request.setAttribute(CURRENT_SESSION_NAME, sessionName); - - List listMonitoredAnswersContainerDTO = new LinkedList(); - - Iterator itListQuestions = listQuestions.iterator(); - while (itListQuestions.hasNext()) { - QaQueContent qaQuestion = (QaQueContent) itListQuestions.next(); - - if (qaQuestion != null) { - QaMonitoredAnswersDTO qaMonitoredAnswersDTO = new QaMonitoredAnswersDTO(); - qaMonitoredAnswersDTO.setQuestionUid(qaQuestion.getUid().toString()); - qaMonitoredAnswersDTO.setQuestion(qaQuestion.getQuestion()); - qaMonitoredAnswersDTO.setFeedback(qaQuestion.getFeedback()); - qaMonitoredAnswersDTO.setSessionName(sessionName); - - Map questionAttemptData = buildGroupsAttemptData(request, qaContent, qaService, - qaQuestion.getUid().toString(), isUserNamesVisible, isLearnerRequest, currentSessionId, - userId); - qaMonitoredAnswersDTO.setQuestionAttempts(questionAttemptData); - listMonitoredAnswersContainerDTO.add(qaMonitoredAnswersDTO); - - } - } - return listMonitoredAnswersContainerDTO; - } - - /** * User id is needed if learnerRequest = true, as it is required to work out * if the data being analysed is the current user (for not show other names) * or to work out which is the user's answers (for not show all answers). */ public static Map buildGroupsAttemptData(HttpServletRequest request, QaContent qaContent, IQaService qaService, - String questionUid, boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, + String questionUid, boolean isUserNamesVisible, boolean isLearnerRequest, String sessionId, String userId) { List> listMonitoredAttemptsContainerDTO = new LinkedList>(); - Map summaryToolSessions = populateToolSessionsId(request, qaContent, qaService); + QaSession session = qaService.retrieveQaSession(new Long(sessionId).longValue()); - Iterator itMap = summaryToolSessions.entrySet().iterator(); - - /*request is for monitoring summary */ + List listUsers = new LinkedList(); if (!isLearnerRequest) { + /* request is for monitoring summary */ - if (currentSessionId != null) { - if (currentSessionId.equals("All")) { - while (itMap.hasNext()) { - Map.Entry pairs = (Map.Entry) itMap.next(); - - if (!(pairs.getValue().toString().equals("None")) - && !(pairs.getValue().toString().equals("All"))) { - QaSession qaSession = qaService.retrieveQaSession(new Long(pairs.getValue().toString()) - .longValue()); - - if (qaSession != null) { - List listUsers = new LinkedList(); - if (qaContent.isUseSelectLeaderToolOuput()) { - QaQueUsr groupLeader = qaSession.getGroupLeader(); - if (groupLeader != null) { - listUsers.add(groupLeader); - } - } else { - listUsers = qaService.getUserBySessionOnly(qaSession); - } - - Map sessionUsersAttempts = populateSessionUsersAttempts( - qaService, qaSession.getQaSessionId(), listUsers, questionUid, - isUserNamesVisible, isLearnerRequest, userId); - listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); - } - } - } - } else if (!currentSessionId.equals("All")) { - QaSession qaSession = qaService - .retrieveQaSession(new Long(currentSessionId.toString()).longValue()); - - List listUsers = new LinkedList(); - if (qaContent.isUseSelectLeaderToolOuput()) { - QaQueUsr groupLeader = qaSession.getGroupLeader(); - if (groupLeader != null) { - listUsers.add(groupLeader); - } - } else { - listUsers = qaService.getUserBySessionOnly(qaSession); - } - - Map sessionUsersAttempts = populateSessionUsersAttempts(qaService, new Long( - currentSessionId), listUsers, questionUid, isUserNamesVisible, isLearnerRequest, userId); - listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); + if (qaContent.isUseSelectLeaderToolOuput()) { + QaQueUsr groupLeader = session.getGroupLeader(); + if (groupLeader != null) { + listUsers.add(groupLeader); } + } else { + listUsers = qaService.getUserBySessionOnly(session); } } else { - /*request is for learner report, use only the passed tool session in the report. */ - QaSession qaSession = qaService.retrieveQaSession(new Long(currentSessionId).longValue()); - if (qaSession != null) { - List listUsers = null; - if (qaContent.isShowOtherAnswers()) { - listUsers = qaService.getUserBySessionOnly(qaSession); - } else { - listUsers = new ArrayList(); - QaQueUsr currentUser = qaService.getUserByIdAndSession(new Long(userId).longValue(), qaSession - .getQaSessionId()); - if (currentUser != null) - listUsers.add(currentUser); + + if (qaContent.isShowOtherAnswers()) { + listUsers = qaService.getUserBySessionOnly(session); + } else { + listUsers = new ArrayList(); + QaQueUsr currentUser = qaService.getUserByIdAndSession(new Long(userId).longValue(), + session.getQaSessionId()); + if (currentUser != null){ + listUsers.add(currentUser); } - Map sessionUsersAttempts = populateSessionUsersAttempts(qaService, qaSession.getQaSessionId(), - listUsers, questionUid, isUserNamesVisible, isLearnerRequest, userId); - listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); } } + Map sessionUsersAttempts = populateSessionUsersAttempts(qaService, new Long(sessionId), listUsers, + questionUid, isUserNamesVisible, isLearnerRequest, userId); + listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); + return convertToMap(listMonitoredAttemptsContainerDTO); } @@ -249,26 +159,26 @@ private static Map populateSessionUsersAttempts(IQaService qaService, Long sessionId, List listUsers, String questionUid, boolean isUserNamesVisible, boolean isLearnerRequest, String userId) { - List listMonitoredUserContainerDTO = new LinkedList(); + List qaMonitoredUserDTOs = new LinkedList(); QaContent qaContent = qaService.getQaContentBySessionId(sessionId); - for (QaQueUsr qaQueUsr : (List) listUsers) { - QaUsrResp response = qaService.getResponseByUserAndQuestion(qaQueUsr.getQueUsrId(), new Long(questionUid)); + for (QaQueUsr user : (List) listUsers) { + QaUsrResp response = qaService.getResponseByUserAndQuestion(user.getQueUsrId(), new Long(questionUid)); if (response != null) { QaMonitoredUserDTO qaMonitoredUserDTO = new QaMonitoredUserDTO(); qaMonitoredUserDTO.setAttemptTime(response.getAttemptTime()); qaMonitoredUserDTO.setTimeZone(response.getTimezone()); qaMonitoredUserDTO.setUid(response.getResponseId().toString()); - if (!isUserNamesVisible && isLearnerRequest && !userId.equals(qaQueUsr.getQueUsrId().toString())) { + if (!isUserNamesVisible && isLearnerRequest && !userId.equals(user.getQueUsrId().toString())) { // this is not current user, put his name as blank qaMonitoredUserDTO.setUserName(" "); } else { // this is current user, put his name normally - qaMonitoredUserDTO.setUserName(qaQueUsr.getFullname()); + qaMonitoredUserDTO.setUserName(user.getFullname()); } - qaMonitoredUserDTO.setQueUsrId(qaQueUsr.getQueUsrId().toString()); + qaMonitoredUserDTO.setQueUsrId(user.getQueUsrId().toString()); qaMonitoredUserDTO.setSessionId(sessionId.toString()); qaMonitoredUserDTO.setResponse(response.getAnswer()); @@ -285,10 +195,10 @@ qaMonitoredUserDTO.setNumberOfVotes(averageRating.getNumberOfVotes()); } - listMonitoredUserContainerDTO.add(qaMonitoredUserDTO); + qaMonitoredUserDTOs.add(qaMonitoredUserDTO); } } - return convertToMcMonitoredUserDTOMap(listMonitoredUserContainerDTO); + return convertToMcMonitoredUserDTOMap(qaMonitoredUserDTOs); } private static Map convertToMcMonitoredUserDTOMap(List list) { @@ -327,32 +237,6 @@ return map; } - public static boolean notebookEntriesExist(IQaService qaService, QaContent qaContent) { - Iterator iteratorSession = qaContent.getQaSessions().iterator(); - while (iteratorSession.hasNext()) { - QaSession qaSession = (QaSession) iteratorSession.next(); - - if (qaSession != null) { - Iterator iteratorUser = qaSession.getQaQueUsers().iterator(); - while (iteratorUser.hasNext()) { - QaQueUsr qaQueUsr = (QaQueUsr) iteratorUser.next(); - - if (qaQueUsr != null) { - - NotebookEntry notebookEntry = qaService.getEntry(qaSession.getQaSessionId(), - CoreNotebookConstants.NOTEBOOK_TOOL, MY_SIGNATURE, new Integer(qaQueUsr.getQueUsrId() - .intValue())); - if (notebookEntry != null) { - return true; - } - - } - } - } - } - return false; - } - private static void buildQaStatsDTO(HttpServletRequest request, IQaService qaService, QaContent qaContent) { QaStatsDTO qaStatsDTO = new QaStatsDTO(); @@ -396,63 +280,95 @@ buildQaStatsDTO(request, qaService, qaContent); //generateGroupsSessionData - List listAllGroupsDTO = buildGroupBasedSessionData(request, qaContent, qaService); + List listAllGroupsDTO = buildGroupBasedSessionData(request, qaContent, qaService); request.setAttribute(LIST_ALL_GROUPS_DTO, listAllGroupsDTO); - - //set SubmissionDeadline, if any - if (qaContent.getSubmissionDeadline() != null) { - Date submissionDeadline = qaContent.getSubmissionDeadline(); - HttpSession ss = SessionManager.getSession(); - UserDTO teacher = (UserDTO) ss.getAttribute(AttributeNames.USER); - TimeZone teacherTimeZone = teacher.getTimeZone(); - Date tzSubmissionDeadline = DateUtil.convertToTimeZoneFromDefault(teacherTimeZone, submissionDeadline); - request.setAttribute(QaAppConstants.ATTR_SUBMISSION_DEADLINE, tzSubmissionDeadline.getTime()); + + List reflectionDTOs = qaService.getReflectList(qaContent, null); + request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); + + // set SubmissionDeadline, if any + if (qaContent.getSubmissionDeadline() != null) { + Date submissionDeadline = qaContent.getSubmissionDeadline(); + HttpSession ss = SessionManager.getSession(); + UserDTO teacher = (UserDTO) ss.getAttribute(AttributeNames.USER); + TimeZone teacherTimeZone = teacher.getTimeZone(); + Date tzSubmissionDeadline = DateUtil.convertToTimeZoneFromDefault(teacherTimeZone, submissionDeadline); + request.setAttribute(QaAppConstants.ATTR_SUBMISSION_DEADLINE, tzSubmissionDeadline.getTime()); + } } - } - public static List buildGroupBasedSessionData(HttpServletRequest request, QaContent qaContent, IQaService qaService) { - List listQuestions = qaService.getAllQuestionEntries(qaContent.getUid()); + public static List buildGroupBasedSessionData(HttpServletRequest request, QaContent qaContent, IQaService qaService) { + List questions = qaService.getAllQuestionEntries(qaContent.getUid()); - List listAllGroupsContainerDTO = new LinkedList(); + List groupDTOs = new LinkedList(); Set sessions = new TreeSet(new QaSessionComparator()); sessions.addAll(qaContent.getQaSessions()); for (QaSession session : sessions) { - String currentSessionId = session.getQaSessionId().toString(); + String sessionId = session.getQaSessionId().toString(); + String sessionName = session.getSession_name(); - String currentSessionName = session.getSession_name(); + GroupDTO groupDTO = new GroupDTO(); + List qaMonitoredAnswersDTOs = new LinkedList(); - QaAllGroupsDTO qaAllGroupsDTO = new QaAllGroupsDTO(); - List listMonitoredAnswersContainerDTO = new LinkedList(); - if (session != null) { - Iterator itListQuestions = listQuestions.iterator(); - while (itListQuestions.hasNext()) { - QaQueContent qaQuestion = itListQuestions.next(); + Iterator itQuestions = questions.iterator(); + while (itQuestions.hasNext()) { + QaQueContent question = itQuestions.next(); - if (qaQuestion != null) { - QaMonitoredAnswersDTO qaMonitoredAnswersDTO = new QaMonitoredAnswersDTO(); - qaMonitoredAnswersDTO.setQuestionUid(qaQuestion.getUid().toString()); - qaMonitoredAnswersDTO.setQuestion(qaQuestion.getQuestion()); - qaMonitoredAnswersDTO.setFeedback(qaQuestion.getFeedback()); - qaMonitoredAnswersDTO.setSessionId(currentSessionId); - qaMonitoredAnswersDTO.setSessionName(currentSessionName); + QaMonitoredAnswersDTO qaMonitoredAnswersDTO = new QaMonitoredAnswersDTO(); + qaMonitoredAnswersDTO.setQuestionUid(question.getUid().toString()); + qaMonitoredAnswersDTO.setQuestion(question.getQuestion()); + qaMonitoredAnswersDTO.setFeedback(question.getFeedback()); + qaMonitoredAnswersDTO.setSessionId(sessionId); + qaMonitoredAnswersDTO.setSessionName(sessionName); - Map questionAttemptData = buildGroupsAttemptData(request, qaContent, qaService, qaQuestion - .getUid().toString(), true, false, currentSessionId, null); - qaMonitoredAnswersDTO.setQuestionAttempts(questionAttemptData); - listMonitoredAnswersContainerDTO.add(qaMonitoredAnswersDTO); - } + Map questionAttemptData = buildGroupsAttemptData(request, qaContent, qaService, question.getUid() + .toString(), true, false, sessionId, null); + qaMonitoredAnswersDTO.setQuestionAttempts(questionAttemptData); + qaMonitoredAnswersDTOs.add(qaMonitoredAnswersDTO); } } - qaAllGroupsDTO.setGroupData(listMonitoredAnswersContainerDTO); - qaAllGroupsDTO.setSessionName(currentSessionName); - qaAllGroupsDTO.setSessionId(currentSessionId); - listAllGroupsContainerDTO.add(qaAllGroupsDTO); + groupDTO.setGroupData(qaMonitoredAnswersDTOs); + groupDTO.setSessionName(sessionName); + groupDTO.setSessionId(sessionId); + groupDTOs.add(groupDTO); } - return listAllGroupsContainerDTO; + return groupDTOs; } + /** + * ends up populating the attempt history for all the users of all the tool sessions for a content + * + * User id is needed if isUserNamesVisible is false && is learnerRequest = true, as it is required to work out if + * the data being analysed is the current user. + */ + public static List buildGroupsQuestionData(HttpServletRequest request, QaContent qaContent, IQaService qaService, + boolean isUserNamesVisible, boolean isLearnerRequest, String sessionId, String userId) { + List listQuestions = qaService.getAllQuestionEntries(qaContent.getUid()); + + List listMonitoredAnswersContainerDTO = new LinkedList(); + + Iterator itListQuestions = listQuestions.iterator(); + while (itListQuestions.hasNext()) { + QaQueContent qaQuestion = (QaQueContent) itListQuestions.next(); + + if (qaQuestion != null) { + QaMonitoredAnswersDTO qaMonitoredAnswersDTO = new QaMonitoredAnswersDTO(); + qaMonitoredAnswersDTO.setQuestionUid(qaQuestion.getUid().toString()); + qaMonitoredAnswersDTO.setQuestion(qaQuestion.getQuestion()); + qaMonitoredAnswersDTO.setFeedback(qaQuestion.getFeedback()); + + Map questionAttemptData = MonitoringUtil.buildGroupsAttemptData(request, qaContent, qaService, + qaQuestion.getUid().toString(), isUserNamesVisible, isLearnerRequest, sessionId, userId); + qaMonitoredAnswersDTO.setQuestionAttempts(questionAttemptData); + listMonitoredAnswersContainerDTO.add(qaMonitoredAnswersDTO); + + } + } + return listMonitoredAnswersContainerDTO; + } + } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java =================================================================== diff -u -rbe07c35c372d904a65581d98660e73f3b13b69db -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision be07c35c372d904a65581d98660e73f3b13b69db) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -980,46 +980,6 @@ } /** - * calls monitoring action summary screen generation ActionForward - * getSummary(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 getSummary(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - return qaMonitoringAction.getSummary(mapping, form, request, response); - } - - /** - * calls monitoring action instructions screen generation ActionForward - * getInstructions(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 getInstructions(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - return qaMonitoringAction.getInstructions(mapping, form, request, response); - } - - /** * calls monitoring action stats screen generation * * ActionForward getStats(ActionMapping mapping, ActionForm form, Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -r883c4cc054a636dc8017da1b244b89bdaf0ff974 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 883c4cc054a636dc8017da1b244b89bdaf0ff974) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -19,85 +19,13 @@ http://www.gnu.org/licenses/gpl.txt * ***********************************************************************/ -/** - * @author Ozgur Demirtas - * - - - - - - - - - - - - - - - - - - - - - - - - * - */ - /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; import java.io.IOException; import java.util.Date; +import java.util.List; import java.util.Map; import java.util.TreeMap; @@ -140,8 +68,11 @@ import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; +/** + * @author Ozgur Demirtas + */ public class QaLearningAction extends LamsDispatchAction implements QaAppConstants { - static Logger logger = Logger.getLogger(QaLearningAction.class.getName()); + private static Logger logger = Logger.getLogger(QaLearningAction.class.getName()); private static IQaService qaService; @@ -425,9 +356,8 @@ QaLearningForm qaLearningForm, String toolSessionID, String userID, QaSession qaSession, QaContent qaContent, GeneralLearnerFlowDTO generalLearnerFlowDTO, boolean isUserNamesVisible) { - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - qaMonitoringAction.refreshSummaryData(request, qaContent, QaLearningAction.qaService, isUserNamesVisible, true, - toolSessionID, userID, generalLearnerFlowDTO, false, toolSessionID); + QaLearningAction.refreshSummaryData(request, qaContent, QaLearningAction.qaService, isUserNamesVisible, + toolSessionID, userID, generalLearnerFlowDTO); generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(false).toString()); @@ -499,8 +429,6 @@ QaSession qaSession = QaLearningAction.qaService.getSessionById(new Long(toolSessionID).longValue()); - String toolContentID = qaSession.getQaContent().getQaContentId().toString(); - QaContent qaContent = qaSession.getQaContent(); GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); @@ -513,17 +441,12 @@ qaLearningForm.setHttpSessionID(httpSessionID); generalLearnerFlowDTO.setHttpSessionID(httpSessionID); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); - - Map mapAnswers = (Map) sessionMap.get(QaAppConstants.MAP_ALL_RESULTS_KEY); - /*recreate the users and responses*/ qaLearningForm.resetUserActions(); qaLearningForm.setSubmitAnswersContent(null); - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - qaMonitoringAction.refreshSummaryData(request, qaContent, QaLearningAction.qaService, isUserNamesVisible, true, - toolSessionID, userID, generalLearnerFlowDTO, false, toolSessionID); + QaLearningAction.refreshSummaryData(request, qaContent, QaLearningAction.qaService, isUserNamesVisible, + toolSessionID, userID, generalLearnerFlowDTO); generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(false).toString()); @@ -863,9 +786,8 @@ Boolean isUserNamesVisibleBoolean = new Boolean(qaContent.isUsernameVisible()); boolean isUserNamesVisible = isUserNamesVisibleBoolean.booleanValue(); - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - qaMonitoringAction.refreshSummaryData(request, qaContent, QaLearningAction.qaService, isUserNamesVisible, true, - toolSessionID, userID, generalLearnerFlowDTO, false, toolSessionID); + QaLearningAction.refreshSummaryData(request, qaContent, QaLearningAction.qaService, isUserNamesVisible, + toolSessionID, userID, generalLearnerFlowDTO); int sessionUserCount = 0; if (qaSession.getQaQueUsers() != null) { @@ -999,7 +921,40 @@ qaLearningForm.resetAll(); return (mapping.findForward(QaAppConstants.NOTEBOOK)); } + + /** + * populates data for summary screen, view all results screen and export + * portfolio. + * + * User id is needed if isUserNamesVisible is false && learnerRequest is + * true, as it is required to work out if the data being analysed is the + * current user. + * + * @param request + * @param qaContent + * @param qaService + * @param isUserNamesVisible + * @param isLearnerRequest + * @param userId + */ + public static void refreshSummaryData(HttpServletRequest request, QaContent qaContent, IQaService qaService, + boolean isUserNamesVisible, String sessionId, String userId, + GeneralLearnerFlowDTO generalLearnerFlowDTO) { + List listMonitoredAnswersContainerDTO = MonitoringUtil.buildGroupsQuestionData(request, qaContent, qaService, + isUserNamesVisible, true, sessionId, userId); + + if (generalLearnerFlowDTO != null) { + generalLearnerFlowDTO.setListMonitoredAnswersContainerDTO(listMonitoredAnswersContainerDTO); + generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); + request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); + } + + MonitoringUtil.setUpMonitoring(request, qaService, qaContent); + } + + + private void initializeQAService() { if (QaLearningAction.qaService == null) { QaLearningAction.qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java =================================================================== diff -u -r1caf9e1e75a249a528bd0d7a55851b4136692d65 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 1caf9e1e75a249a528bd0d7a55851b4136692d65) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -84,7 +84,6 @@ * removed by: QaUtils.cleanupSession(request) * */ - public class QaLearningStarterAction extends Action implements QaAppConstants { static Logger logger = Logger.getLogger(QaLearningStarterAction.class.getName()); @@ -278,13 +277,12 @@ /* the report should have the all entries for the users in this tool session, * and display under the "my answers" section the answers for the user id in the url */ Long learnerProgressUserId = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); generalLearnerFlowDTO.setTeacherViewOnly(new Boolean(true).toString()); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, qaContent.isUsernameVisible(), true, - toolSessionID, userId.toString(), generalLearnerFlowDTO, false, toolSessionID); + QaLearningAction.refreshSummaryData(request, qaContent, qaService, qaContent.isUsernameVisible(), + toolSessionID, userId.toString(), generalLearnerFlowDTO); return (mapping.findForward(INDIVIDUAL_LEARNER_REPORT)); } @@ -329,17 +327,15 @@ // the learner is in the same session and has already responsed to this content generalLearnerFlowDTO.setLockWhenFinished(new Boolean(qaContent.isLockWhenFinished()).toString()); - - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); /* * the report should have all the users' entries OR the report should have only the current * session's entries */ generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); boolean isUserNamesVisible = qaContent.isUsernameVisible(); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, true, - currentToolSessionID.toString(), userId.toString(), generalLearnerFlowDTO, false, toolSessionID); + QaLearningAction.refreshSummaryData(request, qaContent, qaService, isUserNamesVisible, + currentToolSessionID.toString(), userId.toString(), generalLearnerFlowDTO); if (qaUser.isLearnerFinished()) { generalLearnerFlowDTO.setRequestLearningReportViewOnly(new Boolean(true).toString()); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java =================================================================== diff -u -r1caf9e1e75a249a528bd0d7a55851b4136692d65 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 1caf9e1e75a249a528bd0d7a55851b4136692d65) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java (.../QaMonitoringAction.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -19,10 +19,6 @@ http://www.gnu.org/licenses/gpl.txt * ***********************************************************************/ -/** - * @author Ozgur Demirtas - */ - /* $$Id$$ */ package org.lamsfoundation.lams.tool.qa.web; @@ -48,21 +44,16 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; -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.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaCondition; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaQueContent; -import org.lamsfoundation.lams.tool.qa.QaSession; import org.lamsfoundation.lams.tool.qa.QaUsrResp; import org.lamsfoundation.lams.tool.qa.dto.EditActivityDTO; -import org.lamsfoundation.lams.tool.qa.dto.GeneralLearnerFlowDTO; import org.lamsfoundation.lams.tool.qa.dto.GeneralMonitoringDTO; import org.lamsfoundation.lams.tool.qa.dto.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.dto.QaQuestionDTO; -import org.lamsfoundation.lams.tool.qa.dto.ReflectionDTO; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; import org.lamsfoundation.lams.tool.qa.util.QaUtils; @@ -76,8 +67,11 @@ import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; +/** + * @author Ozgur Demirtas + */ public class QaMonitoringAction extends LamsDispatchAction implements QaAppConstants { - static Logger logger = Logger.getLogger(QaMonitoringAction.class.getName()); + private static Logger logger = Logger.getLogger(QaMonitoringAction.class.getName()); public static String SELECTBOX_SELECTED_TOOL_SESSION = "selectBoxSelectedToolSession"; public static Integer READABLE_TOOL_SESSION_COUNT = new Integer(1); @@ -88,177 +82,7 @@ return null; } - public void initStatsContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response, GeneralMonitoringDTO generalMonitoringDTO) throws IOException, - ServletException { - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - IQaService qaService = null; - if (getServlet() != null) { - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - } else { - qaService = qaMonitoringForm.getQaService(); - } - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - - qaMonitoringForm.setToolContentID(strToolContentID); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - - qaMonitoringForm.setContentFolderID(contentFolderID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - refreshStatsData(request, qaMonitoringForm, qaService, generalMonitoringDTO); - generalMonitoringDTO.setEditResponse(new Boolean(false).toString()); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - - request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - - } - /** - * switches to instructions tab of the monitoring url. - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - */ - public ActionForward getInstructions(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - initInstructionsContent(mapping, form, request, response); - - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - - public void initInstructionsContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - - GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); - - IQaService qaService = null; - if (getServlet() != null) { - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - } else { - qaService = qaMonitoringForm.getQaService(); - } - - - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - - qaMonitoringForm.setToolContentID(strToolContentID); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - - qaMonitoringForm.setContentFolderID(contentFolderID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - generalMonitoringDTO.setEditResponse(new Boolean(false).toString()); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - - request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - - } - - /** * activates editActivity screen * * @param mapping @@ -291,10 +115,6 @@ qaMonitoringForm.setContentFolderID(contentFolderID); - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - request.setAttribute(QaAppConstants.SOURCE_MC_STARTER, "monitoring"); @@ -308,10 +128,6 @@ request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); if (qaService.isStudentActivityOccurredGlobal(qaContent)) { generalMonitoringDTO.setUserExceptionContentInUse(new Boolean(true).toString()); @@ -339,116 +155,14 @@ request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - prepareEditActivityScreenData(request, qaContent); - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); /* note that we are casting monitoring form subclass into Authoring form */ return qaStarterAction.executeDefineLater(mapping, qaMonitoringForm, request, response, qaService); } - /** - * switches to summary tab of the monitoring url - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - */ - public ActionForward getSummary(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - initSummaryContent(mapping, form, request, response); - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - - public void initSummaryContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); - - IQaService qaService = null; - if (getServlet() != null) { - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - } else { - qaService = qaMonitoringForm.getQaService(); - } - - - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - qaMonitoringForm.setToolContentID(strToolContentID); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - qaMonitoringForm.setEditResponse(editResponse); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - /* this section is related to summary tab. Starts here. */ - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - /* true means there is at least 1 response */ - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - generalMonitoringDTO.setEditResponse(new Boolean(false).toString()); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - } - public ActionForward editActivityQuestions(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ToolException { QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; @@ -489,16 +203,6 @@ QaUtils.setDefineLater(request, true, strToolContentID, qaService); prepareEditActivityScreenData(request, qaContent); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); @@ -526,323 +230,19 @@ request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = generalMonitoringDTO.getUserExceptionNoToolSessions(); - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return mapping.findForward(QaAppConstants.LOAD_MONITORING); } - /** - * gets called when the user selects a group from dropdown box in the - * summary tab - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - */ - public ActionForward submitSession(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - - QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) - .longValue()); - request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); - } - - request.setAttribute(QaAppConstants.CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - qaMonitoringForm.setToolContentID(strToolContentID); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - qaMonitoringForm.setEditResponse(editResponse); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, - currentMonitoredToolSession); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - - /** - * enables the user to edit responses - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - */ - public ActionForward editResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - qaMonitoringForm.setEditResponse(editResponse); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String responseId = qaMonitoringForm.getResponseId(); - request.getSession().setAttribute(QaAppConstants.EDITABLE_RESPONSE_ID, responseId); - - QaUsrResp qaUsrResp = qaService.getResponseById(new Long(responseId).longValue()); - - - refreshUserInput(request, qaMonitoringForm); - - QaContent qaContent = qaUsrResp.getQaQuestion().getQaContent(); - - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - - if (currentMonitoredToolSession.equals("")) { - currentMonitoredToolSession = "All"; - } - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - - QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) - .longValue()); - request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); - } - - request.setAttribute(QaAppConstants.CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, true, - currentMonitoredToolSession); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - - public ActionForward editGroupResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - String editableSessionId = request.getParameter("sessionId"); - request.setAttribute("editableSessionId", editableSessionId); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String responseId = qaMonitoringForm.getResponseId(); - request.getSession().setAttribute(QaAppConstants.EDITABLE_RESPONSE_ID, responseId); - - QaUsrResp qaUsrResp = qaService.getResponseById(new Long(responseId).longValue()); - - - refreshUserInput(request, qaMonitoringForm); - - QaContent qaContent = qaUsrResp.getQaQuestion().getQaContent(); - - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - if (currentMonitoredToolSession.equals("")) { - currentMonitoredToolSession = "All"; - } - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - } - - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, true, - currentMonitoredToolSession); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - request.setAttribute("currentMonitoredToolSession", "All"); - - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - - /** - * enables the user to update responses - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - */ public ActionForward updateResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - String responseId = qaMonitoringForm.getResponseId(); - + Long responseUid = WebUtil.readLongParam(request, QaAppConstants.RESPONSE_UID); String updatedResponse = request.getParameter("updatedResponse"); - - QaUsrResp qaUsrResp = qaService.getResponseById(new Long(responseId).longValue()); - + QaUsrResp qaUsrResp = qaService.getResponseById(responseUid); /* * write out the audit log entry. If you move this after the update of the response, then make sure you update @@ -854,302 +254,10 @@ qaUsrResp.setAnswer(updatedResponse); qaService.updateUserResponse(qaUsrResp); - refreshUserInput(request, qaMonitoringForm); - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - if (currentMonitoredToolSession.equals("")) { - currentMonitoredToolSession = "All"; - } - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - - QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) - .longValue()); - request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - } - - request.setAttribute(QaAppConstants.CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); - - QaContent qaContent = qaUsrResp.getQaQuestion().getQaContent(); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, - currentMonitoredToolSession); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - - return mapping.findForward(QaAppConstants.LOAD_MONITORING); + return null; } - public ActionForward updateGroupResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - String responseId = qaMonitoringForm.getResponseId(); - - String updatedResponse = request.getParameter("updatedResponse"); - - QaUsrResp qaUsrResp = qaService.getResponseById(new Long(responseId).longValue()); - - - /* - * 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(QaAppConstants.MY_SIGNATURE, qaUsrResp.getQaQueUser().getQueUsrId(), - qaUsrResp.getQaQueUser().getUsername(), qaUsrResp.getAnswer(), updatedResponse); - - qaUsrResp.setAnswer(updatedResponse); - qaService.updateUserResponse(qaUsrResp); - - refreshUserInput(request, qaMonitoringForm); - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - if (currentMonitoredToolSession.equals("")) { - currentMonitoredToolSession = "All"; - } - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - } - - - QaContent qaContent = qaUsrResp.getQaQuestion().getQaContent(); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, - currentMonitoredToolSession); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - request.setAttribute("currentMonitoredToolSession", "All"); - - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - /** - * enables the user to delete responses - * - * @param mapping - * @param form - * @param request - * @param response - * @return - * @throws IOException - * @throws ServletException - */ - public ActionForward deleteResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { - - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - if (currentMonitoredToolSession.equals("")) { - currentMonitoredToolSession = "All"; - } - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - } - - - - String responseId = qaMonitoringForm.getResponseId(); - QaUsrResp qaUsrResp = qaService.getResponseById(new Long(responseId).longValue()); - qaService.removeUserResponse(qaUsrResp); - - refreshUserInput(request, qaMonitoringForm); - - QaContent qaContent = qaUsrResp.getQaQuestion().getQaContent(); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, - currentMonitoredToolSession); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - - /** - * - * @param request - */ - public void refreshUserInput(HttpServletRequest request, QaMonitoringForm qaMonitoringForm) { - - IQaService qaService = null; - if (getServlet() != null) { - qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - } else { - qaService = qaMonitoringForm.getQaService(); - } - - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - qaMonitoringForm.setToolContentID(strToolContentID); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - - // prepareReflectionData(request, qaContent, qaService,null, false); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - } - - /** * persists error messages to request scope * * @param request @@ -1161,587 +269,17 @@ saveErrors(request, errors); } - /** - * populates data for summary screen, view all results screen and export - * portfolio. - * - * User id is needed if isUserNamesVisible is false && learnerRequest is - * true, as it is required to work out if the data being analysed is the - * current user. - * - * @param request - * @param qaContent - * @param qaService - * @param isUserNamesVisible - * @param isLearnerRequest - * @param currentSessionId - * @param userId - */ - public void refreshSummaryData(HttpServletRequest request, QaContent qaContent, IQaService qaService, - boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId, - GeneralLearnerFlowDTO generalLearnerFlowDTO, boolean setEditResponse, String currentMonitoredToolSession) { - - GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); - - /* this section is related to summary tab. Starts here. */ - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - if (qaContent.getTitle() == null) { - generalMonitoringDTO.setActivityTitle("Questions and Answers"); - generalMonitoringDTO.setActivityInstructions("Please answer the questions."); - } else { - generalMonitoringDTO.setActivityTitle(qaContent.getTitle()); - generalMonitoringDTO.setActivityInstructions(qaContent.getInstructions()); - } - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - boolean isContentInUse = qaContent.isContentLocked(); - generalMonitoringDTO.setMonitoredContentInUse(new Boolean(false).toString()); - if (isContentInUse == true) { - - persistError(request, "error.content.inUse"); - generalMonitoringDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - currentSessionId = currentMonitoredToolSession; - - List listMonitoredAnswersContainerDTO = MonitoringUtil.buildGroupsQuestionData(request, qaContent, qaService, - isUserNamesVisible, isLearnerRequest, currentSessionId, userId); - - - - /* getting stats screen content from here... */ - int countAllUsers = qaService.getTotalNumberOfUsers(qaContent); - if (countAllUsers == 0) { - //error: countAllUsers is 0 - generalMonitoringDTO.setUserExceptionNoStudentActivity(new Boolean(true).toString()); - } - - generalMonitoringDTO.setCountAllUsers(new Integer(countAllUsers).toString()); - - int countSessionComplete = qaService.countSessionComplete(qaContent); - - generalMonitoringDTO.setCountSessionComplete(new Integer(countSessionComplete).toString()); - /* till here */ - - generalMonitoringDTO.setEditResponse(new Boolean(setEditResponse).toString()); - - if (generalLearnerFlowDTO != null) { - generalLearnerFlowDTO.setListMonitoredAnswersContainerDTO(listMonitoredAnswersContainerDTO); - - if (isLearnerRequest) { - generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - } - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - - request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - } - - /** - * populates data for stats screen - * - * @param request - */ - public void refreshStatsData(HttpServletRequest request, QaMonitoringForm qaMonitoringForm, IQaService qaService, - GeneralMonitoringDTO generalMonitoringDTO) { - - - /* it is possible that no users has ever logged in for the activity yet */ - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - qaMonitoringForm.setToolContentID(strToolContentID); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - int countAllUsers = qaService.getTotalNumberOfUsers(qaContent); - - if (countAllUsers == 0) { - //error: countAllUsers is 0 - generalMonitoringDTO.setUserExceptionNoStudentActivity(new Boolean(true).toString()); - } - - generalMonitoringDTO.setCountAllUsers(new Integer(countAllUsers).toString()); - - int countSessionComplete = qaService.countSessionComplete(qaContent); - - generalMonitoringDTO.setCountSessionComplete(new Integer(countSessionComplete).toString()); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - - - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - } - - public ActionForward showResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, + public ActionForward updateResponseVisibility(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ToolException { - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String currentUid = qaMonitoringForm.getCurrentUid(); - QaUsrResp qaUsrResp = qaService.getResponseById(new Long(currentUid)); + Long responseUid = WebUtil.readLongParam(request, QaAppConstants.RESPONSE_UID); + boolean isHideItem = WebUtil.readBooleanParam(request, QaAppConstants.IS_HIDE_ITEM); + qaService.updateResponseVisibility(responseUid, isHideItem); - qaUsrResp.setVisible(true); - qaService.updateUserResponse(qaUsrResp); - qaService.showResponse(qaUsrResp); - - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - qaMonitoringForm.setToolContentID(strToolContentID); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - if (currentMonitoredToolSession.equals("")) { - currentMonitoredToolSession = "All"; - } - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, - currentMonitoredToolSession); - - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - - QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) - .longValue()); - request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); - } - - - request.setAttribute(QaAppConstants.CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - - //submitting session to refresh the data from the database - return mapping.findForward(QaAppConstants.LOAD_MONITORING); + return null; } - - public ActionForward showGroupResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException, ToolException { - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String currentUid = qaMonitoringForm.getCurrentUid(); - QaUsrResp qaUsrResp = qaService.getResponseById(new Long(currentUid)); - - qaUsrResp.setVisible(true); - qaService.updateUserResponse(qaUsrResp); - qaService.showResponse(qaUsrResp); - - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - qaMonitoringForm.setToolContentID(strToolContentID); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - if (currentMonitoredToolSession.equals("")) { - currentMonitoredToolSession = "All"; - } - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, - currentMonitoredToolSession); - - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - } - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - request.setAttribute("currentMonitoredToolSession", "All"); - - //submitting session to refresh the data from the database - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - - public ActionForward hideResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException, ToolException { - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String currentUid = qaMonitoringForm.getCurrentUid(); - QaUsrResp qaUsrResp = qaService.getResponseById(new Long(currentUid)); - - qaUsrResp.setVisible(false); - qaService.updateUserResponse(qaUsrResp); - qaService.hideResponse(qaUsrResp); - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - qaMonitoringForm.setToolContentID(strToolContentID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - if (currentMonitoredToolSession.equals("")) { - currentMonitoredToolSession = "All"; - } - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - - QaSession qaSession = qaService.getSessionById(new Long(currentMonitoredToolSession) - .longValue()); - request.setAttribute(QaAppConstants.CURRENT_SESSION_NAME, qaSession.getSession_name()); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - } - - request.setAttribute(QaAppConstants.CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, - currentMonitoredToolSession); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - - //submitting session to refresh the data from the database - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - - public ActionForward hideGroupResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException, ToolException { - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String currentUid = qaMonitoringForm.getCurrentUid(); - QaUsrResp qaUsrResp = qaService.getResponseById(new Long(currentUid));; - - qaUsrResp.setVisible(false); - qaService.updateUserResponse(qaUsrResp); - qaService.hideResponse(qaUsrResp); - - - String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - qaMonitoringForm.setToolContentID(strToolContentID); - - String editResponse = request.getParameter(QaAppConstants.EDIT_RESPONSE); - - qaMonitoringForm.setEditResponse(editResponse); - - QaContent qaContent = qaService.getQa(new Long(strToolContentID).longValue()); - - - Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); - - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); - - Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, qaContent, qaService); - request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS_ID, summaryToolSessionsId); - - String currentMonitoredToolSession = qaMonitoringForm.getSelectedToolSessionId(); - - if (currentMonitoredToolSession.equals("")) { - currentMonitoredToolSession = "All"; - } - - if (currentMonitoredToolSession.equals("All")) { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(2)); - } else { - request.setAttribute(QaAppConstants.SELECTION_CASE, new Long(1)); - } - - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - - - refreshSummaryData(request, qaContent, qaService, true, false, null, null, generalLearnerFlowDTO, false, - currentMonitoredToolSession); - - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - prepareEditActivityScreenData(request, qaContent); - - EditActivityDTO editActivityDTO = new EditActivityDTO(); - boolean isContentInUse = qaContent.isContentLocked(); - if (isContentInUse == true) { - editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); - } - request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - request.setAttribute("currentMonitoredToolSession", "All"); - - //submitting session to refresh the data from the database - return mapping.findForward(QaAppConstants.LOAD_MONITORING); - } - - public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException, ToolException { - QaMonitoringForm qaMonitoringForm = (QaMonitoringForm) form; - - IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); - - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - qaMonitoringForm.setContentFolderID(contentFolderID); - - String uid = request.getParameter("uid"); - String userId = request.getParameter("userId"); - String userName = request.getParameter("userName"); - String sessionId = request.getParameter("sessionId"); - NotebookEntry notebookEntry = qaService.getEntry(new Long(sessionId), CoreNotebookConstants.NOTEBOOK_TOOL, - QaAppConstants.MY_SIGNATURE, new Integer(userId)); - - GeneralLearnerFlowDTO generalLearnerFlowDTO = new GeneralLearnerFlowDTO(); - if (notebookEntry != null) { - String notebookEntryPresentable = QaUtils.replaceNewLines(notebookEntry.getEntry()); - generalLearnerFlowDTO.setNotebookEntry(notebookEntryPresentable); - generalLearnerFlowDTO.setUserName(userName); - } - - - request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); - - QaSession qaSession = qaService.getSessionById(new Long(sessionId).longValue()); - - - QaContent qaContent = qaSession.getQaContent(); - - - prepareEditActivityScreenData(request, qaContent); - - GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - - request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = generalMonitoringDTO.getUserExceptionNoToolSessions(); - - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); - - return mapping.findForward(QaAppConstants.LEARNER_NOTEBOOK); - } - + public void prepareEditActivityScreenData(HttpServletRequest request, QaContent qaContent) { QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); @@ -1765,7 +303,7 @@ String httpSessionID = request.getParameter("httpSessionID"); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); @@ -1879,41 +417,10 @@ qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setActiveModule(activeModule); qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setCurrentTab("3"); - - /* start monitoring code */ - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } + qaAuthoringForm.setCurrentTab("2"); - - request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return mapping.findForward(QaAppConstants.LOAD_MONITORING); @@ -1928,7 +435,7 @@ String httpSessionID = request.getParameter("httpSessionID"); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); @@ -2066,7 +573,7 @@ qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setActiveModule(activeModule); qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setCurrentTab("3"); + qaAuthoringForm.setCurrentTab("2"); request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); @@ -2078,39 +585,12 @@ /* start monitoring code */ GeneralMonitoringDTO qaGeneralMonitoringDTO = new GeneralMonitoringDTO(); qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return mapping.findForward(QaAppConstants.LOAD_MONITORING); @@ -2127,7 +607,7 @@ String httpSessionID = request.getParameter("httpSessionID"); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); @@ -2153,8 +633,6 @@ qaGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString()); - AuthoringUtil authoringUtil = new AuthoringUtil(); - List listQuestionContentDTO = (List) sessionMap.get(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY); @@ -2215,7 +693,7 @@ qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setActiveModule(activeModule); qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setCurrentTab("3"); + qaAuthoringForm.setCurrentTab("2"); request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); @@ -2227,38 +705,12 @@ /* start monitoring code */ GeneralMonitoringDTO qaGeneralMonitoringDTO = new GeneralMonitoringDTO(); qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return mapping.findForward(QaAppConstants.LOAD_MONITORING); @@ -2274,7 +726,7 @@ String httpSessionID = request.getParameter("httpSessionID"); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); @@ -2315,36 +767,10 @@ /* start monitoring code */ GeneralMonitoringDTO qaGeneralMonitoringDTO = new GeneralMonitoringDTO(); qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return mapping.findForward("newQuestionBox"); @@ -2359,7 +785,7 @@ String httpSessionID = request.getParameter("httpSessionID"); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); @@ -2375,7 +801,6 @@ QaQuestionDTO qaQuestionDTO = (QaQuestionDTO) listIterator.next(); - String question = qaQuestionDTO.getQuestion(); String displayOrder = qaQuestionDTO.getDisplayOrder(); if (displayOrder != null && !displayOrder.equals("")) { @@ -2432,37 +857,10 @@ /* start monitoring code */ GeneralMonitoringDTO qaGeneralMonitoringDTO = new GeneralMonitoringDTO(); qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString()); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return mapping.findForward("editQuestionBox"); @@ -2477,7 +875,7 @@ String httpSessionID = request.getParameter("httpSessionID"); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); @@ -2488,10 +886,7 @@ Iterator listIterator = listQuestionContentDTO.iterator(); while (listIterator.hasNext()) { qaQuestionDTO = (QaQuestionDTO) listIterator.next(); - - - String question = qaQuestionDTO.getQuestion(); String displayOrder = qaQuestionDTO.getDisplayOrder(); if (displayOrder != null && !displayOrder.equals("")) { if (displayOrder.equals(questionIndex)) { @@ -2500,13 +895,10 @@ } } - qaQuestionDTO.setQuestion(""); - listQuestionContentDTO = AuthoringUtil.reorderListQuestionContentDTO(listQuestionContentDTO, questionIndex); - sessionMap.put(QaAppConstants.LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); @@ -2562,7 +954,7 @@ qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setActiveModule(activeModule); qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setCurrentTab("3"); + qaAuthoringForm.setCurrentTab("2"); request.setAttribute(QaAppConstants.LIST_QUESTION_CONTENT_DTO, listQuestionContentDTO); @@ -2575,39 +967,10 @@ /* start monitoring code */ GeneralMonitoringDTO qaGeneralMonitoringDTO = new GeneralMonitoringDTO(); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return mapping.findForward(QaAppConstants.LOAD_MONITORING); @@ -2624,7 +987,7 @@ String httpSessionID = request.getParameter("httpSessionID"); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); @@ -2675,8 +1038,6 @@ qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - AuthoringUtil authoringUtil = new AuthoringUtil(); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); request.getSession().setAttribute(httpSessionID, sessionMap); @@ -2691,7 +1052,7 @@ qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setActiveModule(activeModule); qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setCurrentTab("3"); + qaAuthoringForm.setCurrentTab("2"); request.setAttribute(QaAppConstants.LIST_QUESTION_CONTENT_DTO, listQuestionContentDTO); @@ -2703,39 +1064,10 @@ /* start monitoring code */ GeneralMonitoringDTO qaGeneralMonitoringDTO = new GeneralMonitoringDTO(); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return mapping.findForward(QaAppConstants.LOAD_MONITORING); @@ -2753,7 +1085,7 @@ String httpSessionID = request.getParameter("httpSessionID"); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); String questionIndex = request.getParameter("questionIndex"); @@ -2821,7 +1153,7 @@ qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setActiveModule(activeModule); qaAuthoringForm.setDefaultContentIdStr(defaultContentIdStr); - qaAuthoringForm.setCurrentTab("3"); + qaAuthoringForm.setCurrentTab("2"); request.setAttribute(QaAppConstants.LIST_QUESTION_CONTENT_DTO, listQuestionContentDTO); @@ -2833,38 +1165,10 @@ /* start monitoring code */ GeneralMonitoringDTO qaGeneralMonitoringDTO = new GeneralMonitoringDTO(); - - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } else { - qaGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } - - qaGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString()); request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, qaGeneralMonitoringDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - /* find out if there are any reflection entries, from here */ - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = qaGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(QaAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - } else { - request.setAttribute(QaAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - /* ... till here */ - MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return mapping.findForward(QaAppConstants.LOAD_MONITORING); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java =================================================================== diff -u -r1caf9e1e75a249a528bd0d7a55851b4136692d65 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 1caf9e1e75a249a528bd0d7a55851b4136692d65) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java (.../QaMonitoringStarterAction.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -28,6 +28,7 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; @@ -51,8 +52,8 @@ import org.lamsfoundation.lams.tool.qa.dto.EditActivityDTO; import org.lamsfoundation.lams.tool.qa.dto.GeneralLearnerFlowDTO; import org.lamsfoundation.lams.tool.qa.dto.GeneralMonitoringDTO; +import org.lamsfoundation.lams.tool.qa.dto.QaMonitoredAnswersDTO; import org.lamsfoundation.lams.tool.qa.dto.QaQuestionDTO; -import org.lamsfoundation.lams.tool.qa.dto.ReflectionDTO; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; import org.lamsfoundation.lams.tool.qa.util.QaApplicationException; @@ -63,13 +64,12 @@ import org.lamsfoundation.lams.web.util.SessionMap; /** + * Starts up the monitoring module * * @author Ozgur Demirtas - * - * starts up the monitoring module */ public class QaMonitoringStarterAction extends Action implements QaAppConstants { - static Logger logger = Logger.getLogger(QaMonitoringStarterAction.class.getName()); + private static Logger logger = Logger.getLogger(QaMonitoringStarterAction.class.getName()); public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, QaApplicationException { @@ -91,49 +91,61 @@ return validateParameters; } - GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); - boolean initData = initialiseMonitoringData(mapping, qaMonitoringForm, request, response, qaService, - generalMonitoringDTO); - if (initData == false) { + String toolContentID = qaMonitoringForm.getToolContentID(); + QaContent qaContent = qaService.getQa(new Long(toolContentID).longValue()); + if (qaContent == null) { + QaUtils.cleanUpSessionAbsolute(request); throw new ServletException("Data not initialised in Monitoring"); } - qaMonitoringForm.setCurrentTab("1"); - - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - generalMonitoringDTO.setContentFolderID(contentFolderID); - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - qaMonitoringAction.initSummaryContent(mapping, form, request, response); - qaMonitoringAction.initInstructionsContent(mapping, form, request, response); - qaMonitoringAction.initStatsContent(mapping, form, request, response, generalMonitoringDTO); + GeneralMonitoringDTO generalMonitoringDTO = new GeneralMonitoringDTO(); - String toolContentID = qaMonitoringForm.getToolContentID(); - QaContent qaContent = qaService.getQa(new Long(toolContentID).longValue()); - - /*true means there is at least 1 response*/ - if (qaService.isStudentActivityOccurredGlobal(qaContent)) { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); + if (qaContent.getTitle() == null) { + generalMonitoringDTO.setActivityTitle("Questions and Answers"); + generalMonitoringDTO.setActivityInstructions("Please answer the questions."); } else { - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); + generalMonitoringDTO.setActivityTitle(qaContent.getTitle()); + generalMonitoringDTO.setActivityInstructions(qaContent.getInstructions()); } - request.setAttribute(SELECTION_CASE, new Long(2)); - qaMonitoringForm.setActiveModule(MONITORING); - qaMonitoringForm.setEditResponse(new Boolean(false).toString()); + /* getting stats screen content from here... */ + int countAllUsers = qaService.getTotalNumberOfUsers(qaContent); + if (countAllUsers == 0) { + //error: countAllUsers is 0 + generalMonitoringDTO.setUserExceptionNoStudentActivity(new Boolean(true).toString()); + } + generalMonitoringDTO.setCountAllUsers(new Integer(countAllUsers).toString()); + + request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + + MonitoringUtil.setUpMonitoring(request, qaService, qaContent); + + qaMonitoringForm.setCurrentTab("1"); + + String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); + qaMonitoringForm.setToolContentID(strToolContentID); + + + /* this section is related to summary tab. Starts here. */ + Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, qaContent, qaService); + request.setAttribute(QaAppConstants.SUMMARY_TOOL_SESSIONS, summaryToolSessions); + EditActivityDTO editActivityDTO = new EditActivityDTO(); boolean isContentInUse = qaContent.isContentLocked(); if (isContentInUse == true) { editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString()); } - request.setAttribute(EDIT_ACTIVITY_DTO, editActivityDTO); + request.setAttribute(QaAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO); - List reflectionDTOs = qaService.getReflectList(qaContent, null); - request.setAttribute(QaAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionDTOs); - - request.setAttribute(QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + generalMonitoringDTO.setContentFolderID(contentFolderID); + int countSessionComplete = qaService.countSessionComplete(qaContent); + generalMonitoringDTO.setCountSessionComplete(new Integer(countSessionComplete).toString()); + request.setAttribute(QaAppConstants.QA_GENERAL_MONITORING_DTO, generalMonitoringDTO); + qaMonitoringForm.setActiveModule(MONITORING); + /*for Edit Activity screen, BasicTab-ViewOnly*/ qaMonitoringAction.prepareEditActivityScreenData(request, qaContent); @@ -145,83 +157,30 @@ request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); List listQuestionContentDTO = new LinkedList(); - Iterator queIterator = qaContent.getQaQueContents().iterator(); while (queIterator.hasNext()) { - QaQueContent qaQuestion = (QaQueContent) queIterator.next(); if (qaQuestion != null) { QaQuestionDTO qaQuestionDTO = new QaQuestionDTO(qaQuestion); listQuestionContentDTO.add(qaQuestionDTO); } } - request.setAttribute(LIST_QUESTION_CONTENT_DTO, listQuestionContentDTO); sessionMap.put(LIST_QUESTION_CONTENT_DTO_KEY, listQuestionContentDTO); + request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); // preserve conditions into sessionMap SortedSet conditionSet = new TreeSet(new TextSearchConditionComparator()); conditionSet.addAll(qaContent.getConditions()); sessionMap.put(QaAppConstants.ATTR_CONDITION_SET, conditionSet); - request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); - - boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(qaService, qaContent); - - if (notebookEntriesExist) { - request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - - String userExceptionNoToolSessions = (String) generalMonitoringDTO.getUserExceptionNoToolSessions(); - - if (userExceptionNoToolSessions.equals("true")) { - //there are no online student activity but there are reflections - request.setAttribute(NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString()); - } - - } else { - request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(false).toString()); - } - request.setAttribute("currentMonitoredToolSession", "All"); MonitoringUtil.setUpMonitoring(request, qaService, qaContent); return (mapping.findForward(LOAD_MONITORING)); } /** - * initialises monitoring data mainly for jsp purposes - * initialiseMonitoringData(ActionMapping mapping, ActionForm form, - * HttpServletRequest request, HttpServletResponse response) - * - * @param mapping - * @param form - * @param request - * @param response - * @return boolean - */ - public boolean initialiseMonitoringData(ActionMapping mapping, QaMonitoringForm qaMonitoringForm, - HttpServletRequest request, HttpServletResponse response, IQaService qaService, - GeneralMonitoringDTO generalMonitoringDTO) { - generalMonitoringDTO.setEditResponse(new Boolean(false).toString()); - generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - - String toolContentID = qaMonitoringForm.getToolContentID(); - QaContent qaContent = qaService.getQa(new Long(toolContentID).longValue()); - if (qaContent == null) { - QaUtils.cleanUpSessionAbsolute(request); - return false; - } - - QaMonitoringAction qaMonitoringAction = new QaMonitoringAction(); - GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); - qaMonitoringAction.refreshSummaryData(request, qaContent, qaService, true, false, null, null, - generalLearnerFlowDTO, false, "All"); - qaMonitoringAction.refreshStatsData(request, qaMonitoringForm, qaService, generalMonitoringDTO); - - return true; - } - - /** * validates request paramaters based on tool contract * validateParameters(HttpServletRequest request, ActionMapping mapping) * Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java =================================================================== diff -u -r1caf9e1e75a249a528bd0d7a55851b4136692d65 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 1caf9e1e75a249a528bd0d7a55851b4136692d65) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -159,11 +159,10 @@ import org.lamsfoundation.lams.web.util.SessionMap; /** - * * @author Ozgur Demirtas */ public class QaStarterAction extends Action implements QaAppConstants { - static Logger logger = Logger.getLogger(QaStarterAction.class.getName()); + private static Logger logger = Logger.getLogger(QaStarterAction.class.getName()); @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaMonitoringForm.java =================================================================== diff -u -r91f0740e75daa643981b757e49d1ed2ed7f0a528 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaMonitoringForm.java (.../QaMonitoringForm.java) (revision 91f0740e75daa643981b757e49d1ed2ed7f0a528) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaMonitoringForm.java (.../QaMonitoringForm.java) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -26,7 +26,6 @@ /* ActionForm for the Monitoring environment */ -import org.apache.commons.lang.builder.ToStringBuilder; import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.service.IQaService; @@ -37,10 +36,7 @@ public class QaMonitoringForm extends QaAuthoringForm implements QaAppConstants { //controls which method is called by the Lookup map */ protected String method; - protected String selectedToolSessionId; - protected String isToolSessionChanged; - protected String editResponse; protected String hideResponse; protected String showResponse; protected String currentUid; @@ -49,30 +45,7 @@ protected IQaService qaService; - public String toString() { - super.toString(); - return new ToStringBuilder(this).append("Listing current QaMonitoringForm properties: ").append("method: ", - method).append("selectedToolSessionId: ", selectedToolSessionId).append("isToolSessionChanged: ", - isToolSessionChanged).append("editResponse: ", editResponse).append("hideResponse: ", hideResponse) - .append("showResponse: ", showResponse).append("currentUid: ", currentUid).toString(); - } - /** - * @return Returns the editResponse. - */ - public String getEditResponse() { - return editResponse; - } - - /** - * @param editResponse - * The editResponse to set. - */ - public void setEditResponse(String editResponse) { - this.editResponse = editResponse; - } - - /** * @return Returns the qaService. */ public IQaService getQaService() { @@ -133,36 +106,6 @@ } /** - * @return Returns the isToolSessionChanged. - */ - public String getIsToolSessionChanged() { - return isToolSessionChanged; - } - - /** - * @param isToolSessionChanged - * The isToolSessionChanged to set. - */ - public void setIsToolSessionChanged(String isToolSessionChanged) { - this.isToolSessionChanged = isToolSessionChanged; - } - - /** - * @return Returns the selectedToolSessionId. - */ - public String getSelectedToolSessionId() { - return selectedToolSessionId; - } - - /** - * @param selectedToolSessionId - * The selectedToolSessionId to set. - */ - public void setSelectedToolSessionId(String selectedToolSessionId) { - this.selectedToolSessionId = selectedToolSessionId; - } - - /** * @return Returns the method. */ public String getMethod() { Fisheye: Tag 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 refers to a dead (removed) revision in file `lams_tool_laqa/web/BaseContent.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 refers to a dead (removed) revision in file `lams_tool_laqa/web/Footer.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 refers to a dead (removed) revision in file `lams_tool_laqa/web/Header.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 refers to a dead (removed) revision in file `lams_tool_laqa/web/SystemErrorContent.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/web/WEB-INF/struts-config.xml =================================================================== diff -u -rbe07c35c372d904a65581d98660e73f3b13b69db -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision be07c35c372d904a65581d98660e73f3b13b69db) +++ lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -218,12 +218,6 @@ /> - - - - - - - - - Index: lams_tool_laqa/web/authoring/itemlist.jsp =================================================================== diff -u -rc2ba0dc3e2d99441897de8d185e83c419a416f2d -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/web/authoring/itemlist.jsp (.../itemlist.jsp) (revision c2ba0dc3e2d99441897de8d185e83c419a416f2d) +++ lams_tool_laqa/web/authoring/itemlist.jsp (.../itemlist.jsp) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -28,9 +28,7 @@ style="display:none" id="resourceListArea_Busy" /> - + Index: lams_tool_laqa/web/export/exportportfolio.jsp =================================================================== diff -u -rf7d806b0ab4f783c2dd89e920d7f6edf370c04db -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/web/export/exportportfolio.jsp (.../exportportfolio.jsp) (revision f7d806b0ab4f783c2dd89e920d7f6edf370c04db) +++ lams_tool_laqa/web/export/exportportfolio.jsp (.../exportportfolio.jsp) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -1,26 +1,5 @@ -<%-- -Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) -License Information: http://lamsfoundation.org/licensing/lams/2.0/ + - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - http://www.gnu.org/licenses/gpl.txt ---%> - - - <%@ include file="/common/taglibs.jsp"%> @@ -56,21 +35,19 @@

${generalLearnerFlowDTO.activityInstructions}

- +

- + - +

@@ -98,14 +75,12 @@ - + - + @@ -146,12 +121,9 @@ - - - + + +

@@ -182,14 +154,11 @@ - + - - + + @@ -232,13 +201,10 @@ <%-- The actual output of a reflection --%> - + - - + +

Index: lams_tool_laqa/web/learning/IndividualLearnerResults.jsp =================================================================== diff -u -rdfed319ec6cb9e7a5a985e1b5a6a380839717ff5 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision dfed319ec6cb9e7a5a985e1b5a6a380839717ff5) +++ lams_tool_laqa/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -1,14 +1,9 @@ - + <%@ include file="/common/taglibs.jsp"%> - - - - - - + + @@ -18,31 +13,24 @@ <fmt:message key="activity.title" /> - - - -

- +

@@ -53,58 +41,50 @@
- -
- -
+ +
+ +
+
-
- - - + + - -

- : + + : +

- + - -

- + +
-

-
- - : - + + : + +
@@ -115,52 +95,48 @@

-
+ + + + + + + +
+ + + + + + + + + + + + +
+
- - - - - - - - -
- - - - - - - - - - - - -
+ + + + +
- - - - - - -
-
@@ -170,19 +146,3 @@
- - - - - - - - - - - - - - - - Index: lams_tool_laqa/web/learning/parts/ratingStarsDisabled.jsp =================================================================== diff -u -rf7d806b0ab4f783c2dd89e920d7f6edf370c04db -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/web/learning/parts/ratingStarsDisabled.jsp (.../ratingStarsDisabled.jsp) (revision f7d806b0ab4f783c2dd89e920d7f6edf370c04db) +++ lams_tool_laqa/web/learning/parts/ratingStarsDisabled.jsp (.../ratingStarsDisabled.jsp) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -1,6 +1,6 @@ <%@ include file="/common/taglibs.jsp"%> - +
Fisheye: Tag 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 refers to a dead (removed) revision in file `lams_tool_laqa/web/monitoring/AllSessionsSummary.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp =================================================================== diff -u -rbe07c35c372d904a65581d98660e73f3b13b69db -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision be07c35c372d904a65581d98660e73f3b13b69db) +++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -1,25 +1,5 @@ -<%-- -Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) -License Information: http://lamsfoundation.org/licensing/lams/2.0/ + - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - http://www.gnu.org/licenses/gpl.txt ---%> - - <%@ include file="/common/taglibs.jsp"%> <%@ page import="java.util.LinkedHashSet" %> @@ -32,7 +12,6 @@ tabs.add("label.editActivity"); tabs.add("label.stats"); pageContext.setAttribute("tabs", tabs); - %> @@ -59,8 +38,55 @@ + + @@ -87,6 +113,8 @@ + + +
- Fisheye: Tag 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 refers to a dead (removed) revision in file `lams_tool_laqa/web/monitoring/editResponse.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/web/monitoring/itemlist.jsp =================================================================== diff -u -rc2ba0dc3e2d99441897de8d185e83c419a416f2d -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/web/monitoring/itemlist.jsp (.../itemlist.jsp) (revision c2ba0dc3e2d99441897de8d185e83c419a416f2d) +++ lams_tool_laqa/web/monitoring/itemlist.jsp (.../itemlist.jsp) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -1,23 +1,3 @@ -<%-- -Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) -License Information: http://lamsfoundation.org/licensing/lams/2.0/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - http://www.gnu.org/licenses/gpl.txt ---%> - <%@ include file="/common/taglibs.jsp" %>
Index: lams_tool_laqa/web/monitoring/newQuestionBox.jsp =================================================================== diff -u -r4c9365155a19f048af7f0465ced0b965141292d5 -r9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90 --- lams_tool_laqa/web/monitoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 4c9365155a19f048af7f0465ced0b965141292d5) +++ lams_tool_laqa/web/monitoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 9fbb7ff85ea238ebc8699e9ec116eb0cd782ff90) @@ -1,26 +1,5 @@ -<%-- -Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) -License Information: http://lamsfoundation.org/licensing/lams/2.0/ + - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - http://www.gnu.org/licenses/gpl.txt ---%> - - - <%@ include file="/common/taglibs.jsp"%> @@ -42,7 +21,6 @@
-