Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/ExportPortfolioDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/Attic/ExportPortfolioDTO.java,v diff -u -r1.5 -r1.6 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/ExportPortfolioDTO.java 23 May 2008 06:05:24 -0000 1.5 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/ExportPortfolioDTO.java 6 Feb 2014 22:07:15 -0000 1.6 @@ -27,161 +27,173 @@ import org.apache.commons.lang.builder.ToStringBuilder; - - /** - *

DTO that holds export portfolio properties + *

+ * DTO that holds export portfolio properties *

* * @author Ozgur Demirtas */ -public class ExportPortfolioDTO implements Comparable -{ +public class ExportPortfolioDTO implements Comparable { protected String portfolioExportMode; protected String userExceptionNoToolSessions; protected String showResults; - + protected Map mapStandardNominationsHTMLedContent; protected Map mapStandardNominationsContent; protected Map mapStandardUserCount; protected Map mapStandardRatesContent; - + protected List listUserEntries; protected List listMonitoredAnswersContainerDto; - + protected boolean allowText; - - public int compareTo(Object o) - { - VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = (VoteGeneralAuthoringDTO) o; - - if (voteGeneralAuthoringDTO == null) - return 1; - else - return 0; + + 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("portfolioExportMode: ", portfolioExportMode) - .append("userExceptionNoToolSessions: ", userExceptionNoToolSessions) - .append("mapStandardNominationsHTMLedContent: ", mapStandardNominationsHTMLedContent) - .append("mapStandardUserCount: ", mapStandardUserCount) - .append("mapStandardRatesContent: ", mapStandardRatesContent) - .append("listUserEntries: ", listUserEntries) - .append("listMonitoredAnswersContainerDto: ", listMonitoredAnswersContainerDto) - .toString(); + public String toString() { + return new ToStringBuilder(this).append("portfolioExportMode: ", portfolioExportMode) + .append("userExceptionNoToolSessions: ", userExceptionNoToolSessions) + .append("mapStandardNominationsHTMLedContent: ", mapStandardNominationsHTMLedContent) + .append("mapStandardUserCount: ", mapStandardUserCount) + .append("mapStandardRatesContent: ", mapStandardRatesContent) + .append("listUserEntries: ", listUserEntries) + .append("listMonitoredAnswersContainerDto: ", listMonitoredAnswersContainerDto).toString(); } - + /** * @return Returns the listMonitoredAnswersContainerDto. */ public List getListMonitoredAnswersContainerDto() { - return listMonitoredAnswersContainerDto; + return listMonitoredAnswersContainerDto; } + /** - * @param listMonitoredAnswersContainerDto The listMonitoredAnswersContainerDto to set. + * @param listMonitoredAnswersContainerDto + * The listMonitoredAnswersContainerDto to set. */ - public void setListMonitoredAnswersContainerDto( - List listMonitoredAnswersContainerDto) { - this.listMonitoredAnswersContainerDto = listMonitoredAnswersContainerDto; + public void setListMonitoredAnswersContainerDto(List listMonitoredAnswersContainerDto) { + this.listMonitoredAnswersContainerDto = listMonitoredAnswersContainerDto; } + /** * @return Returns the listUserEntries. */ public List getListUserEntries() { - return listUserEntries; + return listUserEntries; } + /** - * @param listUserEntries The listUserEntries to set. + * @param listUserEntries + * The listUserEntries to set. */ public void setListUserEntries(List listUserEntries) { - this.listUserEntries = listUserEntries; + this.listUserEntries = listUserEntries; } + /** * @return Returns the mapStandardNominationsHTMLedContent. */ public Map getMapStandardNominationsHTMLedContent() { - return mapStandardNominationsHTMLedContent; + return mapStandardNominationsHTMLedContent; } + /** - * @param mapStandardNominationsHTMLedContent The mapStandardNominationsHTMLedContent to set. + * @param mapStandardNominationsHTMLedContent + * The mapStandardNominationsHTMLedContent to set. */ - public void setMapStandardNominationsHTMLedContent( - Map mapStandardNominationsHTMLedContent) { - this.mapStandardNominationsHTMLedContent = mapStandardNominationsHTMLedContent; + public void setMapStandardNominationsHTMLedContent(Map mapStandardNominationsHTMLedContent) { + this.mapStandardNominationsHTMLedContent = mapStandardNominationsHTMLedContent; } + /** * @return Returns the mapStandardRatesContent. */ public Map getMapStandardRatesContent() { - return mapStandardRatesContent; + return mapStandardRatesContent; } + /** - * @param mapStandardRatesContent The mapStandardRatesContent to set. + * @param mapStandardRatesContent + * The mapStandardRatesContent to set. */ public void setMapStandardRatesContent(Map mapStandardRatesContent) { - this.mapStandardRatesContent = mapStandardRatesContent; + this.mapStandardRatesContent = mapStandardRatesContent; } + /** * @return Returns the mapStandardUserCount. */ public Map getMapStandardUserCount() { - return mapStandardUserCount; + return mapStandardUserCount; } + /** - * @param mapStandardUserCount The mapStandardUserCount to set. + * @param mapStandardUserCount + * The mapStandardUserCount to set. */ public void setMapStandardUserCount(Map mapStandardUserCount) { - this.mapStandardUserCount = mapStandardUserCount; + this.mapStandardUserCount = mapStandardUserCount; } + /** * @return Returns the portfolioExportMode. */ public String getPortfolioExportMode() { - return portfolioExportMode; + return portfolioExportMode; } + /** - * @param portfolioExportMode The portfolioExportMode to set. + * @param portfolioExportMode + * The portfolioExportMode to set. */ public void setPortfolioExportMode(String portfolioExportMode) { - this.portfolioExportMode = portfolioExportMode; + this.portfolioExportMode = portfolioExportMode; } + /** * @return Returns the userExceptionNoToolSessions. */ public String getUserExceptionNoToolSessions() { - return userExceptionNoToolSessions; + return userExceptionNoToolSessions; } + /** - * @param userExceptionNoToolSessions The userExceptionNoToolSessions to set. + * @param userExceptionNoToolSessions + * The userExceptionNoToolSessions to set. */ - public void setUserExceptionNoToolSessions( - String userExceptionNoToolSessions) { - this.userExceptionNoToolSessions = userExceptionNoToolSessions; + public void setUserExceptionNoToolSessions(String userExceptionNoToolSessions) { + this.userExceptionNoToolSessions = userExceptionNoToolSessions; } - public Map getMapStandardNominationsContent() { - return mapStandardNominationsContent; - } + public Map getMapStandardNominationsContent() { + return mapStandardNominationsContent; + } - public void setMapStandardNominationsContent(Map mapStandardNominationsContent) { - this.mapStandardNominationsContent = mapStandardNominationsContent; - } + public void setMapStandardNominationsContent(Map mapStandardNominationsContent) { + this.mapStandardNominationsContent = mapStandardNominationsContent; + } - public String getShowResults() { - return showResults; - } + public String getShowResults() { + return showResults; + } - public void setShowResults(String showResults) { - this.showResults = showResults; - } + public void setShowResults(String showResults) { + this.showResults = showResults; + } - public boolean isAllowText() { - return allowText; - } + public boolean isAllowText() { + return allowText; + } - public void setAllowText(boolean allowText) { - this.allowText = allowText; - } + public void setAllowText(boolean allowText) { + this.allowText = allowText; + } } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java,v diff -u -r1.29 -r1.30 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java 28 Jan 2014 23:05:52 -0000 1.29 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java 6 Feb 2014 22:07:15 -0000 1.30 @@ -41,18 +41,14 @@ List getAttemptsForUser(final Long queUsrId); - List getUserRecords(final String userEntry); + List getUserRecords(final Long voteContentUid, final String userEntry); - Set getUserEntries(); + Set getUserEntries(final Long voteContentUid); int getUserEnteredVotesCountForContent(final Long voteContentUid); - List getSessionUserEntries(final Long voteSessionUid); + Set getSessionUserEntriesSet(final Long voteSessionUid); - Set getSessionUserEntriesSet(final Long voteSessionUid); - - List getUserEnteredVotesForSession(final String userEntry, final Long voteSessionUid); - VoteUsrAttempt getAttemptByUID(Long uid); int getSessionEntriesCount(final Long voteSessionId); @@ -63,21 +59,21 @@ int getStandardAttemptsForQuestionContentAndSessionUid(final Long voteQueContentId, final Long voteSessionUid); - List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, + List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, final Long voteSessionUid); - void removeAttemptsForUserandSession(final Long queUsrId, final Long voteSessionId); + void removeAttemptsForUserandSession(final Long queUsrId, final Long sessionUid); - VoteUsrAttempt getAttemptForUserAndQuestionContentAndSession(final Long queUsrId, - final Long voteQueContentId, final Long voteSessionId); + VoteUsrAttempt getAttemptForUserAndQuestionContentAndSession(final Long queUsrId, final Long voteQueContentId, + final Long sessionUid); void updateVoteUsrAttempt(VoteUsrAttempt voteUsrAttempt); void removeVoteUsrAttempt(VoteUsrAttempt voteUsrAttempt); - Set getAttemptsForUserAndSession(final Long queUsrId, final Long voteSessionUid); + Set getAttemptsForUserAndSession(final Long queUsrId, final Long sessionUid); - Set getAttemptsForUserAndSessionUseOpenAnswer(final Long queUsrId, final Long voteSessionId); + Set getAttemptsForUserAndSessionUseOpenAnswer(final Long queUsrId, final Long sessionUid); List getAttemptsForUserAndQuestionContent(final Long queUsrId, final Long voteQueContentId); } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java,v diff -u -r1.8 -r1.9 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java 23 Jan 2014 23:53:16 -0000 1.8 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteSessionDAO.java 6 Feb 2014 22:07:15 -0000 1.9 @@ -56,8 +56,8 @@ private static final String GET_SESSIONNAMES_FROM_CONTENT = "select votes.session_name from VoteSession votes where votes.voteContent=:voteContent order by votes.voteSessionId"; - public VoteSession getVoteSessionByUID(Long uid) { - return (VoteSession) this.getHibernateTemplate().get(VoteSession.class, uid); + public VoteSession getVoteSessionByUID(Long sessionUid) { + return (VoteSession) this.getHibernateTemplate().get(VoteSession.class, sessionUid); } public VoteSession findVoteSessionById(Long voteSessionId) { 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.37 -r1.38 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java 28 Jan 2014 23:05:51 -0000 1.37 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java 6 Feb 2014 22:07:15 -0000 1.38 @@ -30,82 +30,85 @@ import org.hibernate.FlushMode; import org.lamsfoundation.lams.tool.vote.dao.IVoteUsrAttemptDAO; -import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; -import org.lamsfoundation.lams.tool.vote.service.IVoteService; import org.springframework.orm.hibernate3.HibernateTemplate; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; /** + * Hibernate implementation for database access to VoteUsrAttemptDAO for the voting tool. + * * @author Ozgur Demirtas repaired by lfoxton - *

- * Hibernate implementation for database access to VoteUsrAttemptDAO for the voting tool. - *

*/ public class VoteUsrAttemptDAO extends HibernateDaoSupport implements IVoteUsrAttemptDAO { private static final String LOAD_ATTEMPT_FOR_USER = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.queUsrId=:queUsrId"; private static final String LOAD_ATTEMPT_FOR_QUESTION_CONTENT = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.voteQueContentId=:voteQueContentId"; + 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"; + 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"; + 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"; + private static final String LOAD_USER_ENTRIES = "select distinct voteUsrAttempt.userEntry from VoteUsrAttempt voteUsrAttempt where voteUsrAttempt.voteQueUsr.voteSession.voteContent.uid=:voteContentUid"; - private static final String LOAD_USER_ENTRY_RECORDS = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.userEntry=:userEntry and voteUsrAttempt.voteQueContentId=1 "; + private static final String LOAD_USER_ENTRY_RECORDS = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.userEntry=:userEntry and voteUsrAttempt.voteQueContentId=1 and voteUsrAttempt.voteQueUsr.voteSession.voteContent.uid=:voteContentUid"; private static final String COUNT_ATTEMPTS_BY_CONTENT_ID = "select count(*) from VoteUsrAttempt att, VoteQueUsr user, VoteSession ses where " + "att.voteQueUsr=user and user.voteSession=ses and " + "ses.voteContentId=:voteContentId"; - private static final String LOAD_ENTRIES_BY_SESSION_ID = "select att from VoteUsrAttempt att, VoteQueUsr user, VoteSession ses where " + private static final String LOAD_ENTRIES_BY_SESSION_UID = "select att from VoteUsrAttempt att, VoteQueUsr user, VoteSession ses where " + "att.voteQueUsr=user and user.voteSession=ses and ses.uid=:voteSessionUid"; private static final String COUNT_ENTRIES_BY_SESSION_ID = "select count(*) from VoteUsrAttempt att, VoteQueUsr user, VoteSession ses where " + "att.voteQueUsr=user and user.voteSession=ses and ses.uid=:voteSessionUid"; + @Override public VoteUsrAttempt getAttemptByUID(Long uid) { String query = "from VoteUsrAttempt attempt where attempt.uid=?"; - List list = getSession().createQuery(query).setLong(0, uid.longValue()).list(); + List list = getSession().createQuery(query).setLong(0, uid.longValue()).list(); - if (list != null && list.size() > 0) { - VoteUsrAttempt attempt = (VoteUsrAttempt) list.get(0); + if ((list != null) && (list.size() > 0)) { + VoteUsrAttempt attempt = list.get(0); return attempt; } return null; } + @Override public void saveVoteUsrAttempt(VoteUsrAttempt voteUsrAttempt) { this.getHibernateTemplate().save(voteUsrAttempt); } + @Override public List getAttemptsForUser(final Long queUsrId) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER).setLong("queUsrId", - queUsrId.longValue()).list(); + List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER) + .setLong("queUsrId", queUsrId.longValue()).list(); return list; } + @Override public int getUserEnteredVotesCountForContent(final Long voteContentUid) { - List result = getSession().createQuery(VoteUsrAttemptDAO.COUNT_ATTEMPTS_BY_CONTENT_ID).setLong("voteContentId", - voteContentUid).list(); + List result = getSession().createQuery(VoteUsrAttemptDAO.COUNT_ATTEMPTS_BY_CONTENT_ID) + .setLong("voteContentId", voteContentUid).list(); Long resultLong = result.get(0) != null ? (Long) result.get(0) : new Long(0); return resultLong.intValue(); } - public Set getUserEntries() { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_USER_ENTRIES).list(); + @Override + public Set getUserEntries(final Long voteContentUid) { + List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_USER_ENTRIES) + .setLong("voteContentUid", voteContentUid).list(); - Set set = new HashSet(); - - Set userEntries = new HashSet(); - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); + Set userEntries = new HashSet(); + if ((list != null) && (list.size() > 0)) { + Iterator listIterator = list.iterator(); while (listIterator.hasNext()) { - String entry = (String) listIterator.next(); + String entry = listIterator.next(); if (entry != null && entry.length() > 0) { userEntries.add(entry); } @@ -114,166 +117,149 @@ return userEntries; } - public List getSessionUserEntries(final Long voteSessionUid) { - - return getSession().createQuery(VoteUsrAttemptDAO.LOAD_ENTRIES_BY_SESSION_ID).setLong("voteSessionUid", - voteSessionUid).list(); + @Override + public List getUserRecords(final Long voteContentUid, final String userEntry) { + List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_USER_ENTRY_RECORDS) + .setLong("voteContentUid", voteContentUid).setString("userEntry", userEntry).list(); + return list; } - public Set getSessionUserEntriesSet(final Long voteSessionUid) { - List list = getSessionUserEntries(voteSessionUid); + @Override + public Set getSessionUserEntriesSet(final Long voteSessionUid) { + List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ENTRIES_BY_SESSION_UID) + .setLong("voteSessionUid", voteSessionUid).list(); + Set sessionUserEntries = new HashSet(); - for (VoteUsrAttempt att : list) { - sessionUserEntries.add(att); - } + sessionUserEntries.addAll(list); return sessionUserEntries; } - public void removeAttemptsForUserandSession(final Long queUsrId, final Long voteSessionId) { - String strGetUser = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.queUsrId=:queUsrId"; + @Override + public void removeAttemptsForUserandSession(final Long queUsrId, final Long sessionUid) { + String strGetUser = "from voteUsrAttempt in class VoteUsrAttempt where voteUsrAttempt.queUsrId=:queUsrId and voteUsrAttempt.voteQueUsr.voteSession.uid=:sessionUid"; HibernateTemplate templ = this.getHibernateTemplate(); - List list = getSession().createQuery(strGetUser).setLong("queUsrId", queUsrId.longValue()).list(); + List list = getSession().createQuery(strGetUser).setLong("queUsrId", queUsrId.longValue()) + .setLong("sessionUid", sessionUid).list(); - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); + if ((list != null) && (list.size() > 0)) { + Iterator listIterator = list.iterator(); while (listIterator.hasNext()) { - VoteUsrAttempt attempt = (VoteUsrAttempt) listIterator.next(); - if (attempt.getVoteQueUsr().getVoteSession().getUid().toString().equals(voteSessionId.toString())) { - this.getSession().setFlushMode(FlushMode.AUTO); - templ.delete(attempt); - templ.flush(); - - } + VoteUsrAttempt attempt = listIterator.next(); + this.getSession().setFlushMode(FlushMode.AUTO); + templ.delete(attempt); + templ.flush(); } } } + @Override public int getAttemptsForQuestionContent(final Long voteQueContentId) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT).setLong( - "voteQueContentId", voteQueContentId.longValue()).list(); + List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT) + .setLong("voteQueContentId", voteQueContentId.longValue()).list(); - if (list != null && list.size() > 0) { + if ((list != null) && (list.size() > 0)) { return list.size(); } return 0; } - public int getStandardAttemptsForQuestionContentAndSessionUid(final Long voteQueContentId, final Long voteSessionUid) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT).setLong( - "voteQueContentId", voteQueContentId.longValue()).list(); - - List userEntries = new ArrayList(); - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); - while (listIterator.hasNext()) { - VoteUsrAttempt attempt = (VoteUsrAttempt) listIterator.next(); - if (attempt.getVoteQueUsr().getVoteSession().getUid().toString().equals(voteSessionUid.toString())) { - userEntries.add(attempt); - } - } - } - return userEntries.size(); - + @Override + public int getStandardAttemptsForQuestionContentAndSessionUid(final Long voteQueContentId, final Long sessionUid) { + List list = getStandardAttemptUsersForQuestionContentAndSessionUid(voteQueContentId, sessionUid); + return list.size(); } - public List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, - final Long voteSessionUid) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT).setLong( - "voteQueContentId", voteQueContentId.longValue()).list(); + @Override + public List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, + final Long sessionUid) { + List list = getSession() + .createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT_AND_SESSION) + .setLong("voteQueContentId", voteQueContentId.longValue()) + .setLong("sessionUid", sessionUid.longValue()).list(); - List userEntries = new ArrayList(); - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); - while (listIterator.hasNext()) { - VoteUsrAttempt attempt = (VoteUsrAttempt) listIterator.next(); - if (attempt.getVoteQueUsr().getVoteSession().getUid().toString().equals(voteSessionUid.toString())) { - userEntries.add(attempt); - } - } + List userEntries = new ArrayList(); + if ((list != null) && (list.size() > 0)) { + userEntries.addAll(list); } return userEntries; } + @Override public List getStandardAttemptsForQuestionContentAndContentUid(final Long voteQueContentId) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT).setLong( - "voteQueContentId", voteQueContentId.longValue()).list(); + List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_QUESTION_CONTENT) + .setLong("voteQueContentId", voteQueContentId.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()).list(); + List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_QUESTION_CONTENT) + .setLong("queUsrId", queUsrId.longValue()).setLong("voteQueContentId", voteQueContentId.longValue()) + .list(); return list; } + @Override public VoteUsrAttempt getAttemptForUserAndQuestionContentAndSession(final Long queUsrId, - final Long voteQueContentId, final Long voteSessionUid) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_QUESTION_CONTENT_AND_SESSION) + final Long voteQueContentId, 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()) - .list(); + .setLong("sessionUid", sessionUid.longValue()).list(); - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); - while (listIterator.hasNext()) { - VoteUsrAttempt attempt = listIterator.next(); - if (attempt.getVoteQueUsr().getVoteSession().getUid().toString().equals(voteSessionUid.toString())) { - return attempt; - } - } + if ((list == null) || (list.size() == 0)) { + return null; } - return null; + return list.get(0); } - public Set getAttemptsForUserAndSession(final Long queUsrId, final Long voteSessionUid) { + @Override + public Set getAttemptsForUserAndSession(final Long queUsrId, final Long sessionUid) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_SESSION).setLong("queUsrId", - queUsrId.longValue()).list(); + List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_SESSION) + .setLong("queUsrId", queUsrId.longValue()).setLong("sessionUid", sessionUid.longValue()).list(); - Set userEntries = new HashSet(); - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); + Set userEntries = new HashSet(); + if ((list != null) && (list.size() > 0)) { + Iterator listIterator = list.iterator(); while (listIterator.hasNext()) { - VoteUsrAttempt attempt = (VoteUsrAttempt) listIterator.next(); + VoteUsrAttempt attempt = listIterator.next(); - if (attempt.getVoteQueUsr().getVoteSession().getUid().toString().equals(voteSessionUid.toString())) { - Long questionUid = attempt.getVoteQueContent().getUid(); - if (!questionUid.toString().equals("1")) { - userEntries.add(attempt.getVoteQueContent().getQuestion()); - } + Long questionUid = attempt.getVoteQueContent().getUid(); + if (!questionUid.toString().equals("1")) { + userEntries.add(attempt.getVoteQueContent().getQuestion()); } } } return userEntries; } - public Set getAttemptsForUserAndSessionUseOpenAnswer(final Long queUsrId, final Long voteSessionId) { + @Override + public Set getAttemptsForUserAndSessionUseOpenAnswer(final Long queUsrId, final Long sessionUid) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_SESSION).setLong("queUsrId", - queUsrId.longValue()).list(); + List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_ATTEMPT_FOR_USER_AND_SESSION) + .setLong("queUsrId", queUsrId.longValue()).setLong("sessionUid", sessionUid.longValue()).list(); String openAnswer = ""; - Set userEntries = new HashSet(); - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); + Set userEntries = new HashSet(); + if ((list != null) && (list.size() > 0)) { + Iterator listIterator = list.iterator(); while (listIterator.hasNext()) { - VoteUsrAttempt attempt = (VoteUsrAttempt) listIterator.next(); + VoteUsrAttempt attempt = listIterator.next(); - if (attempt.getVoteQueUsr().getVoteSession().getUid().toString().equals(voteSessionId.toString())) { - Long questionUid = attempt.getVoteQueContent().getUid(); - if (!questionUid.toString().equals("1")) { - userEntries.add(attempt.getVoteQueContent().getQuestion()); - } else { - //this is a user entered vote - if (attempt.getUserEntry().length() > 0) { - openAnswer = attempt.getUserEntry(); - //adding openAnswer to userEntries - userEntries.add(openAnswer); - } - + Long questionUid = attempt.getVoteQueContent().getUid(); + if (!questionUid.toString().equals("1")) { + userEntries.add(attempt.getVoteQueContent().getQuestion()); + } else { + // this is a user entered vote + if (attempt.getUserEntry().length() > 0) { + openAnswer = attempt.getUserEntry(); + // adding openAnswer to userEntries + userEntries.add(openAnswer); } } @@ -282,41 +268,21 @@ return userEntries; } - public List getUserRecords(final String userEntry) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_USER_ENTRY_RECORDS).setString("userEntry", - userEntry).list(); - return list; - } - - public List getUserEnteredVotesForSession(final String userEntry, final Long voteSessionUid) { - List list = getSession().createQuery(VoteUsrAttemptDAO.LOAD_USER_ENTRY_RECORDS).setString("userEntry", - userEntry).list(); - - List sessionUserEntries = new ArrayList(); - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); - while (listIterator.hasNext()) { - VoteUsrAttempt attempt = (VoteUsrAttempt) listIterator.next(); - if (attempt.getVoteQueUsr().getVoteSession().getUid().toString().equals(voteSessionUid.toString())) { - sessionUserEntries.add(attempt.getUserEntry()); - } - } - } - return sessionUserEntries; - } - + @Override public int getSessionEntriesCount(final Long voteSessionUid) { - List result = getSession().createQuery(VoteUsrAttemptDAO.COUNT_ENTRIES_BY_SESSION_ID).setLong("voteSessionUid", - voteSessionUid).list(); + List result = getSession().createQuery(VoteUsrAttemptDAO.COUNT_ENTRIES_BY_SESSION_ID) + .setLong("voteSessionUid", voteSessionUid).list(); Long resultLong = result.get(0) != null ? (Long) result.get(0) : new Long(0); return resultLong.intValue(); } + @Override public void updateVoteUsrAttempt(VoteUsrAttempt voteUsrAttempt) { this.getSession().setFlushMode(FlushMode.AUTO); this.getHibernateTemplate().update(voteUsrAttempt); } + @Override public void removeVoteUsrAttempt(VoteUsrAttempt voteUsrAttempt) { this.getSession().setFlushMode(FlushMode.AUTO); this.getHibernateTemplate().delete(voteUsrAttempt); 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.48 -r1.49 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java 29 Jan 2014 20:20:41 -0000 1.48 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java 6 Feb 2014 22:07:15 -0000 1.49 @@ -98,7 +98,7 @@ */ LinkedList getSessionDTOs(Long toolContentID); - List processUserEnteredNominations(VoteContent voteContent, String currentSessionId, + List processUserEnteredNominations(Long voteContentUid, String currentSessionId, boolean showUserEntriesBySession, String userId, boolean showUserEntriesByUserId); List getReflectionData(VoteContent voteContent, Long userID); @@ -115,8 +115,6 @@ void createVoteQueUsr(VoteQueUsr voteQueUsr) throws VoteApplicationException; - List getUserEnteredVotesForSession(final String userEntry, final Long voteSessionUid); - VoteQueUsr getVoteUserBySession(final Long queUsrId, final Long sessionUid) throws VoteApplicationException; @@ -129,16 +127,14 @@ VoteQueContent getQuestionContentByDisplayOrder(final Long displayOrder, final Long voteContentUid) throws VoteApplicationException; - Set getAttemptsForUserAndSessionUseOpenAnswer(final Long userUid, final Long sessionUid); + Set getAttemptsForUserAndSessionUseOpenAnswer(final Long userUid, final Long sessionUid); Set getSessionUserEntriesSet(final Long voteSessionUid) throws VoteApplicationException; void createVoteUsrAttempt(VoteUsrAttempt voteUsrAttempt) throws VoteApplicationException; void updateVoteUsrAttempt(VoteUsrAttempt voteUsrAttempt) throws VoteApplicationException; - List getUserRecords(final String userEntry) throws VoteApplicationException; - List getUserBySessionOnly(final VoteSession voteSession) throws VoteApplicationException; void hideOpenVote(VoteUsrAttempt voteUsrAttempt) throws VoteApplicationException; @@ -153,7 +149,7 @@ int getUserEnteredVotesCountForContent(final Long voteContentUid) throws VoteApplicationException; - List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, + List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, final Long voteSessionUid); int getStandardAttemptsForQuestionContentAndSessionUid(final Long voteQueContentId, final Long voteSessionId) @@ -185,12 +181,8 @@ void cleanAllQuestions(final Long voteContentUid) throws VoteApplicationException; - Set getUserEntries() throws VoteApplicationException; - List getStandardAttemptsForQuestionContentAndContentUid(final Long voteQueContentId); - List getSessionUserEntries(final Long voteSessionId) throws VoteApplicationException; - VoteQueContent getQuestionContentByQuestionText(final String question, final Long voteContentUid); void removeVoteQueContentByUID(Long uid) throws VoteApplicationException; @@ -199,7 +191,7 @@ void updateVoteUser(VoteQueUsr voteUser) throws VoteApplicationException; - void removeAttemptsForUserandSession(final Long queUsrId, final Long voteSessionId) + void removeAttemptsForUserandSession(final Long queUsrId, final Long sessionUid) throws VoteApplicationException; List getAllQuestionEntries(final Long voteContentId) throws VoteApplicationException; @@ -286,7 +278,7 @@ List getSessionsFromContent(VoteContent mcContent) throws VoteApplicationException; - Set getAttemptsForUserAndSession(final Long queUsrId, final Long voteSessionUid) + Set getAttemptsForUserAndSession(final Long queUsrId, final Long voteSessionUid) throws VoteApplicationException; Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry); 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.78 -r1.79 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java 2 Feb 2014 17:19:34 -0000 1.78 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java 6 Feb 2014 22:07:15 -0000 1.79 @@ -296,7 +296,7 @@ VoteContent voteContent = this.retrieveVote(toolContentID); int entriesCount = 0; - Set userEntries = null; + Set userEntries = null; if (toolSessionUid != null) { entriesCount = this.getSessionEntriesCount(toolSessionUid); userEntries = this.getSessionUserEntriesSet(toolSessionUid); @@ -428,7 +428,7 @@ sessionDTO.setMapStandardQuestionUid(mapStandardQuestionUid); sessionDTO.setMapStandardToolSessionUid(mapStandardToolSessionUid); - List openVotes = this.processUserEnteredNominations(voteContent, session + List openVotes = this.processUserEnteredNominations(voteContent.getUid(), session .getVoteSessionId().toString(), true, null, false); sessionDTO.setOpenVotes(openVotes); boolean isExistsOpenVote = openVotes.size() > 0; @@ -521,9 +521,9 @@ } @Override - public List processUserEnteredNominations(VoteContent voteContent, - String currentSessionId, boolean showUserEntriesBySession, String userId, boolean showUserEntriesByUserId) { - Set userEntries = this.getUserEntries(); + public List processUserEnteredNominations(Long voteContentUid, String currentSessionId, + boolean showUserEntriesBySession, String userId, boolean showUserEntriesByUserId) { + Set userEntries = voteUsrAttemptDAO.getUserEntries(voteContentUid); List listUserEntries = new LinkedList(); @@ -535,60 +535,34 @@ VoteMonitoredAnswersDTO voteMonitoredAnswersDTO = new VoteMonitoredAnswersDTO(); voteMonitoredAnswersDTO.setQuestion(userEntry); - List userRecords = this.getUserRecords(userEntry); + List userRecords = voteUsrAttemptDAO.getUserRecords(voteContentUid, userEntry); List listMonitoredUserContainerDTO = new LinkedList(); Iterator itUserRecords = userRecords.iterator(); while (itUserRecords.hasNext()) { VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); VoteUsrAttempt voteUsrAttempt = (VoteUsrAttempt) itUserRecords.next(); - VoteSession localUserSession = voteUsrAttempt.getVoteQueUsr().getVoteSession(); - - if (showUserEntriesBySession == false) { - if (voteContent.getUid().toString().equals(localUserSession.getVoteContentId().toString())) { - 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()); - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - } + if (!showUserEntriesBySession) { + 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()); + listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); + } else { // showUserEntriesBySession is true: the case with learner export portfolio - // show user entries by same content and same session and same user + // show user entries by same same session and same user String userSessionId = voteUsrAttempt.getVoteQueUsr().getVoteSession().getVoteSessionId() .toString(); - if (showUserEntriesByUserId == true) { - if (voteContent.getUid().toString().equals(localUserSession.getVoteContentId().toString())) { - 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 content and same session - if (voteContent.getUid().toString().equals(localUserSession.getVoteContentId().toString())) { - if (userSessionId.equals(currentSessionId)) { + 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()); @@ -598,8 +572,25 @@ 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()); + } } } @@ -738,7 +729,7 @@ } } - public List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, + public List getStandardAttemptUsersForQuestionContentAndSessionUid(final Long voteQueContentId, final Long voteSessionUid) { try { return voteUsrAttemptDAO.getStandardAttemptUsersForQuestionContentAndSessionUid(voteQueContentId, @@ -749,17 +740,8 @@ } } - public Set getUserEntries() throws VoteApplicationException { + public Set getAttemptsForUserAndSessionUseOpenAnswer(final Long userUid, final Long sessionUid) { try { - return voteUsrAttemptDAO.getUserEntries(); - } catch (DataAccessException e) { - throw new VoteApplicationException( - "Exception occured when lams is getting user entries: " + e.getMessage(), e); - } - } - - public Set getAttemptsForUserAndSessionUseOpenAnswer(final Long userUid, final Long sessionUid) { - try { return voteUsrAttemptDAO.getAttemptsForUserAndSessionUseOpenAnswer(userUid, sessionUid); } catch (DataAccessException e) { throw new VoteApplicationException( @@ -769,27 +751,18 @@ } - public List getSessionUserEntries(final Long voteSessionUid) throws VoteApplicationException { - try { - return voteUsrAttemptDAO.getSessionUserEntries(voteSessionUid); - } catch (DataAccessException e) { - throw new VoteApplicationException("Exception occured when lams is getting session user entries: " - + e.getMessage(), e); - } - } - - public Set getAttemptsForUserAndSession(final Long queUsrUid, final Long voteSessionUid) + public Set getAttemptsForUserAndSession(final Long queUsrUid, final Long sessionUid) throws VoteApplicationException { try { - return voteUsrAttemptDAO.getAttemptsForUserAndSession(queUsrUid, voteSessionUid); + return voteUsrAttemptDAO.getAttemptsForUserAndSession(queUsrUid, sessionUid); } catch (DataAccessException e) { throw new VoteApplicationException("Exception occured when lams is getting user entries: " + e.getMessage(), e); } } - public Set getSessionUserEntriesSet(final Long voteSessionUid) throws VoteApplicationException { + public Set getSessionUserEntriesSet(final Long voteSessionUid) throws VoteApplicationException { try { return voteUsrAttemptDAO.getSessionUserEntriesSet(voteSessionUid); } catch (DataAccessException e) { @@ -870,14 +843,14 @@ } } - public int getVoteSessionPotentialLearnersCount(Long voteSessionId) throws VoteApplicationException { + public int getVoteSessionPotentialLearnersCount(Long sessionUid) throws VoteApplicationException { try { - VoteSession session = voteSessionDAO.getVoteSessionByUID(voteSessionId); + VoteSession session = voteSessionDAO.getVoteSessionByUID(sessionUid); if (session != null) { - Set potentialLearners = toolService.getAllPotentialLearners(session.getVoteSessionId().longValue()); + Set potentialLearners = toolService.getAllPotentialLearners(session.getVoteSessionId().longValue()); return potentialLearners != null ? potentialLearners.size() : 0; } else { - VoteServicePOJO.logger.error("Unable to find vote session record id=" + voteSessionId + VoteServicePOJO.logger.error("Unable to find vote session record id=" + sessionUid + ". Returning 0 users."); return 0; } @@ -994,15 +967,6 @@ } } - public List getUserRecords(final String userEntry) throws VoteApplicationException { - try { - return voteUsrAttemptDAO.getUserRecords(userEntry); - } catch (DataAccessException e) { - throw new VoteApplicationException("Exception occured when lams is getting user records for user entry: " - + e.getMessage(), e); - } - } - public VoteUsrAttempt getAttemptForUserAndQuestionContentAndSession(final Long queUsrId, final Long voteQueContentId, final Long toolSessionUid) throws VoteApplicationException { try { @@ -1023,10 +987,10 @@ } } - public void removeAttemptsForUserandSession(final Long queUsrId, final Long voteSessionId) + public void removeAttemptsForUserandSession(final Long queUsrId, final Long sessionUid) throws VoteApplicationException { try { - voteUsrAttemptDAO.removeAttemptsForUserandSession(queUsrId, voteSessionId); + voteUsrAttemptDAO.removeAttemptsForUserandSession(queUsrId, sessionUid); } catch (DataAccessException e) { throw new VoteApplicationException("Exception occured when lams is removing by user and votesession id : " + e.getMessage(), e); @@ -1043,16 +1007,6 @@ } - public List getUserEnteredVotesForSession(final String userEntry, final Long voteSessionUid) { - try { - return voteUsrAttemptDAO.getUserEnteredVotesForSession(userEntry, voteSessionUid); - } catch (DataAccessException e) { - throw new VoteApplicationException( - "Exception occured when lams is getting user entered votes for session: " + e.getMessage(), e); - } - - } - public int getUserEnteredVotesCountForContent(final Long voteContentUid) throws VoteApplicationException { try { return voteUsrAttemptDAO.getUserEnteredVotesCountForContent(voteContentUid); 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.31 -r1.32 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java 29 Jan 2014 20:20:41 -0000 1.31 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java 6 Feb 2014 22:07:15 -0000 1.32 @@ -47,13 +47,10 @@ import org.lamsfoundation.lams.web.servlet.AbstractExportPortfolioServlet; /** - *

* Enables exporting portfolio for teacher and learner modes. - *

* * @author Ozgur Demirtas */ - public class ExportServlet extends AbstractExportPortfolioServlet implements VoteAppConstants { static Logger logger = Logger.getLogger(ExportServlet.class.getName()); private static final long serialVersionUID = -1529093489007108983L; @@ -82,7 +79,6 @@ exportPortfolioDTO.setPortfolioExportMode("learner"); IVoteService voteService = VoteServiceProxy.getVoteService(getServletContext()); - MessageService messageService = VoteServiceProxy.getMessageService(getServletContext()); if ((userID == null) || (toolSessionID == null)) { String error = "Tool session Id or user Id is null. Unable to continue"; @@ -111,8 +107,8 @@ VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO(); - VoteMonitoringStarterAction.refreshSummaryData(request, content, voteService, true, true, - toolSessionID.toString(), userID.toString(), true, null, voteGeneralMonitoringDTO, + VoteMonitoringStarterAction.refreshSummaryData(request, content, voteService, true, + toolSessionID.toString(), userID.toString(), true, voteGeneralMonitoringDTO, exportPortfolioDTO); List reflectionsContainerDTO = voteService.getReflectionData(content, userID); @@ -130,9 +126,7 @@ public void teacher(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { ExportPortfolioDTO exportPortfolioDTO = new ExportPortfolioDTO(); exportPortfolioDTO.setPortfolioExportMode("teacher"); - IVoteService voteService = VoteServiceProxy.getVoteService(getServletContext()); - MessageService messageService = VoteServiceProxy.getMessageService(getServletContext()); if (toolContentID == null) { String error = "Tool Content Id is missing. Unable to continue"; @@ -141,7 +135,6 @@ } VoteContent content = voteService.retrieveVote(toolContentID); - if (content == null) { String error = "Data is missing from the database. Unable to Continue"; ExportServlet.logger.error(error); @@ -152,7 +145,7 @@ VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO(); - VoteMonitoringStarterAction.refreshSummaryData(request, content, voteService, true, false, null, null, false, null, + VoteMonitoringStarterAction.refreshSummaryData(request, content, voteService, false, null, null, false, voteGeneralMonitoringDTO, exportPortfolioDTO); request.getSession().setAttribute(VoteAppConstants.EXPORT_PORTFOLIO_DTO, exportPortfolioDTO); 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.55 -r1.56 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java 28 Jan 2014 23:05:51 -0000 1.55 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java 6 Feb 2014 22:07:15 -0000 1.56 @@ -72,285 +72,6 @@ */ public class MonitoringUtil implements VoteAppConstants { - /** - * groups user's votes - */ - public static Map buildGroupsAttemptData(HttpServletRequest request, VoteContent voteContent, - VoteQueContent voteQueContent, String questionUid, boolean isUserNamesVisible, boolean isLearnerRequest, - String currentSessionId, String userId, IVoteService voteService) { - - List> listMonitoredAttemptsContainerDTO = new LinkedList>(); - - Map summaryToolSessions = populateToolSessionsId(voteContent, voteService); - - /* request is for monitoring summary */ - if (!isLearnerRequest) { - 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 = populateSessionUsersAttempts(request, - voteContent, voteSession.getVoteSessionId(), users, questionUid, isUserNamesVisible, - isLearnerRequest, userId, voteService); - listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); - } - } - } - -// //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 = populateSessionUsersAttempts( - request, voteContent, voteSession.getVoteSessionId(), listUsers, questionUid, - isUserNamesVisible, isLearnerRequest, userId, voteService); - listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); - } - } - } - } - } - - Map mapMonitoredAttemptsContainerDTO = convertToMap(listMonitoredAttemptsContainerDTO); - return mapMonitoredAttemptsContainerDTO; - } - - public static Map populateSessionUsersAttempts(HttpServletRequest request, - VoteContent voteContent, Long sessionId, List listUsers, String questionUid, boolean isUserNamesVisible, - boolean isLearnerRequest, String userId, IVoteService voteService) { - - List listMonitoredUserContainerDTO = new LinkedList(); - Iterator itUsers = listUsers.iterator(); - - if (userId == null) { - if ((isUserNamesVisible) && (!isLearnerRequest)) { - while (itUsers.hasNext()) { - VoteQueUsr voteQueUsr = (VoteQueUsr) itUsers.next(); - - if (voteQueUsr != null) { - List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), - new Long(questionUid)); - - Iterator itAttempts = listUserAttempts.iterator(); - while (itAttempts.hasNext()) { - VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); - - if (voteUsrResp != null) { - VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); - voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); - voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); - voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); - voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); - - voteMonitoredUserDTO.setQuestionUid(questionUid); - - VoteQueContent voteQueContent = voteUsrResp.getVoteQueContent(); - String entry = voteQueContent.getQuestion(); - - Long voteQuestionUid = voteUsrResp.getVoteQueContent().getUid(); - String voteQueContentId = voteQuestionUid.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"))) { - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - } else { - voteMonitoredUserDTO.setResponse(voteQueContent.getQuestion()); - } - } - } - - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - } - } - } - } - } else if ((isUserNamesVisible) && (isLearnerRequest)) { - // summary reporting case 2 - // just populating data normally just like monitoring summary, except that the data is ony for a - // specific session - String userID = (String) request.getSession().getAttribute(USER_ID); - VoteQueUsr voteQueUsr = voteService.getVoteQueUsrById(new Long(userID).longValue()); - - while (itUsers.hasNext()) { - voteQueUsr = (VoteQueUsr) itUsers.next(); - - if (voteQueUsr != null) { - List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), - new Long(questionUid)); - - Iterator itAttempts = listUserAttempts.iterator(); - while (itAttempts.hasNext()) { - VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); - - if (voteUsrResp != null) { - VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); - voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); - voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); - voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); - voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); - voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setQuestionUid(questionUid); - - VoteQueContent voteQueContent = voteUsrResp.getVoteQueContent(); - String entry = voteQueContent.getQuestion(); - String voteQueContentId = 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"))) { - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - } else { - voteMonitoredUserDTO.setResponse(voteQueContent.getQuestion()); - } - } - } - - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - } - } - } - } - } else if ((!isUserNamesVisible) && (isLearnerRequest)) { - // summary reporting case 3 - // populating data normally exception are for a specific session and other user names are not visible - String userID = (String) request.getSession().getAttribute(USER_ID); - - while (itUsers.hasNext()) { - VoteQueUsr voteQueUsr = (VoteQueUsr) itUsers.next(); - - if (voteQueUsr != null) { - List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), - new Long(questionUid)); - - Iterator itAttempts = listUserAttempts.iterator(); - while (itAttempts.hasNext()) { - VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); - - if (voteUsrResp != null) { - VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); - voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); - voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); - - if (userID.equals(voteQueUsr.getQueUsrId().toString())) { - voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); - } else { - voteMonitoredUserDTO.setUserName("[ ]"); - } - - voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); - voteMonitoredUserDTO.setSessionId(sessionId.toString()); - - voteMonitoredUserDTO.setQuestionUid(questionUid); - voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); - - VoteQueContent voteQueContent = voteUsrResp.getVoteQueContent(); - String entry = voteQueContent.getQuestion(); - - String voteQueContentId = 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"))) { - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - } else { - voteMonitoredUserDTO.setResponse(voteQueContent.getQuestion()); - } - } - } - - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - - } - } - } - } - } - } else { - // summary reporting case 4 - // request is for learner progress report userId - while (itUsers.hasNext()) { - VoteQueUsr voteQueUsr = (VoteQueUsr) itUsers.next(); - - if (voteQueUsr != null) { - List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), - new Long(questionUid)); - - Iterator itAttempts = listUserAttempts.iterator(); - while (itAttempts.hasNext()) { - VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); - - if (voteUsrResp != null) { - if (userId.equals(voteQueUsr.getQueUsrId().toString())) { - // this is the user requested , include his name for learner progress - VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); - voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); - voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); - voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); - voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); - voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setQuestionUid(questionUid); - - VoteQueContent voteQueContent = voteUsrResp.getVoteQueContent(); - String entry = voteQueContent.getQuestion(); - - String voteQueContentId = 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"))) { - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - } else { - voteMonitoredUserDTO.setResponse(voteQueContent.getQuestion()); - } - } - } - - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - } - } - } - } - } - - } - - Map mapMonitoredUserContainerDTO = convertToVoteMonitoredUserDTOMap(listMonitoredUserContainerDTO); - return mapMonitoredUserContainerDTO; - } - public static Map populateToolSessionsId(VoteContent voteContent, IVoteService voteService) { List sessionIds = voteService.getSessionsFromContent(voteContent); @@ -476,177 +197,6 @@ } } - public static Map populateSessionUsersAttempts(HttpServletRequest request, IVoteService voteService, - Long sessionId, List users, String questionUid, boolean isUserNamesVisible, - boolean isLearnerRequest, String userId) { - - List listMonitoredUserContainerDTO = new LinkedList(); - Iterator itUsers = users.iterator(); - - if (userId == null) { - if ((isUserNamesVisible) && (!isLearnerRequest)) { - while (itUsers.hasNext()) { - VoteQueUsr voteQueUsr = (VoteQueUsr) itUsers.next(); - - if (voteQueUsr != null) { - List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), - new Long(questionUid)); - - Iterator itAttempts = listUserAttempts.iterator(); - while (itAttempts.hasNext()) { - VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); - - if (voteUsrResp != null) { - VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); - // voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimezone()); - voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); - voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); - voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); - voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - - String responsePresentable = VoteUtils.replaceNewLines(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setResponsePresentable(responsePresentable); - - voteMonitoredUserDTO.setQuestionUid(questionUid); - voteMonitoredUserDTO.setVisible(new Boolean(voteUsrResp.isVisible()).toString()); - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - } - } - } - } - } else if ((isUserNamesVisible) && (isLearnerRequest)) { - // just populating data normally just like monitoring summary, except that the data is ony for a - // specific session - - String userID = VoteUtils.getCurrentLearnerID(); - VoteQueUsr voteQueUsr = voteService.getVoteQueUsrById(new Long(userID).longValue()); - - while (itUsers.hasNext()) { - voteQueUsr = (VoteQueUsr) itUsers.next(); - - if (voteQueUsr != null) { - List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), - new Long(questionUid)); - - Iterator itAttempts = listUserAttempts.iterator(); - while (itAttempts.hasNext()) { - VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); - - if (voteUsrResp != null) { - VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); - // voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimezone()); - voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); - voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); - voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); - voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - - String responsePresentable = VoteUtils.replaceNewLines(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setResponsePresentable(responsePresentable); - - voteMonitoredUserDTO.setQuestionUid(questionUid); - voteMonitoredUserDTO.setVisible(new Boolean(voteUsrResp.isVisible()).toString()); - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - } - } - } - } - } else if ((!isUserNamesVisible) && (isLearnerRequest)) { - // populating data normally exception are for a specific session and other user names are not visible - // getting only current user's data - - String userID = VoteUtils.getCurrentLearnerID(); - while (itUsers.hasNext()) { - VoteQueUsr voteQueUsr = (VoteQueUsr) itUsers.next(); - - if (voteQueUsr != null) { - List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), - new Long(questionUid)); - - Iterator itAttempts = listUserAttempts.iterator(); - while (itAttempts.hasNext()) { - VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); - - if (voteUsrResp != null) { - VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); - // voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimezone()); - voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); - - if (userID.equals(voteQueUsr.getQueUsrId().toString())) { - voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); - } else { - voteMonitoredUserDTO.setUserName(" "); - } - - voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); - voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - - String responsePresentable = VoteUtils.replaceNewLines(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setResponsePresentable(responsePresentable); - - voteMonitoredUserDTO.setQuestionUid(questionUid); - voteMonitoredUserDTO.setVisible(new Boolean(voteUsrResp.isVisible()).toString()); - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - } - } - } - } - } - } else { - // request is for learner progress report - while (itUsers.hasNext()) { - VoteQueUsr voteQueUsr = (VoteQueUsr) itUsers.next(); - - if (voteQueUsr != null) { - List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), - new Long(questionUid)); - - Iterator itAttempts = listUserAttempts.iterator(); - while (itAttempts.hasNext()) { - VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); - - if (voteUsrResp != null) { - if (userId.equals(voteQueUsr.getQueUsrId().toString())) { - VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); - voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); - // voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimezone()); - voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); - voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); - voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); - voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - - String responsePresentable = VoteUtils.replaceNewLines(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setResponsePresentable(responsePresentable); - - voteMonitoredUserDTO.setQuestionUid(questionUid); - voteMonitoredUserDTO.setVisible(new Boolean(voteUsrResp.isVisible()).toString()); - listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); - } - } - } - } - } - - } - - //convertToMcMonitoredUserDTOMap - Map mapMonitoredUserContainerDTO = new TreeMap(new VoteStringComparator()); - Iterator listIterator = listMonitoredUserContainerDTO.iterator(); - Long mapIndex = new Long(1); - while (listIterator.hasNext()) { - VoteMonitoredUserDTO data = (VoteMonitoredUserDTO) listIterator.next(); - mapMonitoredUserContainerDTO.put(mapIndex.toString(), data); - mapIndex = new Long(mapIndex.longValue() + 1); - } - return mapMonitoredUserContainerDTO; - } - public static void repopulateRequestParameters(HttpServletRequest request, VoteMonitoringForm voteMonitoringForm, VoteGeneralMonitoringDTO voteGeneralMonitoringDTO) { 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.55 -r1.56 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java 28 Jan 2014 23:05:51 -0000 1.55 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java 6 Feb 2014 22:07:15 -0000 1.56 @@ -136,7 +136,7 @@ existingVoteQueUsr.setFinalScreenRequested(true); voteService.updateVoteUser(existingVoteQueUsr); - Set userAttempts = voteService.getAttemptsForUserAndSession(existingVoteQueUsr.getUid(), toolSessionUid); + Set userAttempts = voteService.getAttemptsForUserAndSession(existingVoteQueUsr.getUid(), toolSessionUid); request.setAttribute(LIST_GENERAL_CHECKED_OPTIONS_CONTENT, userAttempts); voteService.prepareChartData(request, toolContentID, toolSessionUid, voteGeneralLearnerFlowDTO); 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.56 -r1.57 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 28 Jan 2014 23:05:51 -0000 1.56 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 6 Feb 2014 22:07:15 -0000 1.57 @@ -261,7 +261,7 @@ Long sessionUid = user.getVoteSessionId(); putMapQuestionsContentIntoRequest(request, voteService, user); - Set userAttempts = voteService.getAttemptsForUserAndSessionUseOpenAnswer(user.getUid(), sessionUid); + Set userAttempts = voteService.getAttemptsForUserAndSessionUseOpenAnswer(user.getUid(), sessionUid); request.setAttribute(VoteAppConstants.LIST_GENERAL_CHECKED_OPTIONS_CONTENT, userAttempts); // since this is progress view, present a screen which can not be edited 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.55 -r1.56 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java 29 Jan 2014 20:20:41 -0000 1.55 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java 6 Feb 2014 22:07:15 -0000 1.56 @@ -60,6 +60,7 @@ 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.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; @@ -386,9 +387,9 @@ .getValue().toString())); if (voteSession2 != null) { List listUsers = voteService.getUserBySessionOnly(voteSession2); - Map sessionUsersAttempts = MonitoringUtil.populateSessionUsersAttempts( + Map sessionUsersAttempts = VoteMonitoringAction.populateSessionUsersAttempts( request, voteService, voteSession2.getVoteSessionId(), listUsers, - questionUid, true, false, null); + questionUid); listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); } } @@ -398,9 +399,8 @@ List listUsers = voteService.getUserBySessionOnly(voteSession); - Map sessionUsersAttempts = MonitoringUtil.populateSessionUsersAttempts(request, - voteService, new Long(currentSessionId), listUsers, questionUid, true, false, - null); + Map sessionUsersAttempts = VoteMonitoringAction.populateSessionUsersAttempts(request, + voteService, new Long(currentSessionId), listUsers, questionUid); listMonitoredAttemptsContainerDTO.add(sessionUsersAttempts); } } @@ -426,6 +426,56 @@ return mapping.findForward(VoteAppConstants.LOAD_MONITORING); } + private static Map populateSessionUsersAttempts(HttpServletRequest request, IVoteService voteService, + Long sessionId, List users, String questionUid) { + + List listMonitoredUserContainerDTO = new LinkedList(); + Iterator itUsers = users.iterator(); + + while (itUsers.hasNext()) { + VoteQueUsr voteQueUsr = (VoteQueUsr) itUsers.next(); + + if (voteQueUsr != null) { + List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), new Long( + questionUid)); + + Iterator itAttempts = listUserAttempts.iterator(); + while (itAttempts.hasNext()) { + VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); + + if (voteUsrResp != null) { + VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); + voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); + // voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimezone()); + voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); + voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); + voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); + voteMonitoredUserDTO.setSessionId(sessionId.toString()); + voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + + String responsePresentable = VoteUtils.replaceNewLines(voteUsrResp.getUserEntry()); + voteMonitoredUserDTO.setResponsePresentable(responsePresentable); + + voteMonitoredUserDTO.setQuestionUid(questionUid); + voteMonitoredUserDTO.setVisible(new Boolean(voteUsrResp.isVisible()).toString()); + listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); + } + } + } + } + + //convertToMcMonitoredUserDTOMap + Map mapMonitoredUserContainerDTO = new TreeMap(new VoteStringComparator()); + Iterator listIterator = listMonitoredUserContainerDTO.iterator(); + Long mapIndex = new Long(1); + while (listIterator.hasNext()) { + VoteMonitoredUserDTO data = (VoteMonitoredUserDTO) listIterator.next(); + mapMonitoredUserContainerDTO.put(mapIndex.toString(), data); + mapIndex = new Long(mapIndex.longValue() + 1); + } + return mapMonitoredUserContainerDTO; + } + public void prepareEditActivityScreenData(HttpServletRequest request, VoteContent voteContent) { VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO(); 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.44 -r1.45 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 29 Jan 2014 20:20:41 -0000 1.44 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 6 Feb 2014 22:07:15 -0000 1.45 @@ -30,6 +30,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeMap; +import java.util.Map.Entry; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -54,11 +55,14 @@ 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.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.util.MessageService; @@ -157,8 +161,8 @@ request.setAttribute(TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size())); - VoteMonitoringStarterAction.refreshSummaryData(request, voteContent, voteService, true, false, null, null, false, - null, voteGeneralMonitoringDTO, null); + VoteMonitoringStarterAction.refreshSummaryData(request, voteContent, voteService, false, null, null, false, + voteGeneralMonitoringDTO, null); voteGeneralMonitoringDTO.setExistsOpenVotes(new Boolean(false).toString()); @@ -210,10 +214,10 @@ return mapping.findForward(VoteAppConstants.LOAD_MONITORING); } - public static void refreshSummaryData(HttpServletRequest request, VoteContent voteContent, IVoteService voteService, - boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId, - boolean showUserEntriesBySession, VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO, - VoteGeneralMonitoringDTO voteGeneralMonitoringDTO, ExportPortfolioDTO exportPortfolioDTO) { + public static void refreshSummaryData(HttpServletRequest request, VoteContent voteContent, + IVoteService voteService, boolean isLearnerRequest, String currentSessionId, String userId, + boolean showUserEntriesBySession, VoteGeneralMonitoringDTO voteGeneralMonitoringDTO, + ExportPortfolioDTO exportPortfolioDTO) { /* this section is related to summary tab. Starts here. */ @@ -245,24 +249,71 @@ voteMonitoredAnswersDTO.setQuestionUid(voteQueContent.getUid().toString()); voteMonitoredAnswersDTO.setQuestion(voteQueContent.getQuestion()); - Map questionAttemptData = MonitoringUtil.buildGroupsAttemptData(request, voteContent, voteQueContent, - voteQueContent.getUid().toString(), isUserNamesVisible, isLearnerRequest, currentSessionId, - userId, voteService); + String questionUid = voteQueContent.getUid().toString(); + + List> listMonitoredAttemptsContainerDTO = new LinkedList>(); + + Map summaryToolSessions = MonitoringUtil.populateToolSessionsId(voteContent, voteService); + + /* request is for monitoring summary */ + if (!isLearnerRequest) { + 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); + } + } + } + +// //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, + List listUserEntries = voteService.processUserEnteredNominations(voteContent.getUid(), currentSessionId, showUserEntriesBySession, userId, isLearnerRequest); - if (voteGeneralLearnerFlowDTO != null) { - voteGeneralLearnerFlowDTO.setListMonitoredAnswersContainerDto(listMonitoredAnswersContainerDTO); - voteGeneralLearnerFlowDTO.setListUserEntries(listUserEntries); - } - if (exportPortfolioDTO != null) { exportPortfolioDTO.setListMonitoredAnswersContainerDto(listMonitoredAnswersContainerDTO); exportPortfolioDTO.setListUserEntries(listUserEntries); @@ -316,7 +367,169 @@ MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent); } + + private static Map populateSessionUsersAttempts(HttpServletRequest request, + VoteContent voteContent, Long sessionId, List listUsers, String questionUid, boolean isLearnerRequest, + String userId, IVoteService voteService) { + List listMonitoredUserContainerDTO = new LinkedList(); + Iterator itUsers = listUsers.iterator(); + + if (userId == null) { + if (!isLearnerRequest) { + while (itUsers.hasNext()) { + VoteQueUsr voteQueUsr = (VoteQueUsr) itUsers.next(); + + if (voteQueUsr != null) { + List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), + new Long(questionUid)); + + Iterator itAttempts = listUserAttempts.iterator(); + while (itAttempts.hasNext()) { + VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); + + if (voteUsrResp != null) { + VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); + voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); + voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); + voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); + voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); + voteMonitoredUserDTO.setSessionId(sessionId.toString()); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + + voteMonitoredUserDTO.setQuestionUid(questionUid); + + VoteQueContent voteQueContent = voteUsrResp.getVoteQueContent(); + String entry = voteQueContent.getQuestion(); + + Long voteQuestionUid = voteUsrResp.getVoteQueContent().getUid(); + String voteQueContentId = voteQuestionUid.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"))) { + voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + } else { + voteMonitoredUserDTO.setResponse(voteQueContent.getQuestion()); + } + } + } + + listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); + } + } + } + } + } else { + // summary reporting case 2 + // just populating data normally just like monitoring summary, except that the data is ony for a + // specific session + String userID = (String) request.getSession().getAttribute(USER_ID); + VoteQueUsr voteQueUsr = voteService.getVoteQueUsrById(new Long(userID).longValue()); + + while (itUsers.hasNext()) { + voteQueUsr = (VoteQueUsr) itUsers.next(); + + if (voteQueUsr != null) { + List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), + new Long(questionUid)); + + Iterator itAttempts = listUserAttempts.iterator(); + while (itAttempts.hasNext()) { + VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); + + if (voteUsrResp != null) { + VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); + voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); + voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); + voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); + voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); + voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); + voteMonitoredUserDTO.setSessionId(sessionId.toString()); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + voteMonitoredUserDTO.setQuestionUid(questionUid); + + VoteQueContent voteQueContent = voteUsrResp.getVoteQueContent(); + String entry = voteQueContent.getQuestion(); + String voteQueContentId = 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"))) { + voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + } else { + voteMonitoredUserDTO.setResponse(voteQueContent.getQuestion()); + } + } + } + + listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); + } + } + } + } + } + } else { + // summary reporting case 4 + // request is for learner progress report userId + while (itUsers.hasNext()) { + VoteQueUsr voteQueUsr = (VoteQueUsr) itUsers.next(); + + if (voteQueUsr != null) { + List listUserAttempts = voteService.getAttemptsForUserAndQuestionContent(voteQueUsr.getUid(), + new Long(questionUid)); + + Iterator itAttempts = listUserAttempts.iterator(); + while (itAttempts.hasNext()) { + VoteUsrAttempt voteUsrResp = (VoteUsrAttempt) itAttempts.next(); + + if (voteUsrResp != null) { + if (userId.equals(voteQueUsr.getQueUsrId().toString())) { + // this is the user requested , include his name for learner progress + VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO(); + voteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime()); + voteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); + voteMonitoredUserDTO.setUid(voteUsrResp.getUid().toString()); + voteMonitoredUserDTO.setUserName(voteQueUsr.getFullname()); + voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); + voteMonitoredUserDTO.setSessionId(sessionId.toString()); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + voteMonitoredUserDTO.setQuestionUid(questionUid); + + VoteQueContent voteQueContent = voteUsrResp.getVoteQueContent(); + String entry = voteQueContent.getQuestion(); + + String voteQueContentId = 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"))) { + voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + } else { + voteMonitoredUserDTO.setResponse(voteQueContent.getQuestion()); + } + } + } + + listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); + } + } + } + } + } + + } + + Map mapMonitoredUserContainerDTO = MonitoringUtil.convertToVoteMonitoredUserDTOMap(listMonitoredUserContainerDTO); + return mapMonitoredUserContainerDTO; + } + private ActionForward validateParameters(HttpServletRequest request, ActionMapping mapping, VoteMonitoringForm voteMonitoringForm) { Index: lams_tool_vote/web/export/ExportContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/export/ExportContent.jsp,v diff -u -r1.22 -r1.23 --- lams_tool_vote/web/export/ExportContent.jsp 28 Jan 2014 23:05:52 -0000 1.22 +++ lams_tool_vote/web/export/ExportContent.jsp 6 Feb 2014 22:07:15 -0000 1.23 @@ -2,317 +2,113 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -  ( ) - - -
- - - - - - - - - - - - - - - - - - - -
- - - -
-
- - - - - - - - - - - - -  ( ) - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
-
-
  

  
- +
- - - - - + +

+ +

+
- - - - - - - - + +

+ +

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

+ : +

-
- - - + + + + + + + + +
  
: - -
- - - - - - - - - +
+ + + + + + + + + - - - - - - - - -
-
+ - - - -
  
: - -
- - - - - + + + +

+ : +

+ +
+ + + + - - - - - - - + + + + + + + -
+ + + +
+ + + +
-
+ - - - - - - - - - - - - - - - - -
-   -
- - - - - - - - - - - - - - - - - +
- - - -
- -
- : - - - - -
-
- +

+ +

+ + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
Index: lams_tool_vote/web/monitoring/AllSessionsSummary.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/monitoring/AllSessionsSummary.jsp,v diff -u -r1.25 -r1.26 --- lams_tool_vote/web/monitoring/AllSessionsSummary.jsp 29 Jan 2014 20:20:41 -0000 1.25 +++ lams_tool_vote/web/monitoring/AllSessionsSummary.jsp 6 Feb 2014 22:07:15 -0000 1.26 @@ -44,28 +44,32 @@ - - - - - - - - - - - - monitoring.do?dispatch=getVoteNomination&questionUid=${currentQuestionUid.value}&sessionUid=${sessionUidParam} - - - - - - - - - - + + + + + + + + + + + + + + + monitoring.do?dispatch=getVoteNomination&questionUid=${currentQuestionUid.value}&sessionUid=${sessionUidParam} + + + + + + + + + + +