Index: lams_tool_vote/conf/language/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/conf/language/Attic/ApplicationResources.properties,v
diff -u -r1.27 -r1.28
--- lams_tool_vote/conf/language/ApplicationResources.properties 16 May 2006 05:13:25 -0000 1.27
+++ lams_tool_vote/conf/language/ApplicationResources.properties 16 May 2006 14:17:56 -0000 1.28
@@ -102,6 +102,11 @@
label.learner.progress =Learner Progress Report
error.system.vote =A system exception has occured. Please contact Lams International technical support at 95806666. The error to report is\:
{0}
error.duplicate.nomination =Please correct this: You have entered the same nomination more than once.
+label.total.students =Total number of students in class:
+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.
#======= End labels: Exported 96 labels for en AU =====
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteAppConstants.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteAppConstants.java,v
diff -u -r1.18 -r1.19
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteAppConstants.java 15 May 2006 22:42:12 -0000 1.18
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteAppConstants.java 16 May 2006 14:17:56 -0000 1.19
@@ -108,6 +108,8 @@
public static final String MAP_QUESTION_CONTENT ="mapQuestionContent";
public static final String MAP_OPTIONS_CONTENT ="mapOptionsContent";
public static final String MAP_VOTERATES_CONTENT ="mapVoteRatesContent";
+ public static final String MAP_STANDARD_NOMINATIONS_CONTENT ="mapStandardNominationsContent";
+ public static final String MAP_STANDARD_RATES_CONTENT ="mapStandardRatesContent";
public static final String MAP_OPTIONS_CONTENT_FCK ="mapOptionsContentFck";
public static final String MAP_DEFAULTOPTIONS_CONTENT ="mapDefaultOptionsContent";
public static final String MAP_DISABLED_QUESTIONS ="mapDisabledQuestions";
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.10 -r1.11
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java 10 May 2006 21:23:21 -0000 1.10
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/IVoteUsrAttemptDAO.java 16 May 2006 14:17:56 -0000 1.11
@@ -45,6 +45,8 @@
public List getUserRecords(final String userEntry);
+ public Set getContentEntries(final Long voteContentUid);
+
public Set getUserEntries();
public int getAllEntriesCount();
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.14 -r1.15
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java 13 May 2006 09:44:53 -0000 1.14
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java 16 May 2006 14:17:56 -0000 1.15
@@ -86,6 +86,40 @@
.list();
return list;
}
+
+ public Set getContentEntries(final Long voteContentUid)
+ {
+ HibernateTemplate templ = this.getHibernateTemplate();
+ List list = getSession().createQuery(LOAD_ALL_ENTRIES)
+ .list();
+
+ Set contentEntries= new HashSet();
+ Iterator listIterator=list.iterator();
+ logger.debug("looking for voteContentUid: " + voteContentUid);
+ while (listIterator.hasNext())
+ {
+ VoteUsrAttempt attempt=(VoteUsrAttempt)listIterator.next();
+ logger.debug("attempt: " + attempt);
+ if (attempt.getVoteQueUsr().getVoteSession().getVoteContent().getUid().toString().equals(voteContentUid.toString()))
+ {
+ logger.debug("found content: " + voteContentUid);
+ if (attempt.getVoteQueContentId().toString().equals("1"))
+ {
+ logger.debug("user entered nomination: " + attempt.getUserEntry());
+ if ((attempt.getUserEntry() != null) && (attempt.getUserEntry().length() > 0))
+ contentEntries.add(attempt.getUserEntry());
+ }
+ else
+ {
+ logger.debug("standard content nomination: " + attempt.getVoteQueContent().getQuestion());
+ contentEntries.add(attempt.getVoteQueContent().getQuestion());
+ }
+ }
+ }
+
+ return contentEntries;
+ }
+
public Set getUserEntries()
{
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.15 -r1.16
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java 13 May 2006 09:44:53 -0000 1.15
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java 16 May 2006 14:17:56 -0000 1.16
@@ -117,6 +117,8 @@
public Set getUserEntries() throws VoteApplicationException;
+ public Set getContentEntries(final Long voteContentUid) throws VoteApplicationException;
+
public int getSessionUserRecordsEntryCount(final String userEntry, final Long voteSessionUid, IVoteService voteService) throws VoteApplicationException;
public Set getSessionUserEntries(final Long voteSessionId) throws VoteApplicationException;
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.14 -r1.15
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java 10 May 2006 21:23:21 -0000 1.14
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java 16 May 2006 14:17:56 -0000 1.15
@@ -234,6 +234,21 @@
}
+ public Set getContentEntries(final Long voteContentUid) throws VoteApplicationException
+ {
+ try
+ {
+ return voteUsrAttemptDAO.getContentEntries(voteContentUid);
+ }
+ catch (DataAccessException e)
+ {
+ throw new VoteApplicationException("Exception occured when lams is getting content entries: "
+ + e.getMessage(),
+ e);
+ }
+ }
+
+
public Set getUserEntries() throws VoteApplicationException
{
try
@@ -472,7 +487,6 @@
}
}
-
public int getAllEntriesCount() throws VoteApplicationException
{
try
Fisheye: Tag 1.2 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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java,v
diff -u -r1.13 -r1.14
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java 13 May 2006 09:44:53 -0000 1.13
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java 16 May 2006 14:17:56 -0000 1.14
@@ -636,7 +636,9 @@
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("existing voteContent:" + voteContent);
Map mapOptionsContent= new TreeMap(new VoteComparator());
logger.debug("mapOptionsContent: " + mapOptionsContent);
@@ -658,9 +660,13 @@
{
sessionLevelCharting=false;
logger.debug("process for content: ");
- entriesCount=voteService.getAllEntriesCount();
- userEntries=voteService.getUserEntries();
+ //entriesCount=voteService.getAllEntriesCount();
+ //userEntries=voteService.getUserEntries();
+ //entriesCount=voteService.getContentEntriesCount(voteContent.getUid());
+ userEntries=voteService.getContentEntries(voteContent.getUid());
+ entriesCount=userEntries.size();
}
+
logger.debug("entriesCount: " + entriesCount);
logger.debug("userEntries: " + userEntries);
logger.debug("sessionLevelCharting: " + sessionLevelCharting);
@@ -716,7 +722,15 @@
}
}
logger.debug("Map initialized with existing contentid to: " + mapOptionsContent);
+ Map mapStandardNominationsContent= new TreeMap(new VoteComparator());
+ mapStandardNominationsContent=mapOptionsContent;
+ logger.debug("mapStandardNominationsContent: " + mapStandardNominationsContent);
+ Map mapStandardRatesContent= new TreeMap(new VoteComparator());
+ mapStandardRatesContent=mapVoteRatesContent;
+ logger.debug("mapStandardRatesContent: " + mapStandardRatesContent);
+
+
Iterator itListQuestions = userEntries.iterator();
int mapVoteRatesSize=mapVoteRatesContent.size();
logger.debug("mapVoteRatesSize: " + mapVoteRatesSize);
@@ -727,7 +741,17 @@
logger.debug("updated mapIndex: " + mapIndex);
double share=100d-total ;
logger.debug("share: " + share);
+
+
+ mapStandardNominationsContent.put(mapIndex.toString(), "Open vote");
+ mapStandardRatesContent.put(mapIndex.toString(), new Double(share).toString());
+ request.getSession().setAttribute(MAP_STANDARD_NOMINATIONS_CONTENT, mapStandardNominationsContent);
+ logger.debug("MAP_STANDARD_NOMINATIONS_CONTENT: " + request.getSession().getAttribute(MAP_STANDARD_NOMINATIONS_CONTENT));
+
+ request.getSession().setAttribute(MAP_STANDARD_RATES_CONTENT, mapStandardRatesContent);
+ logger.debug("MAP_STANDARD_RATES_CONTENT: " + request.getSession().getAttribute(MAP_STANDARD_RATES_CONTENT));
+
double totalUserRate=0d;
while (itListQuestions.hasNext())
{
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java,v
diff -u -r1.19 -r1.20
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 16 May 2006 05:13:25 -0000 1.19
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 16 May 2006 14:17:56 -0000 1.20
@@ -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/VoteMonitoringStarterAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java,v
diff -u -r1.15 -r1.16
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 15 May 2006 15:30:59 -0000 1.15
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 16 May 2006 14:17:56 -0000 1.16
@@ -136,7 +136,6 @@
request.getSession().setAttribute(TOOL_SERVICE, voteService);
request.getSession().setAttribute(CURRENT_MONITORING_TAB, "summary");
- //request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
voteMonitoringForm.setSbmtSuccess(new Boolean(false).toString());
request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(false));
request.getSession().setAttribute(REQUEST_LEARNING_REPORT, new Boolean(false).toString());
Index: lams_tool_vote/web/monitoring/SummaryContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/web/monitoring/SummaryContent.jsp,v
diff -u -r1.9 -r1.10
--- lams_tool_vote/web/monitoring/SummaryContent.jsp 15 May 2006 15:30:59 -0000 1.9
+++ lams_tool_vote/web/monitoring/SummaryContent.jsp 16 May 2006 14:17:56 -0000 1.10
@@ -47,10 +47,8 @@
-     - | -|
| +     + | +
|