Index: lams_tool_vote/conf/language/ApplicationResources.properties =================================================================== diff -u -r7e1e8414045a6435bbd09cb35b0058b1573389b2 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 7e1e8414045a6435bbd09cb35b0058b1573389b2) +++ lams_tool_vote/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -36,7 +36,7 @@ label.authoring.instructions =Instructions label.moveDown =Down label.other =Other -label.view.chart =View Session Votes Chart +label.view.chart =View Votes Chart button.delete =Delete label.fileContent =File Content count.total.user =Total Users Count: @@ -106,7 +106,8 @@ label.total.completed.students =Total number of students that completed voting: label.open.vote =Open vote label.total.votes =Total votes -label.select.session =Please select a session to view the votes summary. +label.select.session =Please select a group to view class votes summary +label.percent =% #======= End labels: Exported 96 labels for en AU ===== Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java =================================================================== diff -u -r7e1e8414045a6435bbd09cb35b0058b1573389b2 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java (.../IVoteUsrAttemptDAO.java) (revision 7e1e8414045a6435bbd09cb35b0058b1573389b2) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java (.../IVoteUsrAttemptDAO.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -53,6 +53,8 @@ public Set getSessionUserEntries(final Long voteSessionUid); + public int getCompletedSessionEntriesCount(final Long voteSessionUid); + public int getSessionEntriesCount(final Long voteSessionId); public int getSessionUserRecordsEntryCount(final String userEntry, final Long voteSessionUid, IVoteService voteService); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java =================================================================== diff -u -r7e1e8414045a6435bbd09cb35b0058b1573389b2 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java (.../VoteUsrAttemptDAO.java) (revision 7e1e8414045a6435bbd09cb35b0058b1573389b2) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java (.../VoteUsrAttemptDAO.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -444,6 +444,35 @@ } + public int getCompletedSessionEntriesCount(final Long voteSessionUid) + { + HibernateTemplate templ = this.getHibernateTemplate(); + List list = getSession().createQuery(LOAD_ALL_ENTRIES) + .list(); + + int completedSessionCount=0; + if(list != null && list.size() > 0){ + Iterator listIterator=list.iterator(); + while (listIterator.hasNext()) + { + VoteUsrAttempt attempt=(VoteUsrAttempt)listIterator.next(); + logger.debug("attempt: " + attempt); + if (attempt.getVoteQueUsr().getVoteSession().getUid().toString().equals(voteSessionUid.toString())) + { + String sessionStatus=attempt.getVoteQueUsr().getVoteSession().getSessionStatus(); + logger.debug("sessionStatus: " + sessionStatus); + if (sessionStatus.equals("COMPLETED")) + { + logger.debug("this is a completed session: " + sessionStatus); + ++completedSessionCount; + } + } + } + } + return completedSessionCount; + } + + public void updateVoteUsrAttempt(VoteUsrAttempt voteUsrAttempt) { this.getHibernateTemplate().update(voteUsrAttempt); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java =================================================================== diff -u -r7e1e8414045a6435bbd09cb35b0058b1573389b2 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java (.../IVoteService.java) (revision 7e1e8414045a6435bbd09cb35b0058b1573389b2) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java (.../IVoteService.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -91,6 +91,8 @@ public int getSessionEntriesCount(final Long voteSessionId) throws VoteApplicationException; + public int getCompletedSessionEntriesCount(final Long voteSessionUid) throws VoteApplicationException; + public int getUserRecordsEntryCount(final String userEntry) throws VoteApplicationException; public VoteUsrAttempt getAttemptsForUserAndQuestionContent(final Long queUsrId, final Long voteQueContentId) throws VoteApplicationException; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java =================================================================== diff -u -r7e1e8414045a6435bbd09cb35b0058b1573389b2 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision 7e1e8414045a6435bbd09cb35b0058b1573389b2) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -264,6 +264,20 @@ } + public int getCompletedSessionEntriesCount(final Long voteSessionUid) throws VoteApplicationException + { + try + { + return voteUsrAttemptDAO.getCompletedSessionEntriesCount(voteSessionUid); + } + catch (DataAccessException e) + { + throw new VoteApplicationException("Exception occured when lams is getting completed session user entries count: " + + e.getMessage(), + e); + } + } + public Set getSessionUserEntries(final Long voteSessionUid) throws VoteApplicationException { try Fisheye: Tag 7e1e8414045a6435bbd09cb35b0058b1573389b2 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ClearSessionAction.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java =================================================================== diff -u -r7e1e8414045a6435bbd09cb35b0058b1573389b2 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 7e1e8414045a6435bbd09cb35b0058b1573389b2) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -631,13 +631,14 @@ } - public static void prepareChartData(HttpServletRequest request, IVoteService voteService, Long toolContentId, Long toolSessionUid) + public static void prepareChartData(HttpServletRequest request, IVoteService voteService, VoteMonitoringForm voteMonitoringForm, Long toolContentId, Long toolSessionUid) { logger.debug("starting prepareChartData, toolContentId: " + toolContentId); logger.debug("starting prepareChartData, toolSessionUid: " + toolSessionUid); VoteContent voteContent=voteService.retrieveVote(toolContentId); logger.debug("starting prepareChartData, voteContent uid: " + voteContent.getUid()); + logger.debug("starting prepareChartData, voteMonitoringForm: " + voteMonitoringForm); logger.debug("existing voteContent:" + voteContent); Map mapOptionsContent= new TreeMap(new VoteComparator()); @@ -655,6 +656,16 @@ logger.debug("process for session: " + toolSessionUid); entriesCount=voteService.getSessionEntriesCount(toolSessionUid); userEntries=voteService.getSessionUserEntries(toolSessionUid); + logger.debug("sessionUserCount: " + userEntries.size()); + + int completedEntriesCount=voteService.getCompletedSessionEntriesCount(toolSessionUid); + logger.debug("completedEntriesCount: " + completedEntriesCount); + + if (voteMonitoringForm != null) + { + voteMonitoringForm.setSessionUserCount(new Integer(entriesCount).toString()); + voteMonitoringForm.setCompletedSessionUserCount(new Integer(completedEntriesCount).toString()); + } } else { Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java =================================================================== diff -u -r7e1e8414045a6435bbd09cb35b0058b1573389b2 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java (.../VoteAction.java) (revision 7e1e8414045a6435bbd09cb35b0058b1573389b2) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java (.../VoteAction.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -455,7 +455,7 @@ logger.debug("final duplicate status :" +request.getAttribute(USER_EXCEPTION_OPTIONS_DUPLICATE)); logger.debug("fwding to destination :" +destination); - //request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE); + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE); return (mapping.findForward(destination)); } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGenerator.java =================================================================== diff -u -r3a984c9bc1a3a01f8cd91635fb437dd44d07f950 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGenerator.java (.../VoteChartGenerator.java) (revision 3a984c9bc1a3a01f8cd91635fb437dd44d07f950) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGenerator.java (.../VoteChartGenerator.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -53,8 +53,8 @@ { logger.debug("dispatching doGet for VoteChartGenerator..."); - logger.debug("MAP_VOTERATES_CONTENT Map: " + request.getSession().getAttribute(MAP_VOTERATES_CONTENT)); - logger.debug("MAP_OPTIONS_CONTENT Map: " + request.getSession().getAttribute(MAP_OPTIONS_CONTENT)); + logger.debug("MAP_STANDARD_RATES_CONTENT Map: " + request.getSession().getAttribute(MAP_STANDARD_RATES_CONTENT)); + logger.debug("MAP_STANDARD_NOMINATIONS_CONTENT Map: " + request.getSession().getAttribute(MAP_STANDARD_NOMINATIONS_CONTENT)); OutputStream out= response.getOutputStream(); try{ @@ -96,10 +96,10 @@ logger.debug("starting createPieChart..."); DefaultPieDataset data= new DefaultPieDataset(); - Map mapNominationsContent=(Map)request.getSession().getAttribute(MAP_OPTIONS_CONTENT); + Map mapNominationsContent=(Map)request.getSession().getAttribute(MAP_STANDARD_NOMINATIONS_CONTENT); logger.error("mapNominationsContent: " + mapNominationsContent); - Map mapVoteRatesContent=(Map)request.getSession().getAttribute(MAP_VOTERATES_CONTENT); + Map mapVoteRatesContent=(Map)request.getSession().getAttribute(MAP_STANDARD_RATES_CONTENT); logger.error("mapVoteRatesContent: " + mapVoteRatesContent); Iterator itMap = mapNominationsContent.entrySet().iterator(); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java =================================================================== diff -u -r0ec38b0c90a821a6e5732546f5e035b3c223c12f -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 0ec38b0c90a821a6e5732546f5e035b3c223c12f) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -497,7 +497,7 @@ voteLearningForm.setNominationsSubmited(new Boolean(true).toString()); logger.debug("calling prepareChartData: " + toolContentId); - MonitoringUtil.prepareChartData(request, voteService, toolContentId, toolSessionUid); + MonitoringUtil.prepareChartData(request, voteService, null, toolContentId, toolSessionUid); return (mapping.findForward(INDIVIDUAL_REPORT)); } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java =================================================================== diff -u -r0ec38b0c90a821a6e5732546f5e035b3c223c12f -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java (.../VoteMonitoringAction.java) (revision 0ec38b0c90a821a6e5732546f5e035b3c223c12f) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java (.../VoteMonitoringAction.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -156,7 +156,7 @@ logger.debug("preparing chart data for content id: " + voteContent.getVoteContentId()); logger.debug("preparing chart data for currentMonitoredToolSession: " + currentMonitoredToolSession); - MonitoringUtil.prepareChartData(request, voteService, voteContent.getVoteContentId(), new Long(currentMonitoredToolSession)); + MonitoringUtil.prepareChartData(request, voteService, voteMonitoringForm, voteContent.getVoteContentId(), new Long(currentMonitoredToolSession)); refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true); request.getSession().setAttribute(SELECTION_CASE, new Long(1)); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringForm.java =================================================================== diff -u -r2422ef6cbe87acd7830e1d1da524fe062bc912a6 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringForm.java (.../VoteMonitoringForm.java) (revision 2422ef6cbe87acd7830e1d1da524fe062bc912a6) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringForm.java (.../VoteMonitoringForm.java) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -38,7 +38,12 @@ protected String isToolSessionChanged; + protected String sessionUserCount; + protected String completedSessionUserCount; + + + /** * @return Returns the isToolSessionChanged. */ @@ -77,4 +82,28 @@ 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; + } } Index: lams_tool_vote/web/WEB-INF/struts-config.xml =================================================================== diff -u -rbe0f74b3d01318467107b6a074df9a097ca56fc1 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision be0f74b3d01318467107b6a074df9a097ca56fc1) +++ lams_tool_vote/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -459,7 +459,8 @@ + type="org.lamsfoundation.lams.tool.vote.web.ClearSessionAction" + name="VoteAuthoringForm" > Index: lams_tool_vote/web/authoring/AuthoringMaincontent.jsp =================================================================== diff -u -rbe0f74b3d01318467107b6a074df9a097ca56fc1 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/web/authoring/AuthoringMaincontent.jsp (.../AuthoringMaincontent.jsp) (revision be0f74b3d01318467107b6a074df9a097ca56fc1) +++ lams_tool_vote/web/authoring/AuthoringMaincontent.jsp (.../AuthoringMaincontent.jsp) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -162,7 +162,7 @@ - @@ -188,7 +188,7 @@ - Index: lams_tool_vote/web/index.jsp =================================================================== diff -u -r6cfdabe63a1d792f3135529031f9a969768a6b10 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/web/index.jsp (.../index.jsp) (revision 6cfdabe63a1d792f3135529031f9a969768a6b10) +++ lams_tool_vote/web/index.jsp (.../index.jsp) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -42,6 +42,11 @@ String strSetDefineLater="/authoringStarter?toolContentID=" + hardCodedCopiedToolContentId + "&setDefineLater=1"; String strSetRunoffline="/authoringStarter?toolContentID=" + hardCodedCopiedToolContentId + "&strSetRunoffline=1"; + String strClearSession="/clearsession"; + String strClearSession1="/clearsession?action=confirm&mode=author&signature=lavote11&toolContentID=1"; + String strClearSession2="/clearsession?action=confirm&mode=author&signature=lavote11&toolContentID=2"; + + %> @@ -93,3 +98,22 @@ + + + + + + + + + + + + + + + + + + + Index: lams_tool_vote/web/monitoring/SummaryContent.jsp =================================================================== diff -u -r7e1e8414045a6435bbd09cb35b0058b1573389b2 -ra178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8 --- lams_tool_vote/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision 7e1e8414045a6435bbd09cb35b0058b1573389b2) +++ lams_tool_vote/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision a178ed11c7cc66dbfbff48645b8c6cc33eb2dbf8) @@ -51,24 +51,6 @@ - - - - - - - - - - - - - - -     - - - @@ -109,20 +91,24 @@ - + - 1 + - 2 + + + +    + @@ -132,10 +118,23 @@ -    +    + + + + + + + + + + + + + @@ -151,11 +150,11 @@ - + - - + ( ) +