Index: lams_tool_vote/conf/language/ApplicationResources.properties =================================================================== diff -u -raaf728a804e41624949c6b869bd25e0d5d8fc83b -r73662d4e9b04a3e3c6b1357ed57870152faa5b61 --- lams_tool_vote/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b) +++ lams_tool_vote/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 73662d4e9b04a3e3c6b1357ed57870152faa5b61) @@ -49,19 +49,21 @@ label.learner.viewAnswers =Learner's Answers label.withRetries.results.summary =Voting with Retries Summary label.withoutRetries.results.summary =Voting without Retries Summary +label.learning.reportMessage =Thank you for your participation!
The following is a summary of your answers. count.total.user =Total Users Count: count.finished.user =Finished User Count: count.max.attempt =Maximum Attempt Count: label.attempts =Attempts label.you.answered =You answered: label.learner.answered =Learner answered: -label.redo.questions =Redo Questions +label.retake =Retake label.view.summary =View Summary label.view.answers =View Answers label.view =View label.download =Download label.delete =Delete label.finished =Finished +label.overAllResults =Overall Results label.attempt =Attempt button.cancel =Cancel button.upload =Upload Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java =================================================================== diff -u -r53db9379d8fb01523176dd7f71712a5deaaa730b -r73662d4e9b04a3e3c6b1357ed57870152faa5b61 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java (.../VoteUsrAttempt.java) (revision 53db9379d8fb01523176dd7f71712a5deaaa730b) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java (.../VoteUsrAttempt.java) (revision 73662d4e9b04a3e3c6b1357ed57870152faa5b61) @@ -83,6 +83,17 @@ this.voteQueUsr = voteQueUsr; } + public VoteUsrAttempt(Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent voteQueContent, + org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr voteQueUsr, String userEntry) { + this.attemptTime = attemptTime; + this.timeZone = timeZone; + this.voteQueContent = voteQueContent; + this.voteQueUsr = voteQueUsr; + this.userEntry=userEntry; + } + + + public VoteUsrAttempt(String userEntry, Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent voteQueContent, org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr voteQueUsr) { this.userEntry=userEntry; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java =================================================================== diff -u -raaf728a804e41624949c6b869bd25e0d5d8fc83b -r73662d4e9b04a3e3c6b1357ed57870152faa5b61 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java (.../LearningUtil.java) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java (.../LearningUtil.java) (revision 73662d4e9b04a3e3c6b1357ed57870152faa5b61) @@ -30,9 +30,6 @@ import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.web.VoteLearningForm; -import org.lamsfoundation.lams.tool.vote.web.VoteLearningForm; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; import org.lamsfoundation.lams.tool.vote.VoteComparator; import org.lamsfoundation.lams.tool.vote.VoteUtils; @@ -132,9 +129,12 @@ } - public static void createAttempt(HttpServletRequest request, VoteQueUsr voteQueUsr, Map mapGeneralCheckedOptionsContent) + public static void createAttempt(HttpServletRequest request, VoteQueUsr voteQueUsr, Map mapGeneralCheckedOptionsContent, String userEntry) { logger.debug("doing createAttempt: " + mapGeneralCheckedOptionsContent); + + logger.debug("userEntry: " + userEntry); + IVoteService voteService =VoteUtils.getToolService(request); Date attempTime=VoteUtils.getGMTDateTime(); String timeZone= VoteUtils.getCurrentTimeZone(); @@ -158,21 +158,24 @@ logger.debug("voteQueContent: " + voteQueContent); if (voteQueContent != null) { - createIndividualOptions(request, voteQueContent, voteQueUsr, attempTime, timeZone); + createIndividualOptions(request, voteQueContent, voteQueUsr, attempTime, timeZone, userEntry); } } } } - public static void createIndividualOptions(HttpServletRequest request, VoteQueContent voteQueContent, VoteQueUsr voteQueUsr, Date attempTime, String timeZone) + public static void createIndividualOptions(HttpServletRequest request, VoteQueContent voteQueContent, VoteQueUsr voteQueUsr, Date attempTime, String timeZone, String userEntry) { logger.debug("doing createIndividualOptions"); + + logger.debug("userEntry: " + userEntry); + IVoteService voteService =VoteUtils.getToolService(request); logger.debug("voteQueContent: " + voteQueContent); if (voteQueContent != null) { - VoteUsrAttempt voteUsrAttempt=new VoteUsrAttempt(attempTime, timeZone, voteQueContent, voteQueUsr); + VoteUsrAttempt voteUsrAttempt=new VoteUsrAttempt(attempTime, timeZone, voteQueContent, voteQueUsr, userEntry); logger.debug("voteUsrAttempt: " + voteUsrAttempt); voteService.createVoteUsrAttempt(voteUsrAttempt); logger.debug("created voteUsrAttempt in the db :" + voteUsrAttempt); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java =================================================================== diff -u -raaf728a804e41624949c6b869bd25e0d5d8fc83b -r73662d4e9b04a3e3c6b1357ed57870152faa5b61 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 73662d4e9b04a3e3c6b1357ed57870152faa5b61) @@ -38,7 +38,6 @@ import org.apache.struts.action.ActionMessages; import org.lamsfoundation.lams.tool.exception.DataMissingException; import org.lamsfoundation.lams.tool.exception.ToolException; -import org.lamsfoundation.lams.tool.vote.web.LearningUtil; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; import org.lamsfoundation.lams.tool.vote.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.VoteUtils; @@ -114,6 +113,30 @@ return null; } + + public ActionForward viewAllResults(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws IOException, + ServletException + { + VoteUtils.cleanUpUserExceptions(request); + logger.debug("dispatching viewAllResults..."); + + setContentInUse(request); + VoteLearningForm voteLearningForm = (VoteLearningForm) form; + IVoteService voteService =VoteUtils.getToolService(request); + + Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); + logger.debug("toolContentId: " + toolContentId); + + + voteLearningForm.resetCommands(); + return (mapping.findForward(INDIVIDUAL_REPORT)); + } + + + public ActionForward continueOptionsCombined(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -134,12 +157,18 @@ Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); logger.debug("toolContentId: " + toolContentId); - //Map mapLeanerAssessmentResults=LearningUtil.assess(request, mapGeneralCheckedOptionsContent, toolContentId); - //Map mapLeanerAssessmentResults=null; - //logger.debug("mapLeanerAssessmentResults: " + mapLeanerAssessmentResults); - logger.debug("assesment complete"); + String userEntry=voteLearningForm.getUserEntry(); + logger.debug("userEntry: " + userEntry); - + boolean userEntryAvailable=false; + if ((userEntry != null) && (userEntry.length() > 0)) + { + logger.debug("userEntry available: " + userEntry); + userEntryAvailable=true; + } + logger.debug("userEntryAvailable " + userEntryAvailable); + + boolean isUserDefined=LearningUtil.doesUserExists(request); logger.debug("isUserDefined"); if (isUserDefined == false) @@ -151,7 +180,7 @@ logger.debug("voteQueUsr: " + voteQueUsr); - LearningUtil.createAttempt(request, voteQueUsr, mapGeneralCheckedOptionsContent); + LearningUtil.createAttempt(request, voteQueUsr, mapGeneralCheckedOptionsContent, userEntry); logger.debug("created user attempt in the db"); voteLearningForm.resetCommands(); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java =================================================================== diff -u -raaf728a804e41624949c6b869bd25e0d5d8fc83b -r73662d4e9b04a3e3c6b1357ed57870152faa5b61 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java (.../VoteLearningForm.java) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java (.../VoteLearningForm.java) (revision 73662d4e9b04a3e3c6b1357ed57870152faa5b61) @@ -51,6 +51,7 @@ protected String redoQuestionsOk; protected String donePreview; protected String doneLearnerProgress; + protected String viewAllResults; protected String method; protected String answer; @@ -66,6 +67,7 @@ this.getNextQuestion=null; this.getPreviousQuestion=null; this.endLearning=null; + this.viewAllResults=null; } @@ -417,4 +419,16 @@ } + /** + * @return Returns the viewAllResults. + */ + public String getViewAllResults() { + return viewAllResults; + } + /** + * @param viewAllResults The viewAllResults to set. + */ + public void setViewAllResults(String viewAllResults) { + this.viewAllResults = viewAllResults; + } } Index: lams_tool_vote/web/learning/AnswersContent.jsp =================================================================== diff -u -raaf728a804e41624949c6b869bd25e0d5d8fc83b -r73662d4e9b04a3e3c6b1357ed57870152faa5b61 --- lams_tool_vote/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b) +++ lams_tool_vote/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 73662d4e9b04a3e3c6b1357ed57870152faa5b61) @@ -31,7 +31,7 @@ - + Index: lams_tool_vote/web/learning/IndividualLearnerResults.jsp =================================================================== diff -u -raaf728a804e41624949c6b869bd25e0d5d8fc83b -r73662d4e9b04a3e3c6b1357ed57870152faa5b61 --- lams_tool_vote/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b) +++ lams_tool_vote/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision 73662d4e9b04a3e3c6b1357ed57870152faa5b61) @@ -1,23 +1,3 @@ -<%-- -Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) -License Information: http://lamsfoundation.org/licensing/lams/2.0/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA - - http://www.gnu.org/licenses/gpl.txt ---%> <%@ taglib uri="tags-bean" prefix="bean"%> <%@ taglib uri="tags-html" prefix="html"%> <%@ taglib uri="tags-logic" prefix="logic" %> @@ -30,13 +10,19 @@ - + + + + + + + + @@ -47,75 +33,26 @@ - - - + - - - - - + + + + - - - - - - - - -
- - +
+ - +
- - - - - - - - - - - - - - - - - - - - - -
- images/dot.jpg" align=left>   - -
- - - -
- - - - - - - - - - - - - - - -
- - - -
-
-
+ + + +
@@ -124,45 +61,27 @@
- - - - - - - - - - - + + + + + +
- - - - - - - - - - - -
-
+
+ +
+ +