Index: lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u -r1.43 -r1.44 --- lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties 26 Feb 2014 18:33:49 -0000 1.43 +++ lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties 28 Mar 2014 21:24:09 -0000 1.44 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java,v diff -u -r1.90 -r1.91 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java 18 Feb 2014 14:15:39 -0000 1.90 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java 28 Mar 2014 21:24:10 -0000 1.91 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.java,v diff -u -r1.12 -r1.13 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.java 22 Mar 2011 16:51:32 -0000 1.12 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.java 28 Mar 2014 21:24:10 -0000 1.13 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/Attic/ResponseRatingDAO.java,v diff -u -r1.4 -r1.5 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/ResponseRatingDAO.java 2 Feb 2014 17:19:17 -0000 1.4 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/ResponseRatingDAO.java 28 Mar 2014 21:24:09 -0000 1.5 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/Attic/GeneralMonitoringDTO.java,v diff -u -r1.3 -r1.4 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralMonitoringDTO.java 17 Jan 2014 22:04:43 -0000 1.3 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GeneralMonitoringDTO.java 28 Mar 2014 21:24:09 -0000 1.4 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GroupDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/GroupDTO.java 28 Mar 2014 21:24:09 -0000 1.1 @@ -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: GroupDTO.java,v 1.1 2014/03/28 21:24:09 andreyb Exp $$ */ +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 1.3 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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/ReflectionDTO.java,v diff -u -r1.2 -r1.3 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/ReflectionDTO.java 18 Mar 2011 17:09:51 -0000 1.2 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/ReflectionDTO.java 28 Mar 2014 21:24:09 -0000 1.3 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java,v diff -u -r1.63 -r1.64 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java 17 Jan 2014 22:04:44 -0000 1.63 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java 28 Mar 2014 21:24:08 -0000 1.64 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java,v diff -u -r1.102 -r1.103 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 11 Feb 2014 13:59:53 -0000 1.102 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 28 Mar 2014 21:24:08 -0000 1.103 @@ -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