Index: lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.hbm.xml,v diff -u -r1.1 -r1.2 --- lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.hbm.xml 30 Jul 2012 18:54:20 -0000 1.1 +++ lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.hbm.xml 6 Mar 2014 22:43:34 -0000 1.2 @@ -39,7 +39,6 @@ > - getAttemptsForUser(final Long queUsrId); - List getUserRecords(final Long voteContentUid, final String userEntry); + List getUserAttempts(final Long voteContentUid, final String userEntry); Set getUserEntries(final Long voteContentUid); @@ -53,13 +53,13 @@ int getSessionEntriesCount(final Long voteSessionId); - List getStandardAttemptsForQuestionContentAndContentUid(final Long voteQueContentId); + List getStandardAttemptsForQuestionContentAndContentUid(final Long questionUid); int getAttemptsForQuestionContent(final Long voteQueContentId); int getStandardAttemptsForQuestionContentAndSessionUid(final Long voteQueContentId, final Long voteSessionUid); - List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, + List getAttemptsForQuestionContentAndSessionUid(final Long voteQueContentId, final Long voteSessionUid); void removeAttemptsForUserandSession(final Long queUsrId, final Long sessionUid); @@ -75,5 +75,6 @@ Set getAttemptsForUserAndSessionUseOpenAnswer(final Long queUsrId, final Long sessionUid); - List getAttemptsForUserAndQuestionContent(final Long queUsrId, final Long voteQueContentId); + List getAttemptsForUserAndQuestionContent(final Long queUsrId, final Long voteQueContentId); + } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java,v diff -u -r1.38 -r1.39 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java 6 Feb 2014 22:07:15 -0000 1.38 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java 6 Mar 2014 22:43:34 -0000 1.39 @@ -48,9 +48,9 @@ private static final String LOAD_ATTEMPT_FOR_QUESTION_CONTENT_AND_SESSION = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.voteQueContentId=:voteQueContentId and voteUsrAttempt.voteQueUsr.voteSession.uid=:sessionUid"; private static final String LOAD_ATTEMPT_FOR_USER_AND_QUESTION_CONTENT = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.queUsrId=:queUsrId and voteUsrAttempt.voteQueContentId=:voteQueContentId"; + + private static final String LOAD_ATTEMPT_FOR_USER_AND_QUESTION_CONTENT_AND_SESSION = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.queUsrId=:queUsrId and voteUsrAttempt.voteQueContentId=:voteQueContentId and voteUsrAttempt.voteQueUsr.voteSession.uid=:sessionUid"; - private static final String LOAD_ATTEMPT_FOR_USER_AND_QUESTION_CONTENT_AND_SESSION = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.queUsrId=:queUsrId and voteUsrAttempt.voteQueContentId=:voteQueContentId and voteUsrAttempt.voteQueUsr.voteSession.uid=:sessionUid"; - private static final String LOAD_ATTEMPT_FOR_USER_AND_SESSION = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.queUsrId=:queUsrId and voteUsrAttempt.voteQueUsr.voteSession.uid=:sessionUid"; private static final String LOAD_USER_ENTRIES = "select distinct voteUsrAttempt.userEntry from VoteUsrAttempt voteUsrAttempt where voteUsrAttempt.voteQueUsr.voteSession.voteContent.uid=:voteContentUid"; @@ -118,7 +118,7 @@ } @Override - public List getUserRecords(final Long voteContentUid, final String userEntry) { + public List getUserAttempts(final Long voteContentUid, final String userEntry) { List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_USER_ENTRY_RECORDS) .setLong("voteContentUid", voteContentUid).setString("userEntry", userEntry).list(); return list; @@ -153,9 +153,9 @@ } @Override - public int getAttemptsForQuestionContent(final Long voteQueContentId) { + public int getAttemptsForQuestionContent(final Long questionUid) { List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT) - .setLong("voteQueContentId", voteQueContentId.longValue()).list(); + .setLong("voteQueContentId", questionUid.longValue()).list(); if ((list != null) && (list.size() > 0)) { return list.size(); @@ -165,17 +165,17 @@ } @Override - public int getStandardAttemptsForQuestionContentAndSessionUid(final Long voteQueContentId, final Long sessionUid) { - List list = getStandardAttemptUsersForQuestionContentAndSessionUid(voteQueContentId, sessionUid); + public int getStandardAttemptsForQuestionContentAndSessionUid(final Long questionUid, final Long sessionUid) { + List list = getAttemptsForQuestionContentAndSessionUid(questionUid, sessionUid); return list.size(); } @Override - public List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, + public List getAttemptsForQuestionContentAndSessionUid(final Long questionUid, final Long sessionUid) { List list = getSession() .createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT_AND_SESSION) - .setLong("voteQueContentId", voteQueContentId.longValue()) + .setLong("voteQueContentId", questionUid.longValue()) .setLong("sessionUid", sessionUid.longValue()).list(); List userEntries = new ArrayList(); @@ -187,28 +187,29 @@ } @Override - public List getStandardAttemptsForQuestionContentAndContentUid(final Long voteQueContentId) { + public List getStandardAttemptsForQuestionContentAndContentUid(final Long questionUid) { List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT) - .setLong("voteQueContentId", voteQueContentId.longValue()).list(); + .setLong("voteQueContentId", questionUid.longValue()).list(); return list; } @Override - public List getAttemptsForUserAndQuestionContent(final Long queUsrId, final Long voteQueContentId) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_QUESTION_CONTENT) - .setLong("queUsrId", queUsrId.longValue()).setLong("voteQueContentId", voteQueContentId.longValue()) + public List getAttemptsForUserAndQuestionContent(final Long queUsrId, final Long questionUid) { + List list = getSession() + .createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_QUESTION_CONTENT) + .setLong("queUsrId", queUsrId.longValue()).setLong("voteQueContentId", questionUid.longValue()) .list(); return list; } @Override public VoteUsrAttempt getAttemptForUserAndQuestionContentAndSession(final Long queUsrId, - final Long voteQueContentId, final Long sessionUid) { + final Long questionUid, final Long sessionUid) { List list = getSession() .createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_QUESTION_CONTENT_AND_SESSION) - .setLong("queUsrId", queUsrId.longValue()).setLong("voteQueContentId", voteQueContentId.longValue()) + .setLong("queUsrId", queUsrId.longValue()).setLong("voteQueContentId", questionUid.longValue()) .setLong("sessionUid", sessionUid.longValue()).list(); if ((list == null) || (list.size() == 0)) { Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/EditActivityDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/Attic/EditActivityDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/EditActivityDTO.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,69 @@ +/**************************************************************** + * 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: EditActivityDTO.java,v 1.1 2014/03/06 22:43:33 andreyb Exp $$ */ +package org.lamsfoundation.lams.tool.vote.dto; + +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + *

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

+ * + * @author Ozgur Demirtas + */ +public class EditActivityDTO implements Comparable +{ + private String monitoredContentInUse; + + + /** + * @return Returns the monitoredContentInUse. + */ + public String getMonitoredContentInUse() { + return monitoredContentInUse; + } + /** + * @param monitoredContentInUse The monitoredContentInUse to set. + */ + public void setMonitoredContentInUse(String monitoredContentInUse) { + this.monitoredContentInUse = monitoredContentInUse; + } + public String toString() { + return new ToStringBuilder(this) + .append("monitoredContentInUse", monitoredContentInUse) + .toString(); + } + + public int compareTo(Object o) + { + EditActivityDTO editActivityDTO = (EditActivityDTO) o; + + if (editActivityDTO == null) + return 1; + else + return 0; + } + +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/ExportPortfolioDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/ExportPortfolioDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/ExportPortfolioDTO.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,87 @@ +/*************************************************************************** + * 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: ExportPortfolioDTO.java,v 1.1 2014/03/06 22:43:33 andreyb Exp $$ */ +package org.lamsfoundation.lams.tool.vote.dto; + +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + *

+ * DTO that holds export portfolio properties + *

+ * + * @author Ozgur Demirtas + */ +public class ExportPortfolioDTO { + protected String portfolioExportMode; + protected boolean userExceptionNoToolSessions; + protected LinkedList sessionDtos; + + /** + * @return Returns the listMonitoredAnswersContainerDto. + */ + public LinkedList getSessionDtos() { + return sessionDtos; + } + + /** + * @param listMonitoredAnswersContainerDto + * The listMonitoredAnswersContainerDto to set. + */ + public void setSessionDtos(LinkedList sessionDTOs) { + this.sessionDtos = sessionDTOs; + } + + /** + * @return Returns the portfolioExportMode. + */ + public String getPortfolioExportMode() { + return portfolioExportMode; + } + + /** + * @param portfolioExportMode + * The portfolioExportMode to set. + */ + public void setPortfolioExportMode(String portfolioExportMode) { + this.portfolioExportMode = portfolioExportMode; + } + + /** + * @return Returns the userExceptionNoToolSessions. + */ + public boolean getUserExceptionNoToolSessions() { + return userExceptionNoToolSessions; + } + + /** + * @param userExceptionNoToolSessions + * The userExceptionNoToolSessions to set. + */ + public void setUserExceptionNoToolSessions(boolean userExceptionNoToolSessions) { + this.userExceptionNoToolSessions = userExceptionNoToolSessions; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/ReflectionDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/ReflectionDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/ReflectionDTO.java 6 Mar 2014 22:43:34 -0000 1.1 @@ -0,0 +1,131 @@ +/*************************************************************************** + * 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: ReflectionDTO.java,v 1.1 2014/03/06 22:43:34 andreyb Exp $$ */ +package org.lamsfoundation.lams.tool.vote.dto; + + +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + *

DTO that holds reflections from users + *

+ * + * @author Ozgur Demirtas + */ +public class ReflectionDTO implements Comparable +{ + protected String userName; + + protected String userId; + + protected String sessionId; + + protected String reflectionUid; + + protected String entry; + + + public int compareTo(Object o) + { + ReflectionDTO reflectionDTO = (ReflectionDTO) o; + + if (reflectionDTO == null) + return 1; + else + return 0; + } + + + public String toString() { + return new ToStringBuilder(this) + .append("userName: ", userName) + .append("userId: ", userId) + .append("sessionId: ", sessionId) + .append("reflectionUid: ", reflectionUid) + .append("entry: ", entry) + .toString(); + } + + + + /** + * @return Returns the entry. + */ + public String getEntry() { + return entry; + } + /** + * @param entry The entry to set. + */ + public void setEntry(String entry) { + this.entry = entry; + } + /** + * @return Returns the sessionId. + */ + public String getSessionId() { + return sessionId; + } + /** + * @param sessionId The sessionId to set. + */ + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + /** + * @return Returns the reflectionUid. + */ + public String getReflectionUid() { + return reflectionUid; + } + /** + * @param reflectionUid The reflectionUid to set. + */ + public void setReflectionUid(String reflectionUid) { + this.reflectionUid = reflectionUid; + } + /** + * @return Returns the userId. + */ + public String getUserId() { + return userId; + } + /** + * @param userId The userId to set. + */ + public void setUserId(String userId) { + this.userId = userId; + } + /** + * @return Returns the userName. + */ + public String getUserName() { + return userName; + } + /** + * @param userName The userName to set. + */ + public void setUserName(String userName) { + this.userName = userName; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/SessionDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/SessionDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/SessionDTO.java 6 Mar 2014 22:43:34 -0000 1.1 @@ -0,0 +1,243 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ + +package org.lamsfoundation.lams.tool.vote.dto; + +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + *

+ * DTO that holds summary data for all the sessions + *

+ * + * @author Ozgur Demirtas + */ +public class SessionDTO implements Comparable { + private int sessionUserCount; + private int completedSessionUserCount; + private String sessionId; + private String sessionName; + private Map mapStandardNominationsHTMLedContent; + private Map mapStandardQuestionUid; + private Map mapStandardToolSessionUid; + private boolean existsOpenVote; + private Map mapStandardUserCount; + private Map mapStandardRatesContent; + private List openVotes; + private List answers; + + /** + * @return Returns the mapStandardQuestionUid. + */ + public Map getMapStandardQuestionUid() { + return mapStandardQuestionUid; + } + + /** + * @param mapStandardQuestionUid + * The mapStandardQuestionUid to set. + */ + public void setMapStandardQuestionUid(Map mapStandardQuestionUid) { + this.mapStandardQuestionUid = mapStandardQuestionUid; + } + + /** + * @return Returns the mapStandardToolSessionUid. + */ + public Map getMapStandardToolSessionUid() { + return mapStandardToolSessionUid; + } + + /** + * @param mapStandardToolSessionUid + * The mapStandardToolSessionUid to set. + */ + public void setMapStandardToolSessionUid(Map mapStandardToolSessionUid) { + this.mapStandardToolSessionUid = mapStandardToolSessionUid; + } + + /** + * @return Returns the openVotes. + */ + public List getOpenVotes() { + return openVotes; + } + + /** + * @param openVotes + * The openVotes to set. + */ + public void setOpenVotes(List openVotes) { + this.openVotes = openVotes; + } + + /** + * @return Returns the openVotes. + */ + public List getAnswers() { + return answers; + } + + /** + * @param openVotes + * The openVotes to set. + */ + public void setAnswers(List answers) { + this.answers = answers; + } + + /** + * @return Returns the mapStandardRatesContent. + */ + public Map getMapStandardRatesContent() { + return mapStandardRatesContent; + } + + /** + * @param mapStandardRatesContent + * The mapStandardRatesContent to set. + */ + public void setMapStandardRatesContent(Map mapStandardRatesContent) { + this.mapStandardRatesContent = mapStandardRatesContent; + } + + /** + * @return Returns the mapStandardUserCount. + */ + public Map getMapStandardUserCount() { + return mapStandardUserCount; + } + + /** + * @param mapStandardUserCount + * The mapStandardUserCount to set. + */ + public void setMapStandardUserCount(Map mapStandardUserCount) { + this.mapStandardUserCount = mapStandardUserCount; + } + + public String toString() { + return new ToStringBuilder(this).append("sessionId", getSessionId()).toString(); + } + + public int compareTo(Object o) { + SessionDTO sessionDTO = (SessionDTO) o; + + if (sessionDTO == null) + return 1; + else + return (int) (new Long(sessionId).longValue() - new Long(sessionDTO.sessionId).longValue()); + } + + /** + * @return Returns the completedSessionUserCount. + */ + public int getCompletedSessionUserCount() { + return completedSessionUserCount; + } + + /** + * @param completedSessionUserCount + * The completedSessionUserCount to set. + */ + public void setCompletedSessionUserCount(int completedSessionUserCount) { + this.completedSessionUserCount = completedSessionUserCount; + } + + /** + * @return Returns the sessionId. + */ + public String getSessionId() { + return sessionId; + } + + /** + * @param sessionId + * The sessionId to set. + */ + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + /** + * @return Returns the sessionUserCount. + */ + public int getSessionUserCount() { + return sessionUserCount; + } + + /** + * @param sessionUserCount + * The sessionUserCount to set. + */ + public void setSessionUserCount(int sessionUserCount) { + this.sessionUserCount = sessionUserCount; + } + + /** + * @return Returns the mapStandardNominationsHTMLedContent. + */ + public Map getMapStandardNominationsHTMLedContent() { + return mapStandardNominationsHTMLedContent; + } + + /** + * @param mapStandardNominationsHTMLedContent + * The mapStandardNominationsHTMLedContent to set. + */ + public void setMapStandardNominationsHTMLedContent(Map mapStandardNominationsHTMLedContent) { + this.mapStandardNominationsHTMLedContent = mapStandardNominationsHTMLedContent; + } + + /** + * @return Returns the existsOpenVote. + */ + public boolean getExistsOpenVote() { + return existsOpenVote; + } + + /** + * @param existsOpenVote + * The existsOpenVote to set. + */ + public void setExistsOpenVote(boolean existsOpenVote) { + this.existsOpenVote = existsOpenVote; + } + + /** + * @return Returns the sessionName. + */ + public String getSessionName() { + return sessionName; + } + + /** + * @param sessionName + * The sessionName to set. + */ + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteAllGroupsDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/Attic/VoteAllGroupsDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteAllGroupsDTO.java 6 Mar 2014 22:43:33 -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: VoteAllGroupsDTO.java,v 1.1 2014/03/06 22:43:33 andreyb Exp $$ */ +package org.lamsfoundation.lams.tool.vote.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 VoteAllGroupsDTO 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) + { + VoteAllGroupsDTO qaAllGroupsDTO = (VoteAllGroupsDTO) o; + + if (qaAllGroupsDTO == null) + return 1; + else + return 0; + } + + + /** + * @return Returns the groupData. + */ + public List getGroupData() { + return groupData; + } + /** + * @param groupData The groupData to set. + */ + public void setGroupData(List groupData) { + this.groupData = groupData; + } + /** + * @return Returns the sessionName. + */ + public String getSessionName() { + return sessionName; + } + /** + * @param sessionName The sessionName to set. + */ + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + /** + * @return Returns the sessionId. + */ + public String getSessionId() { + return sessionId; + } + /** + * @param sessionId The sessionId to set. + */ + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralAuthoringDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralAuthoringDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralAuthoringDTO.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,686 @@ +/*************************************************************************** + * 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: VoteGeneralAuthoringDTO.java,v 1.1 2014/03/06 22:43:33 andreyb Exp $$ */ +package org.lamsfoundation.lams.tool.vote.dto; + +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + *

+ * DTO that holds authoring properties for authoring jsps + *

+ * + * @author Ozgur Demirtas + */ +public class VoteGeneralAuthoringDTO implements Comparable { + protected String activeModule; + protected String defineLaterInEditMode; + protected String exceptionMaxNominationInvalid; + protected String toolContentID; + protected String defaultContentId; + protected String defaultContentIdStr; + protected String isDefineLater; + protected String activityTitle; + protected String activityInstructions; + protected int maxOptionIndex; + protected String defaultOptionContent; + + protected String useSelectLeaderToolOuput; + protected String allowText; + protected String showResults; + protected String lockOnFinish; + protected String maxNominationCount; + protected String minNominationCount; + + protected String editActivityEditMode; + protected Map mapOptionsContent; + protected String userExceptionMaxNominationInvalid; + protected String userExceptionNoToolSessions; + protected String userExceptionFilenameEmpty; + protected String isMonitoredContentInUse; + protected String validationError; + protected String userExceptionOptionsDuplicate; + protected String httpSessionID; + + protected String contentFolderID; + protected String editableQuestionText; + protected String editableQuestionFeedback; + + protected List attachmentList; + protected List deletedAttachmentList; + protected String reflect; + protected String reflectionSubject; + + protected Map mapNominationContent; + protected String editableNominationText; + protected String editableNominationFeedback; + protected String responseId; + protected String currentUid; + protected List dataFlowObjectNames; + + public List getDataFlowObjectNames() { + return dataFlowObjectNames; + } + + public void setDataFlowObjectNames(List dataFlowObjectNames) { + this.dataFlowObjectNames = dataFlowObjectNames; + } + + /** + * @return Returns the httpSessionID. + */ + public String getHttpSessionID() { + return httpSessionID; + } + + /** + * @param httpSessionID + * The httpSessionID to set. + */ + public void setHttpSessionID(String httpSessionID) { + this.httpSessionID = httpSessionID; + } + + /** + * @return Returns the maxNominationCount. + */ + public String getMaxNominationCount() { + return maxNominationCount; + } + + /** + * @param maxNominationCount + * The maxNominationCount to set. + */ + public void setMaxNominationCount(String maxNominationCount) { + this.maxNominationCount = maxNominationCount; + } + + /** + * @return Returns the minNominationCount. + */ + public String getMinNominationCount() { + return minNominationCount; + } + + /** + * @param minNominationCount + * The minNominationCount to set. + */ + public void setMinNominationCount(String minNominationCount) { + this.minNominationCount = minNominationCount; + } + + /** + * @return Returns the activeModule. + */ + public String getActiveModule() { + return activeModule; + } + + /** + * @return Returns the isMonitoredContentInUse. + */ + public String getIsMonitoredContentInUse() { + return isMonitoredContentInUse; + } + + /** + * @param isMonitoredContentInUse + * The isMonitoredContentInUse to set. + */ + public void setIsMonitoredContentInUse(String isMonitoredContentInUse) { + this.isMonitoredContentInUse = isMonitoredContentInUse; + } + + /** + * @param activeModule + * The activeModule to set. + */ + public void setActiveModule(String activeModule) { + this.activeModule = activeModule; + } + + /** + * @return Returns the activityInstructions. + */ + public String getActivityInstructions() { + return activityInstructions; + } + + /** + * @param activityInstructions + * The activityInstructions to set. + */ + public void setActivityInstructions(String activityInstructions) { + this.activityInstructions = activityInstructions; + } + + /** + * @return Returns the activityTitle. + */ + public String getActivityTitle() { + return activityTitle; + } + + /** + * @param activityTitle + * The activityTitle to set. + */ + public void setActivityTitle(String activityTitle) { + this.activityTitle = activityTitle; + } + + /** + * @return Returns the defaultContentId. + */ + public String getDefaultContentId() { + return defaultContentId; + } + + /** + * @param defaultContentId + * The defaultContentId to set. + */ + public void setDefaultContentId(String defaultContentId) { + this.defaultContentId = defaultContentId; + } + + /** + * @return Returns the defaultContentIdStr. + */ + public String getDefaultContentIdStr() { + return defaultContentIdStr; + } + + /** + * @param defaultContentIdStr + * The defaultContentIdStr to set. + */ + public void setDefaultContentIdStr(String defaultContentIdStr) { + this.defaultContentIdStr = defaultContentIdStr; + } + + /** + * @return Returns the defaultOptionContent. + */ + public String getDefaultOptionContent() { + return defaultOptionContent; + } + + /** + * @param defaultOptionContent + * The defaultOptionContent to set. + */ + public void setDefaultOptionContent(String defaultOptionContent) { + this.defaultOptionContent = defaultOptionContent; + } + + /** + * @return Returns the defineLaterInEditMode. + */ + public String getDefineLaterInEditMode() { + return defineLaterInEditMode; + } + + /** + * @param defineLaterInEditMode + * The defineLaterInEditMode to set. + */ + public void setDefineLaterInEditMode(String defineLaterInEditMode) { + this.defineLaterInEditMode = defineLaterInEditMode; + } + + /** + * @return Returns the exceptionMaxNominationInvalid. + */ + public String getExceptionMaxNominationInvalid() { + return exceptionMaxNominationInvalid; + } + + /** + * @param exceptionMaxNominationInvalid + * The exceptionMaxNominationInvalid to set. + */ + public void setExceptionMaxNominationInvalid(String exceptionMaxNominationInvalid) { + this.exceptionMaxNominationInvalid = exceptionMaxNominationInvalid; + } + + /** + * @return Returns the isDefineLater. + */ + public String getIsDefineLater() { + return isDefineLater; + } + + /** + * @param isDefineLater + * The isDefineLater to set. + */ + public void setIsDefineLater(String isDefineLater) { + this.isDefineLater = isDefineLater; + } + + /** + * @return Returns the maxOptionIndex. + */ + public int getMaxOptionIndex() { + return maxOptionIndex; + } + + /** + * @param maxOptionIndex + * The maxOptionIndex to set. + */ + public void setMaxOptionIndex(int maxOptionIndex) { + this.maxOptionIndex = maxOptionIndex; + } + + /** + * @return Returns the toolContentID. + */ + public String getToolContentID() { + return toolContentID; + } + + /** + * @param toolContentID + * The toolContentID to set. + */ + public void setToolContentID(String toolContentID) { + this.toolContentID = toolContentID; + } + + /** + * @return Returns the useSelectLeaderToolOuput. + */ + public String getUseSelectLeaderToolOuput() { + return useSelectLeaderToolOuput; + } + + /** + * @param useSelectLeaderToolOuput + * The useSelectLeaderToolOuput to set. + */ + public void setUseSelectLeaderToolOuput(String useSelectLeaderToolOuput) { + this.useSelectLeaderToolOuput = useSelectLeaderToolOuput; + } + + /** + * @return Returns the allowText. + */ + public String getAllowText() { + return allowText; + } + + /** + * @param allowText + * The allowText to set. + */ + public void setAllowText(String allowText) { + this.allowText = allowText; + } + + /** + * @return Returns the lockOnFinish. + */ + public String getLockOnFinish() { + return lockOnFinish; + } + + /** + * @param lockOnFinish + * The lockOnFinish to set. + */ + public void setLockOnFinish(String lockOnFinish) { + this.lockOnFinish = lockOnFinish; + } + + /** + * @return Returns the mapOptionsContent. + */ + public Map getMapOptionsContent() { + return mapOptionsContent; + } + + /** + * @param mapOptionsContent + * The mapOptionsContent to set. + */ + public void setMapOptionsContent(Map mapOptionsContent) { + this.mapOptionsContent = mapOptionsContent; + } + + /** + * @return Returns the userExceptionMaxNominationInvalid. + */ + public String getUserExceptionMaxNominationInvalid() { + return userExceptionMaxNominationInvalid; + } + + /** + * @param userExceptionMaxNominationInvalid + * The userExceptionMaxNominationInvalid to set. + */ + public void setUserExceptionMaxNominationInvalid(String userExceptionMaxNominationInvalid) { + this.userExceptionMaxNominationInvalid = userExceptionMaxNominationInvalid; + } + + /** + * @return Returns the userExceptionOptionsDuplicate. + */ + public String getUserExceptionOptionsDuplicate() { + return userExceptionOptionsDuplicate; + } + + /** + * @param userExceptionOptionsDuplicate + * The userExceptionOptionsDuplicate to set. + */ + public void setUserExceptionOptionsDuplicate(String userExceptionOptionsDuplicate) { + this.userExceptionOptionsDuplicate = userExceptionOptionsDuplicate; + } + + /** + * @return Returns the validationError. + */ + public String getValidationError() { + return validationError; + } + + /** + * @param validationError + * The validationError to set. + */ + public void setValidationError(String validationError) { + this.validationError = validationError; + } + + /** + * @return Returns the editActivityEditMode. + */ + public String getEditActivityEditMode() { + return editActivityEditMode; + } + + /** + * @param editActivityEditMode + * The editActivityEditMode to set. + */ + public void setEditActivityEditMode(String editActivityEditMode) { + this.editActivityEditMode = editActivityEditMode; + } + + /** + * @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 userExceptionFilenameEmpty. + */ + public String getUserExceptionFilenameEmpty() { + return userExceptionFilenameEmpty; + } + + /** + * @param userExceptionFilenameEmpty + * The userExceptionFilenameEmpty to set. + */ + public void setUserExceptionFilenameEmpty(String userExceptionFilenameEmpty) { + this.userExceptionFilenameEmpty = userExceptionFilenameEmpty; + } + + public int compareTo(Object o) { + VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = (VoteGeneralAuthoringDTO) o; + + if (voteGeneralAuthoringDTO == null) + return 1; + else + return 0; + } + + public String toString() { + return new ToStringBuilder(this).append("activeModule: ", activeModule) + .append("contentFolderID: ", contentFolderID).append("editableQuestionText: ", editableQuestionText) + .append("reflectionSubject: ", reflectionSubject) + .append("mapNominationContent: ", mapNominationContent) + .append("exceptionMaxNominationInvalid: ", exceptionMaxNominationInvalid) + .append("toolContentID: ", toolContentID).append("defaultContentId: ", defaultContentId) + .append("defaultContentIdStr: ", defaultContentIdStr).append("reflect: ", reflect) + .append("allowText: ", allowText) + .append("showResults: ", showResults).append("lockOnFinish: ", lockOnFinish) + .append("maxNominationCount: ", maxNominationCount).append("minNominationCount: ", minNominationCount) + .append("activityTitle: ", activityTitle).append("activityInstructions: ", activityInstructions) + .append("maxOptionIndex: ", maxOptionIndex).append("defaultOptionContent: ", defaultOptionContent) + .append("mapOptionsContent: ", mapOptionsContent) + .append("userExceptionMaxNominationInvalid: ", userExceptionMaxNominationInvalid) + .append("userExceptionFilenameEmpty: ", userExceptionFilenameEmpty) + .append("isMonitoredContentInUse: ", isMonitoredContentInUse) + .append("validationError: ", validationError) + .append("userExceptionOptionsDuplicate: ", userExceptionOptionsDuplicate) + .append("userExceptionNoToolSessions: ", userExceptionNoToolSessions) + .append("httpSessionID: ", httpSessionID).append("editActivityEditMode: ", editActivityEditMode) + .toString(); + } + + /** + * @return Returns the contentFolderID. + */ + public String getContentFolderID() { + return contentFolderID; + } + + /** + * @param contentFolderID + * The contentFolderID to set. + */ + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + + /** + * @return Returns the editableQuestionFeedback. + */ + public String getEditableQuestionFeedback() { + return editableQuestionFeedback; + } + + /** + * @param editableQuestionFeedback + * The editableQuestionFeedback to set. + */ + public void setEditableQuestionFeedback(String editableQuestionFeedback) { + this.editableQuestionFeedback = editableQuestionFeedback; + } + + /** + * @return Returns the editableQuestionText. + */ + public String getEditableQuestionText() { + return editableQuestionText; + } + + /** + * @param editableQuestionText + * The editableQuestionText to set. + */ + public void setEditableQuestionText(String editableQuestionText) { + this.editableQuestionText = editableQuestionText; + } + + /** + * @return Returns the attachmentList. + */ + public List getAttachmentList() { + return attachmentList; + } + + /** + * @param attachmentList + * The attachmentList to set. + */ + public void setAttachmentList(List attachmentList) { + this.attachmentList = attachmentList; + } + + /** + * @return Returns the deletedAttachmentList. + */ + public List getDeletedAttachmentList() { + return deletedAttachmentList; + } + + /** + * @param deletedAttachmentList + * The deletedAttachmentList to set. + */ + public void setDeletedAttachmentList(List deletedAttachmentList) { + this.deletedAttachmentList = deletedAttachmentList; + } + + /** + * @return Returns the reflect. + */ + public String getReflect() { + return reflect; + } + + /** + * @param reflect + * The reflect to set. + */ + public void setReflect(String reflect) { + this.reflect = reflect; + } + + /** + * @return Returns the reflectionSubject. + */ + public String getReflectionSubject() { + return reflectionSubject; + } + + /** + * @param reflectionSubject + * The reflectionSubject to set. + */ + public void setReflectionSubject(String reflectionSubject) { + this.reflectionSubject = reflectionSubject; + } + + /** + * @return Returns the editableNominationFeedback. + */ + public String getEditableNominationFeedback() { + return editableNominationFeedback; + } + + /** + * @param editableNominationFeedback + * The editableNominationFeedback to set. + */ + public void setEditableNominationFeedback(String editableNominationFeedback) { + this.editableNominationFeedback = editableNominationFeedback; + } + + /** + * @return Returns the editableNominationText. + */ + public String getEditableNominationText() { + return editableNominationText; + } + + /** + * @param editableNominationText + * The editableNominationText to set. + */ + public void setEditableNominationText(String editableNominationText) { + this.editableNominationText = editableNominationText; + } + + /** + * @return Returns the mapNominationContent. + */ + public Map getMapNominationContent() { + return mapNominationContent; + } + + /** + * @param mapNominationContent + * The mapNominationContent to set. + */ + public void setMapNominationContent(Map mapNominationContent) { + this.mapNominationContent = mapNominationContent; + } + + /** + * @return Returns the currentUid. + */ + public String getCurrentUid() { + return currentUid; + } + + /** + * @param currentUid + * The currentUid to set. + */ + public void setCurrentUid(String currentUid) { + this.currentUid = currentUid; + } + + /** + * @return Returns the responseId. + */ + public String getResponseId() { + return responseId; + } + + /** + * @param responseId + * The responseId to set. + */ + public void setResponseId(String responseId) { + this.responseId = responseId; + } + + public String getShowResults() { + return showResults; + } + + public void setShowResults(String showResults) { + this.showResults = showResults; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralLearnerFlowDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralLearnerFlowDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralLearnerFlowDTO.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,710 @@ +/*************************************************************************** + * 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: VoteGeneralLearnerFlowDTO.java,v 1.1 2014/03/06 22:43:33 andreyb Exp $$ */ +package org.lamsfoundation.lams.tool.vote.dto; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + *

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

+ * + * @author Ozgur Demirtas + */ +public class VoteGeneralLearnerFlowDTO implements Comparable { + protected String activityTitle; + + protected String activityInstructions; + + protected String revisitingUser; + + protected String userEntry; + + protected String userName; + + protected String castVoteCount; + + protected String maxNominationCountReached; + + protected String minNominationCountReached; + + protected String toolSessionID; + + protected String toolContentID; + + protected String toolContentUID; + + protected String learningMode; + + protected String maxNominationCount; + + protected String minNominationCount; + + protected String useSelectLeaderToolOuput; + + protected String allowTextEntry; + + protected String showResults; + + protected String lockOnFinish; + + protected String notebookEntriesVisible; + + protected String reflection; + + protected String reflectionSubject; + + protected String notebookEntry; + + protected String totalQuestionCount; + + protected String previewOnly; + + protected String reportViewOnly; + + protected String requestLearningReport; + + protected String requestLearningReportProgress; + + protected String nominationsSubmited; + + protected Date submissionDeadline; + + protected Map mapGeneralCheckedOptionsContent; + + protected Map mapStandardNominationsContent; + + protected Map mapStandardNominationsHTMLedContent; + + protected Map mapStandardRatesContent; + + protected Map mapStandardUserCount; + + protected Map mapStandardQuestionUid; + + protected Map mapStandardToolSessionUid; + + protected List listMonitoredAnswersContainerDto; + + protected List listUserEntries; + + /** + * @return Returns the castVoteCount. + */ + public String getCastVoteCount() { + return castVoteCount; + } + + /** + * @param castVoteCount + * The castVoteCount to set. + */ + public void setCastVoteCount(String castVoteCount) { + this.castVoteCount = castVoteCount; + } + + /** + * @return Returns the maxNominationCountReached. + */ + public String getMaxNominationCountReached() { + return maxNominationCountReached; + } + + /** + * @param maxNominationCountReached + * The maxNominationCountReached to set. + */ + public void setMaxNominationCountReached(String maxNominationCountReached) { + this.maxNominationCountReached = maxNominationCountReached; + } + + /** + * @return Returns the minNominationCountReached. + */ + public String getMinNominationCountReached() { + return minNominationCountReached; + } + + /** + * @param minNominationCountReached + * The minNominationCountReached to set. + */ + public void setMinNominationCountReached(String minNominationCountReached) { + this.minNominationCountReached = minNominationCountReached; + } + + /** + * @return Returns the revisitingUser. + */ + public String getRevisitingUser() { + return revisitingUser; + } + + /** + * @param revisitingUser + * The revisitingUser to set. + */ + public void setRevisitingUser(String revisitingUser) { + this.revisitingUser = revisitingUser; + } + + /** + * @return Returns the userEntry. + */ + public String getUserEntry() { + return userEntry; + } + + /** + * @param userEntry + * The userEntry to set. + */ + public void setUserEntry(String userEntry) { + this.userEntry = userEntry; + } + + /** + * @return Returns the activityInstructions. + */ + public String getActivityInstructions() { + return activityInstructions; + } + + /** + * @param activityInstructions + * The activityInstructions to set. + */ + public void setActivityInstructions(String activityInstructions) { + this.activityInstructions = activityInstructions; + } + + /** + * @return Returns the activityTitle. + */ + public String getActivityTitle() { + return activityTitle; + } + + /** + * @param activityTitle + * The activityTitle to set. + */ + public void setActivityTitle(String activityTitle) { + this.activityTitle = activityTitle; + } + + /** + * @return Returns the learningMode. + */ + public String getLearningMode() { + return learningMode; + } + + /** + * @param learningMode + * The learningMode to set. + */ + public void setLearningMode(String learningMode) { + this.learningMode = learningMode; + } + + /** + * @return Returns the toolSessionID. + */ + public String getToolSessionID() { + return toolSessionID; + } + + /** + * @param toolSessionID + * The toolSessionID to set. + */ + public void setToolSessionID(String toolSessionID) { + this.toolSessionID = toolSessionID; + } + + /** + * @return Returns the useSelectLeaderToolOuput. + */ + public String getUseSelectLeaderToolOuput() { + return useSelectLeaderToolOuput; + } + + /** + * @param useSelectLeaderToolOuput + * The useSelectLeaderToolOuput to set. + */ + public void setUseSelectLeaderToolOuput(String useSelectLeaderToolOuput) { + this.useSelectLeaderToolOuput = useSelectLeaderToolOuput; + } + + /** + * @return Returns the allowTextEntry. + */ + public String getAllowTextEntry() { + return allowTextEntry; + } + + /** + * @param allowTextEntry + * The allowTextEntry to set. + */ + public void setAllowTextEntry(String allowTextEntry) { + this.allowTextEntry = allowTextEntry; + } + + /** + * @return Returns the lockOnFinish. + */ + public String getLockOnFinish() { + return lockOnFinish; + } + + /** + * @param lockOnFinish + * The lockOnFinish to set. + */ + public void setLockOnFinish(String lockOnFinish) { + this.lockOnFinish = lockOnFinish; + } + + /** + * @return Returns the maxNominationCount. + */ + public String getMaxNominationCount() { + return maxNominationCount; + } + + /** + * @param maxNominationCount + * The maxNominationCount to set. + */ + public void setMaxNominationCount(String maxNominationCount) { + this.maxNominationCount = maxNominationCount; + } + + /** + * @return Returns the minNominationCount. + */ + public String getMinNominationCount() { + return minNominationCount; + } + + /** + * @param minNominationCount + * The minNominationCount to set. + */ + public void setMinNominationCount(String minNominationCount) { + this.minNominationCount = minNominationCount; + } + + /** + * @return Returns the toolContentID. + */ + public String getToolContentID() { + return toolContentID; + } + + /** + * @param toolContentID + * The toolContentID to set. + */ + public void setToolContentID(String toolContentID) { + this.toolContentID = toolContentID; + } + + /** + * @return Returns the toolContentUID. + */ + public String getToolContentUID() { + return toolContentUID; + } + + /** + * @param toolContentUID + * The toolContentUID to set. + */ + public void setToolContentUID(String toolContentUID) { + this.toolContentUID = toolContentUID; + } + + /** + * @return the submissionDeadline + */ + public Date getSubmissionDeadline() { + return submissionDeadline; + } + + /** + * @param submissionDeadline + * the submissionDeadline to set + */ + public void setSubmissionDeadline(Date submissionDeadline) { + this.submissionDeadline = submissionDeadline; + } + + /** + * @return Returns the previewOnly. + */ + public String getPreviewOnly() { + return previewOnly; + } + + /** + * @param previewOnly + * The previewOnly to set. + */ + public void setPreviewOnly(String previewOnly) { + this.previewOnly = previewOnly; + } + + /** + * @return Returns the totalQuestionCount. + */ + public String getTotalQuestionCount() { + return totalQuestionCount; + } + + /** + * @param totalQuestionCount + * The totalQuestionCount to set. + */ + public void setTotalQuestionCount(String totalQuestionCount) { + this.totalQuestionCount = totalQuestionCount; + } + + /** + * @return Returns the listUserEntries. + */ + public List getListUserEntries() { + return listUserEntries; + } + + /** + * @param listUserEntries + * The listUserEntries to set. + */ + public void setListUserEntries(List listUserEntries) { + this.listUserEntries = listUserEntries; + } + + public int compareTo(Object o) { + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = (VoteGeneralLearnerFlowDTO) o; + + if (voteGeneralLearnerFlowDTO == null) + return 1; + else + return 0; + } + + public String toString() { + return new ToStringBuilder(this).append("activityInstructions: ", activityInstructions) + .append("activityTitle: ", activityTitle).append("revisitingUser: ", revisitingUser) + .append("userEntry: ", userEntry).append("castVoteCount: ", castVoteCount) + .append("maxNominationCountReached: ", maxNominationCountReached) + .append("learningMode: ", learningMode).append("maxNominationCount: ", maxNominationCount) + .append("allowTextEntry: ", allowTextEntry).append("showResults: ", showResults) + .append("lockOnFinish: ", lockOnFinish).append("toolContentID: ", toolContentID) + .append("toolContentUID: ", toolContentUID).append("totalQuestionCount: ", totalQuestionCount) + .append("requestLearningReport: ", requestLearningReport) + .append("requestLearningReportProgress: ", requestLearningReportProgress) + .append("nominationsSubmited: ", nominationsSubmited) + .append("mapGeneralCheckedOptionsContent: ", mapGeneralCheckedOptionsContent) + .append("mapStandardNominationsContent: ", mapStandardNominationsContent) + .append("mapStandardNominationsHTMLedContent: ", mapStandardNominationsHTMLedContent) + .append("mapStandardRatesContent: ", mapStandardRatesContent) + .append("mapStandardUserCount: ", mapStandardUserCount) + .append("mapStandardQuestionUid: ", mapStandardQuestionUid) + .append("mapStandardToolSessionUid: ", mapStandardToolSessionUid) + .append("listMonitoredAnswersContainerDto: ", listMonitoredAnswersContainerDto) + .append("listUserEntries: ", listUserEntries).append("reportViewOnly: ", reportViewOnly).toString(); + } + + /** + * @return Returns the reportViewOnly. + */ + public String getReportViewOnly() { + return reportViewOnly; + } + + /** + * @param reportViewOnly + * The reportViewOnly to set. + */ + public void setReportViewOnly(String reportViewOnly) { + this.reportViewOnly = reportViewOnly; + } + + /** + * @return Returns the nominationsSubmited. + */ + public String getNominationsSubmited() { + return nominationsSubmited; + } + + /** + * @param nominationsSubmited + * The nominationsSubmited to set. + */ + public void setNominationsSubmited(String nominationsSubmited) { + this.nominationsSubmited = nominationsSubmited; + } + + /** + * @return Returns the requestLearningReport. + */ + public String getRequestLearningReport() { + return requestLearningReport; + } + + /** + * @param requestLearningReport + * The requestLearningReport to set. + */ + public void setRequestLearningReport(String requestLearningReport) { + this.requestLearningReport = requestLearningReport; + } + + /** + * @return Returns the requestLearningReportProgress. + */ + public String getRequestLearningReportProgress() { + return requestLearningReportProgress; + } + + /** + * @param requestLearningReportProgress + * The requestLearningReportProgress to set. + */ + public void setRequestLearningReportProgress(String requestLearningReportProgress) { + this.requestLearningReportProgress = requestLearningReportProgress; + } + + /** + * @return Returns the mapStandardNominationsContent. + */ + public Map getMapStandardNominationsContent() { + return mapStandardNominationsContent; + } + + /** + * @param mapStandardNominationsContent + * The mapStandardNominationsContent to set. + */ + public void setMapStandardNominationsContent(Map mapStandardNominationsContent) { + this.mapStandardNominationsContent = mapStandardNominationsContent; + } + + /** + * @return Returns the mapStandardNominationsHTMLedContent. + */ + public Map getMapStandardNominationsHTMLedContent() { + return mapStandardNominationsHTMLedContent; + } + + /** + * @param mapStandardNominationsHTMLedContent + * The mapStandardNominationsHTMLedContent to set. + */ + public void setMapStandardNominationsHTMLedContent(Map mapStandardNominationsHTMLedContent) { + this.mapStandardNominationsHTMLedContent = mapStandardNominationsHTMLedContent; + } + + /** + * @return Returns the mapStandardRatesContent. + */ + public Map getMapStandardRatesContent() { + return mapStandardRatesContent; + } + + /** + * @param mapStandardRatesContent + * The mapStandardRatesContent to set. + */ + public void setMapStandardRatesContent(Map mapStandardRatesContent) { + this.mapStandardRatesContent = mapStandardRatesContent; + } + + /** + * @return Returns the mapStandardUserCount. + */ + public Map getMapStandardUserCount() { + return mapStandardUserCount; + } + + /** + * @param mapStandardUserCount + * The mapStandardUserCount to set. + */ + public void setMapStandardUserCount(Map mapStandardUserCount) { + this.mapStandardUserCount = mapStandardUserCount; + } + + /** + * @return Returns the listMonitoredAnswersContainerDto. + */ + public List getListMonitoredAnswersContainerDto() { + return listMonitoredAnswersContainerDto; + } + + /** + * @param listMonitoredAnswersContainerDto + * The listMonitoredAnswersContainerDto to set. + */ + public void setListMonitoredAnswersContainerDto(List listMonitoredAnswersContainerDto) { + this.listMonitoredAnswersContainerDto = listMonitoredAnswersContainerDto; + } + + /** + * @return Returns the mapGeneralCheckedOptionsContent. + */ + public Map getMapGeneralCheckedOptionsContent() { + return mapGeneralCheckedOptionsContent; + } + + /** + * @param mapGeneralCheckedOptionsContent + * The mapGeneralCheckedOptionsContent to set. + */ + public void setMapGeneralCheckedOptionsContent(Map mapGeneralCheckedOptionsContent) { + this.mapGeneralCheckedOptionsContent = mapGeneralCheckedOptionsContent; + } + + /** + * @return Returns the mapStandardQuestionUid. + */ + public Map getMapStandardQuestionUid() { + return mapStandardQuestionUid; + } + + /** + * @param mapStandardQuestionUid + * The mapStandardQuestionUid to set. + */ + public void setMapStandardQuestionUid(Map mapStandardQuestionUid) { + this.mapStandardQuestionUid = mapStandardQuestionUid; + } + + /** + * @return Returns the mapStandardToolSessionUid. + */ + public Map getMapStandardToolSessionUid() { + return mapStandardToolSessionUid; + } + + /** + * @param mapStandardToolSessionUid + * The mapStandardToolSessionUid to set. + */ + public void setMapStandardToolSessionUid(Map mapStandardToolSessionUid) { + this.mapStandardToolSessionUid = mapStandardToolSessionUid; + } + + /** + * @return Returns the notebookEntriesVisible. + */ + public String getNotebookEntriesVisible() { + return notebookEntriesVisible; + } + + /** + * @param notebookEntriesVisible + * The notebookEntriesVisible to set. + */ + public void setNotebookEntriesVisible(String notebookEntriesVisible) { + this.notebookEntriesVisible = notebookEntriesVisible; + } + + /** + * @return Returns the notebookEntry. + */ + public String getNotebookEntry() { + return notebookEntry; + } + + /** + * @param notebookEntry + * The notebookEntry to set. + */ + public void setNotebookEntry(String notebookEntry) { + this.notebookEntry = notebookEntry; + } + + /** + * @return Returns the reflection. + */ + public String getReflection() { + return reflection; + } + + /** + * @param reflection + * The reflection to set. + */ + public void setReflection(String reflection) { + this.reflection = reflection; + } + + /** + * @return Returns the reflectionSubject. + */ + public String getReflectionSubject() { + return reflectionSubject; + } + + /** + * @param reflectionSubject + * The reflectionSubject to set. + */ + public void setReflectionSubject(String reflectionSubject) { + this.reflectionSubject = reflectionSubject; + } + + /** + * @return Returns the userName. + */ + public String getUserName() { + return userName; + } + + /** + * @param userName + * The userName to set. + */ + public void setUserName(String userName) { + this.userName = userName; + } + + public String getShowResults() { + return showResults; + } + + public void setShowResults(String showResults) { + this.showResults = showResults; + } + +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralMonitoringDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralMonitoringDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteGeneralMonitoringDTO.java 6 Mar 2014 22:43:34 -0000 1.1 @@ -0,0 +1,618 @@ +/*************************************************************************** + * 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: VoteGeneralMonitoringDTO.java,v 1.1 2014/03/06 22:43:34 andreyb Exp $$ */ +package org.lamsfoundation.lams.tool.vote.dto; + +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + *

+ * DTO that holds monitoring flow properties + *

+ * + * @author Ozgur Demirtas + */ +public class VoteGeneralMonitoringDTO implements Comparable { + protected String defineLaterInEditMode; + protected String requestLearningReport; + protected String userExceptionNoToolSessions; + protected String userExceptionContentInUse; + protected String userExceptionContentDoesNotExist; + protected String userExceptionNoStudentActivity; + protected String isMonitoredContentInUse; + protected String monitoredContentInUse; + + protected String activeModule; + protected String currentTab; + protected String activityTitle; + protected String activityInstructions; + protected String defaultOptionContent; + protected String countAllUsers; + protected String countSessionComplete; + protected String isPortfolioExport; + protected String existsOpenVotes; + protected String responseId; + protected String currentUid; + + protected String toolContentID; + protected Map mapOptionsContent; + protected List listMonitoredAnswersContainerDto; + protected List listUserEntries; + + protected List sessionDTOs; + protected Map mapStandardNominationsContent; + protected Map mapStandardNominationsHTMLedContent; + protected Map mapStandardRatesContent; + protected Map mapStandardUserCount; + protected Map mapStandardQuestionUid; + protected Map mapStandardToolSessionUid; + + protected String sessionUserCount; + protected String completedSessionUserCount; + protected List mapStudentsVoted; + + protected String contentFolderID; + + /** + * @return Returns the userExceptionContentDoesNotExist. + */ + public String getUserExceptionContentDoesNotExist() { + return userExceptionContentDoesNotExist; + } + + /** + * @param userExceptionContentDoesNotExist + * The userExceptionContentDoesNotExist to set. + */ + public void setUserExceptionContentDoesNotExist(String userExceptionContentDoesNotExist) { + this.userExceptionContentDoesNotExist = userExceptionContentDoesNotExist; + } + + /** + * @return Returns the userExceptionNoStudentActivity. + */ + public String getUserExceptionNoStudentActivity() { + return userExceptionNoStudentActivity; + } + + /** + * @param userExceptionNoStudentActivity + * The userExceptionNoStudentActivity to set. + */ + public void setUserExceptionNoStudentActivity(String userExceptionNoStudentActivity) { + this.userExceptionNoStudentActivity = userExceptionNoStudentActivity; + } + + /** + * @return Returns the activeModule. + */ + public String getActiveModule() { + return activeModule; + } + + /** + * @param activeModule + * The activeModule to set. + */ + public void setActiveModule(String activeModule) { + this.activeModule = activeModule; + } + + /** + * @return Returns the currentTab. + */ + public String getCurrentTab() { + return currentTab; + } + + /** + * @param currentTab + * The currentTab to set. + */ + public void setCurrentTab(String currentTab) { + this.currentTab = currentTab; + } + + /** + * @return Returns the defaultOptionContent. + */ + public String getDefaultOptionContent() { + return defaultOptionContent; + } + + /** + * @param defaultOptionContent + * The defaultOptionContent to set. + */ + public void setDefaultOptionContent(String defaultOptionContent) { + this.defaultOptionContent = defaultOptionContent; + } + + /** + * @return Returns the userExceptionContentInUse. + */ + public String getUserExceptionContentInUse() { + return userExceptionContentInUse; + } + + /** + * @param userExceptionContentInUse + * The userExceptionContentInUse to set. + */ + public void setUserExceptionContentInUse(String userExceptionContentInUse) { + this.userExceptionContentInUse = userExceptionContentInUse; + } + + /** + * @return Returns the activityInstructions. + */ + public String getActivityInstructions() { + return activityInstructions; + } + + /** + * @param activityInstructions + * The activityInstructions to set. + */ + public void setActivityInstructions(String activityInstructions) { + this.activityInstructions = activityInstructions; + } + + /** + * @return Returns the activityTitle. + */ + public String getActivityTitle() { + return activityTitle; + } + + /** + * @param activityTitle + * The activityTitle to set. + */ + public void setActivityTitle(String activityTitle) { + this.activityTitle = activityTitle; + } + + /** + * @return Returns the defineLaterInEditMode. + */ + public String getDefineLaterInEditMode() { + return defineLaterInEditMode; + } + + /** + * @param defineLaterInEditMode + * The defineLaterInEditMode to set. + */ + public void setDefineLaterInEditMode(String defineLaterInEditMode) { + this.defineLaterInEditMode = defineLaterInEditMode; + } + + /** + * @return Returns the requestLearningReport. + */ + public String getRequestLearningReport() { + return requestLearningReport; + } + + /** + * @param requestLearningReport + * The requestLearningReport to set. + */ + public void setRequestLearningReport(String requestLearningReport) { + this.requestLearningReport = requestLearningReport; + } + + /** + * @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 isMonitoredContentInUse. + */ + public String getIsMonitoredContentInUse() { + return isMonitoredContentInUse; + } + + /** + * @param isMonitoredContentInUse + * The isMonitoredContentInUse to set. + */ + public void setIsMonitoredContentInUse(String isMonitoredContentInUse) { + this.isMonitoredContentInUse = isMonitoredContentInUse; + } + + /** + * @return Returns the mapOptionsContent. + */ + public Map getMapOptionsContent() { + return mapOptionsContent; + } + + /** + * @param mapOptionsContent + * The mapOptionsContent to set. + */ + public void setMapOptionsContent(Map mapOptionsContent) { + this.mapOptionsContent = mapOptionsContent; + } + + /** + * @return Returns the countAllUsers. + */ + public String getCountAllUsers() { + return countAllUsers; + } + + /** + * @param countAllUsers + * The countAllUsers to set. + */ + public void setCountAllUsers(String countAllUsers) { + this.countAllUsers = countAllUsers; + } + + /** + * @return Returns the countSessionComplete. + */ + public String getCountSessionComplete() { + return countSessionComplete; + } + + /** + * @param countSessionComplete + * The countSessionComplete to set. + */ + public void setCountSessionComplete(String countSessionComplete) { + this.countSessionComplete = countSessionComplete; + } + + /** + * @return Returns the isPortfolioExport. + */ + public String getIsPortfolioExport() { + return isPortfolioExport; + } + + /** + * @param isPortfolioExport + * The isPortfolioExport to set. + */ + public void setIsPortfolioExport(String isPortfolioExport) { + this.isPortfolioExport = isPortfolioExport; + } + + /** + * @return Returns the listMonitoredAnswersContainerDto. + */ + public List getListMonitoredAnswersContainerDto() { + return listMonitoredAnswersContainerDto; + } + + /** + * @param listMonitoredAnswersContainerDto + * The listMonitoredAnswersContainerDto to set. + */ + public void setListMonitoredAnswersContainerDto(List listMonitoredAnswersContainerDto) { + this.listMonitoredAnswersContainerDto = listMonitoredAnswersContainerDto; + } + + /** + * @return Returns the listUserEntries. + */ + public List getListUserEntries() { + return listUserEntries; + } + + /** + * @param listUserEntries + * The listUserEntries to set. + */ + public void setListUserEntries(List listUserEntries) { + this.listUserEntries = listUserEntries; + } + + /** + * @return Returns the existsOpenVotes. + */ + public String getExistsOpenVotes() { + return existsOpenVotes; + } + + /** + * @param existsOpenVotes + * The existsOpenVotes to set. + */ + public void setExistsOpenVotes(String existsOpenVotes) { + this.existsOpenVotes = existsOpenVotes; + } + + /** + * @return Returns the sessionDtos. + */ + public List getSessionDTOs() { + return sessionDTOs; + } + + /** + * @param sessionDtos + * The sessionDtos to set. + */ + public void setSessionDTOs(List sessionDTOs) { + this.sessionDTOs = sessionDTOs; + } + + /** + * @return Returns the mapStandardNominationsContent. + */ + public Map getMapStandardNominationsContent() { + return mapStandardNominationsContent; + } + + /** + * @param mapStandardNominationsContent + * The mapStandardNominationsContent to set. + */ + public void setMapStandardNominationsContent(Map mapStandardNominationsContent) { + this.mapStandardNominationsContent = mapStandardNominationsContent; + } + + /** + * @return Returns the mapStandardNominationsHTMLedContent. + */ + public Map getMapStandardNominationsHTMLedContent() { + return mapStandardNominationsHTMLedContent; + } + + /** + * @param mapStandardNominationsHTMLedContent + * The mapStandardNominationsHTMLedContent to set. + */ + public void setMapStandardNominationsHTMLedContent(Map mapStandardNominationsHTMLedContent) { + this.mapStandardNominationsHTMLedContent = mapStandardNominationsHTMLedContent; + } + + /** + * @return Returns the mapStandardQuestionUid. + */ + public Map getMapStandardQuestionUid() { + return mapStandardQuestionUid; + } + + /** + * @param mapStandardQuestionUid + * The mapStandardQuestionUid to set. + */ + public void setMapStandardQuestionUid(Map mapStandardQuestionUid) { + this.mapStandardQuestionUid = mapStandardQuestionUid; + } + + /** + * @return Returns the mapStandardRatesContent. + */ + public Map getMapStandardRatesContent() { + return mapStandardRatesContent; + } + + /** + * @param mapStandardRatesContent + * The mapStandardRatesContent to set. + */ + public void setMapStandardRatesContent(Map mapStandardRatesContent) { + this.mapStandardRatesContent = mapStandardRatesContent; + } + + /** + * @return Returns the mapStandardToolSessionUid. + */ + public Map getMapStandardToolSessionUid() { + return mapStandardToolSessionUid; + } + + /** + * @param mapStandardToolSessionUid + * The mapStandardToolSessionUid to set. + */ + public void setMapStandardToolSessionUid(Map mapStandardToolSessionUid) { + this.mapStandardToolSessionUid = mapStandardToolSessionUid; + } + + /** + * @return Returns the mapStandardUserCount. + */ + public Map getMapStandardUserCount() { + return mapStandardUserCount; + } + + /** + * @param mapStandardUserCount + * The mapStandardUserCount to set. + */ + public void setMapStandardUserCount(Map mapStandardUserCount) { + this.mapStandardUserCount = mapStandardUserCount; + } + + /** + * @param mapStudentsVoted + * The mapStudentsVoted to set. + */ + public void setMapStudentsVoted(List mapStudentsVoted) { + this.mapStudentsVoted = mapStudentsVoted; + } + + /** + * @return Returns the mapStudentsVoted. + */ + public List getMapStudentsVoted() { + return mapStudentsVoted; + } + + /** + * @return Returns the currentUid. + */ + public String getCurrentUid() { + return currentUid; + } + + /** + * @param currentUid + * The currentUid to set. + */ + public void setCurrentUid(String currentUid) { + this.currentUid = currentUid; + } + + /** + * @return Returns the responseId. + */ + public String getResponseId() { + return responseId; + } + + /** + * @param responseId + * The responseId to set. + */ + public void setResponseId(String responseId) { + this.responseId = responseId; + } + + /** + * @return Returns the toolContentID. + */ + public String getToolContentID() { + return toolContentID; + } + + /** + * @param toolContentID + * The toolContentID to set. + */ + public void setToolContentID(String toolContentID) { + this.toolContentID = toolContentID; + } + + /** + * @return Returns the completedSessionUserCount. + */ + public String getCompletedSessionUserCount() { + return completedSessionUserCount; + } + + /** + * @param completedSessionUserCount + * The completedSessionUserCount to set. + */ + public void setCompletedSessionUserCount(String completedSessionUserCount) { + this.completedSessionUserCount = completedSessionUserCount; + } + + /** + * @return Returns the sessionUserCount. + */ + public String getSessionUserCount() { + return sessionUserCount; + } + + /** + * @param sessionUserCount + * The sessionUserCount to set. + */ + public void setSessionUserCount(String sessionUserCount) { + this.sessionUserCount = sessionUserCount; + } + + public String toString() { + return new ToStringBuilder(this).append("toolContentID: ", toolContentID) + .append("activeModule: ", activeModule).append("monitoredContentInUse: ", monitoredContentInUse) + .append("currentTab: ", currentTab) + .append("requestLearningReport: ", requestLearningReport) + .append("userExceptionNoToolSessions: ", userExceptionNoToolSessions) + .append("userExceptionContentDoesNotExist: ", userExceptionContentDoesNotExist) + .append("userExceptionNoStudentActivity: ", userExceptionNoStudentActivity) + .append("isMonitoredContentInUse: ", isMonitoredContentInUse).append("activityTitle: ", activityTitle) + .append("activityInstructions: ", activityInstructions) + .append("userExceptionContentInUse: ", userExceptionContentInUse) + .append("defaultOptionContent: ", defaultOptionContent).append("countAllUsers: ", countAllUsers) + .append("countSessionComplete: ", countSessionComplete) + .append("isPortfolioExport: ", isPortfolioExport) + .append("listMonitoredAnswersContainerDto: ", listMonitoredAnswersContainerDto) + .append("listUserEntries: ", listUserEntries).append("existsOpenVotes: ", existsOpenVotes) + .append("sessionDtos: ", sessionDTOs).append("mapStudentsVoted: ", mapStudentsVoted) + .append("responseId: ", responseId).append("currentUid: ", currentUid) + .append("sessionUserCount: ", sessionUserCount) + .append("completedSessionUserCount: ", completedSessionUserCount).toString(); + } + + public int compareTo(Object o) { + VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = (VoteGeneralMonitoringDTO) o; + + if (voteGeneralMonitoringDTO == null) + return 1; + else + return 0; + } + + /** + * @return Returns the monitoredContentInUse. + */ + public String getMonitoredContentInUse() { + return monitoredContentInUse; + } + + /** + * @param monitoredContentInUse + * The monitoredContentInUse to set. + */ + public void setMonitoredContentInUse(String monitoredContentInUse) { + this.monitoredContentInUse = monitoredContentInUse; + } + + /** + * @return Returns the contentFolderID. + */ + public String getContentFolderID() { + return contentFolderID; + } + + /** + * @param contentFolderID + * The contentFolderID to set. + */ + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteMonitoredAnswersDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteMonitoredAnswersDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteMonitoredAnswersDTO.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,169 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ + +package org.lamsfoundation.lams.tool.vote.dto; + +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + *

+ * DTO that holds question/candidate answers data as well as user attempts data for jsp purposes + *

+ * + * @author Ozgur Demirtas + */ +public class VoteMonitoredAnswersDTO implements Comparable { + protected String questionUid; + + private String question; + + private String attemptUid; + + private List candidateAnswers; + + private Map questionAttempts; + + private String sessionId; + + private String sessionName; + + /** + * @return Returns the sessionId. + */ + public String getSessionId() { + return sessionId; + } + + /** + * @param sessionId + * The sessionId to set. + */ + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + /** + * @return Returns the sessionName. + */ + public String getSessionName() { + return sessionName; + } + + /** + * @param sessionName + * The sessionName to set. + */ + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + /** + * @return Returns the candidateAnswers. + */ + public List getCandidateAnswers() { + return candidateAnswers; + } + + /** + * @param candidateAnswers + * The candidateAnswers to set. + */ + public void setCandidateAnswers(List candidateAnswers) { + this.candidateAnswers = candidateAnswers; + } + + /** + * @return Returns the question. + */ + public String getQuestion() { + return question; + } + + /** + * @param question + * The question to set. + */ + public void setQuestion(String question) { + this.question = question; + } + + /** + * @return Returns the questionUid. + */ + public String getQuestionUid() { + return questionUid; + } + + /** + * @param questionUid + * The questionUid to set. + */ + public void setQuestionUid(String questionUid) { + this.questionUid = questionUid; + } + + /** + * @return Returns the questionAttempts. + */ + public Map getQuestionAttempts() { + return questionAttempts; + } + + /** + * @param questionAttempts + * The questionAttempts to set. + */ + public void setQuestionAttempts(Map questionAttempts) { + this.questionAttempts = questionAttempts; + } + + public String toString() { + return new ToStringBuilder(this).append("question", getQuestion()).toString(); + } + + public int compareTo(Object o) { + VoteMonitoredAnswersDTO voteMonitoredAnswersDTO = (VoteMonitoredAnswersDTO) o; + + if (voteMonitoredAnswersDTO == null) + return 1; + else + return (int) (new Long(questionUid).longValue() - new Long(voteMonitoredAnswersDTO.questionUid).longValue()); + } + + /** + * @return Returns the attemptUid. + */ + public String getAttemptUid() { + return attemptUid; + } + + /** + * @param attemptUid + * The attemptUid to set. + */ + public void setAttemptUid(String attemptUid) { + this.attemptUid = attemptUid; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteMonitoredUserDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteMonitoredUserDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteMonitoredUserDTO.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,239 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ +package org.lamsfoundation.lams.tool.vote.dto; + +import java.util.Date; +import java.util.Map; + +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + *

DTO that holds users attempt history data for jsp purposes

+ * + * @author Ozgur Demirtas + */ +public class VoteMonitoredUserDTO implements Comparable +{ + private String queUsrId; + + private String uid; + + //private String attemptTime; + + private Date attemptTime; + + private String timeZone; + + private String userName; + + private String isCorrect; + + private String response; + + private String userEntry; + + private String visible; + + private String sessionId; + + private String questionUid; + + private Map usersAttempts; + + private String responsePresentable; + + + + /** + * @return Returns the queUsrId. + */ + public String getQueUsrId() { + return queUsrId; + } + /** + * @param queUsrId The queUsrId to set. + */ + public void setQueUsrId(String queUsrId) { + this.queUsrId = queUsrId; + } + + public String toString() { + return new ToStringBuilder(this) + .append("queUsrId and username", getQueUsrId() + " and " + getUserName()) + .toString(); + } + /** + * @return Returns the usersAttempts. + */ + public Map getUsersAttempts() { + return usersAttempts; + } + /** + * @param usersAttempts The usersAttempts to set. + */ + public void setUsersAttempts(Map usersAttempts) { + this.usersAttempts = usersAttempts; + } + + public int compareTo(Object o) + { + VoteMonitoredUserDTO VoteMonitoredUserDTO = (VoteMonitoredUserDTO) o; + + if (VoteMonitoredUserDTO == null) + return 1; + else + return (int) (new Long(queUsrId).longValue() - new Long(VoteMonitoredUserDTO.queUsrId).longValue()); + } + /** + * @return Returns the isCorrect. + */ + public String getIsCorrect() { + return isCorrect; + } + /** + * @param isCorrect The isCorrect to set. + */ + public void setIsCorrect(String isCorrect) { + this.isCorrect = isCorrect; + } + /** + * @return Returns the response. + */ + public String getResponse() { + return response; + } + /** + * @param response The response to set. + */ + public void setResponse(String response) { + this.response = response; + } + /** + * @return Returns the timeZone. + */ + public String getTimeZone() { + return timeZone; + } + /** + * @param timeZone The timeZone to set. + */ + public void setTimeZone(String timeZone) { + this.timeZone = timeZone; + } + /** + * @return Returns the uid. + */ + public String getUid() { + return uid; + } + /** + * @param uid The uid to set. + */ + public void setUid(String uid) { + this.uid = uid; + } + /** + * @return Returns the userName. + */ + public String getUserName() { + return userName; + } + /** + * @param userName The userName to set. + */ + public void setUserName(String userName) { + this.userName = userName; + } + /** + * @return Returns the sessionId. + */ + public String getSessionId() { + return sessionId; + } + /** + * @param sessionId The sessionId to set. + */ + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + /** + * @return Returns the questionUid. + */ + public String getQuestionUid() { + return questionUid; + } + /** + * @param questionUid The questionUid to set. + */ + public void setQuestionUid(String questionUid) { + this.questionUid = questionUid; + } + /** + * @return Returns the userEntry. + */ + public String getUserEntry() { + return userEntry; + } + /** + * @param userEntry The userEntry to set. + */ + public void setUserEntry(String userEntry) { + this.userEntry = userEntry; + } + /** + * @return Returns the visible. + */ + public String getVisible() { + return visible; + } + /** + * @param visible The visible to set. + */ + public void setVisible(String visible) { + this.visible = visible; + } + /** + * @return Returns the attemptTime. + */ + public Date getAttemptTime() { + return attemptTime; + } + /** + * @param attemptTime The attemptTime to set. + */ + public void setAttemptTime(Date attemptTime) { + this.attemptTime = attemptTime; + } + /** + * @return Returns the responsePresentable. + */ + public String getResponsePresentable() { + return responsePresentable; + } + /** + * @param responsePresentable The responsePresentable to set. + */ + public void setResponsePresentable(String responsePresentable) { + this.responsePresentable = responsePresentable; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteNominationContentDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/Attic/VoteNominationContentDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteNominationContentDTO.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,107 @@ +/**************************************************************** + * 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: VoteNominationContentDTO.java,v 1.1 2014/03/06 22:43:33 andreyb Exp $$ */ +package org.lamsfoundation.lams.tool.vote.dto; + +import org.apache.commons.lang.builder.ToStringBuilder; + + + +/** + *

Votes dto + *

+ * + * @author Ozgur Demirtas + */ +public class VoteNominationContentDTO implements Comparable +{ + private String question; + private String displayOrder; + private String feedback; + + public String toString() { + return new ToStringBuilder(this) + .append("question:", question) + .append("feedback:", feedback) + .append("displayOrder:", displayOrder) + .toString(); + } + + public int compareTo(Object o) + { + VoteMonitoredUserDTO voteMonitoredUserDTO = (VoteMonitoredUserDTO) o; + + if (voteMonitoredUserDTO == null) + return 1; + else + return 0; + } + /** + * @return Returns the displayOrder. + */ + public String getDisplayOrder() { + return displayOrder; + } + /** + * @param displayOrder The displayOrder to set. + */ + public void setDisplayOrder(String displayOrder) { + this.displayOrder = displayOrder; + } + /** + * @return Returns the feedback. + */ + public String getFeedback() { + return feedback; + } + /** + * @param feedback The feedback to set. + */ + public void setFeedback(String feedback) { + this.feedback = feedback; + } + /** + * @return Returns the question. + */ + public String getNomination() { + return question; + } + /** + * @param question The question to set. + */ + public void setNomination(String question) { + this.question = question; + } + /** + * @return Returns the question. + */ + public String getQuestion() { + return question; + } + /** + * @param question The question to set. + */ + public void setQuestion(String question) { + this.question = question; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteStatsDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteStatsDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dto/VoteStatsDTO.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,84 @@ +/**************************************************************** + * 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: VoteStatsDTO.java,v 1.1 2014/03/06 22:43:33 andreyb Exp $$ */ +package org.lamsfoundation.lams.tool.vote.dto; + +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + *

DTO that holds stats data + *

+ * + * @author Ozgur Demirtas + */ +public class VoteStatsDTO implements Comparable +{ + private String countAllUsers; + + private String countSessionComplete; + + public String toString() { + return new ToStringBuilder(this) + .append("question", countAllUsers) + .append("countSessionComplete", countSessionComplete) + .toString(); + } + + public int compareTo(Object o) + { + VoteStatsDTO qaStatsDTO = (VoteStatsDTO) o; + + if (qaStatsDTO == null) + return 1; + else + return 0; + } + + + /** + * @return Returns the countAllUsers. + */ + public String getCountAllUsers() { + return countAllUsers; + } + /** + * @param countAllUsers The countAllUsers to set. + */ + public void setCountAllUsers(String countAllUsers) { + this.countAllUsers = countAllUsers; + } + /** + * @return Returns the countSessionComplete. + */ + public String getCountSessionComplete() { + return countSessionComplete; + } + /** + * @param countSessionComplete The countSessionComplete to set. + */ + public void setCountSessionComplete(String countSessionComplete) { + this.countSessionComplete = countSessionComplete; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.java,v diff -u -r1.8 -r1.9 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.java 4 Jul 2013 15:01:26 -0000 1.8 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.java 6 Mar 2014 22:43:34 -0000 1.9 @@ -44,9 +44,6 @@ /** identifier field */ private Long uid; - /** persistent field */ - private Long voteQueContentId; - /** nullable persistent field */ private String question; @@ -61,14 +58,6 @@ /** persistent field */ private Set voteUsrAttempts; - - /** full constructor */ - public VoteQueContent(Long voteQueContentId, String question, VoteContent voteContent, Set voteUsrAttempts) { - this.voteQueContentId = voteQueContentId; - this.question = question; - this.voteContent=voteContent; - this.voteUsrAttempts = voteUsrAttempts; - } public VoteQueContent(String question, VoteContent voteContent, Set voteUsrAttempts) { this.question = question; @@ -83,30 +72,9 @@ this.voteUsrAttempts = voteUsrAttempts; } - - public VoteQueContent(Long voteQueContentId, String question, Set voteUsrAttempts) { - this.voteQueContentId = voteQueContentId; - this.question = question; - this.voteUsrAttempts = voteUsrAttempts; - } - - public VoteQueContent(String question, Set voteUsrAttempts) { - this.question = question; - this.voteUsrAttempts = voteUsrAttempts; - } - - - /** default constructor */ public VoteQueContent() { } - - /** minimal constructor */ - public VoteQueContent(Long voteQueContentId, org.lamsfoundation.lams.tool.vote.pojos.VoteContent voteContent, Set voteUsrAttempts) { - this.voteQueContentId = voteQueContentId; - this.voteContent = voteContent; - this.voteUsrAttempts = voteUsrAttempts; - } /** @@ -116,16 +84,11 @@ * @param queContent the original qa question content * @return the new qa question content object */ - public static VoteQueContent newInstance(VoteQueContent queContent, int displayOrder, - VoteContent newMcContent) - - { - VoteQueContent newQueContent = new VoteQueContent(queContent.getQuestion(), - displayOrder, - newMcContent, - new TreeSet()); - - return newQueContent; + public static VoteQueContent newInstance(VoteQueContent queContent, int displayOrder, VoteContent newMcContent) { + VoteQueContent newQueContent = new VoteQueContent(queContent.getQuestion(), displayOrder, newMcContent, + new TreeSet()); + + return newQueContent; } @@ -172,28 +135,16 @@ } - public int compareTo(Object o) - { - VoteQueContent queContent = (VoteQueContent) o; - //if the object does not exist yet, then just return any one of 0, -1, 1. Should not make a difference. - if (voteQueContentId == null) - return 1; - else - return (int) (voteQueContentId.longValue() - queContent.voteQueContentId.longValue()); + public int compareTo(Object o) { + VoteQueContent queContent = (VoteQueContent) o; + // if the object does not exist yet, then just return any one of 0, -1, 1. Should not make a difference. + if (uid == null) + return 1; + else + return (int) (uid.longValue() - queContent.uid.longValue()); } + /** - * @return Returns the voteQueContentId. - */ - public Long getVoteQueContentId() { - return voteQueContentId; - } - /** - * @param voteQueContentId The voteQueContentId to set. - */ - public void setVoteQueContentId(Long voteQueContentId) { - this.voteQueContentId = voteQueContentId; - } - /** * @return Returns the voteContentId. */ public Long getVoteContentId() { Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java,v diff -u -r1.14 -r1.15 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java 2 Jan 2014 23:12:50 -0000 1.14 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java 6 Mar 2014 22:43:34 -0000 1.15 @@ -70,7 +70,7 @@ this.attemptTime = attemptTime; this.timeZone = timeZone; this.voteQueContent = voteQueContent; - this.voteQueContentId = voteQueContent.getVoteQueContentId(); + //this.voteQueContentId = voteQueContent.getVoteQueContentId(); this.voteQueUsr = voteQueUsr; this.userEntry = userEntry; this.visible = visible; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java,v diff -u -r1.49 -r1.50 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java 6 Feb 2014 22:07:15 -0000 1.49 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java 6 Mar 2014 22:43:34 -0000 1.50 @@ -37,11 +37,10 @@ import org.lamsfoundation.lams.tool.exception.DataMissingException; import org.lamsfoundation.lams.tool.exception.SessionDataExistsException; import org.lamsfoundation.lams.tool.exception.ToolException; -import org.lamsfoundation.lams.tool.vote.ReflectionDTO; -import org.lamsfoundation.lams.tool.vote.SessionDTO; -import org.lamsfoundation.lams.tool.vote.VoteApplicationException; -import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; -import org.lamsfoundation.lams.tool.vote.VoteMonitoredAnswersDTO; +import org.lamsfoundation.lams.tool.vote.dto.ReflectionDTO; +import org.lamsfoundation.lams.tool.vote.dto.SessionDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredAnswersDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; @@ -98,8 +97,7 @@ */ LinkedList getSessionDTOs(Long toolContentID); - List processUserEnteredNominations(Long voteContentUid, String currentSessionId, - boolean showUserEntriesBySession, String userId, boolean showUserEntriesByUserId); + List getOpenVotes(Long voteContentUid, Long currentSessionId, Long userId); List getReflectionData(VoteContent voteContent, Long userID); @@ -143,25 +141,25 @@ void updateVoteQueContent(VoteQueContent voteQueContent) throws VoteApplicationException; - int getAttemptsForQuestionContent(final Long voteQueContentId) throws VoteApplicationException; + int getAttemptsForQuestionContent(final Long questionUid) throws VoteApplicationException; boolean studentActivityOccurredStandardAndOpen(VoteContent voteContent) throws VoteApplicationException; int getUserEnteredVotesCountForContent(final Long voteContentUid) throws VoteApplicationException; - List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, + List getAttemptsForQuestionContentAndSessionUid(final Long questionUid, final Long voteSessionUid); - int getStandardAttemptsForQuestionContentAndSessionUid(final Long voteQueContentId, final Long voteSessionId) + int getStandardAttemptsForQuestionContentAndSessionUid(final Long questionUid, final Long voteSessionId) throws VoteApplicationException; int getSessionEntriesCount(final Long voteSessionId) throws VoteApplicationException; - List getAttemptsForUserAndQuestionContent(final Long userUid, final Long questionUid) + List getAttemptsForUserAndQuestionContent(final Long userUid, final Long questionUid) throws VoteApplicationException; VoteUsrAttempt getAttemptForUserAndQuestionContentAndSession(final Long queUsrId, - final Long voteQueContentId, final Long toolSessionUid) throws VoteApplicationException; + final Long questionUid, final Long toolSessionUid) throws VoteApplicationException; List retrieveVoteQueContentsByToolContentId(long qaContentId) throws VoteApplicationException; @@ -181,7 +179,7 @@ void cleanAllQuestions(final Long voteContentUid) throws VoteApplicationException; - List getStandardAttemptsForQuestionContentAndContentUid(final Long voteQueContentId); + List getStandardAttemptsForQuestionContentAndContentUid(final Long questionUid); VoteQueContent getQuestionContentByQuestionText(final String question, final Long voteContentUid); @@ -238,19 +236,20 @@ void saveVoteContent(VoteContent vote) throws VoteApplicationException; + /** + * checks the parameter content in the user responses table + * + * @param voteContent + * @return boolean + * @throws VoteApplicationException + */ boolean studentActivityOccurredGlobal(VoteContent voteContent) throws VoteApplicationException; - int countIncompleteSession(VoteContent vote) throws VoteApplicationException; - - boolean studentActivityOccurred(VoteContent vote) throws VoteApplicationException; - void copyToolContent(Long fromContentId, Long toContentId) throws ToolException; void removeToolContent(Long toolContentID, boolean removeSessionData) throws SessionDataExistsException, ToolException; - boolean existsSession(Long toolSessionId); - void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentID) throws ToolException; void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteApplicationException.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteApplicationException.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteApplicationException.java 6 Mar 2014 22:43:34 -0000 1.1 @@ -0,0 +1,73 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ + +package org.lamsfoundation.lams.tool.vote.service; + + +/** + *

This exception wraps all basic exception occured in the voting tool. It is + * not suppose to be try and catched in any level. The struts should be taking + * care of handling this exception.

+ * +* @author Ozgur Demirtas + * + */ +public class VoteApplicationException extends RuntimeException +{ + /** + * Default Constructor + */ + public VoteApplicationException() + { + super(); + } + + /** + * Constructor for customized error message + * @param message + */ + public VoteApplicationException(String message) + { + super(message); + } + + /** + * Constructor for wrapping the throwable object + * @param cause + */ + public VoteApplicationException(Throwable cause) + { + super(cause); + } + + /** + * Constructor for wrapping both the customized error message and + * throwable exception object. + * @param message + * @param cause + */ + public VoteApplicationException(String message, Throwable cause) + { + super(message, cause); + } + +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteOutputFactory.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteOutputFactory.java,v diff -u -r1.10 -r1.11 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteOutputFactory.java 2 Jan 2014 23:12:50 -0000 1.10 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteOutputFactory.java 6 Mar 2014 22:43:34 -0000 1.11 @@ -36,12 +36,12 @@ import org.lamsfoundation.lams.tool.SimpleURL; import org.lamsfoundation.lams.tool.ToolOutput; import org.lamsfoundation.lams.tool.ToolOutputDefinition; -import org.lamsfoundation.lams.tool.vote.VoteUtils; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; public class VoteOutputFactory extends OutputFactory { Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java,v diff -u -r1.80 -r1.81 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java 11 Feb 2014 14:00:08 -0000 1.80 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java 6 Mar 2014 22:43:34 -0000 1.81 @@ -70,27 +70,25 @@ import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.service.ILamsCoreToolService; import org.lamsfoundation.lams.tool.service.ILamsToolService; -import org.lamsfoundation.lams.tool.vote.ReflectionDTO; -import org.lamsfoundation.lams.tool.vote.SessionDTO; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteApplicationException; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; -import org.lamsfoundation.lams.tool.vote.VoteMonitoredAnswersDTO; -import org.lamsfoundation.lams.tool.vote.VoteMonitoredUserDTO; -import org.lamsfoundation.lams.tool.vote.VoteUtils; import org.lamsfoundation.lams.tool.vote.dao.IVoteContentDAO; import org.lamsfoundation.lams.tool.vote.dao.IVoteQueContentDAO; import org.lamsfoundation.lams.tool.vote.dao.IVoteSessionDAO; import org.lamsfoundation.lams.tool.vote.dao.IVoteUserDAO; import org.lamsfoundation.lams.tool.vote.dao.IVoteUsrAttemptDAO; +import org.lamsfoundation.lams.tool.vote.dto.ReflectionDTO; +import org.lamsfoundation.lams.tool.vote.dto.SessionDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredAnswersDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredUserDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; import org.lamsfoundation.lams.tool.vote.web.MonitoringUtil; -import org.lamsfoundation.lams.tool.vote.web.VoteMonitoringAction; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; @@ -111,9 +109,7 @@ * */ public class VoteServicePOJO implements IVoteService, ToolContentManager, ToolSessionManager, - ToolContentImport102Manager, VoteAppConstants - -{ + ToolContentImport102Manager, VoteAppConstants { static Logger logger = Logger.getLogger(VoteServicePOJO.class.getName()); private IVoteContentDAO voteContentDAO; @@ -428,8 +424,8 @@ sessionDTO.setMapStandardQuestionUid(mapStandardQuestionUid); sessionDTO.setMapStandardToolSessionUid(mapStandardToolSessionUid); - List openVotes = this.processUserEnteredNominations(voteContent.getUid(), session - .getVoteSessionId().toString(), true, null, false); + List openVotes = this.getOpenVotes(voteContent.getUid(), + session.getVoteSessionId(), null); sessionDTO.setOpenVotes(openVotes); boolean isExistsOpenVote = openVotes.size() > 0; sessionDTO.setExistsOpenVote(isExistsOpenVote); @@ -521,92 +517,86 @@ } @Override - public List processUserEnteredNominations(Long voteContentUid, String currentSessionId, - boolean showUserEntriesBySession, String userId, boolean showUserEntriesByUserId) { + public List getOpenVotes(Long voteContentUid, Long currentSessionId, Long userId) { Set userEntries = voteUsrAttemptDAO.getUserEntries(voteContentUid); - List listUserEntries = new LinkedList(); + List monitoredAnswersDTOs = new LinkedList(); + for (String userEntry : userEntries) { - Iterator itListNominations = userEntries.iterator(); - while (itListNominations.hasNext()) { - String userEntry = (String) itListNominations.next(); + if (userEntry == null || userEntry.length() == 0) { + continue; + } + + VoteMonitoredAnswersDTO voteMonitoredAnswersDTO = new VoteMonitoredAnswersDTO(); + voteMonitoredAnswersDTO.setQuestion(userEntry); - if (userEntry != null && userEntry.length() > 0) { - VoteMonitoredAnswersDTO voteMonitoredAnswersDTO = new VoteMonitoredAnswersDTO(); - voteMonitoredAnswersDTO.setQuestion(userEntry); + List userAttempts = voteUsrAttemptDAO.getUserAttempts(voteContentUid, userEntry); + List monitoredUserContainerDTOs = new LinkedList(); - List userRecords = voteUsrAttemptDAO.getUserRecords(voteContentUid, userEntry); - List listMonitoredUserContainerDTO = new LinkedList(); + for (VoteUsrAttempt voteUsrAttempt : userAttempts) { + VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - Iterator itUserRecords = userRecords.iterator(); - while (itUserRecords.hasNext()) { - VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - VoteUsrAttempt voteUsrAttempt = (VoteUsrAttempt) itUserRecords.next(); + if (currentSessionId == null) { + voteMonitoredUserDTO.setAttemptTime(voteUsrAttempt.getAttemptTime()); + voteMonitoredUserDTO.setTimeZone(voteUsrAttempt.getTimeZone()); + voteMonitoredUserDTO.setUserName(voteUsrAttempt.getVoteQueUsr().getFullname()); + voteMonitoredUserDTO.setQueUsrId(voteUsrAttempt.getVoteQueUsr().getUid().toString()); + voteMonitoredUserDTO.setUserEntry(voteUsrAttempt.getUserEntry()); + voteMonitoredUserDTO.setUid(voteUsrAttempt.getUid().toString()); + voteMonitoredUserDTO.setVisible(new Boolean(voteUsrAttempt.isVisible()).toString()); + monitoredUserContainerDTOs.add(voteMonitoredUserDTO); - if (!showUserEntriesBySession) { + } else { + // showUserEntriesBySession is true: the case with learner export portfolio + // show user entries by same same session and same user + Long userSessionId = voteUsrAttempt.getVoteQueUsr().getVoteSession().getVoteSessionId(); + + if (userId != null) { + if (userSessionId.equals(currentSessionId)) { + Long localUserId = voteUsrAttempt.getVoteQueUsr().getQueUsrId(); + if (userId.equals(localUserId)) { + voteMonitoredUserDTO.setAttemptTime(voteUsrAttempt.getAttemptTime()); + voteMonitoredUserDTO.setTimeZone(voteUsrAttempt.getTimeZone()); + voteMonitoredUserDTO.setUserName(voteUsrAttempt.getVoteQueUsr().getFullname()); + voteMonitoredUserDTO.setQueUsrId(voteUsrAttempt.getVoteQueUsr().getUid().toString()); + voteMonitoredUserDTO.setUserEntry(voteUsrAttempt.getUserEntry()); + monitoredUserContainerDTOs.add(voteMonitoredUserDTO); + voteMonitoredUserDTO.setUid(voteUsrAttempt.getUid().toString()); + voteMonitoredUserDTO.setVisible(new Boolean(voteUsrAttempt.isVisible()).toString()); + if (voteUsrAttempt.isVisible() == false) { + voteMonitoredAnswersDTO.setQuestion("Nomination Hidden"); + } + + } + } + } else { + // showUserEntriesByUserId is false + // show user entries by same session + if (userSessionId.equals(currentSessionId)) { voteMonitoredUserDTO.setAttemptTime(voteUsrAttempt.getAttemptTime()); voteMonitoredUserDTO.setTimeZone(voteUsrAttempt.getTimeZone()); voteMonitoredUserDTO.setUserName(voteUsrAttempt.getVoteQueUsr().getFullname()); voteMonitoredUserDTO.setQueUsrId(voteUsrAttempt.getVoteQueUsr().getUid().toString()); voteMonitoredUserDTO.setUserEntry(voteUsrAttempt.getUserEntry()); + monitoredUserContainerDTOs.add(voteMonitoredUserDTO); voteMonitoredUserDTO.setUid(voteUsrAttempt.getUid().toString()); voteMonitoredUserDTO.setVisible(new Boolean(voteUsrAttempt.isVisible()).toString()); - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - - } else { - // showUserEntriesBySession is true: the case with learner export portfolio - // show user entries by same same session and same user - String userSessionId = voteUsrAttempt.getVoteQueUsr().getVoteSession().getVoteSessionId() - .toString(); - - if (showUserEntriesByUserId) { - if (userSessionId.equals(currentSessionId)) { - String localUserId = voteUsrAttempt.getVoteQueUsr().getQueUsrId().toString(); - if (userId.equals(localUserId)) { - voteMonitoredUserDTO.setAttemptTime(voteUsrAttempt.getAttemptTime()); - voteMonitoredUserDTO.setTimeZone(voteUsrAttempt.getTimeZone()); - voteMonitoredUserDTO.setUserName(voteUsrAttempt.getVoteQueUsr().getFullname()); - voteMonitoredUserDTO - .setQueUsrId(voteUsrAttempt.getVoteQueUsr().getUid().toString()); - voteMonitoredUserDTO.setUserEntry(voteUsrAttempt.getUserEntry()); - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - voteMonitoredUserDTO.setUid(voteUsrAttempt.getUid().toString()); - voteMonitoredUserDTO.setVisible(new Boolean(voteUsrAttempt.isVisible()).toString()); - if (voteUsrAttempt.isVisible() == false) { - voteMonitoredAnswersDTO.setQuestion("Nomination Hidden"); - } - - } - } - } else { - // showUserEntriesByUserId is false - // show user entries by same session - if (userSessionId.equals(currentSessionId)) { - voteMonitoredUserDTO.setAttemptTime(voteUsrAttempt.getAttemptTime()); - voteMonitoredUserDTO.setTimeZone(voteUsrAttempt.getTimeZone()); - voteMonitoredUserDTO.setUserName(voteUsrAttempt.getVoteQueUsr().getFullname()); - voteMonitoredUserDTO.setQueUsrId(voteUsrAttempt.getVoteQueUsr().getUid().toString()); - voteMonitoredUserDTO.setUserEntry(voteUsrAttempt.getUserEntry()); - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - voteMonitoredUserDTO.setUid(voteUsrAttempt.getUid().toString()); - voteMonitoredUserDTO.setVisible(new Boolean(voteUsrAttempt.isVisible()).toString()); - } - } } - + } } - if (listMonitoredUserContainerDTO.size() > 0) { - Map mapMonitoredUserContainerDTO = MonitoringUtil - .convertToVoteMonitoredUserDTOMap(listMonitoredUserContainerDTO); + } - voteMonitoredAnswersDTO.setQuestionAttempts(mapMonitoredUserContainerDTO); - listUserEntries.add(voteMonitoredAnswersDTO); - } + if (monitoredUserContainerDTOs.size() > 0) { + Map mapMonitoredUserContainerDTO = MonitoringUtil + .convertToVoteMonitoredUserDTOMap(monitoredUserContainerDTOs); + + voteMonitoredAnswersDTO.setQuestionAttempts(mapMonitoredUserContainerDTO); + monitoredAnswersDTOs.add(voteMonitoredAnswersDTO); } } - return listUserEntries; + return monitoredAnswersDTOs; } @Override @@ -729,10 +719,10 @@ } } - public List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, + public List getAttemptsForQuestionContentAndSessionUid(final Long questionUid, final Long voteSessionUid) { try { - return voteUsrAttemptDAO.getStandardAttemptUsersForQuestionContentAndSessionUid(voteQueContentId, + return voteUsrAttemptDAO.getAttemptsForQuestionContentAndSessionUid(questionUid, voteSessionUid); } catch (DataAccessException e) { throw new VoteApplicationException("Exception occured when lams is retrieving usernames for votes: " @@ -1282,7 +1272,8 @@ } } - public List getAttemptsForUserAndQuestionContent(final Long userUid, final Long questionUid) + @Override + public List getAttemptsForUserAndQuestionContent(final Long userUid, final Long questionUid) throws VoteApplicationException { try { return voteUsrAttemptDAO.getAttemptsForUserAndQuestionContent(userUid, questionUid); @@ -1293,13 +1284,7 @@ } } - /** - * checks the parameter content in the user responses table - * - * @param voteContent - * @return boolean - * @throws VoteApplicationException - */ + @Override public boolean studentActivityOccurredGlobal(VoteContent voteContent) throws VoteApplicationException { Iterator questionIterator = voteContent.getVoteQueContents().iterator(); @@ -1316,6 +1301,7 @@ return false; } + @Override public boolean studentActivityOccurredStandardAndOpen(VoteContent voteContent) throws VoteApplicationException { boolean studentActivityOccurredGlobal = studentActivityOccurredGlobal(voteContent); @@ -1328,41 +1314,7 @@ return false; } - public int countIncompleteSession(VoteContent vote) throws VoteApplicationException { - int countIncompleteSession = 2; - return countIncompleteSession; - } - - /** - * checks the parameter content in the tool sessions table - * - * find out if any student has ever used (logged in through the url and replied) to this content return true even if - * you have only one content passed as parameter referenced in the tool sessions table - * - * @param vote - * @return boolean - * @throws VoteApplicationException - */ - public boolean studentActivityOccurred(VoteContent vote) throws VoteApplicationException { - - int countStudentActivity = 2; - - if (countStudentActivity > 0) { - return true; - } - return false; - } - - /** - * implemented as part of the Tool Contract copyToolContent(Long fromContentId, Long toContentId) throws - * ToolException - * - * @param fromContentId - * @param toContentId - * @return - * @throws ToolException - * - */ + @Override public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException { if (fromContentId == null) { @@ -1424,14 +1376,7 @@ } } - /** - * implemented as part of the tool contract. Removes content and uploaded files from the content repository. - * - * @param toContentId - * @param removeSessionData - * @return - * @throws ToolException - */ + @Override public void removeToolContent(Long toolContentID, boolean removeSessionData) throws SessionDataExistsException, ToolException { @@ -1472,6 +1417,7 @@ } @SuppressWarnings("unchecked") + @Override public void removeLearnerContent(Long toolContentId, Integer userId) throws ToolException { if (logger.isDebugEnabled()) { logger.debug("Removing Vote attempts for user ID " + userId + " and toolContentId " + toolContentId); @@ -1499,15 +1445,7 @@ } } - /** - * Export the XML fragment for the tool's content, along with any files needed for the content. - * - * @throws DataMissingException - * if no tool content matches the toolSessionID - * @throws ToolException - * if any other error occurs - */ - + @Override public void exportToolContent(Long toolContentID, String rootPath) throws DataMissingException, ToolException { VoteContent toolContentObj = voteContentDAO.findVoteContentById(toolContentID); if (toolContentObj == null) { @@ -1539,12 +1477,7 @@ } } - /** - * Import the XML fragment for the tool's content, along with any files needed for the content. - * - * @throws ToolException - * if any other error occurs - */ + @Override public void importToolContent(Long toolContentID, Integer newUserUid, String toolContentPath, String fromVersion, String toVersion) throws ToolException { try { @@ -1570,23 +1503,6 @@ } /** - * it is possible that the tool session id already exists in the tool sessions table as the users from the same - * session are involved. existsSession(long toolSessionID) - * - * @param toolSessionID - * @return boolean - */ - public boolean existsSession(Long toolSessionID) { - VoteSession voteSession = retrieveVoteSession(toolSessionID); - - if (voteSession == null) { - VoteServicePOJO.logger.error("voteSession does not exist yet: " + toolSessionID); - return false; - } - return true; - } - - /** * Implemented as part of the tool contract. Gets called only in the Learner mode. All the learners in the same * group have the same toolSessionID. * @@ -1641,9 +1557,10 @@ /* * create a new a new tool session if it does not already exist in the tool session table */ - if (!existsSession(toolSessionID)) { + VoteSession voteSession = retrieveVoteSession(toolSessionID); + if (voteSession == null) { try { - VoteSession voteSession = new VoteSession(toolSessionID, new Date(System.currentTimeMillis()), + voteSession = new VoteSession(toolSessionID, new Date(System.currentTimeMillis()), VoteSession.INCOMPLETE, toolSessionName, voteContent, new TreeSet()); voteSessionDAO.saveVoteSession(voteSession); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteComparator.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,61 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ + +package org.lamsfoundation.lams.tool.vote.util; + +import java.io.Serializable; +import java.util.Comparator; + +/** + * @author Ozgur Demirtas A comparator implementation that can be used as a constructor to collections. The TreeMap in + * the web layer makes use of it. + * + */ +public class VoteComparator implements Comparator, Serializable { + + public int compare(Object o1, Object o2) { + + int key1; + int key2; + + if (o1 instanceof Long) { + Long s1 = (Long) o1; + Long s2 = (Long) o2; + + key1 = s1.intValue(); + key2 = s2.intValue(); + + } else { + String s1 = (String) o1; + String s2 = (String) o2; + + key1 = new Long(s1).intValue(); + key2 = new Long(s2).intValue(); + } + + return key1 - key2; + } + + public boolean equals(Object o) { + return compare(this, o) == 0; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteStringComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteStringComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteStringComparator.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,46 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ + +package org.lamsfoundation.lams.tool.vote.util; + +import java.io.Serializable; +import java.util.Comparator; + +/** + * @author Ozgur Demirtas + * * A comparator implementation that can be used as a constructor to collections. + * The TreeMap in the web layer makes use of it. + * + */ +public class VoteStringComparator implements Comparator, Serializable { + + public int compare(Object o1, Object o2) { + String s1 = (String)o1; + String s2 = (String)o2; + + return s1.compareTo(s2); + } + + public boolean equals(Object o) { + return compare(this, o)==0; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteUtils.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteUtils.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/util/VoteUtils.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,448 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ + +package org.lamsfoundation.lams.tool.vote.util; + +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; +import java.util.TreeMap; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.lamsfoundation.lams.tool.vote.VoteAppConstants; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralAuthoringDTO; +import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; +import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; +import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.service.VoteApplicationException; +import org.lamsfoundation.lams.tool.vote.web.form.VoteAuthoringForm; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + *

+ * Common Voting utility functions live here. + *

+ * + * @author Ozgur Demirtas + */ +public abstract class VoteUtils implements VoteAppConstants { + + public static String replaceNewLines(String text) { + String newText = ""; + if (text != null) { + newText = text.replaceAll("\n", "
"); + } + + return newText; + } + + public static String getCurrentLearnerID() { + String userID = ""; + HttpSession ss = SessionManager.getSession(); + + if (ss != null) { + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + if ((user != null) && (user.getUserID() != null)) { + userID = user.getUserID().toString(); + } + } + return userID; + } + + /** + * + * getGMTDateTime(HttpServletRequest request) + * + * @param request + * @return + */ + /* fix this */ + public static Date getGMTDateTime() { + Date date = new Date(System.currentTimeMillis()); + return date; + } + + public static String getFormattedDateString(Date date) { + return (DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG).format(date)); + } + + public static void saveTimeZone(HttpServletRequest request) { + TimeZone timeZone = TimeZone.getDefault(); + } + + public static String getCurrentTimeZone() { + TimeZone timeZone = TimeZone.getDefault(); + return timeZone.getDisplayName(); + } + + /** + * existsContent(long toolContentId) + * + * @param long toolContentId + * @return boolean determine whether a specific toolContentId exists in the db + */ + public static boolean existsContent(Long toolContentId, HttpServletRequest request, IVoteService voteService) { + + VoteContent voteContent = voteService.retrieveVote(toolContentId); + if (voteContent == null) + return false; + + return true; + } + + /** + * it is expected that the tool session id already exists in the tool sessions table existsSession(long + * toolSessionId) + * + * @param toolSessionId + * @return boolean + */ + public static boolean existsSession(Long toolSessionId, HttpServletRequest request, IVoteService voteService) { + + VoteSession voteSession = voteService.retrieveVoteSession(toolSessionId); + + if (voteSession == null) + return false; + + return true; + } + + public static void readContentValues(HttpServletRequest request, VoteContent defaultVoteContent, + VoteAuthoringForm voteAuthoringForm, VoteGeneralAuthoringDTO voteGeneralAuthoringDTO) { + /* should never be null anyway as default content MUST exist in the db */ + if (defaultVoteContent == null) + throw new NullPointerException("Default VoteContent cannot be null"); + + voteGeneralAuthoringDTO.setActivityTitle(defaultVoteContent.getTitle()); + voteGeneralAuthoringDTO.setActivityInstructions(defaultVoteContent.getInstructions()); + + voteAuthoringForm.setUseSelectLeaderToolOuput(defaultVoteContent.isUseSelectLeaderToolOuput() ? "1" : "0"); + voteAuthoringForm.setAllowText(defaultVoteContent.isAllowText() ? "1" : "0"); + voteAuthoringForm.setAllowTextEntry(defaultVoteContent.isAllowText() ? "1" : "0"); + + voteAuthoringForm.setShowResults(defaultVoteContent.isShowResults() ? "1" : "0"); + + voteAuthoringForm.setLockOnFinish(defaultVoteContent.isLockOnFinish() ? "1" : "0"); + voteAuthoringForm.setReflect(defaultVoteContent.isReflect() ? "1" : "0"); + + voteGeneralAuthoringDTO + .setUseSelectLeaderToolOuput(defaultVoteContent.isUseSelectLeaderToolOuput() ? "1" : "0"); + voteGeneralAuthoringDTO.setAllowText(defaultVoteContent.isAllowText() ? "1" : "0"); + voteGeneralAuthoringDTO.setLockOnFinish(defaultVoteContent.isLockOnFinish() ? "1" : "0"); + voteAuthoringForm.setReflect(defaultVoteContent.isReflect() ? "1" : "0"); + + String maxNomcount = defaultVoteContent.getMaxNominationCount(); + if (maxNomcount.equals("")) + maxNomcount = "0"; + voteAuthoringForm.setMaxNominationCount(maxNomcount); + voteGeneralAuthoringDTO.setMaxNominationCount(maxNomcount); + + String minNomcount = defaultVoteContent.getMinNominationCount(); + if ((minNomcount == null) || minNomcount.equals("")) + minNomcount = "0"; + voteAuthoringForm.setMinNominationCount(minNomcount); + voteGeneralAuthoringDTO.setMinNominationCount(minNomcount); + } + + public static String stripHTML(String htmlText) { + String noHTMLText = htmlText.replaceAll("\\<.*?\\>", "").replaceAll(" ", "") + .replaceAll("&#[0-9][0-9][0-9][0-9];", ""); + String[] htmlTokens = noHTMLText.split("\n"); + String noHtmlNoNewLineStr = ""; + for (int i = 0; i < htmlTokens.length; i++) { + if (!htmlTokens[i].trim().equals("")) { + noHtmlNoNewLineStr = noHtmlNoNewLineStr.length() > 0 ? noHtmlNoNewLineStr + " " + htmlTokens[i] + : htmlTokens[i]; + } + } + + if (noHtmlNoNewLineStr.trim().length() == 0) { + // nomination text is just composed of html markup, try getting just a src entry for a picture otherwise + // give up + htmlText = htmlText.toLowerCase(); + int index = htmlText.indexOf("src"); + if (index > -1) { + index = htmlText.indexOf("\"", index); + if (index > -1 && index < htmlText.length()) { + int indexStop = htmlText.indexOf("\"", index + 1); + if (indexStop > -1) { + String srcEntry = htmlText.substring(index + 1, indexStop); + // get rid of any leading path and just get the filename; + index = srcEntry.lastIndexOf("/"); + if (index == srcEntry.length() - 1) + index = srcEntry.lastIndexOf("/", index); + if (index > -1) { + srcEntry = srcEntry.substring(index + 1); + } + return srcEntry; + } + } + } + if (htmlText.length() > 50) + return htmlText.substring(0, 51); + else + return htmlText; + } + + if (noHtmlNoNewLineStr.length() > 50) + return noHtmlNoNewLineStr.substring(0, 51); + + return noHtmlNoNewLineStr; + } + + public static void saveRichText(HttpServletRequest request, VoteGeneralAuthoringDTO voteGeneralAuthoringDTO, + SessionMap sessionMap) { + String richTextTitle = request.getParameter(TITLE); + String richTextInstructions = request.getParameter(INSTRUCTIONS); + + if (richTextTitle != null) { + voteGeneralAuthoringDTO.setActivityTitle(richTextTitle); + } + String noHTMLTitle = stripHTML(richTextTitle); + + if (richTextInstructions != null) { + voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + } + } + + /** + * temporary function + * + * @return + */ + public static int getCurrentUserId(HttpServletRequest request) throws VoteApplicationException { + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + return user.getUserID().intValue(); + } + + /** + * temporary function + * + * @return + */ + public static User createSimpleUser(Integer userId) { + User user = new User(); + user.setUserId(userId); + return user; + } + + /** + * temporary function + * + * @return + */ + public static boolean getDefineLaterStatus() { + return false; + } + + /** + * builds a map from a list convertToMap(List sessionsList) + * + * @param sessionsList + * @return Map + */ + public static Map convertToMap(List sessionsList, String listType) { + Map map = new TreeMap(new VoteComparator()); + + Iterator listIterator = sessionsList.iterator(); + Long mapIndex = new Long(1); + + while (listIterator.hasNext()) { + if (listType.equals("String")) { + String text = (String) listIterator.next(); + map.put(mapIndex.toString(), text); + } else if (listType.equals("Long")) { + Long LongValue = (Long) listIterator.next(); + map.put(mapIndex.toString(), LongValue); + } + mapIndex = new Long(mapIndex.longValue() + 1); + } + return map; + } + + /** + * find out if the content is in use or not. If it is in use, the author can not modify it. The idea of content + * being in use is, once any one learner starts using a particular content that content should become unmodifiable. + * + * isContentInUse(VoteContent voteContent) + * + * @param voteContent + * @return boolean + */ + public static boolean isContentInUse(VoteContent voteContent) { + return voteContent.isContentInUse(); + } + + /** + * find out if the content is being edited in monitoring interface or not. If it is, the author can not modify it. + * + * isDefineLater(VoteContent voteContent) + * + * @param voteContent + * @return boolean + */ + public static boolean isDefineLater(VoteContent voteContent) { + return voteContent.isDefineLater(); + } + + public static String getDestination(String sourceVoteStarter) { + + if ((sourceVoteStarter != null) && !sourceVoteStarter.equals("monitoring")) { + // request is from authoring or define Later url. return to: LOAD_QUESTIONS + return LOAD_QUESTIONS; + } else if (sourceVoteStarter == null) { + // request is from authoring url. return to: LOAD_QUESTIONS + return LOAD_QUESTIONS; + } else { + // request is from monitoring url. return to: LOAD_MONITORING_CONTENT_EDITACTIVITY + return LOAD_MONITORING_CONTENT_EDITACTIVITY; + } + } + + public static void setDefineLater(HttpServletRequest request, boolean value, IVoteService voteService, + String toolContentID) { + + VoteContent voteContent = voteService.retrieveVote(new Long(toolContentID)); + if (voteContent != null) { + voteContent.setDefineLater(value); + voteService.updateVote(voteContent); + } + } + + /** + * + * cleanUpSessionAbsolute(HttpServletRequest request) + * + * @param request + */ + public static void cleanUpSessionAbsolute(HttpServletRequest request) { + cleanUpUserExceptions(request); + } + + /** + * removes attributes except USER_EXCEPTION_NO_STUDENT_ACTIVITY + */ + public static void cleanUpUserExceptions(HttpServletRequest request) { + request.getSession().removeAttribute(USER_EXCEPTION_WRONG_FORMAT); + request.getSession().removeAttribute(USER_EXCEPTION_INCOMPATIBLE_IDS); + request.getSession().removeAttribute(USER_EXCEPTION_NUMBERFORMAT); + request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST); + request.getSession().removeAttribute(USER_EXCEPTION_TOOLSESSION_DOESNOTEXIST); + request.getSession().removeAttribute(USER_EXCEPTION_TOOLCONTENT_DOESNOTEXIST); + request.getSession().removeAttribute(USER_EXCEPTION_LEARNER_REQUIRED); + request.getSession().removeAttribute(USER_EXCEPTION_CONTENTID_REQUIRED); + request.getSession().removeAttribute(USER_EXCEPTION_TOOLSESSIONID_REQUIRED); + request.getSession().removeAttribute(USER_EXCEPTION_TOOLSESSIONID_INCONSISTENT); + request.getSession().removeAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOT_AVAILABLE); + request.getSession().removeAttribute(USER_EXCEPTION_DEFAULTQUESTIONCONTENT_NOT_AVAILABLE); + request.getSession().removeAttribute(USER_EXCEPTION_DEFAULTOPTIONSCONTENT_NOT_AVAILABLE); + request.getSession().removeAttribute(USER_EXCEPTION_USERID_NOTAVAILABLE); + request.getSession().removeAttribute(USER_EXCEPTION_USERID_NOTNUMERIC); + request.getSession().removeAttribute(USER_EXCEPTION_ONLYCONTENT_ANDNOSESSIONS); + request.getSession().removeAttribute(USER_EXCEPTION_USERID_EXISTING); + request.getSession().removeAttribute(USER_EXCEPTION_USER_DOESNOTEXIST); + request.getSession().removeAttribute(USER_EXCEPTION_MONITORINGTAB_CONTENTID_REQUIRED); + request.getSession().removeAttribute(USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP); + request.getSession().removeAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS); + request.getSession().removeAttribute(USER_EXCEPTION_MODE_REQUIRED); + request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_IN_USE); + request.getSession().removeAttribute(USER_EXCEPTION_CONTENT_BEING_MODIFIED); + request.getSession().removeAttribute(USER_EXCEPTION_MODE_INVALID); + request.getSession().removeAttribute(USER_EXCEPTION_QUESTION_EMPTY); + request.getSession().removeAttribute(USER_EXCEPTION_ANSWER_EMPTY); + request.getSession().removeAttribute(USER_EXCEPTION_ANSWERS_DUPLICATE); + request.getSession().removeAttribute(USER_EXCEPTION_OPTIONS_COUNT_ZERO); + request.getSession().removeAttribute(USER_EXCEPTION_CHKBOXES_EMPTY); + request.getSession().removeAttribute(USER_EXCEPTION_SUBMIT_NONE); + request.getSession().removeAttribute(USER_EXCEPTION_NUMBERFORMAT); + request.getSession().removeAttribute(USER_EXCEPTION_WEIGHT_MUST_EQUAL100); + request.getSession().removeAttribute(USER_EXCEPTION_SINGLE_OPTION); + } + + public static void setFormProperties(HttpServletRequest request, IVoteService voteService, + VoteAuthoringForm voteAuthoringForm, VoteGeneralAuthoringDTO voteGeneralAuthoringDTO, + String strToolContentID, String defaultContentIdStr, String activeModule, SessionMap sessionMap, + String httpSessionID) { + + voteAuthoringForm.setHttpSessionID(httpSessionID); + voteGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + + voteAuthoringForm.setToolContentID(strToolContentID); + + if ((defaultContentIdStr != null) && (defaultContentIdStr.length() > 0)) + voteAuthoringForm.setDefaultContentIdStr(new Long(defaultContentIdStr).toString()); + + voteAuthoringForm.setActiveModule(activeModule); + voteGeneralAuthoringDTO.setActiveModule(activeModule); + + String lockOnFinish = request.getParameter("lockOnFinish"); + voteAuthoringForm.setLockOnFinish(lockOnFinish); + voteGeneralAuthoringDTO.setLockOnFinish(lockOnFinish); + + String useSelectLeaderToolOuput = request.getParameter("useSelectLeaderToolOuput"); + voteAuthoringForm.setUseSelectLeaderToolOuput(useSelectLeaderToolOuput);; + voteGeneralAuthoringDTO.setAllowText(useSelectLeaderToolOuput); + + String allowText = request.getParameter("allowText"); + voteAuthoringForm.setAllowText(allowText); + voteGeneralAuthoringDTO.setAllowText(allowText); + + String showResults = request.getParameter("showResults"); + voteAuthoringForm.setShowResults(showResults); + voteGeneralAuthoringDTO.setShowResults(showResults); + + String maxNominationCount = request.getParameter("maxNominationCount"); + voteAuthoringForm.setMaxNominationCount(maxNominationCount); + voteGeneralAuthoringDTO.setMaxNominationCount(maxNominationCount); + + String reflect = request.getParameter("reflect"); + voteAuthoringForm.setReflect(reflect); + voteGeneralAuthoringDTO.setReflect(reflect); + + String reflectionSubject = request.getParameter("reflectionSubject"); + voteAuthoringForm.setReflectionSubject(reflectionSubject); + voteGeneralAuthoringDTO.setReflectionSubject(reflectionSubject); + } + + public static void setDefineLater(HttpServletRequest request, boolean value, String strToolContentID, + IVoteService voteService) { + + VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID)); + + if (voteContent != null) { + voteContent.setDefineLater(value); + voteService.updateVote(voteContent); + } + } + +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/AuthoringUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/AuthoringUtil.java,v diff -u -r1.30 -r1.31 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/AuthoringUtil.java 17 Jan 2014 22:18:25 -0000 1.30 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/AuthoringUtil.java 6 Mar 2014 22:43:33 -0000 1.31 @@ -35,11 +35,12 @@ import org.apache.log4j.Logger; import org.lamsfoundation.lams.learningdesign.DataFlowObject; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteNominationContentDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteNominationContentDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.web.form.VoteAuthoringForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java,v diff -u -r1.32 -r1.33 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java 6 Feb 2014 22:07:15 -0000 1.32 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java 6 Mar 2014 22:43:33 -0000 1.33 @@ -23,7 +23,15 @@ package org.lamsfoundation.lams.tool.vote.web; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; +import java.util.Map.Entry; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; @@ -32,16 +40,24 @@ import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.lamsfoundation.lams.tool.ToolAccessMode; -import org.lamsfoundation.lams.tool.vote.ExportPortfolioDTO; -import org.lamsfoundation.lams.tool.vote.ReflectionDTO; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteApplicationException; -import org.lamsfoundation.lams.tool.vote.VoteGeneralMonitoringDTO; +import org.lamsfoundation.lams.tool.vote.dto.EditActivityDTO; +import org.lamsfoundation.lams.tool.vote.dto.ExportPortfolioDTO; +import org.lamsfoundation.lams.tool.vote.dto.ReflectionDTO; +import org.lamsfoundation.lams.tool.vote.dto.SessionDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralMonitoringDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredAnswersDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredUserDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; +import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; +import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.service.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.servlet.AbstractExportPortfolioServlet; @@ -74,10 +90,7 @@ } public void learner(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { - ExportPortfolioDTO exportPortfolioDTO = new ExportPortfolioDTO(); - exportPortfolioDTO.setPortfolioExportMode("learner"); - IVoteService voteService = VoteServiceProxy.getVoteService(getServletContext()); if ((userID == null) || (toolSessionID == null)) { @@ -93,6 +106,7 @@ // So need to do a "blank" page in that case VoteQueUsr learner = voteService.getVoteUserBySession(userID, voteSession.getUid()); + ExportPortfolioDTO exportPortfolioDTO = new ExportPortfolioDTO(); if ((learner != null) && learner.isFinalScreenRequested()) { VoteContent content = voteSession.getVoteContent(); @@ -102,30 +116,30 @@ ExportServlet.logger.error(error); throw new VoteApplicationException(error); } + + LinkedList sessionDTOs = getSessionDTOs(request, content, voteService, toolSessionID, userID); + exportPortfolioDTO.setSessionDtos(sessionDTOs); - exportPortfolioDTO.setAllowText(content.isAllowText()); + boolean userExceptionNoToolSessions = !voteService.studentActivityOccurredStandardAndOpen(content); + exportPortfolioDTO.setUserExceptionNoToolSessions(userExceptionNoToolSessions); + + boolean isGroupedActivity = voteService.isGroupedActivity(content.getVoteContentId()); + request.getSession().setAttribute(VoteAppConstants.ATTR_IS_GROUPED_ACTIVITY, isGroupedActivity); - VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO(); - - VoteMonitoringStarterAction.refreshSummaryData(request, content, voteService, true, - toolSessionID.toString(), userID.toString(), true, voteGeneralMonitoringDTO, - exportPortfolioDTO); - List reflectionsContainerDTO = voteService.getReflectionData(content, userID); - request.setAttribute(VoteAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); request.getSession().setAttribute(VoteAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); } else { // thise field is needed for the jsp. - exportPortfolioDTO.setUserExceptionNoToolSessions("false"); + exportPortfolioDTO.setUserExceptionNoToolSessions(false); } + exportPortfolioDTO.setPortfolioExportMode("learner"); request.getSession().setAttribute(VoteAppConstants.EXPORT_PORTFOLIO_DTO, exportPortfolioDTO); } public void teacher(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { - ExportPortfolioDTO exportPortfolioDTO = new ExportPortfolioDTO(); - exportPortfolioDTO.setPortfolioExportMode("teacher"); + IVoteService voteService = VoteServiceProxy.getVoteService(getServletContext()); if (toolContentID == null) { @@ -141,17 +155,78 @@ throw new VoteApplicationException(error); } - exportPortfolioDTO.setAllowText(content.isAllowText()); - - VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO(); - - VoteMonitoringStarterAction.refreshSummaryData(request, content, voteService, false, null, null, false, - voteGeneralMonitoringDTO, exportPortfolioDTO); - + ExportPortfolioDTO exportPortfolioDTO = new ExportPortfolioDTO(); + exportPortfolioDTO.setPortfolioExportMode("teacher"); + + LinkedList sessionDTOs = getSessionDTOs(request, content, voteService, null, null); + exportPortfolioDTO.setSessionDtos(sessionDTOs); + + boolean userExceptionNoToolSessions = !voteService.studentActivityOccurredStandardAndOpen(content); + exportPortfolioDTO.setUserExceptionNoToolSessions(userExceptionNoToolSessions); request.getSession().setAttribute(VoteAppConstants.EXPORT_PORTFOLIO_DTO, exportPortfolioDTO); + + boolean isGroupedActivity = voteService.isGroupedActivity(content.getVoteContentId()); + request.getSession().setAttribute(VoteAppConstants.ATTR_IS_GROUPED_ACTIVITY, isGroupedActivity); List reflectionsContainerDTO = voteService.getReflectionData(content, null); - request.setAttribute(VoteAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); request.getSession().setAttribute(VoteAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); } + + public LinkedList getSessionDTOs(HttpServletRequest request, VoteContent voteContent, + IVoteService voteService, Long currentSessionId, Long userId) { + + Set sessions = new HashSet(); + if (currentSessionId == null) { + sessions = (Set) voteContent.getVoteSessions(); + } else { + VoteSession voteSession = voteService.retrieveVoteSession(currentSessionId); + sessions.add(voteSession); + } + + LinkedList sessionDTOs = new LinkedList(); + for (VoteSession session : sessions) { + + SessionDTO sessionDTO = new SessionDTO(); + sessionDTO.setSessionId(session.getVoteSessionId().toString()); + sessionDTO.setSessionName(session.getSession_name()); + + List openVotes = voteService.getOpenVotes(voteContent.getUid(), + session.getVoteSessionId(), userId); + sessionDTO.setOpenVotes(openVotes); + + List answerDTOs = new LinkedList(); + for (VoteQueContent question : (Set) voteContent.getVoteQueContents()) { + Long questionUid = question.getUid(); + + List userAttempts; + if (userId == null) { + /* request is for monitoring summary */ + userAttempts = voteService.getAttemptsForQuestionContentAndSessionUid(questionUid, session.getUid()); + + } else { + /* request is for learner report, use only the passed tool session in the report */ + VoteQueUsr user = voteService.getVoteUserBySession(userId, session.getUid()); + userAttempts = voteService + .getAttemptsForUserAndQuestionContent(user.getUid(), questionUid); + } + + Map questionAttempts = new HashMap(); + Integer i = 0; + for (VoteUsrAttempt userAttempt : userAttempts) { + questionAttempts.put(i++, userAttempt); + } + + VoteMonitoredAnswersDTO answerDTO = new VoteMonitoredAnswersDTO(); + answerDTO.setQuestionUid(question.getUid().toString()); + answerDTO.setQuestion(question.getQuestion()); + answerDTO.setQuestionAttempts(questionAttempts); + answerDTOs.add(answerDTO); + } + sessionDTO.setAnswers(answerDTOs);; + + sessionDTOs.add(sessionDTO); + } + + return sessionDTOs; + } } \ No newline at end of file Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/Attic/LearningUtil.java,v diff -u -r1.26 -r1.27 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java 2 Jan 2014 23:12:50 -0000 1.26 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java 6 Mar 2014 22:43:33 -0000 1.27 @@ -37,14 +37,15 @@ import org.lamsfoundation.lams.tool.SimpleURL; import org.lamsfoundation.lams.tool.ToolOutput; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteUtils; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; +import org.lamsfoundation.lams.tool.vote.web.form.VoteLearningForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java,v diff -u -r1.56 -r1.57 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java 6 Feb 2014 22:07:15 -0000 1.56 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java 6 Mar 2014 22:43:33 -0000 1.57 @@ -38,23 +38,24 @@ import org.lamsfoundation.lams.notebook.model.NotebookEntry; import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; -import org.lamsfoundation.lams.tool.vote.VoteAllGroupsDTO; -import org.lamsfoundation.lams.tool.vote.SessionDTO; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; -import org.lamsfoundation.lams.tool.vote.VoteGeneralMonitoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteMonitoredAnswersDTO; -import org.lamsfoundation.lams.tool.vote.VoteMonitoredUserDTO; -import org.lamsfoundation.lams.tool.vote.VoteStatsDTO; -import org.lamsfoundation.lams.tool.vote.VoteStringComparator; -import org.lamsfoundation.lams.tool.vote.VoteUtils; +import org.lamsfoundation.lams.tool.vote.dto.SessionDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteAllGroupsDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralMonitoringDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredAnswersDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredUserDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteStatsDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteStringComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; +import org.lamsfoundation.lams.tool.vote.web.form.VoteMonitoringForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.util.DateUtil; import org.lamsfoundation.lams.util.MessageService; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java,v diff -u -r1.45 -r1.46 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 23 Jan 2014 23:53:16 -0000 1.45 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 6 Mar 2014 22:43:33 -0000 1.46 @@ -44,13 +44,14 @@ import org.lamsfoundation.lams.learningdesign.DataFlowObject; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteGeneralAuthoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteNominationContentDTO; -import org.lamsfoundation.lams.tool.vote.VoteUtils; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralAuthoringDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteNominationContentDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.service.IVoteService; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; +import org.lamsfoundation.lams.tool.vote.web.form.VoteAuthoringForm; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.action.LamsDispatchAction; import org.lamsfoundation.lams.web.util.AttributeNames; Fisheye: Tag 1.27 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGeneratorAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGeneratorAction.java,v diff -u -r1.4 -r1.5 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGeneratorAction.java 28 Jan 2014 23:05:51 -0000 1.4 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGeneratorAction.java 6 Mar 2014 22:43:33 -0000 1.5 @@ -37,15 +37,15 @@ import org.apache.struts.action.ActionMapping; import org.apache.tomcat.util.json.JSONException; import org.apache.tomcat.util.json.JSONObject; -import org.lamsfoundation.lams.tool.vote.SessionDTO; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; -import org.lamsfoundation.lams.tool.vote.VoteGeneralMonitoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteUtils; +import org.lamsfoundation.lams.tool.vote.dto.SessionDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralMonitoringDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.service.IVoteService; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.action.LamsDispatchAction; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteDLStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/Attic/VoteDLStarterAction.java,v diff -u -r1.8 -r1.9 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteDLStarterAction.java 4 Jul 2013 15:01:26 -0000 1.8 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteDLStarterAction.java 6 Mar 2014 22:43:33 -0000 1.9 @@ -62,10 +62,11 @@ import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteApplicationException; -import org.lamsfoundation.lams.tool.vote.VoteUtils; import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.service.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; +import org.lamsfoundation.lams.tool.vote.web.form.VoteAuthoringForm; public class VoteDLStarterAction extends Action implements VoteAppConstants { Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java,v diff -u -r1.56 -r1.57 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java 6 Feb 2014 22:07:15 -0000 1.56 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java 6 Mar 2014 22:43:33 -0000 1.57 @@ -51,18 +51,19 @@ import org.lamsfoundation.lams.tool.exception.DataMissingException; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteApplicationException; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; -import org.lamsfoundation.lams.tool.vote.VoteGeneralMonitoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteUtils; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralMonitoringDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.service.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; +import org.lamsfoundation.lams.tool.vote.web.form.VoteLearningForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; Fisheye: Tag 1.29 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java,v diff -u -r1.57 -r1.58 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 6 Feb 2014 22:07:15 -0000 1.57 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 6 Mar 2014 22:43:33 -0000 1.58 @@ -52,18 +52,19 @@ import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.ToolAccessMode; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteApplicationException; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; -import org.lamsfoundation.lams.tool.vote.VoteGeneralMonitoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteUtils; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralMonitoringDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.service.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; +import org.lamsfoundation.lams.tool.vote.web.form.VoteLearningForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.util.DateUtil; import org.lamsfoundation.lams.util.MessageService; @@ -357,9 +358,9 @@ if (voteQueContent != null) { String entry = voteQueContent.getQuestion(); - String voteQueContentId = attempt.getVoteQueContent().getUid().toString(); + String questionUid = attempt.getVoteQueContent().getUid().toString(); if (entry != null) { - if (entry.equals("sample nomination") && voteQueContentId.equals("1")) { + if (entry.equals("sample nomination") && questionUid.equals("1")) { localMapQuestionsContent.put(new Integer(order).toString(), attempt.getUserEntry()); } else { localMapQuestionsContent.put(new Integer(order).toString(), voteQueContent.getQuestion()); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java,v diff -u -r1.56 -r1.57 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java 6 Feb 2014 22:07:15 -0000 1.56 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java 6 Mar 2014 22:43:33 -0000 1.57 @@ -47,28 +47,29 @@ 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.vote.EditActivityDTO; -import org.lamsfoundation.lams.tool.vote.ExportPortfolioDTO; -import org.lamsfoundation.lams.tool.vote.ReflectionDTO; -import org.lamsfoundation.lams.tool.vote.VoteAllGroupsDTO; -import org.lamsfoundation.lams.tool.vote.SessionDTO; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteGeneralAuthoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; -import org.lamsfoundation.lams.tool.vote.VoteGeneralMonitoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteMonitoredAnswersDTO; -import org.lamsfoundation.lams.tool.vote.VoteMonitoredUserDTO; -import org.lamsfoundation.lams.tool.vote.VoteNominationContentDTO; -import org.lamsfoundation.lams.tool.vote.VoteStringComparator; -import org.lamsfoundation.lams.tool.vote.VoteUtils; +import org.lamsfoundation.lams.tool.vote.dto.EditActivityDTO; +import org.lamsfoundation.lams.tool.vote.dto.ExportPortfolioDTO; +import org.lamsfoundation.lams.tool.vote.dto.ReflectionDTO; +import org.lamsfoundation.lams.tool.vote.dto.SessionDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteAllGroupsDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralAuthoringDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralMonitoringDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredAnswersDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredUserDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteNominationContentDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; import org.lamsfoundation.lams.tool.vote.service.IVoteService; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteStringComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; +import org.lamsfoundation.lams.tool.vote.web.form.VoteMonitoringForm; import org.lamsfoundation.lams.util.DateUtil; import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; @@ -152,7 +153,7 @@ List userAttempts; //in regular case when we need info for particular session if (StringUtils.isNotBlank(sessionUid)) { - userAttempts = voteService.getStandardAttemptUsersForQuestionContentAndSessionUid(new Long(questionUid), + userAttempts = voteService.getAttemptsForQuestionContentAndSessionUid(new Long(questionUid), new Long(sessionUid)); //in case of All sessions Fisheye: Tag 1.14 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringForm.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java,v diff -u -r1.45 -r1.46 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 6 Feb 2014 22:07:15 -0000 1.45 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 6 Mar 2014 22:43:33 -0000 1.46 @@ -23,49 +23,42 @@ package org.lamsfoundation.lams.tool.vote.web; import java.io.IOException; -import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.TreeMap; import java.util.Map.Entry; +import java.util.TreeMap; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; -import org.apache.struts.Globals; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; -import org.apache.struts.action.ActionMessage; -import org.apache.struts.action.ActionMessages; -import org.lamsfoundation.lams.tool.vote.EditActivityDTO; -import org.lamsfoundation.lams.tool.vote.ExportPortfolioDTO; -import org.lamsfoundation.lams.tool.vote.ReflectionDTO; -import org.lamsfoundation.lams.tool.vote.SessionDTO; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteApplicationException; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteGeneralAuthoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; -import org.lamsfoundation.lams.tool.vote.VoteGeneralMonitoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteMonitoredAnswersDTO; -import org.lamsfoundation.lams.tool.vote.VoteMonitoredUserDTO; -import org.lamsfoundation.lams.tool.vote.VoteNominationContentDTO; -import org.lamsfoundation.lams.tool.vote.VoteUtils; +import org.lamsfoundation.lams.tool.vote.dto.EditActivityDTO; +import org.lamsfoundation.lams.tool.vote.dto.ReflectionDTO; +import org.lamsfoundation.lams.tool.vote.dto.SessionDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralAuthoringDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralMonitoringDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredAnswersDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteMonitoredUserDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteNominationContentDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.service.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; -import org.lamsfoundation.lams.util.MessageService; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; +import org.lamsfoundation.lams.tool.vote.web.form.VoteMonitoringForm; import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; @@ -161,8 +154,7 @@ request.setAttribute(TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size())); - VoteMonitoringStarterAction.refreshSummaryData(request, voteContent, voteService, false, null, null, false, - voteGeneralMonitoringDTO, null); + VoteMonitoringStarterAction.refreshSummaryData(request, voteContent, voteService, voteGeneralMonitoringDTO); voteGeneralMonitoringDTO.setExistsOpenVotes(new Boolean(false).toString()); @@ -215,26 +207,17 @@ } public static void refreshSummaryData(HttpServletRequest request, VoteContent voteContent, - IVoteService voteService, boolean isLearnerRequest, String currentSessionId, String userId, - boolean showUserEntriesBySession, VoteGeneralMonitoringDTO voteGeneralMonitoringDTO, - ExportPortfolioDTO exportPortfolioDTO) { - + IVoteService voteService, VoteGeneralMonitoringDTO voteGeneralMonitoringDTO) { + /* this section is related to summary tab. Starts here. */ if (voteService.studentActivityOccurredStandardAndOpen(voteContent)) { - if (voteGeneralMonitoringDTO != null) { - voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); - } + voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { - if (voteGeneralMonitoringDTO != null) { - voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); - } + voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString()); } String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions(); - if (exportPortfolioDTO != null) { - exportPortfolioDTO.setUserExceptionNoToolSessions(userExceptionNoToolSessions); - } List listQuestions = voteService.getAllQuestionEntries(voteContent.getUid()); @@ -250,83 +233,52 @@ voteMonitoredAnswersDTO.setQuestion(voteQueContent.getQuestion()); String questionUid = voteQueContent.getUid().toString(); - + List> listMonitoredAttemptsContainerDTO = new LinkedList>(); - Map summaryToolSessions = MonitoringUtil.populateToolSessionsId(voteContent, voteService); + Map summaryToolSessions = MonitoringUtil.populateToolSessionsId(voteContent, + voteService); - /* request is for monitoring summary */ - if (!isLearnerRequest) { - for (Entry pairs : summaryToolSessions.entrySet()) { + for (Entry pairs : summaryToolSessions.entrySet()) { - if (!(pairs.getValue().equals("None")) && !(pairs.getValue().equals("All"))) { - VoteSession voteSession = voteService.retrieveVoteSession(new Long(pairs.getValue())); - if (voteSession != null) { - List users = voteService.getUserBySessionOnly(voteSession); - Map sessionUsersAttempts = VoteMonitoringStarterAction - .populateSessionUsersAttempts(request, voteContent, - voteSession.getVoteSessionId(), users, questionUid, isLearnerRequest, - userId, voteService); - listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); - } + if (!(pairs.getValue().equals("None")) && !(pairs.getValue().equals("All"))) { + VoteSession voteSession = voteService.retrieveVoteSession(new Long(pairs.getValue())); + if (voteSession != null) { + List users = voteService.getUserBySessionOnly(voteSession); + Map sessionUsersAttempts = VoteMonitoringStarterAction + .populateSessionUsersAttempts(request, voteContent, voteSession.getVoteSessionId(), + users, questionUid, false, null, voteService); + listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); } } + } -// //create data for All sessions in total -// if (summaryToolSessions.size() > 1) { +// //create data for All sessions in total +// if (summaryToolSessions.size() > 1) { // Map sessionUsersAttempts = populateSessionUsersAttempts(request, // voteContent, voteSession.getVoteSessionId(), users, questionUid, isUserNamesVisible, // isLearnerRequest, userId, voteService); // listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); -// } +// } - } else { - /* request is for learner report, use only the passed tool session in the report */ - for (Entry pairs : summaryToolSessions.entrySet()) { - - if (!(pairs.getValue().toString().equals("None")) && !(pairs.getValue().toString().equals("All"))) { - - if (currentSessionId.equals(pairs.getValue())) { - VoteSession voteSession = voteService - .retrieveVoteSession(new Long(pairs.getValue().toString())); - if (voteSession != null) { - List listUsers = voteService.getUserBySessionOnly(voteSession); - Map sessionUsersAttempts = VoteMonitoringStarterAction - .populateSessionUsersAttempts(request, voteContent, - voteSession.getVoteSessionId(), listUsers, questionUid, - isLearnerRequest, userId, voteService); - listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); - } - } - } - } - } - Map questionAttemptData = MonitoringUtil.convertToMap(listMonitoredAttemptsContainerDTO); - + voteMonitoredAnswersDTO.setQuestionAttempts(questionAttemptData); listMonitoredAnswersContainerDTO.add(voteMonitoredAnswersDTO); } } /* ends here. */ - List listUserEntries = voteService.processUserEnteredNominations(voteContent.getUid(), - currentSessionId, showUserEntriesBySession, userId, isLearnerRequest); + List userEnteredNominations = voteService.getOpenVotes( + voteContent.getUid(), null, null); - if (exportPortfolioDTO != null) { - exportPortfolioDTO.setListMonitoredAnswersContainerDto(listMonitoredAnswersContainerDTO); - exportPortfolioDTO.setListUserEntries(listUserEntries); - } + voteGeneralMonitoringDTO.setListMonitoredAnswersContainerDto(listMonitoredAnswersContainerDTO); + voteGeneralMonitoringDTO.setListUserEntries(userEnteredNominations); - if (voteGeneralMonitoringDTO != null) { - voteGeneralMonitoringDTO.setListMonitoredAnswersContainerDto(listMonitoredAnswersContainerDTO); - voteGeneralMonitoringDTO.setListUserEntries(listUserEntries); - - voteGeneralMonitoringDTO.setExistsOpenVotes(new Boolean(false).toString()); - if (listUserEntries.size() > 0) { - voteGeneralMonitoringDTO.setExistsOpenVotes(new Boolean(true).toString()); - } + voteGeneralMonitoringDTO.setExistsOpenVotes(new Boolean(false).toString()); + if (userEnteredNominations.size() > 0) { + voteGeneralMonitoringDTO.setExistsOpenVotes(new Boolean(true).toString()); } boolean isContentInUse = VoteUtils.isContentInUse(voteContent); @@ -368,9 +320,9 @@ } - private static Map populateSessionUsersAttempts(HttpServletRequest request, + public static Map populateSessionUsersAttempts(HttpServletRequest request, VoteContent voteContent, Long sessionId, List listUsers, String questionUid, boolean isLearnerRequest, - String userId, IVoteService voteService) { + Long userId, IVoteService voteService) { List listMonitoredUserContainerDTO = new LinkedList(); Iterator itUsers = listUsers.iterator(); @@ -402,14 +354,13 @@ VoteQueContent voteQueContent = voteUsrResp.getVoteQueContent(); String entry = voteQueContent.getQuestion(); - Long voteQuestionUid = voteUsrResp.getVoteQueContent().getUid(); - String voteQueContentId = voteQuestionUid.toString(); + String voteQuestionUid = voteUsrResp.getVoteQueContent().getUid().toString(); VoteSession localUserSession = voteUsrResp.getVoteQueUsr().getVoteSession(); if (voteContent.getVoteContentId().toString() .equals(localUserSession.getVoteContentId().toString())) { if (entry != null) { - if (entry.equals("sample nomination") && (voteQueContentId.equals("1"))) { + if (entry.equals("sample nomination") && (voteQuestionUid.equals("1"))) { voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); } else { voteMonitoredUserDTO.setResponse(voteQueContent.getQuestion()); @@ -453,13 +404,13 @@ VoteQueContent voteQueContent = voteUsrResp.getVoteQueContent(); String entry = voteQueContent.getQuestion(); - String voteQueContentId = voteUsrResp.getVoteQueContentId().toString(); + String questionUid2 = voteUsrResp.getVoteQueContentId().toString(); VoteSession localUserSession = voteUsrResp.getVoteQueUsr().getVoteSession(); if (voteContent.getVoteContentId().toString() .equals(localUserSession.getVoteContentId().toString())) { if (entry != null) { - if (entry.equals("sample nomination") && (voteQueContentId.equals("1"))) { + if (entry.equals("sample nomination") && (questionUid2.equals("1"))) { voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); } else { voteMonitoredUserDTO.setResponse(voteQueContent.getQuestion()); @@ -488,7 +439,7 @@ VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); if (voteUsrResp != null) { - if (userId.equals(voteQueUsr.getQueUsrId().toString())) { + if (userId.equals(voteQueUsr.getQueUsrId())) { // this is the user requested , include his name for learner progress VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VotePedagogicalPlannerAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VotePedagogicalPlannerAction.java,v diff -u -r1.6 -r1.7 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VotePedagogicalPlannerAction.java 4 Jul 2013 15:01:26 -0000 1.6 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VotePedagogicalPlannerAction.java 6 Mar 2014 22:43:33 -0000 1.7 @@ -39,6 +39,7 @@ import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.service.IVoteService; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; +import org.lamsfoundation.lams.tool.vote.web.form.VotePedagogicalPlannerForm; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.action.LamsDispatchAction; import org.lamsfoundation.lams.web.util.AttributeNames; Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VotePedagogicalPlannerForm.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java,v diff -u -r1.41 -r1.42 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java 23 Jan 2014 23:53:16 -0000 1.41 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java 6 Mar 2014 22:43:33 -0000 1.42 @@ -43,15 +43,16 @@ import org.apache.struts.action.ActionMessages; import org.lamsfoundation.lams.learningdesign.DataFlowObject; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteApplicationException; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteGeneralAuthoringDTO; -import org.lamsfoundation.lams.tool.vote.VoteNominationContentDTO; -import org.lamsfoundation.lams.tool.vote.VoteUtils; +import org.lamsfoundation.lams.tool.vote.dto.VoteGeneralAuthoringDTO; +import org.lamsfoundation.lams.tool.vote.dto.VoteNominationContentDTO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.service.IVoteService; +import org.lamsfoundation.lams.tool.vote.service.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; +import org.lamsfoundation.lams.tool.vote.util.VoteComparator; +import org.lamsfoundation.lams.tool.vote.util.VoteUtils; +import org.lamsfoundation.lams.tool.vote.web.form.VoteAuthoringForm; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.web.util.SessionMap; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VoteAuthoringForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VoteAuthoringForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VoteAuthoringForm.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,982 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ + +package org.lamsfoundation.lams.tool.vote.web.form; + +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.tool.vote.VoteAppConstants; +import org.lamsfoundation.lams.tool.vote.service.IVoteService; + +/** + *

+ * ActionForm for the Authoring environment + *

+ * + * @author Ozgur Demirtas + * + */ +public class VoteAuthoringForm extends VoteLearningForm implements VoteAppConstants { + /* form controllers */ + protected String addOptionContent; + protected String currentTab; + + protected String questionIndex; + protected String optIndex; + protected String optionIndex; + protected String selectedIndex; + protected String deletableOptionIndex; + + protected String editDefaultQuestion; + protected String removeOptionContent; + + protected String lockOnFinish; + protected String allowText; + protected String showResults; + protected String useSelectLeaderToolOuput; + + protected String reflect; + protected String reflectionSubject; + + protected String activeModule; + + protected String maxNominationCount; + protected String minNominationCount; + + protected String addContent; + protected String removeContent; + protected String removeAllContent; + protected String submitAllContent; + protected String submitTabDone; + + /* tab controller, these may go away once the Flash wraps the jsp */ + protected String choice; + protected String choiceBasic; + protected String choiceAdvanced; + protected String choiceInstructions; + + protected String submit; + + /* basic content */ + protected String title; + protected String instructions; + + protected String isRemoveContent; + protected String toolContentID; + protected String editableNominationIndex; + + protected String defineLaterInEditMode; + + /* proxy controllers for Monitoring tabs */ + protected String summaryMonitoring; + protected String instructionsMonitoring; + protected String editActivityMonitoring; + protected String statsMonitoring; + + protected String edit; + protected String exceptionMaxNominationInvalid; + protected String defaultContentIdStr; + protected String defaultContentId; + protected String isDefineLater; + protected String defaultOptionContent; + protected String httpSessionID; + protected IVoteService voteService; + + private String contentFolderID; + private String addSingleQuestion; + private String editableQuestionIndex; + private String feedback; + private String editQuestionBoxRequest; + + protected Integer assignedDataFlowObject; + private Short maxInputs; + + public Integer getAssignedDataFlowObject() { + return assignedDataFlowObject; + } + + public void setAssignedDataFlowObject(Integer assignedDataFlowObject) { + this.assignedDataFlowObject = assignedDataFlowObject; + } + + public void resetUserAction() { + editDefaultQuestion = null; + addOptionContent = null; + removeOptionContent = null; + + addContent = null; + removeContent = null; + removeAllContent = null; + submitAllContent = null; + submitTabDone = null; + + summaryMonitoring = null; + instructionsMonitoring = null; + editActivityMonitoring = null; + statsMonitoring = null; + edit = null; + submit = null; + } + + public void reset() { + editDefaultQuestion = null; + addOptionContent = null; + removeOptionContent = null; + + addContent = null; + removeContent = null; + removeAllContent = null; + submitAllContent = null; + submitTabDone = null; + + choice = null; + choiceBasic = null; + choiceAdvanced = null; + choiceInstructions = null; + + title = null; + instructions = null; + questionIndex = null; + optIndex = null; + optionIndex = null; + selectedIndex = null; + deletableOptionIndex = null; + isRemoveContent = null; + toolContentID = null; + + useSelectLeaderToolOuput = null; + reflect = null; + lockOnFinish = null; + allowText = null; + showResults = null; + maxNominationCount = null; + minNominationCount=null; + + summaryMonitoring = null; + instructionsMonitoring = null; + editActivityMonitoring = null; + statsMonitoring = null; + edit = null; + submit = null; + + maxInputs = 0; + } + + public void resetRadioBoxes() { + lockOnFinish = "0"; + allowText = "0"; + showResults = "0"; + reflect = "0"; + useSelectLeaderToolOuput = "0"; + } + + /** + * @return Returns the defaultContentId. + */ + public String getDefaultContentId() { + return defaultContentId; + } + + /** + * @param defaultContentId + * The defaultContentId to set. + */ + public void setDefaultContentId(String defaultContentId) { + this.defaultContentId = defaultContentId; + } + + /** + * @return Returns the defaultContentIdStr. + */ + public String getDefaultContentIdStr() { + return defaultContentIdStr; + } + + /** + * @param defaultContentIdStr + * The defaultContentIdStr to set. + */ + public void setDefaultContentIdStr(String defaultContentIdStr) { + this.defaultContentIdStr = defaultContentIdStr; + } + + /** + * @return Returns the isRemoveContent. + */ + public String getIsRemoveContent() { + return isRemoveContent; + } + + /** + * @param isRemoveContent + * The isRemoveContent to set. + */ + public void setIsRemoveContent(String isRemoveContent) { + this.isRemoveContent = isRemoveContent; + } + + /** + * @return Returns the questionIndex. + */ + @Override + public String getQuestionIndex() { + return questionIndex; + } + + /** + * @param questionIndex + * The questionIndex to set. + */ + @Override + public void setQuestionIndex(String questionIndex) { + this.questionIndex = questionIndex; + } + + /** + * @return Returns the addContent. + */ + public String getAddContent() { + return addContent; + } + + /** + * @param addContent + * The addContent to set. + */ + public void setAddContent(String addContent) { + this.addContent = addContent; + } + + /** + * @return Returns the removeContent. + */ + public String getRemoveContent() { + return removeContent; + } + + /** + * @param removeContent + * The removeContent to set. + */ + public void setRemoveContent(String removeContent) { + this.removeContent = removeContent; + } + + /** + * @return Returns the removeAllContent. + */ + public String getRemoveAllContent() { + return removeAllContent; + } + + /** + * @param removeAllContent + * The removeAllContent to set. + */ + public void setRemoveAllContent(String removeAllContent) { + this.removeAllContent = removeAllContent; + } + + /** + * @return Returns the submitAllContent. + */ + public String getSubmitAllContent() { + return submitAllContent; + } + + /** + * @param submitAllContent + * The submitAllContent to set. + */ + public void setSubmitAllContent(String submitAllContent) { + this.submitAllContent = submitAllContent; + } + + /** + * @return Returns the instructions. + */ + public String getInstructions() { + return instructions; + } + + /** + * @param instructions + * The instructions to set. + */ + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + /** + * @return Returns the title. + */ + public String getTitle() { + return title; + } + + /** + * @param title + * The title to set. + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * @return Returns the choiceAdvanced. + */ + public String getChoiceAdvanced() { + return choiceAdvanced; + } + + /** + * @param choiceAdvanced + * The choiceAdvanced to set. + */ + public void setChoiceAdvanced(String choiceAdvanced) { + this.choiceAdvanced = choiceAdvanced; + } + + /** + * @return Returns the choiceBasic. + */ + public String getChoiceBasic() { + return choiceBasic; + } + + /** + * @param choiceBasic + * The choiceBasic to set. + */ + public void setChoiceBasic(String choiceBasic) { + this.choiceBasic = choiceBasic; + } + + /** + * @return Returns the choiceInstructions. + */ + public String getChoiceInstructions() { + return choiceInstructions; + } + + /** + * @param choiceInstructions + * The choiceInstructions to set. + */ + public void setChoiceInstructions(String choiceInstructions) { + this.choiceInstructions = choiceInstructions; + } + + /** + * @return Returns the choice. + */ + public String getChoice() { + return choice; + } + + /** + * @param choice + * The choice to set. + */ + public void setChoice(String choice) { + this.choice = choice; + } + + /** + * @return Returns the submitTabDone. + */ + public String getSubmitTabDone() { + return submitTabDone; + } + + /** + * @param submitTabDone + * The submitTabDone to set. + */ + public void setSubmitTabDone(String submitTabDone) { + this.submitTabDone = submitTabDone; + } + + /** + * @return Returns the editActivityMonitoring. + */ + public String getEditActivityMonitoring() { + return editActivityMonitoring; + } + + /** + * @param editActivityMonitoring + * The editActivityMonitoring to set. + */ + public void setEditActivityMonitoring(String editActivityMonitoring) { + this.editActivityMonitoring = editActivityMonitoring; + } + + /** + * @return Returns the instructionsMonitoring. + */ + public String getInstructionsMonitoring() { + return instructionsMonitoring; + } + + /** + * @param instructionsMonitoring + * The instructionsMonitoring to set. + */ + public void setInstructionsMonitoring(String instructionsMonitoring) { + this.instructionsMonitoring = instructionsMonitoring; + } + + /** + * @return Returns the statsMonitoring. + */ + public String getStatsMonitoring() { + return statsMonitoring; + } + + /** + * @param statsMonitoring + * The statsMonitoring to set. + */ + public void setStatsMonitoring(String statsMonitoring) { + this.statsMonitoring = statsMonitoring; + } + + /** + * @return Returns the summaryMonitoring. + */ + public String getSummaryMonitoring() { + return summaryMonitoring; + } + + /** + * @param summaryMonitoring + * The summaryMonitoring to set. + */ + public void setSummaryMonitoring(String summaryMonitoring) { + this.summaryMonitoring = summaryMonitoring; + } + + /** + * @return Returns the edit. + */ + public String getEdit() { + return edit; + } + + /** + * @param edit + * The edit to set. + */ + public void setEdit(String edit) { + this.edit = edit; + } + + /** + * @return Returns the editDefaultQuestion. + */ + public String getEditDefaultQuestion() { + return editDefaultQuestion; + } + + /** + * @param editDefaultQuestion + * The editDefaultQuestion to set. + */ + public void setEditDefaultQuestion(String editDefaultQuestion) { + this.editDefaultQuestion = editDefaultQuestion; + } + + /** + * @return Returns the addOptionContent. + */ + public String getAddOptionContent() { + return addOptionContent; + } + + /** + * @param addOptionContent + * The addOptionContent to set. + */ + public void setAddOptionContent(String addOptionContent) { + this.addOptionContent = addOptionContent; + } + + /** + * @return Returns the removeOptionContent. + */ + public String getRemoveOptionContent() { + return removeOptionContent; + } + + /** + * @param removeOptionContent + * The removeOptionContent to set. + */ + public void setRemoveOptionContent(String removeOptionContent) { + this.removeOptionContent = removeOptionContent; + } + + /** + * @return Returns the optionIndex. + */ + @Override + public String getOptionIndex() { + return optionIndex; + } + + /** + * @param optionIndex + * The optionIndex to set. + */ + @Override + public void setOptionIndex(String optionIndex) { + this.optionIndex = optionIndex; + } + + /** + * @return Returns the selectedIndex. + */ + public String getSelectedIndex() { + return selectedIndex; + } + + /** + * @param selectedIndex + * The selectedIndex to set. + */ + public void setSelectedIndex(String selectedIndex) { + this.selectedIndex = selectedIndex; + } + + /** + * @return Returns the deletableOptionIndex. + */ + public String getDeletableOptionIndex() { + return deletableOptionIndex; + } + + /** + * @param deletableOptionIndex + * The deletableOptionIndex to set. + */ + public void setDeletableOptionIndex(String deletableOptionIndex) { + this.deletableOptionIndex = deletableOptionIndex; + } + + /** + * @return Returns the currentTab. + */ + public String getCurrentTab() { + return currentTab; + } + + /** + * @param currentTab + * The currentTab to set. + */ + public void setCurrentTab(String currentTab) { + this.currentTab = currentTab; + } + + /** + * @return Returns the submit. + */ + public String getSubmit() { + return submit; + } + + /** + * @param submit + * The submit to set. + */ + public void setSubmit(String submit) { + this.submit = submit; + } + + /** + * @return Returns the optIndex. + */ + public String getOptIndex() { + return optIndex; + } + + /** + * @param optIndex + * The optIndex to set. + */ + public void setOptIndex(String optIndex) { + this.optIndex = optIndex; + } + + /** + * @return Returns the lockOnFinish. + */ + @Override + public String getLockOnFinish() { + return lockOnFinish; + } + + /** + * @param lockOnFinish + * The lockOnFinish to set. + */ + @Override + public void setLockOnFinish(String lockOnFinish) { + this.lockOnFinish = lockOnFinish; + } + + /** + * @return Returns the allowText. + */ + public String getAllowText() { + return allowText; + } + + /** + * @param allowText + * The allowText to set. + */ + public void setAllowText(String allowText) { + this.allowText = allowText; + } + + /** + * @return Returns the maxNominationCount. + */ + @Override + public String getMaxNominationCount() { + return maxNominationCount; + } + + /** + * @param maxNominationCount + * The maxNominationCount to set. + */ + @Override + public void setMaxNominationCount(String maxNominationCount) { + this.maxNominationCount = maxNominationCount; + } + + /** + * @return Returns the minNominationCount. + */ + public String getMinNominationCount() { + return minNominationCount; + } + /** + * @param minNominationCount The minNominationCount to set. + */ + public void setMinNominationCount(String minNominationCount) { + this.minNominationCount = minNominationCount; + } + + /** + * @return Returns the exceptionMaxNominationInvalid. + */ + public String getExceptionMaxNominationInvalid() { + return exceptionMaxNominationInvalid; + } + + /** + * @param exceptionMaxNominationInvalid + * The exceptionMaxNominationInvalid to set. + */ + public void setExceptionMaxNominationInvalid(String exceptionMaxNominationInvalid) { + this.exceptionMaxNominationInvalid = exceptionMaxNominationInvalid; + } + + /** + * @return Returns the activeModule. + */ + public String getActiveModule() { + return activeModule; + } + + /** + * @param activeModule + * The activeModule to set. + */ + public void setActiveModule(String activeModule) { + this.activeModule = activeModule; + } + + /** + * @return Returns the defineLaterInEditMode. + */ + public String getDefineLaterInEditMode() { + return defineLaterInEditMode; + } + + /** + * @param defineLaterInEditMode + * The defineLaterInEditMode to set. + */ + public void setDefineLaterInEditMode(String defineLaterInEditMode) { + this.defineLaterInEditMode = defineLaterInEditMode; + } + + /** + * @return Returns the toolContentID. + */ + @Override + public String getToolContentID() { + return toolContentID; + } + + /** + * @param toolContentID + * The toolContentID to set. + */ + @Override + public void setToolContentID(String toolContentID) { + this.toolContentID = toolContentID; + } + + /** + * @return Returns the isDefineLater. + */ + public String getIsDefineLater() { + return isDefineLater; + } + + /** + * @param isDefineLater + * The isDefineLater to set. + */ + public void setIsDefineLater(String isDefineLater) { + this.isDefineLater = isDefineLater; + } + + /** + * @return Returns the defaultOptionContent. + */ + public String getDefaultOptionContent() { + return defaultOptionContent; + } + + /** + * @param defaultOptionContent + * The defaultOptionContent to set. + */ + public void setDefaultOptionContent(String defaultOptionContent) { + this.defaultOptionContent = defaultOptionContent; + } + + /** + * @return Returns the voteService. + */ + public IVoteService getVoteService() { + return voteService; + } + + /** + * @param voteService + * The voteService to set. + */ + public void setVoteService(IVoteService voteService) { + this.voteService = voteService; + } + + /** + * @return Returns the httpSessionID. + */ + public String getHttpSessionID() { + return httpSessionID; + } + + /** + * @param httpSessionID + * The httpSessionID to set. + */ + public void setHttpSessionID(String httpSessionID) { + this.httpSessionID = httpSessionID; + } + + @Override + public String toString() { + return new ToStringBuilder(this).append("activeModule: ", activeModule).append("contentFolderID: ", + contentFolderID).append("addSingleQuestion: ", addSingleQuestion).append("editableQuestionIndex: ", + editableQuestionIndex).append("feedback: ", feedback).append("editQuestionBoxRequest: ", + editQuestionBoxRequest).append("defineLaterInEditMode: ", defineLaterInEditMode).append( + "exceptionMaxNominationInvalid: ", exceptionMaxNominationInvalid).append("isDefineLater: ", + isDefineLater).append("toolContentID: ", toolContentID).append("allowText: ", allowText).append( + "showResults: ", showResults).append("lockOnFinish: ", lockOnFinish).append("reflect: ", reflect) + .append("defaultContentId: ", defaultContentId).append("defaultContentIdStr: ", defaultContentIdStr) + .append("maxNominationCount: ", maxNominationCount).append("minNominationCount: ", minNominationCount).append("defaultOptionContent: ", + defaultOptionContent).append("activityTitle: ", activityTitle).append("activityInstructions: ", + activityInstructions).toString(); + } + + /** + * @return Returns the useSelectLeaderToolOuput. + */ + public String getUseSelectLeaderToolOuput() { + return useSelectLeaderToolOuput; + } + + /** + * @param useSelectLeaderToolOuput + * The useSelectLeaderToolOuput to set. + */ + public void setUseSelectLeaderToolOuput(String useSelectLeaderToolOuput) { + this.useSelectLeaderToolOuput = useSelectLeaderToolOuput; + } + + /** + * @return Returns the reflect. + */ + public String getReflect() { + return reflect; + } + + /** + * @param reflect + * The reflect to set. + */ + public void setReflect(String reflect) { + this.reflect = reflect; + } + + /** + * @return Returns the reflectionSubject. + */ + public String getReflectionSubject() { + return reflectionSubject; + } + + /** + * @param reflectionSubject + * The reflectionSubject to set. + */ + public void setReflectionSubject(String reflectionSubject) { + this.reflectionSubject = reflectionSubject; + } + + /** + * @return Returns the addSingleQuestion. + */ + public String getAddSingleQuestion() { + return addSingleQuestion; + } + + /** + * @param addSingleQuestion + * The addSingleQuestion to set. + */ + public void setAddSingleQuestion(String addSingleQuestion) { + this.addSingleQuestion = addSingleQuestion; + } + + /** + * @return Returns the contentFolderID. + */ + public String getContentFolderID() { + return contentFolderID; + } + + /** + * @param contentFolderID + * The contentFolderID to set. + */ + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + + /** + * @return Returns the editableQuestionIndex. + */ + public String getEditableQuestionIndex() { + return editableQuestionIndex; + } + + /** + * @param editableQuestionIndex + * The editableQuestionIndex to set. + */ + public void setEditableQuestionIndex(String editableQuestionIndex) { + this.editableQuestionIndex = editableQuestionIndex; + } + + /** + * @return Returns the editQuestionBoxRequest. + */ + public String getEditQuestionBoxRequest() { + return editQuestionBoxRequest; + } + + /** + * @param editQuestionBoxRequest + * The editQuestionBoxRequest to set. + */ + public void setEditQuestionBoxRequest(String editQuestionBoxRequest) { + this.editQuestionBoxRequest = editQuestionBoxRequest; + } + + /** + * @return Returns the feedback. + */ + public String getFeedback() { + return feedback; + } + + /** + * @param feedback + * The feedback to set. + */ + public void setFeedback(String feedback) { + this.feedback = feedback; + } + + /** + * @return Returns the editableNominationIndex. + */ + public String getEditableNominationIndex() { + return editableNominationIndex; + } + + /** + * @param editableNominationIndex + * The editableNominationIndex to set. + */ + public void setEditableNominationIndex(String editableNominationIndex) { + this.editableNominationIndex = editableNominationIndex; + } + + @Override + public String getShowResults() { + return showResults; + } + + @Override + public void setShowResults(String showResults) { + this.showResults = showResults; + } + + public Short getMaxInputs() { + return maxInputs; + } + + public void setMaxInputs(Short maxInputs) { + this.maxInputs = maxInputs; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VoteLearningForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VoteLearningForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VoteLearningForm.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,966 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ + +package org.lamsfoundation.lams.tool.vote.web.form; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.tool.vote.VoteAppConstants; + +/** + *

+ * ActionForm for the Learning environment + *

+ * + * @author Ozgur Demirtas + */ +public class VoteLearningForm extends ActionForm implements VoteAppConstants { + protected String optionCheckBoxSelected; + protected String questionIndex; + protected String optionIndex; + protected String optionValue; + protected String checked; + + protected String userEntry; + protected String dispatch; + protected String toolContentID; + + protected String useSelectLeaderToolOuput; + protected String maxNominationCount; + protected String minNominationCount; + protected String allowTextEntry; + protected String showResults; + protected String lockOnFinish; + protected String activityRetries; + protected String activityTitle; + protected String activityInstructions; + + protected String continueOptions; + protected String nextOptions; + protected String castVotes; + + protected String continueOptionsCombined; + protected String redoQuestions; + protected String viewSummary; + protected String viewAnswers; + protected String learnerFinished; + protected String redoQuestionsOk; + protected String donePreview; + protected String doneLearnerProgress; + protected String viewAllResults; + + protected String responseId; + protected String method; + protected String answer; + protected String submitAnswersContent; + protected String getNextQuestion; + protected String getPreviousQuestion; + protected String refreshVotes; + protected String submitReflection; + protected String forwardtoReflection; + + protected String reflection; + + protected String nominationsSubmited; + protected String revisitingUser; + protected String maxNominationCountReached; + protected String minNominationCountReached; + protected int castVoteCount; + + protected Map mapGeneralCheckedOptionsContent; + + protected String entryText; + protected String userID; + protected String toolSessionID; + protected String learningMode; + protected String toolContentUID; + protected String previewOnly; + protected String reportViewOnly; + + protected boolean isUserLeader; + protected String groupLeaderName; + + /** + * @return Returns the learningMode. + */ + public String getLearningMode() { + return learningMode; + } + + /** + * @param learningMode + * The learningMode to set. + */ + public void setLearningMode(String learningMode) { + this.learningMode = learningMode; + } + + /** The check boxes selected on the first voting screen */ + protected String[] checkedVotes; + + public void reset(ActionMapping mapping, HttpServletRequest request) { + checkedVotes = new String[0]; + } + + public void resetUserActions() { + this.getNextQuestion = null; + this.getPreviousQuestion = null; + this.viewAllResults = null; + } + + /** + * @return Returns the answer. + */ + public String getAnswer() { + return answer; + } + + /** + * @param answer + * The answer to set. + */ + public void setAnswer(String answer) { + this.answer = answer; + } + + /** + * @return Returns the getNextQuestion. + */ + public String getGetNextQuestion() { + return getNextQuestion; + } + + /** + * @param getNextQuestion + * The getNextQuestion to set. + */ + public void setGetNextQuestion(String getNextQuestion) { + this.getNextQuestion = getNextQuestion; + } + + /** + * @return Returns the getPreviousQuestion. + */ + public String getGetPreviousQuestion() { + return getPreviousQuestion; + } + + /** + * @param getPreviousQuestion + * The getPreviousQuestion to set. + */ + public void setGetPreviousQuestion(String getPreviousQuestion) { + this.getPreviousQuestion = getPreviousQuestion; + } + + /** + * @return Returns the method. + */ + public String getMethod() { + return method; + } + + /** + * @param method + * The method to set. + */ + public void setMethod(String method) { + this.method = method; + } + + /** + * @return Returns the responseId. + */ + public String getResponseId() { + return responseId; + } + + /** + * @param responseId + * The responseId to set. + */ + public void setResponseId(String responseId) { + this.responseId = responseId; + } + + /** + * @return Returns the submitAnswersContent. + */ + public String getSubmitAnswersContent() { + return submitAnswersContent; + } + + /** + * @param submitAnswersContent + * The submitAnswersContent to set. + */ + public void setSubmitAnswersContent(String submitAnswersContent) { + this.submitAnswersContent = submitAnswersContent; + } + + public void resetCommands() { + this.setContinueOptions(null); + this.setNextOptions(null); + this.setContinueOptionsCombined(null); + this.setRedoQuestions(null); + this.setViewSummary(null); + this.setViewAnswers(null); + this.setRedoQuestionsOk(null); + this.setLearnerFinished(null); + this.setDonePreview(null); + this.setDoneLearnerProgress(null); + this.setRefreshVotes(null); + this.setSubmitReflection(null); + this.setForwardtoReflection(null); + } + + public void resetParameters() { + this.setOptionCheckBoxSelected(null); + this.setQuestionIndex(null); + this.setOptionIndex(null); + this.setChecked(null); + this.setOptionValue(null); + } + + /** + * @return Returns the continueOptions. + */ + public String getContinueOptions() { + return continueOptions; + } + + /** + * @param continueOptions + * The continueOptions to set. + */ + public void setContinueOptions(String continueOptions) { + this.continueOptions = continueOptions; + } + + /** + * @return Returns the checked. + */ + public String getChecked() { + return checked; + } + + /** + * @param checked + * The checked to set. + */ + public void setChecked(String checked) { + this.checked = checked; + } + + /** + * @return Returns the optionCheckBoxSelected. + */ + public String getOptionCheckBoxSelected() { + return optionCheckBoxSelected; + } + + /** + * @param optionCheckBoxSelected + * The optionCheckBoxSelected to set. + */ + public void setOptionCheckBoxSelected(String optionCheckBoxSelected) { + this.optionCheckBoxSelected = optionCheckBoxSelected; + } + + /** + * @return Returns the refreshVotes. + */ + public String getRefreshVotes() { + return refreshVotes; + } + + /** + * @param refreshVotes + * The refreshVotes to set. + */ + public void setRefreshVotes(String refreshVotes) { + this.refreshVotes = refreshVotes; + } + + /** + * @return Returns the optionIndex. + */ + public String getOptionIndex() { + return optionIndex; + } + + /** + * @param optionIndex + * The optionIndex to set. + */ + public void setOptionIndex(String optionIndex) { + this.optionIndex = optionIndex; + } + + /** + * @return Returns the questionIndex. + */ + public String getQuestionIndex() { + return questionIndex; + } + + /** + * @param questionIndex + * The questionIndex to set. + */ + public void setQuestionIndex(String questionIndex) { + this.questionIndex = questionIndex; + } + + /** + * @return Returns the viewSummary. + */ + public String getViewSummary() { + return viewSummary; + } + + /** + * @param viewSummary + * The viewSummary to set. + */ + public void setViewSummary(String viewSummary) { + this.viewSummary = viewSummary; + } + + /** + * @return Returns the continueOptionsCombined. + */ + public String getContinueOptionsCombined() { + return continueOptionsCombined; + } + + /** + * @param continueOptionsCombined + * The continueOptionsCombined to set. + */ + public void setContinueOptionsCombined(String continueOptionsCombined) { + this.continueOptionsCombined = continueOptionsCombined; + } + + /** + * @return Returns the redoQuestions. + */ + public String getRedoQuestions() { + return redoQuestions; + } + + /** + * @param redoQuestions + * The redoQuestions to set. + */ + public void setRedoQuestions(String redoQuestions) { + this.redoQuestions = redoQuestions; + } + + /** + * @return Returns the optionValue. + */ + public String getOptionValue() { + return optionValue; + } + + /** + * @param optionValue + * The optionValue to set. + */ + public void setOptionValue(String optionValue) { + this.optionValue = optionValue; + } + + /** + * @return Returns the viewAnswers. + */ + public String getViewAnswers() { + return viewAnswers; + } + + /** + * @param viewAnswers + * The viewAnswers to set. + */ + public void setViewAnswers(String viewAnswers) { + this.viewAnswers = viewAnswers; + } + + /** + * @return Returns the redoQuestionsOk. + */ + public String getRedoQuestionsOk() { + return redoQuestionsOk; + } + + /** + * @param redoQuestionsOk + * The redoQuestionsOk to set. + */ + public void setRedoQuestionsOk(String redoQuestionsOk) { + this.redoQuestionsOk = redoQuestionsOk; + } + + /** + * @return Returns the nextOptions. + */ + public String getNextOptions() { + return nextOptions; + } + + /** + * @param nextOptions + * The nextOptions to set. + */ + public void setNextOptions(String nextOptions) { + this.nextOptions = nextOptions; + } + + /** + * @return Returns the learnerFinished. + */ + public String getLearnerFinished() { + return learnerFinished; + } + + /** + * @param learnerFinished + * The learnerFinished to set. + */ + public void setLearnerFinished(String learnerFinished) { + this.learnerFinished = learnerFinished; + } + + /** + * @return Returns the donePreview. + */ + public String getDonePreview() { + return donePreview; + } + + /** + * @param donePreview + * The donePreview to set. + */ + public void setDonePreview(String donePreview) { + this.donePreview = donePreview; + } + + /** + * @return Returns the doneLearnerProgress. + */ + public String getDoneLearnerProgress() { + return doneLearnerProgress; + } + + /** + * @param doneLearnerProgress + * The doneLearnerProgress to set. + */ + public void setDoneLearnerProgress(String doneLearnerProgress) { + this.doneLearnerProgress = doneLearnerProgress; + } + + /** + * @return Returns the userEntry. + */ + public String getUserEntry() { + return userEntry; + } + + /** + * @param userEntry + * The userEntry to set. + */ + public void setUserEntry(String userEntry) { + this.userEntry = userEntry; + } + + /** + * @return Returns the dispatch. + */ + public String getDispatch() { + return dispatch; + } + + /** + * @param dispatch + * The dispatch to set. + */ + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + + /** + * @return Returns the toolContentID. + */ + public String getToolContentID() { + return toolContentID; + } + + /** + * @param toolContentID + * The toolContentID to set. + */ + public void setToolContentID(String toolContentID) { + this.toolContentID = toolContentID; + } + + /** + * @return Returns the viewAllResults. + */ + public String getViewAllResults() { + return viewAllResults; + } + + /** + * @param viewAllResults + * The viewAllResults to set. + */ + public void setViewAllResults(String viewAllResults) { + this.viewAllResults = viewAllResults; + } + + /** + * @return Returns the activityInstructions. + */ + public String getActivityInstructions() { + return activityInstructions; + } + + /** + * @param activityInstructions + * The activityInstructions to set. + */ + public void setActivityInstructions(String activityInstructions) { + this.activityInstructions = activityInstructions; + } + + /** + * @return Returns the activityTitle. + */ + public String getActivityTitle() { + return activityTitle; + } + + /** + * @param activityTitle + * The activityTitle to set. + */ + public void setActivityTitle(String activityTitle) { + this.activityTitle = activityTitle; + } + + /** + * @return Returns the activityRetries. + */ + public String getActivityRetries() { + return activityRetries; + } + + /** + * @param activityRetries + * The activityRetries to set. + */ + public void setActivityRetries(String activityRetries) { + this.activityRetries = activityRetries; + } + + /** + * @return Returns the lockOnFinish. + */ + public String getLockOnFinish() { + return lockOnFinish; + } + + /** + * @param lockOnFinish + * The lockOnFinish to set. + */ + public void setLockOnFinish(String lockOnFinish) { + this.lockOnFinish = lockOnFinish; + } + + /** + * @return Returns the useSelectLeaderToolOuput. + */ + public String getUseSelectLeaderToolOuput() { + return useSelectLeaderToolOuput; + } + + /** + * @param allowTextEntry + * The useSelectLeaderToolOuput to set. + */ + public void setUseSelectLeaderToolOuput(String useSelectLeaderToolOuput) { + this.useSelectLeaderToolOuput = useSelectLeaderToolOuput; + } + + /** + * @return Returns the allowTextEntry. + */ + public String getAllowTextEntry() { + return allowTextEntry; + } + + /** + * @param allowTextEntry + * The allowTextEntry to set. + */ + public void setAllowTextEntry(String allowTextEntry) { + this.allowTextEntry = allowTextEntry; + } + + /** + * @return Returns the maxNominationCount. + */ + public String getMaxNominationCount() { + return maxNominationCount; + } + + /** + * @param maxNominationCount + * The maxNominationCount to set. + */ + public void setMaxNominationCount(String maxNominationCount) { + this.maxNominationCount = maxNominationCount; + } + + /** + * @return Returns the minNominationCount. + */ + public String getMinNominationCount() { + return minNominationCount; + } + + /** + * @param minNominationCount + * The minNominationCount to set. + */ + public void setMinNominationCount(String minNominationCount) { + this.minNominationCount = minNominationCount; + } + + /** + * @return Returns the nominationsSubmited. + */ + public String getNominationsSubmited() { + return nominationsSubmited; + } + + /** + * @param nominationsSubmited + * The nominationsSubmited to set. + */ + public void setNominationsSubmited(String nominationsSubmited) { + this.nominationsSubmited = nominationsSubmited; + } + + /** + * @return Returns the revisitingUser. + */ + public String getRevisitingUser() { + return revisitingUser; + } + + /** + * @param revisitingUser + * The revisitingUser to set. + */ + public void setRevisitingUser(String revisitingUser) { + this.revisitingUser = revisitingUser; + } + + /** + * @return Returns the castVoteCount. + */ + public int getCastVoteCount() { + return castVoteCount; + } + + /** + * @param castVoteCount + * The castVoteCount to set. + */ + public void setCastVoteCount(int castVoteCount) { + this.castVoteCount = castVoteCount; + } + + /** + * @return Returns the castVotes. + */ + public String getCastVotes() { + return castVotes; + } + + /** + * @param castVotes + * The castVotes to set. + */ + public void setCastVotes(String castVotes) { + this.castVotes = castVotes; + } + + /** + * @return Returns the maxNominationCountReached. + */ + public String getMaxNominationCountReached() { + return maxNominationCountReached; + } + + /** + * @param maxNominationCountReached + * The maxNominationCountReached to set. + */ + public void setMaxNominationCountReached(String maxNominationCountReached) { + this.maxNominationCountReached = maxNominationCountReached; + } + + /** + * @return Returns the minNominationCountReached. + */ + public String getMinNominationCountReached() { + return minNominationCountReached; + } + + /** + * @param minNominationCountReached + * The minNominationCountReached to set. + */ + public void setMinNominationCountReached(String minNominationCountReached) { + this.minNominationCountReached = minNominationCountReached; + } + + /** Get the votes based on the checkboxes */ + public String[] getCheckedVotes() { + return checkedVotes; + } + + /** Get the votes based on the checkboxes as a collection */ + public Collection votesAsCollection() { + ArrayList votes = new ArrayList(); + for (String vote : checkedVotes) { + votes.add(vote); + } + return votes; + } + + /** Set the votes based on the checkboxes */ + public void setCheckedVotes(String[] checkedVotes) { + this.checkedVotes = checkedVotes; + } + + /** + * @return Returns the mapGeneralCheckedOptionsContent. + */ + public Map getMapGeneralCheckedOptionsContent() { + return mapGeneralCheckedOptionsContent; + } + + /** + * @param mapGeneralCheckedOptionsContent + * The mapGeneralCheckedOptionsContent to set. + */ + public void setMapGeneralCheckedOptionsContent(Map mapGeneralCheckedOptionsContent) { + this.mapGeneralCheckedOptionsContent = mapGeneralCheckedOptionsContent; + } + + /** + * @return Returns the userID. + */ + public String getUserID() { + return userID; + } + + /** + * @param userID + * The userID to set. + */ + public void setUserID(String userID) { + this.userID = userID; + } + + /** + * @return Returns the reportViewOnly. + */ + public String getReportViewOnly() { + return reportViewOnly; + } + + /** + * @param reportViewOnly + * The reportViewOnly to set. + */ + public void setReportViewOnly(String reportViewOnly) { + this.reportViewOnly = reportViewOnly; + } + + /** + * @return Returns the toolSessionID. + */ + public String getToolSessionID() { + return toolSessionID; + } + + /** + * @param toolSessionID + * The toolSessionID to set. + */ + public void setToolSessionID(String toolSessionID) { + this.toolSessionID = toolSessionID; + } + + /** + * @return Returns the toolContentUID. + */ + public String getToolContentUID() { + return toolContentUID; + } + + /** + * @param toolContentUID + * The toolContentUID to set. + */ + public void setToolContentUID(String toolContentUID) { + this.toolContentUID = toolContentUID; + } + + /** + * @return Returns the previewOnly. + */ + public String getPreviewOnly() { + return previewOnly; + } + + /** + * @param previewOnly + * The previewOnly to set. + */ + public void setPreviewOnly(String previewOnly) { + this.previewOnly = previewOnly; + } + + /** + * @return Returns the forwardtoReflection. + */ + public String getForwardtoReflection() { + return forwardtoReflection; + } + + /** + * @param forwardtoReflection + * The forwardtoReflection to set. + */ + public void setForwardtoReflection(String forwardtoReflection) { + this.forwardtoReflection = forwardtoReflection; + } + + /** + * @return Returns the submitReflection. + */ + public String getSubmitReflection() { + return submitReflection; + } + + /** + * @param submitReflection + * The submitReflection to set. + */ + public void setSubmitReflection(String submitReflection) { + this.submitReflection = submitReflection; + } + + public String toString() { + return new ToStringBuilder(this).append("activityInstructions: ", activityInstructions) + .append("activityTitle: ", activityTitle).append("revisitingUser: ", revisitingUser) + .append("userEntry: ", userEntry).append("castVoteCount: ", castVoteCount) + .append("maxNominationCountReached: ", maxNominationCountReached) + .append("toolSessionID: ", toolSessionID) + .append("learningMode: ", learningMode).append("toolContentID: ", toolContentID) + .append("nominationsSubmited: ", nominationsSubmited).append("toolContentUID: ", toolContentUID) + .append("previewOnly: ", previewOnly).append("reportViewOnly: ", reportViewOnly) + .append("mapGeneralCheckedOptionsContent: ", mapGeneralCheckedOptionsContent).toString(); + } + + /** + * @return Returns the entryText. + */ + public String getEntryText() { + return entryText; + } + + /** + * @param entryText + * The entryText to set. + */ + public void setEntryText(String entryText) { + this.entryText = entryText; + } + + /** + * @return Returns the reflection. + */ + public String getReflection() { + return reflection; + } + + /** + * @param reflection + * The reflection to set. + */ + public void setReflection(String reflection) { + this.reflection = reflection; + } + + public String getShowResults() { + return showResults; + } + + public void setShowResults(String showResults) { + this.showResults = showResults; + } + + public String getGroupLeaderName() { + return groupLeaderName; + } + + public void setGroupLeaderName(String groupLeaderName) { + this.groupLeaderName = groupLeaderName; + } + + public boolean isUserLeader() { + return isUserLeader; + } + + public void setIsUserLeader(boolean isUserLeader) { + this.isUserLeader = isUserLeader; + } + +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VoteMonitoringForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VoteMonitoringForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VoteMonitoringForm.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,188 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ +package org.lamsfoundation.lams.tool.vote.web.form; + +import org.lamsfoundation.lams.tool.vote.VoteAppConstants; + +/** + *

+ * ActionForm for the Monitoring environment + *

+ * + * @author Ozgur Demirtas + */ +public class VoteMonitoringForm extends VoteAuthoringForm implements VoteAppConstants { + // controls which method is called by the Lookup map */ + + protected String method; + + protected String sessionUserCount; + + protected String completedSessionUserCount; + + protected String hideOpenVote; + + protected String showOpenVote; + + protected String currentUid; + + protected String existsOpenVotes; + + protected String toolContentID; + + protected String defineLaterInEditMode; + + /** + * @return Returns the toolContentID. + */ + public String getToolContentID() { + return toolContentID; + } + + /** + * @param toolContentID + * The toolContentID to set. + */ + public void setToolContentID(String toolContentID) { + this.toolContentID = toolContentID; + } + + /** + * @return Returns the currentUid. + */ + public String getCurrentUid() { + return currentUid; + } + + /** + * @param currentUid + * The currentUid to set. + */ + public void setCurrentUid(String currentUid) { + this.currentUid = currentUid; + } + + /** + * @return Returns the hideOpenVote. + */ + public String getHideOpenVote() { + return hideOpenVote; + } + + /** + * @param hideOpenVote + * The hideOpenVote to set. + */ + public void setHideOpenVote(String hideOpenVote) { + this.hideOpenVote = hideOpenVote; + } + + /** + * @return Returns the method. + */ + public String getMethod() { + return method; + } + + /** + * @param method + * The method to set. + */ + public void setMethod(String method) { + this.method = method; + } + + /** + * @return Returns the completedSessionUserCount. + */ + public String getCompletedSessionUserCount() { + return completedSessionUserCount; + } + + /** + * @param completedSessionUserCount + * The completedSessionUserCount to set. + */ + public void setCompletedSessionUserCount(String completedSessionUserCount) { + this.completedSessionUserCount = completedSessionUserCount; + } + + /** + * @return Returns the sessionUserCount. + */ + public String getSessionUserCount() { + return sessionUserCount; + } + + /** + * @param sessionUserCount + * The sessionUserCount to set. + */ + public void setSessionUserCount(String sessionUserCount) { + this.sessionUserCount = sessionUserCount; + } + + /** + * @return Returns the showOpenVote. + */ + public String getShowOpenVote() { + return showOpenVote; + } + + /** + * @param showOpenVote + * The showOpenVote to set. + */ + public void setShowOpenVote(String showOpenVote) { + this.showOpenVote = showOpenVote; + } + + /** + * @return Returns the existsOpenVotes. + */ + public String getExistsOpenVotes() { + return existsOpenVotes; + } + + /** + * @param existsOpenVotes + * The existsOpenVotes to set. + */ + public void setExistsOpenVotes(String existsOpenVotes) { + this.existsOpenVotes = existsOpenVotes; + } + + /** + * @return Returns the defineLaterInEditMode. + */ + public String getDefineLaterInEditMode() { + return defineLaterInEditMode; + } + + /** + * @param defineLaterInEditMode + * The defineLaterInEditMode to set. + */ + public void setDefineLaterInEditMode(String defineLaterInEditMode) { + this.defineLaterInEditMode = defineLaterInEditMode; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VotePedagogicalPlannerForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VotePedagogicalPlannerForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/form/VotePedagogicalPlannerForm.java 6 Mar 2014 22:43:33 -0000 1.1 @@ -0,0 +1,130 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: VotePedagogicalPlannerForm.java,v 1.1 2014/03/06 22:43:33 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.vote.web.form; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.apache.commons.lang.StringUtils; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; +import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; +import org.lamsfoundation.lams.web.planner.PedagogicalPlannerActivityForm; + +public class VotePedagogicalPlannerForm extends PedagogicalPlannerActivityForm { + private List nomination; + private String contentFolderID; + private String instructions; + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public String getContentFolderID() { + return contentFolderID; + } + + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + + @Override + public ActionMessages validate() { + ActionMessages errors = new ActionMessages(); + boolean valid = true; + boolean allEmpty = true; + if (nomination != null && !nomination.isEmpty()) { + for (String item : nomination) { + if (!StringUtils.isEmpty(item)) { + allEmpty = false; + break; + } + } + } + if (allEmpty) { + ActionMessage error = new ActionMessage("nominations.none.submitted"); + errors.add(ActionMessages.GLOBAL_MESSAGE, error); + valid = false; + nomination = null; + } + + setValid(valid); + return errors; + } + + public void fillForm(VoteContent voteContent) { + if (voteContent != null) { + setToolContentID(voteContent.getVoteContentId()); + setInstructions(voteContent.getInstructions()); + + nomination = new ArrayList(); + Set questions = voteContent.getVoteQueContents(); + if (questions != null) { + int topicIndex = 0; + for (VoteQueContent message : (Set) questions) { + setNomination(topicIndex++, message.getQuestion()); + } + } + } + } + + public void setNomination(int number, String nomination) { + if (this.nomination == null) { + this.nomination = new ArrayList(); + } + while (number >= this.nomination.size()) { + this.nomination.add(null); + } + this.nomination.set(number, nomination); + } + + public String getNomination(int number) { + if (nomination == null || number >= nomination.size()) { + return null; + } + return nomination.get(number); + } + + public Integer getNominationCount() { + return nomination == null ? 0 : nomination.size(); + } + + public boolean removeNomination(int number) { + if (nomination == null || number >= nomination.size()) { + return false; + } + nomination.remove(number); + return true; + } + + public List getNominationList() { + return nomination; + } +} \ No newline at end of file Index: lams_tool_vote/web/WEB-INF/struts-config.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/WEB-INF/struts-config.xml,v diff -u -r1.36 -r1.37 --- lams_tool_vote/web/WEB-INF/struts-config.xml 23 Jan 2014 23:53:16 -0000 1.36 +++ lams_tool_vote/web/WEB-INF/struts-config.xml 6 Mar 2014 22:43:34 -0000 1.37 @@ -4,11 +4,11 @@ - - - - - + + + + + Index: lams_tool_vote/web/export/ExportContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/export/ExportContent.jsp,v diff -u -r1.23 -r1.24 --- lams_tool_vote/web/export/ExportContent.jsp 6 Feb 2014 22:07:15 -0000 1.23 +++ lams_tool_vote/web/export/ExportContent.jsp 6 Mar 2014 22:43:33 -0000 1.24 @@ -3,78 +3,60 @@
- - -

- -

-
- - -

- -

-
- - - -

- : -

+ + + +
+ ${sessionDto.sessionName} +
+
- + + - - - - + + + + + + + + - - - - - - - - -
- -
-
- - - + + + + + + + + + -

- : -

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

Index: lams_tool_vote/web/export/exportportfolio.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/export/exportportfolio.jsp,v diff -u -r1.18 -r1.19 --- lams_tool_vote/web/export/exportportfolio.jsp 28 Jan 2014 23:05:52 -0000 1.18 +++ lams_tool_vote/web/export/exportportfolio.jsp 6 Mar 2014 22:43:33 -0000 1.19 @@ -1,5 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> @@ -17,30 +16,26 @@

- -

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