Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteAppConstants.java =================================================================== diff -u -r9393c098e5dfd603e2d37347cd1e531a25aa424a -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteAppConstants.java (.../VoteAppConstants.java) (revision 9393c098e5dfd603e2d37347cd1e531a25aa424a) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteAppConstants.java (.../VoteAppConstants.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -62,6 +62,10 @@ public static final String LEARNER_PROGRESS ="learnerProgress"; public static final String VOTE_NOMINATION_VIEWER ="voteNominationViewer"; public static final String LEARNER_PROGRESS_USERID ="learnerProgressUserId"; + public static final String MAX_NOMINATION_COUNT ="maxNominationCount"; + public static final String ALLOW_TEXT_ENTRY ="allowTextEntry"; + public static final String VOTE_CHANGABLE ="voteChangable"; + public static final String LOCK_ON_FINISH ="lockOnFinish"; public static final String AUTHORING ="authoring"; public static final String SOURCE_VOTE_STARTER ="sourceVoteStarter"; @@ -81,6 +85,7 @@ public static final String IS_REMOVE_QUESTION ="isRemoveQuestion"; public static final String IS_REMOVE_CONTENT ="isRemoveContent"; public static final String IS_REVISITING_USER ="isRevisitingUser"; + public static final String REVISITING_USER ="revisitingUser"; public static final String USER = "user"; public static final String TOOL_CONTENT_ID = "toolContentID"; @@ -128,6 +133,7 @@ public static final String MAP_STUDENTS_VOTED ="mapStudentsVoted"; public static final String QUESTIONS_WITHNO_OPTIONS ="questionsWithNoOptions"; + public static final String VOTE_GENERAL_LEARNER_FLOW_DTO ="voteGeneralLearnerFlowDTO"; public static final String MAP_GENERAL_CHECKED_OPTIONS_CONTENT ="mapGeneralCheckedOptionsContent"; public static final String MAP_LEARNER_QUESTIONS_CONTENT ="mapLearnerQuestionsContent"; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteGeneralLearnerFlowDTO.java =================================================================== diff -u --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteGeneralLearnerFlowDTO.java (revision 0) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteGeneralLearnerFlowDTO.java (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -0,0 +1,501 @@ +/*************************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * ***********************************************************************/ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.vote; + +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.builder.ToStringBuilder; + + + +/** + *

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

+ * + * @author Ozgur Demirtas + */ +public class VoteGeneralLearnerFlowDTO implements Comparable +{ + protected String activityTitle; + + protected String activityInstructions; + + protected String revisitingUser; + + protected String userEntry; + + protected String castVoteCount; + + protected String maxNominationCountReached; + + protected String activityRunOffline; + + protected String toolSessionID; + + protected String toolContentID; + + protected String toolContentUID; + + protected String learningMode; + + protected String maxNominationCount; + + protected String allowTextEntry; + + protected String lockOnFinish; + + protected String voteChangable; + + protected String totalQuestionCount; + + protected String previewOnly; + + protected String requestLearningReport; + + protected String requestLearningReportProgress; + + protected String nominationsSubmited; + + protected Map mapGeneralCheckedOptionsContent; + + protected Map mapStandardNominationsContent; + + protected Map mapStandardNominationsHTMLedContent; + + protected Map mapStandardRatesContent; + + protected Map mapStandardUserCount; + + protected Map mapStandardQuestionUid; + + protected Map mapStandardToolSessionUid; + + protected List listMonitoredAnswersContainerDto; + + protected List listUserEntries; + + /** + * @return Returns the activityRunOffline. + */ + public String getActivityRunOffline() { + return activityRunOffline; + } + /** + * @param activityRunOffline The activityRunOffline to set. + */ + public void setActivityRunOffline(String activityRunOffline) { + this.activityRunOffline = activityRunOffline; + } + /** + * @return Returns the castVoteCount. + */ + public String getCastVoteCount() { + return castVoteCount; + } + /** + * @param castVoteCount The castVoteCount to set. + */ + public void setCastVoteCount(String castVoteCount) { + this.castVoteCount = castVoteCount; + } + /** + * @return Returns the maxNominationCountReached. + */ + public String getMaxNominationCountReached() { + return maxNominationCountReached; + } + /** + * @param maxNominationCountReached The maxNominationCountReached to set. + */ + public void setMaxNominationCountReached(String maxNominationCountReached) { + this.maxNominationCountReached = maxNominationCountReached; + } + /** + * @return Returns the revisitingUser. + */ + public String getRevisitingUser() { + return revisitingUser; + } + /** + * @param revisitingUser The revisitingUser to set. + */ + public void setRevisitingUser(String revisitingUser) { + this.revisitingUser = revisitingUser; + } + /** + * @return Returns the userEntry. + */ + public String getUserEntry() { + return userEntry; + } + /** + * @param userEntry The userEntry to set. + */ + public void setUserEntry(String userEntry) { + this.userEntry = userEntry; + } + + /** + * @return Returns the activityInstructions. + */ + public String getActivityInstructions() { + return activityInstructions; + } + /** + * @param activityInstructions The activityInstructions to set. + */ + public void setActivityInstructions(String activityInstructions) { + this.activityInstructions = activityInstructions; + } + /** + * @return Returns the activityTitle. + */ + public String getActivityTitle() { + return activityTitle; + } + /** + * @param activityTitle The activityTitle to set. + */ + public void setActivityTitle(String activityTitle) { + this.activityTitle = activityTitle; + } + /** + * @return Returns the learningMode. + */ + public String getLearningMode() { + return learningMode; + } + /** + * @param learningMode The learningMode to set. + */ + public void setLearningMode(String learningMode) { + this.learningMode = learningMode; + } + /** + * @return Returns the toolSessionID. + */ + public String getToolSessionID() { + return toolSessionID; + } + /** + * @param toolSessionID The toolSessionID to set. + */ + public void setToolSessionID(String toolSessionID) { + this.toolSessionID = toolSessionID; + } + + /** + * @return Returns the allowTextEntry. + */ + public String getAllowTextEntry() { + return allowTextEntry; + } + /** + * @param allowTextEntry The allowTextEntry to set. + */ + public void setAllowTextEntry(String allowTextEntry) { + this.allowTextEntry = allowTextEntry; + } + /** + * @return Returns the lockOnFinish. + */ + public String getLockOnFinish() { + return lockOnFinish; + } + /** + * @param lockOnFinish The lockOnFinish to set. + */ + public void setLockOnFinish(String lockOnFinish) { + this.lockOnFinish = lockOnFinish; + } + /** + * @return Returns the maxNominationCount. + */ + public String getMaxNominationCount() { + return maxNominationCount; + } + /** + * @param maxNominationCount The maxNominationCount to set. + */ + public void setMaxNominationCount(String maxNominationCount) { + this.maxNominationCount = maxNominationCount; + } + /** + * @return Returns the voteChangable. + */ + public String getVoteChangable() { + return voteChangable; + } + /** + * @param voteChangable The voteChangable to set. + */ + public void setVoteChangable(String voteChangable) { + this.voteChangable = voteChangable; + } + + /** + * @return Returns the toolContentID. + */ + public String getToolContentID() { + return toolContentID; + } + /** + * @param toolContentID The toolContentID to set. + */ + public void setToolContentID(String toolContentID) { + this.toolContentID = toolContentID; + } + /** + * @return Returns the toolContentUID. + */ + public String getToolContentUID() { + return toolContentUID; + } + /** + * @param toolContentUID The toolContentUID to set. + */ + public void setToolContentUID(String toolContentUID) { + this.toolContentUID = toolContentUID; + } + + /** + * @return Returns the previewOnly. + */ + public String getPreviewOnly() { + return previewOnly; + } + /** + * @param previewOnly The previewOnly to set. + */ + public void setPreviewOnly(String previewOnly) { + this.previewOnly = previewOnly; + } + + /** + * @return Returns the totalQuestionCount. + */ + public String getTotalQuestionCount() { + return totalQuestionCount; + } + /** + * @param totalQuestionCount The totalQuestionCount to set. + */ + public void setTotalQuestionCount(String totalQuestionCount) { + this.totalQuestionCount = totalQuestionCount; + } + + /** + * @return Returns the listUserEntries. + */ + public List getListUserEntries() { + return listUserEntries; + } + /** + * @param listUserEntries The listUserEntries to set. + */ + public void setListUserEntries(List listUserEntries) { + this.listUserEntries = listUserEntries; + } + public int compareTo(Object o) + { + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = (VoteGeneralLearnerFlowDTO) o; + + if (voteGeneralLearnerFlowDTO == null) + return 1; + else + return 0; + } + + public String toString() { + return new ToStringBuilder(this) + .append("activityInstructions: ", activityInstructions) + .append("activityTitle: ", activityTitle) + .append("revisitingUser: ", revisitingUser) + .append("userEntry: ", userEntry) + .append("castVoteCount: ", castVoteCount) + .append("maxNominationCountReached: ", maxNominationCountReached) + .append("activityRunOffline: ", activityRunOffline) + .append("toolSessionID: ", toolSessionID) + .append("learningMode: ", learningMode) + .append("maxNominationCount: ", maxNominationCount) + .append("allowTextEntry: ", allowTextEntry) + .append("lockOnFinish: ", lockOnFinish) + .append("voteChangable: ", voteChangable) + .append("toolContentID: ", toolContentID) + .append("toolContentUID: ", toolContentUID) + .append("totalQuestionCount: ", totalQuestionCount) + .append("requestLearningReport: ", requestLearningReport) + .append("requestLearningReportProgress: ", requestLearningReportProgress) + .append("nominationsSubmited: ", nominationsSubmited) + .append("mapGeneralCheckedOptionsContent: ", mapGeneralCheckedOptionsContent) + .append("mapStandardNominationsContent: ", mapStandardNominationsContent) + .append("mapStandardNominationsHTMLedContent: ", mapStandardNominationsHTMLedContent) + .append("mapStandardRatesContent: ", mapStandardRatesContent) + .append("mapStandardUserCount: ", mapStandardUserCount) + .append("mapStandardQuestionUid: ", mapStandardQuestionUid) + .append("mapStandardToolSessionUid: ", mapStandardToolSessionUid) + .append("listMonitoredAnswersContainerDto: ", listMonitoredAnswersContainerDto) + .append("listUserEntries: ", listUserEntries) + .toString(); + } + + + /** + * @return Returns the nominationsSubmited. + */ + public String getNominationsSubmited() { + return nominationsSubmited; + } + /** + * @param nominationsSubmited The nominationsSubmited to set. + */ + public void setNominationsSubmited(String nominationsSubmited) { + this.nominationsSubmited = nominationsSubmited; + } + /** + * @return Returns the requestLearningReport. + */ + public String getRequestLearningReport() { + return requestLearningReport; + } + /** + * @param requestLearningReport The requestLearningReport to set. + */ + public void setRequestLearningReport(String requestLearningReport) { + this.requestLearningReport = requestLearningReport; + } + /** + * @return Returns the requestLearningReportProgress. + */ + public String getRequestLearningReportProgress() { + return requestLearningReportProgress; + } + /** + * @param requestLearningReportProgress The requestLearningReportProgress to set. + */ + public void setRequestLearningReportProgress( + String requestLearningReportProgress) { + this.requestLearningReportProgress = requestLearningReportProgress; + } + /** + * @return Returns the mapStandardNominationsContent. + */ + public Map getMapStandardNominationsContent() { + return mapStandardNominationsContent; + } + /** + * @param mapStandardNominationsContent The mapStandardNominationsContent to set. + */ + public void setMapStandardNominationsContent( + Map mapStandardNominationsContent) { + this.mapStandardNominationsContent = mapStandardNominationsContent; + } + /** + * @return Returns the mapStandardNominationsHTMLedContent. + */ + public Map getMapStandardNominationsHTMLedContent() { + return mapStandardNominationsHTMLedContent; + } + /** + * @param mapStandardNominationsHTMLedContent The mapStandardNominationsHTMLedContent to set. + */ + public void setMapStandardNominationsHTMLedContent( + Map mapStandardNominationsHTMLedContent) { + this.mapStandardNominationsHTMLedContent = mapStandardNominationsHTMLedContent; + } + /** + * @return Returns the mapStandardRatesContent. + */ + public Map getMapStandardRatesContent() { + return mapStandardRatesContent; + } + /** + * @param mapStandardRatesContent The mapStandardRatesContent to set. + */ + public void setMapStandardRatesContent(Map mapStandardRatesContent) { + this.mapStandardRatesContent = mapStandardRatesContent; + } + /** + * @return Returns the mapStandardUserCount. + */ + public Map getMapStandardUserCount() { + return mapStandardUserCount; + } + /** + * @param mapStandardUserCount The mapStandardUserCount to set. + */ + public void setMapStandardUserCount(Map mapStandardUserCount) { + this.mapStandardUserCount = mapStandardUserCount; + } + /** + * @return Returns the listMonitoredAnswersContainerDto. + */ + public List getListMonitoredAnswersContainerDto() { + return listMonitoredAnswersContainerDto; + } + /** + * @param listMonitoredAnswersContainerDto The listMonitoredAnswersContainerDto to set. + */ + public void setListMonitoredAnswersContainerDto( + List listMonitoredAnswersContainerDto) { + this.listMonitoredAnswersContainerDto = listMonitoredAnswersContainerDto; + } + /** + * @return Returns the mapGeneralCheckedOptionsContent. + */ + public Map getMapGeneralCheckedOptionsContent() { + return mapGeneralCheckedOptionsContent; + } + /** + * @param mapGeneralCheckedOptionsContent The mapGeneralCheckedOptionsContent to set. + */ + public void setMapGeneralCheckedOptionsContent( + Map mapGeneralCheckedOptionsContent) { + this.mapGeneralCheckedOptionsContent = mapGeneralCheckedOptionsContent; + } + /** + * @return Returns the mapStandardQuestionUid. + */ + public Map getMapStandardQuestionUid() { + return mapStandardQuestionUid; + } + /** + * @param mapStandardQuestionUid The mapStandardQuestionUid to set. + */ + public void setMapStandardQuestionUid(Map mapStandardQuestionUid) { + this.mapStandardQuestionUid = mapStandardQuestionUid; + } + /** + * @return Returns the mapStandardToolSessionUid. + */ + public Map getMapStandardToolSessionUid() { + return mapStandardToolSessionUid; + } + /** + * @param mapStandardToolSessionUid The mapStandardToolSessionUid to set. + */ + public void setMapStandardToolSessionUid(Map mapStandardToolSessionUid) { + this.mapStandardToolSessionUid = mapStandardToolSessionUid; + } +} Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteUtils.java =================================================================== diff -u -r9393c098e5dfd603e2d37347cd1e531a25aa424a -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteUtils.java (.../VoteUtils.java) (revision 9393c098e5dfd603e2d37347cd1e531a25aa424a) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteUtils.java (.../VoteUtils.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -125,7 +125,7 @@ return (DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG).format(date)); } - public static void persistInSessionTimeZone(HttpServletRequest request) + public static void saveTimeZone(HttpServletRequest request) { TimeZone timeZone=TimeZone.getDefault(); logger.debug("current timezone: " + timeZone.getDisplayName()); @@ -235,7 +235,7 @@ } - public static void persistInSessionRichText(HttpServletRequest request) + public static void saveInSessionRichText(HttpServletRequest request) { logger.debug("doing persistRichText: "); String richTextTitle = request.getParameter(TITLE); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java =================================================================== diff -u -r96c010334a799ab269945c37537e46dd15f2a2bc -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision 96c010334a799ab269945c37537e46dd15f2a2bc) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -154,11 +154,11 @@ } - public VoteContent retrieveVote(Long toolContentId) throws VoteApplicationException + public VoteContent retrieveVote(Long toolContentID) throws VoteApplicationException { try { - return voteContentDAO.findVoteContentById(toolContentId); + return voteContentDAO.findVoteContentById(toolContentID); } catch (DataAccessException e) { @@ -538,11 +538,11 @@ } } - public VoteQueUsr retrieveVoteQueUsr(Long userId) throws VoteApplicationException + public VoteQueUsr retrieveVoteQueUsr(Long userID) throws VoteApplicationException { try { - VoteQueUsr voteQueUsr=voteUserDAO.findVoteUserById(userId); + VoteQueUsr voteQueUsr=voteUserDAO.findVoteUserById(userID); return voteQueUsr; } catch (DataAccessException e) @@ -1174,11 +1174,11 @@ } } - public int getLastNominationCount(Long userId) throws VoteApplicationException + public int getLastNominationCount(Long userID) throws VoteApplicationException { try { - int lastNomCount=voteUsrAttemptDAO.getLastNominationCount(userId); + int lastNomCount=voteUsrAttemptDAO.getLastNominationCount(userID); return lastNomCount; } catch (DataAccessException e) @@ -1497,23 +1497,23 @@ /** * implemented as part of the tool contract. Removes content and uploaded files from the content repository. - * removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException + * removeToolContent(Long toolContentID, boolean removeSessionData) throws SessionDataExistsException, ToolException * @param toContentId * @param removeSessionData * @return * @throws ToolException */ - public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException + public void removeToolContent(Long toolContentID, boolean removeSessionData) throws SessionDataExistsException, ToolException { - logger.debug("start of removeToolContent with toolContentId: " + toolContentId + "removeSessionData: " + removeSessionData); + logger.debug("start of removeToolContent with toolContentID: " + toolContentID + "removeSessionData: " + removeSessionData); - if (toolContentId == null) + if (toolContentID == null) { - logger.error("toolContentId is null"); - throw new ToolException("toolContentId is missing"); + logger.error("toolContentID is null"); + throw new ToolException("toolContentID is missing"); } - VoteContent voteContent = voteContentDAO.findVoteContentById(toolContentId); + VoteContent voteContent = voteContentDAO.findVoteContentById(toolContentID); logger.debug("retrieving voteContent: " + voteContent); if (voteContent != null) @@ -1568,34 +1568,34 @@ } } } - logger.debug("removed all existing responses of toolContent with toolContentId:" + - toolContentId); - voteContentDAO.removeVoteById(toolContentId); + logger.debug("removed all existing responses of toolContent with toolContentID:" + + toolContentID); + voteContentDAO.removeVoteById(toolContentID); logger.debug("removed voteContent:" + voteContent); } else { logger.error("Warning!!!, We should have not come here. voteContent is null."); - throw new ToolException("toolContentId is missing"); + throw new ToolException("toolContentID is missing"); } } /** * Export the XML fragment for the tool's content, along with any files needed * for the content. - * @throws DataMissingException if no tool content matches the toolSessionId + * @throws DataMissingException if no tool content matches the toolSessionID * @throws ToolException if any other error occurs */ - public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException { - VoteContent toolContentObj = voteContentDAO.findVoteContentById(toolContentId); + public void exportToolContent(Long toolContentID, String rootPath) throws DataMissingException, ToolException { + VoteContent toolContentObj = voteContentDAO.findVoteContentById(toolContentID); if(toolContentObj == null) - throw new DataMissingException("Unable to find tool content by given id :" + toolContentId); + throw new DataMissingException("Unable to find tool content by given id :" + toolContentID); try { //set ToolContentHandler as null to avoid copy file node in repository again. - toolContentObj = VoteContent.newInstance(null,toolContentObj,toolContentId); + toolContentObj = VoteContent.newInstance(null,toolContentObj,toolContentID); //clear unnecessary information attach toolContentObj.setVoteSessions(null); @@ -1604,7 +1604,7 @@ que.setMcUsrAttempts(null); } exportContentService.registerFileClassForExport(VoteUploadedFile.class.getName(),"uuid",null); - exportContentService.exportToolContent( toolContentId, toolContentObj,voteToolContentHandler, rootPath); + exportContentService.exportToolContent( toolContentID, toolContentObj,voteToolContentHandler, rootPath); } catch (ExportToolContentException e) { throw new ToolException(e); } catch (ItemNotFoundException e) { @@ -1619,7 +1619,7 @@ * for the content. * @throws ToolException if any other error occurs */ - public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath) throws ToolException { + public void importToolContent(Long toolContentID, Integer newUserUid, String toolContentPath) throws ToolException { try { exportContentService.registerFileClassForImport(VoteUploadedFile.class.getName() ,"uuid",null,"filename","fileProperty",null,null); @@ -1629,8 +1629,8 @@ throw new ImportToolContentException("Import Vote tool content failed. Deserialized object is " + toolPOJO); VoteContent toolContentObj = (VoteContent) toolPOJO; -// reset it to new toolContentId - toolContentObj.setVoteContentId(toolContentId); +// reset it to new toolContentID + toolContentObj.setVoteContentId(toolContentID); toolContentObj.setCreatedBy(newUserUid); voteContentDAO.saveVoteContent(toolContentObj); @@ -1641,126 +1641,126 @@ /** * Implemented as part of the tool contract. Sets the defineLater to true on this content. - * setAsDefineLater(Long toolContentId) throws DataMissingException, ToolException - * @param toolContentId + * setAsDefineLater(Long toolContentID) throws DataMissingException, ToolException + * @param toolContentID * @return * @throws ToolException */ - public void setAsDefineLater(Long toolContentId) throws DataMissingException, ToolException + public void setAsDefineLater(Long toolContentID) throws DataMissingException, ToolException { - logger.debug("request for setAsDefineLater with toolContentId: " + toolContentId); - if (toolContentId == null) + logger.debug("request for setAsDefineLater with toolContentID: " + toolContentID); + if (toolContentID == null) { - logger.error("throwing DataMissingException: WARNING!: retrieved toolContentId is null."); - throw new DataMissingException("toolContentId is missing"); + logger.error("throwing DataMissingException: WARNING!: retrieved toolContentID is null."); + throw new DataMissingException("toolContentID is missing"); } - VoteContent voteContent=retrieveVote(toolContentId); + VoteContent voteContent=retrieveVote(toolContentID); if (voteContent == null) { logger.error("throwing DataMissingException: WARNING!: retrieved voteContent is null."); throw new DataMissingException("voteContent is missing"); } voteContent.setDefineLater(true); saveVoteContent(voteContent); - logger.debug("success: end of setAsDefineLater on toolContentId:" + toolContentId); + logger.debug("success: end of setAsDefineLater on toolContentID:" + toolContentID); } /** * Implemented as part of the tool contract. Sets the runOffline to true on this content. - * setAsRunOffline(Long toolContentId) throws DataMissingException, ToolException + * setAsRunOffline(Long toolContentID) throws DataMissingException, ToolException * - * @param toolContentId + * @param toolContentID * return * @throws ToolException */ - public void setAsRunOffline(Long toolContentId) throws DataMissingException, ToolException + public void setAsRunOffline(Long toolContentID) throws DataMissingException, ToolException { - logger.debug("request for setAsRunOffline with toolContentId:" + toolContentId); - if (toolContentId == null) + logger.debug("request for setAsRunOffline with toolContentID:" + toolContentID); + if (toolContentID == null) { - logger.error("throwing DataMissingException: WARNING!: retrieved toolContentId is null."); - throw new DataMissingException("toolContentId is missing"); + logger.error("throwing DataMissingException: WARNING!: retrieved toolContentID is null."); + throw new DataMissingException("toolContentID is missing"); } - VoteContent voteContent = voteContentDAO.findVoteContentById(toolContentId); + VoteContent voteContent = voteContentDAO.findVoteContentById(toolContentID); if (voteContent == null) { logger.error("throwing DataMissingException: WARNING!: retrieved voteContent is null."); throw new DataMissingException("voteContent is missing"); } voteContent.setRunOffline(true); saveVoteContent(voteContent); - logger.debug("success: end of setAsRunOffline on toolContentId:" + toolContentId); + logger.debug("success: end of setAsRunOffline on toolContentID:" + toolContentID); } /** * it is possible that the tool session id already exists in the tool sessions table * as the users from the same session are involved. - * existsSession(long toolSessionId) - * @param toolSessionId + * existsSession(long toolSessionID) + * @param toolSessionID * @return boolean */ - public boolean existsSession(Long toolSessionId) + public boolean existsSession(Long toolSessionID) { - VoteSession voteSession= retrieveVoteSession(toolSessionId); + VoteSession voteSession= retrieveVoteSession(toolSessionID); if (voteSession == null) { - logger.error("voteSession does not exist yet: " + toolSessionId); + logger.error("voteSession does not exist yet: " + toolSessionID); return false; } else { - logger.debug("retrieving an existing voteSession: " + voteSession + " " + toolSessionId); + logger.debug("retrieving an existing voteSession: " + voteSession + " " + toolSessionID); } return true; } /** * Implemented as part of the tool contract. * Gets called only in the Learner mode. - * All the learners in the same group have the same toolSessionId. + * All the learners in the same group have the same toolSessionID. * - * @param toolSessionId the generated tool session id. + * @param toolSessionID the generated tool session id. * @param toolSessionName the tool session name. - * @param toolContentId the tool content id specified. + * @param toolContentID the tool content id specified. * @throws ToolException if an error occurs e.g. defaultContent is missing. * */ - public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException + public void createToolSession(Long toolSessionID, String toolSessionName, Long toolContentID) throws ToolException { - logger.debug("start of createToolSession with ids: " + toolSessionId + " and " + toolContentId); + logger.debug("start of createToolSession with ids: " + toolSessionID + " and " + toolContentID); logger.debug("toolSessionName: " + toolSessionName); - if (toolSessionId == null) + if (toolSessionID == null) { - logger.error("toolSessionId is null"); - throw new ToolException("toolSessionId is missing"); + logger.error("toolSessionID is null"); + throw new ToolException("toolSessionID is missing"); } long defaultContentId=0; - if (toolContentId == null) + if (toolContentID == null) { - logger.error("toolContentId is null."); + logger.error("toolContentID is null."); logger.error("attempt retrieving tool's default content id with signatute : " + MY_SIGNATURE); try { defaultContentId=getToolDefaultContentIdBySignature(MY_SIGNATURE); - toolContentId=new Long(defaultContentId); - logger.debug("updated toolContentId to: " + toolContentId); + toolContentID=new Long(defaultContentId); + logger.debug("updated toolContentID to: " + toolContentID); } catch(Exception e) { logger.error("default content id has not been setup for signature: " + MY_SIGNATURE); throw new ToolException("WARNING! default content has not been setup for signature" + MY_SIGNATURE + " Can't continue!"); } } - logger.debug("final toolSessionId and toolContentId: " + toolSessionId + " " + toolContentId); + logger.debug("final toolSessionID and toolContentID: " + toolSessionID + " " + toolContentID); - VoteContent voteContent = voteContentDAO.findVoteContentById(toolContentId); + VoteContent voteContent = voteContentDAO.findVoteContentById(toolContentID); logger.debug("retrieved voteContent: " + voteContent); if (voteContent == null) @@ -1771,28 +1771,28 @@ try { defaultContentId=getToolDefaultContentIdBySignature(MY_SIGNATURE); - toolContentId=new Long(defaultContentId); - logger.debug("updated toolContentId to: " + toolContentId); + toolContentID=new Long(defaultContentId); + logger.debug("updated toolContentID to: " + toolContentID); } catch(Exception e) { logger.error("default content id has not been setup for signature: " + MY_SIGNATURE); throw new ToolException("WARNING! default content has not been setup for signature" + MY_SIGNATURE + " Can't continue!"); } - voteContent = voteContentDAO.findVoteContentById(toolContentId); + voteContent = voteContentDAO.findVoteContentById(toolContentID); } logger.debug("final - retrieved voteContent: " + voteContent); /* * create a new a new tool session if it does not already exist in the tool session table */ - if (!existsSession(toolSessionId)) + if (!existsSession(toolSessionID)) { try { - VoteSession voteSession = new VoteSession(toolSessionId, + VoteSession voteSession = new VoteSession(toolSessionID, new Date(System.currentTimeMillis()), VoteSession.INCOMPLETE, toolSessionName, @@ -1815,26 +1815,26 @@ /** * Implemented as part of the tool contract. - * removeToolSession(Long toolSessionId) throws DataMissingException, ToolException - * @param toolSessionId - * @param toolContentId + * removeToolSession(Long toolSessionID) throws DataMissingException, ToolException + * @param toolSessionID + * @param toolContentID * return * @throws ToolException */ - public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException + public void removeToolSession(Long toolSessionID) throws DataMissingException, ToolException { - logger.debug("start of removeToolSession with id: " + toolSessionId); - if (toolSessionId == null) + logger.debug("start of removeToolSession with id: " + toolSessionID); + if (toolSessionID == null) { - logger.error("toolSessionId is null"); - throw new DataMissingException("toolSessionId is missing"); + logger.error("toolSessionID is null"); + throw new DataMissingException("toolSessionID is missing"); } VoteSession voteSession=null; try { - voteSession=retrieveVoteSession(toolSessionId); + voteSession=retrieveVoteSession(toolSessionID); logger.debug("retrieved voteSession: " + voteSession); } catch(VoteApplicationException e) @@ -1866,16 +1866,16 @@ /** * Implemtented as part of the tool contract. - * leaveToolSession(Long toolSessionId,Long learnerId) throws DataMissingException, ToolException - * @param toolSessionId + * leaveToolSession(Long toolSessionID,Long learnerId) throws DataMissingException, ToolException + * @param toolSessionID * @param learnerId * return String * @throws ToolException * */ - public String leaveToolSession(Long toolSessionId,Long learnerId) throws DataMissingException, ToolException + public String leaveToolSession(Long toolSessionID,Long learnerId) throws DataMissingException, ToolException { - logger.debug("start of leaveToolSession with toolSessionId:" + toolSessionId + " and learnerId:" + learnerId); + logger.debug("start of leaveToolSession with toolSessionID:" + toolSessionID + " and learnerId:" + learnerId); logger.debug("make sure learnerService is available. Is it?" + learnerService); if (learnerService == null) @@ -1887,16 +1887,16 @@ throw new DataMissingException("learnerId is missing"); } - if (toolSessionId == null) + if (toolSessionID == null) { - logger.error("toolSessionId is null"); - throw new DataMissingException("toolSessionId is missing"); + logger.error("toolSessionID is null"); + throw new DataMissingException("toolSessionID is missing"); } VoteSession voteSession=null; try { - voteSession=retrieveVoteSession(toolSessionId); + voteSession=retrieveVoteSession(toolSessionID); logger.debug("retrieved voteSession: " + voteSession); } catch(VoteApplicationException e) @@ -1911,7 +1911,7 @@ voteSessionDAO.updateVoteSession(voteSession); logger.debug("updated voteSession to COMPLETED" + voteSession); - String nextUrl= learnerService.completeToolSession(toolSessionId,learnerId); + String nextUrl= learnerService.completeToolSession(toolSessionID,learnerId); logger.debug("nextUrl: " + nextUrl); if (nextUrl == null) { @@ -1923,24 +1923,24 @@ /** - * exportToolSession(Long toolSessionId) throws DataMissingException, ToolException - * @param toolSessionId + * exportToolSession(Long toolSessionID) throws DataMissingException, ToolException + * @param toolSessionID * return ToolSessionExportOutputData * @throws ToolException */ - public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException + public ToolSessionExportOutputData exportToolSession(Long toolSessionID) throws DataMissingException, ToolException { throw new ToolException("not yet implemented"); } /** - * exportToolSession(Long toolSessionId) throws DataMissingException, ToolException - * @param toolSessionIds + * exportToolSession(Long toolSessionID) throws DataMissingException, ToolException + * @param toolSessionIDs * return ToolSessionExportOutputData * @throws ToolException */ - public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws DataMissingException, ToolException + public ToolSessionExportOutputData exportToolSession(List toolSessionIDs) throws DataMissingException, ToolException { throw new ToolException("not yet implemented"); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java =================================================================== diff -u -r56e2467330670c32471981528b1f28dc424d6af0 -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java (.../ExportServlet.java) (revision 56e2467330670c32471981528b1f28dc424d6af0) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ExportServlet.java (.../ExportServlet.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -125,7 +125,8 @@ logger.debug("calling learning mode toolSessionID:" + toolSessionID + " userID: " + userID ); VoteMonitoringAction voteMonitoringAction= new VoteMonitoringAction(); - voteMonitoringAction.refreshSummaryData(request, content, voteService, true, true, toolSessionID.toString(), userID.toString() , true); + voteMonitoringAction.refreshSummaryData(request, content, voteService, true, true, + toolSessionID.toString(), userID.toString() , true, null); MonitoringUtil.prepareChartDataForExportTeacher(request, voteService, null, content.getVoteContentId(), voteSession.getUid()); logger.debug("post prepareChartDataForExport"); @@ -161,7 +162,7 @@ VoteMonitoringAction voteMonitoringAction= new VoteMonitoringAction(); logger.debug("starting refreshSummaryData."); - voteMonitoringAction.refreshSummaryData(request, content, voteService, true, false, null, null, false); + voteMonitoringAction.refreshSummaryData(request, content, voteService, true, false, null, null, false, null); logger.debug("teacher uses content id: " + content.getVoteContentId()); MonitoringUtil.prepareChartDataForExportTeacher(request, voteService, null, content.getVoteContentId(), null); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java =================================================================== diff -u -r79c85c32740b5bce9fd2800e35e832062fe9648d -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java (.../LearningUtil.java) (revision 79c85c32740b5bce9fd2800e35e832062fe9648d) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java (.../LearningUtil.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -59,9 +59,9 @@ * @param checkedOptions collection of String display IDs to which to restrict the map (optional) * @return Map of display id -> nomination text. */ - public static Map buildQuestionContentMap(HttpServletRequest request, VoteContent voteContent, Collection checkedOptions) + public static Map buildQuestionContentMap(HttpServletRequest request, IVoteService voteService, + VoteContent voteContent, Collection checkedOptions) { - IVoteService voteService =VoteUtils.getToolService(request); Map mapQuestionsContent= new TreeMap(new VoteComparator()); Iterator contentIterator=voteContent.getVoteQueContents().iterator(); @@ -87,10 +87,9 @@ * @param request * @return */ - public static boolean doesUserExists(HttpServletRequest request) + public static boolean doesUserExists(HttpServletRequest request, IVoteService voteService) { - IVoteService voteService =VoteUtils.getToolService(request); - Long queUsrId=VoteUtils.getUserId(); + Long queUsrId=VoteUtils.getUserId(); VoteQueUsr voteQueUsr=voteService.retrieveVoteQueUsr(queUsrId); if (voteQueUsr != null) @@ -106,15 +105,14 @@ * @param request * @return */ - public static VoteQueUsr createUser(HttpServletRequest request) + public static VoteQueUsr createUser(HttpServletRequest request, IVoteService voteService, Long toolSessionID) { - IVoteService voteService =VoteUtils.getToolService(request); + logger.debug("createUser: " + toolSessionID); + Long queUsrId=VoteUtils.getUserId(); String username=VoteUtils.getUserName(); String fullname=VoteUtils.getUserFullName(); - Long toolSessionId=(Long) request.getSession().getAttribute(TOOL_SESSION_ID); - - VoteSession voteSession=voteService.retrieveVoteSession(toolSessionId); + VoteSession voteSession=voteService.retrieveVoteSession(toolSessionID); VoteQueUsr voteQueUsr= new VoteQueUsr(queUsrId, username, fullname, @@ -126,10 +124,9 @@ } - public static VoteQueUsr getUser(HttpServletRequest request) + public static VoteQueUsr getUser(HttpServletRequest request, IVoteService voteService) { - IVoteService voteService =VoteUtils.getToolService(request); - Long queUsrId=VoteUtils.getUserId(); + Long queUsrId=VoteUtils.getUserId(); VoteQueUsr voteQueUsr=voteService.retrieveVoteQueUsr(queUsrId); return voteQueUsr; } @@ -144,20 +141,19 @@ * @param singleUserEntry * @param voteSession */ - public static void createAttempt(HttpServletRequest request, VoteQueUsr voteQueUsr, Map mapGeneralCheckedOptionsContent, String userEntry, - boolean singleUserEntry, VoteSession voteSession) + public static void createAttempt(HttpServletRequest request, IVoteService voteService, + VoteQueUsr voteQueUsr, Map mapGeneralCheckedOptionsContent, String userEntry, + boolean singleUserEntry, VoteSession voteSession, Long toolContentUID) { logger.debug("doing voteSession: " + voteSession); logger.debug("doing createAttempt: " + mapGeneralCheckedOptionsContent); logger.debug("userEntry: " + userEntry); logger.debug("singleUserEntry: " + singleUserEntry); - IVoteService voteService =VoteUtils.getToolService(request); Date attempTime=VoteUtils.getGMTDateTime(); String timeZone= VoteUtils.getCurrentTimeZone(); logger.debug("timeZone: " + timeZone); - Long toolContentUID= (Long) request.getSession().getAttribute(TOOL_CONTENT_UID); logger.debug("toolContentUID: " + toolContentUID); @@ -166,7 +162,8 @@ logger.debug("mapGeneralCheckedOptionsContent is empty"); VoteQueContent localVoteQueContent=voteService.getToolDefaultQuestionContent(1); logger.debug("localVoteQueContent: " + localVoteQueContent); - createIndividualOptions(request, localVoteQueContent, voteQueUsr, attempTime, timeZone, userEntry, singleUserEntry, voteSession); + createIndividualOptions(request, voteService, localVoteQueContent, voteQueUsr, attempTime, + timeZone, userEntry, singleUserEntry, voteSession); } else @@ -187,39 +184,22 @@ logger.debug("voteQueContent: " + voteQueContent); if (voteQueContent != null) { - createIndividualOptions(request, voteQueContent, voteQueUsr, attempTime, timeZone, userEntry, false, voteSession); + createIndividualOptions(request, voteService, voteQueContent, voteQueUsr, attempTime, timeZone, userEntry, false, voteSession); } - /* - else if ((voteQueContent == null) && (questionDisplayOrder.toString().equals("101"))) - { - logger.debug("creating user entry record, 101"); - VoteQueContent localVoteQueContent=voteService.getToolDefaultQuestionContent(1); - logger.debug("localVoteQueContent: " + localVoteQueContent); - createIndividualOptions(request, localVoteQueContent, voteQueUsr, attempTime, timeZone, userEntry, true, voteSession); - } - else if ((voteQueContent == null) && (questionDisplayOrder.toString().equals("102"))) - { - logger.debug("creating user entry record, 102"); - VoteQueContent localVoteQueContent=voteService.getToolDefaultQuestionContent(1); - logger.debug("localVoteQueContent: " + localVoteQueContent); - createIndividualOptions(request, localVoteQueContent, voteQueUsr, attempTime, timeZone, userEntry, false, voteSession); - } - */ } } } } - public static void createIndividualOptions(HttpServletRequest request, VoteQueContent voteQueContent, VoteQueUsr voteQueUsr, Date attempTime, String timeZone, String userEntry, boolean singleUserEntry, VoteSession voteSession) + public static void createIndividualOptions(HttpServletRequest request, IVoteService voteService, VoteQueContent voteQueContent, + VoteQueUsr voteQueUsr, Date attempTime, String timeZone, String userEntry, boolean singleUserEntry, VoteSession voteSession) { logger.debug("doing voteSession: " + voteSession); logger.debug("userEntry: " + userEntry); logger.debug("singleUserEntry: " + singleUserEntry); - IVoteService voteService =VoteUtils.getToolService(request); - logger.debug("voteQueContent: " + voteQueContent); logger.debug("user " + voteQueUsr.getQueUsrId()); logger.debug("voteQueContent.getVoteContentId() " +voteQueContent.getVoteContentId()); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java =================================================================== diff -u -r531f924847f08239b185e9a9cf604f4db0f536ab -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 531f924847f08239b185e9a9cf604f4db0f536ab) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -36,6 +36,7 @@ import org.lamsfoundation.lams.tool.vote.VoteAllSessionsDTO; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; import org.lamsfoundation.lams.tool.vote.VoteComparator; +import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; import org.lamsfoundation.lams.tool.vote.VoteMonitoredAnswersDTO; import org.lamsfoundation.lams.tool.vote.VoteMonitoredUserDTO; import org.lamsfoundation.lams.tool.vote.VoteStringComparator; @@ -872,11 +873,13 @@ * @param toolContentId * @param toolSessionUid */ - public static void prepareChartData(HttpServletRequest request, IVoteService voteService, VoteMonitoringForm voteMonitoringForm, Long toolContentId, Long toolSessionUid) + public static void prepareChartData(HttpServletRequest request, IVoteService voteService, VoteMonitoringForm voteMonitoringForm, + String toolContentId, String toolSessionUid, VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO) { + logger.debug("starting prepareChartData, voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); logger.debug("starting prepareChartData, toolContentId: " + toolContentId); logger.debug("starting prepareChartData, toolSessionUid: " + toolSessionUid); - VoteContent voteContent=voteService.retrieveVote(toolContentId); + VoteContent voteContent=voteService.retrieveVote(new Long(toolContentId)); logger.debug("starting prepareChartData, voteContent uid: " + voteContent.getUid()); logger.debug("starting prepareChartData, voteMonitoringForm: " + voteMonitoringForm); @@ -896,21 +899,21 @@ if (toolSessionUid != null) { logger.debug("process for session: " + toolSessionUid); - entriesCount=voteService.getSessionEntriesCount(toolSessionUid); + entriesCount=voteService.getSessionEntriesCount(new Long(toolSessionUid)); logger.debug("entriesCount: " + entriesCount); - userEntries=voteService.getSessionUserEntriesSet(toolSessionUid); + userEntries=voteService.getSessionUserEntriesSet(new Long(toolSessionUid)); logger.debug("sessionUserCount: " + userEntries.size()); - int completedSessionUserCount=voteService.getCompletedVoteUserBySessionUid(toolSessionUid); + int completedSessionUserCount=voteService.getCompletedVoteUserBySessionUid(new Long(toolSessionUid)); logger.debug("completedSessionUserCount: " + completedSessionUserCount); - int completedEntriesCount=voteService.getCompletedSessionEntriesCount(toolSessionUid); + int completedEntriesCount=voteService.getCompletedSessionEntriesCount(new Long(toolSessionUid)); logger.debug("completedEntriesCount: " + completedEntriesCount); if (voteMonitoringForm != null) { - int potentialUserCount=voteService.getVoteSessionPotentialLearnersCount(toolSessionUid); + int potentialUserCount=voteService.getVoteSessionPotentialLearnersCount(new Long(toolSessionUid)); logger.debug("potentialUserCount: " + potentialUserCount); voteMonitoringForm.setSessionUserCount(Integer.toString(potentialUserCount)); voteMonitoringForm.setCompletedSessionUserCount(new Integer(completedSessionUserCount).toString()); @@ -962,7 +965,7 @@ if (sessionLevelCharting == true) { logger.debug("getting votesCount based on session: " + toolSessionUid); - votesCount=voteService.getStandardAttemptsForQuestionContentAndSessionUid(voteQueContent.getUid(), toolSessionUid); + votesCount=voteService.getStandardAttemptsForQuestionContentAndSessionUid(voteQueContent.getUid(), new Long(toolSessionUid)); mapStandardQuestionUid.put(mapIndex.toString(),voteQueContent.getUid().toString()); mapStandardToolSessionUid.put(mapIndex.toString(),toolSessionUid.toString()); @@ -1067,6 +1070,21 @@ request.getSession().setAttribute("mapStandardToolSessionUid", mapStandardToolSessionUid); logger.debug("test2: mapStandardToolSessionUid: " + request.getSession().getAttribute("mapStandardToolSessionUid")); + + + if (voteGeneralLearnerFlowDTO !=null) + { + logger.debug("placing maps within voteGeneralLearnerFlowDTO"); + voteGeneralLearnerFlowDTO.setMapStandardNominationsContent(mapStandardNominationsContent); + voteGeneralLearnerFlowDTO.setMapStandardNominationsHTMLedContent(mapStandardNominationsHTMLedContent); + voteGeneralLearnerFlowDTO.setMapStandardRatesContent(mapStandardRatesContent); + voteGeneralLearnerFlowDTO.setMapStandardUserCount(mapStandardUserCount); + voteGeneralLearnerFlowDTO.setMapStandardToolSessionUid(mapStandardToolSessionUid); + voteGeneralLearnerFlowDTO.setMapStandardQuestionUid(mapStandardQuestionUid); + } + + logger.debug("end of prepareChartData, voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); } /** Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java =================================================================== diff -u -r578183182c3aa8d836f7c4ff61886137fb71bcf2 -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java (.../VoteAction.java) (revision 578183182c3aa8d836f7c4ff61886137fb71bcf2) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java (.../VoteAction.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -117,7 +117,7 @@ VoteUtils.cleanUpUserExceptions(request); VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; IVoteService voteService =VoteUtils.getToolService(request); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); voteAuthoringForm.resetUserAction(); return null; } @@ -136,12 +136,10 @@ String richTextTitle = request.getParameter("title"); String richTextInstructions = request.getParameter("instructions"); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); authoringUtil.reconstructOptionContentMapForAdd(mapOptionsContent, request); - logger.debug("richTextInstructions: " + request.getSession().getAttribute(ACTIVITY_INSTRUCTIONS)); - mapOptionsContent=(Map)request.getSession().getAttribute(MAP_OPTIONS_CONTENT); logger.debug("final mapOptionsContent: " + mapOptionsContent); @@ -219,7 +217,7 @@ logger.debug("voteAuthoringForm :" +voteAuthoringForm); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); AuthoringUtil authoringUtil= new AuthoringUtil(); Map mapOptionsContent=(Map)request.getSession().getAttribute(MAP_OPTIONS_CONTENT); @@ -329,7 +327,7 @@ } } - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); ActionMessages errors= new ActionMessages(); errors=validateSubmit(request, errors, voteAuthoringForm); @@ -498,7 +496,7 @@ IVoteService voteService =VoteUtils.getToolService(request); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); Map mapOptionsContent=AuthoringUtil.repopulateMap(request, "optionContent"); logger.debug("mapOptionsContent before move down: " + mapOptionsContent); @@ -619,7 +617,7 @@ String destination=VoteUtils.getDestination(sourceVoteStarter); logger.debug("destination: " + destination); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); Map mapOptionsContent=AuthoringUtil.repopulateMap(request, "optionContent"); logger.debug("mapOptionsContent before move down: " + mapOptionsContent); @@ -777,7 +775,7 @@ String destination=VoteUtils.getDestination(sourceVoteStarter); logger.debug("destination: " + destination); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); logger.debug("will uploadFile for offline file:"); VoteAttachmentDTO voteAttachmentDTO=AuthoringUtil.uploadFile(request, voteAuthoringForm, true); @@ -840,7 +838,7 @@ String destination=VoteUtils.getDestination(sourceVoteStarter); logger.debug("destination: " + destination); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); logger.debug("will uploadFile for online file:"); VoteAttachmentDTO voteAttachmentDTO=AuthoringUtil.uploadFile(request, voteAuthoringForm, false); @@ -902,7 +900,7 @@ String destination=VoteUtils.getDestination(sourceVoteStarter); logger.debug("destination: " + destination); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); String uuid =voteAuthoringForm.getUuid(); logger.debug("uuid:" + uuid); @@ -950,7 +948,7 @@ String destination=VoteUtils.getDestination(sourceVoteStarter); logger.debug("destination: " + destination); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); String uuid =voteAuthoringForm.getUuid(); logger.debug("uuid:" + uuid); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGenerator.java =================================================================== diff -u -r6ccf686e9130dce846ee9229dd7a607277f02437 -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGenerator.java (.../VoteChartGenerator.java) (revision 6ccf686e9130dce846ee9229dd7a607277f02437) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGenerator.java (.../VoteChartGenerator.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -87,7 +87,8 @@ VoteSession voteSession=voteService.retrieveVoteSession(new Long(currentSessionId)); logger.debug("voteSession uid:" + voteSession.getUid()); - MonitoringUtil.prepareChartData(request, voteService, null, voteContent.getVoteContentId(), voteSession.getUid()); + MonitoringUtil.prepareChartData(request, voteService, null, voteContent.getVoteContentId().toString(), + voteSession.getUid().toString(), null); logger.debug("creating maps MAP_STANDARD_NOMINATIONS_CONTENT and MAP_STANDARD_RATES_CONTENT: " + currentSessionId); logger.debug("post prepareChartData : MAP_STANDARD_NOMINATIONS_CONTENT: " + request.getSession().getAttribute(MAP_STANDARD_NOMINATIONS_CONTENT)); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java =================================================================== diff -u -re4797b1aa0dea7822e9aca11510c4294f568f567 -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision e4797b1aa0dea7822e9aca11510c4294f568f567) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -46,13 +46,15 @@ import org.lamsfoundation.lams.tool.vote.VoteAppConstants; import org.lamsfoundation.lams.tool.vote.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.VoteComparator; +import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; import org.lamsfoundation.lams.tool.vote.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.web.action.LamsDispatchAction; /** @@ -71,6 +73,81 @@ * * @author Ozgur Demirtas * + * + * + + + + + + + + + + + + + + + + + + + + + + + + + + + + * */ public class VoteLearningAction extends LamsDispatchAction implements VoteAppConstants { @@ -103,7 +180,7 @@ * main content/question content management and workflow logic * - * if the passed toolContentId exists in the db, we need to get the relevant data into the Map + * if the passed toolContentID exists in the db, we need to get the relevant data into the Map * if not, create the default Map */ public ActionForward unspecified(ActionMapping mapping, @@ -117,7 +194,7 @@ VoteUtils.cleanUpUserExceptions(request); voteLearningForm.setMaxNominationCountReached(new Boolean(false).toString()); - VoteUtils.persistInSessionRichText(request); + VoteUtils.saveInSessionRichText(request); return null; } @@ -131,26 +208,68 @@ VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching viewAllResults..."); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO= new VoteGeneralLearnerFlowDTO(); + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); voteLearningForm.setMaxNominationCountReached(new Boolean(false).toString()); - setContentInUse(request); - IVoteService voteService =VoteUtils.getToolService(request); + voteGeneralLearnerFlowDTO.setNominationsSubmited(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(false).toString()); + + IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); + logger.debug("retrieving voteService from session: " + voteService); - Long toolSessionId=(Long)request.getSession().getAttribute(TOOL_SESSION_ID); - logger.debug("toolSessionId: " + toolSessionId); + String toolSessionID=request.getParameter(TOOL_SESSION_ID); + logger.debug("toolSessionID: " + toolSessionID); + voteLearningForm.setToolSessionID(toolSessionID); + + String userID=request.getParameter(USER_ID); + logger.debug("userID: " + userID); + voteLearningForm.setUserID(userID); + + String revisitingUser=request.getParameter(REVISITING_USER); + logger.debug("revisitingUser: " + revisitingUser); + voteLearningForm.setRevisitingUser(revisitingUser); + + String previewOnly=request.getParameter(PREVIEW_ONLY); + logger.debug("previewOnly: " + previewOnly); + voteLearningForm.setPreviewOnly(previewOnly); + + String maxNominationCount=request.getParameter(MAX_NOMINATION_COUNT); + logger.debug("maxNominationCount: " + maxNominationCount); + voteLearningForm.setMaxNominationCount(maxNominationCount); + + String allowTextEntry=request.getParameter(ALLOW_TEXT_ENTRY); + logger.debug("allowTextEntry: " + allowTextEntry); + voteLearningForm.setAllowTextEntry(allowTextEntry); - VoteSession voteSession=voteService.retrieveVoteSession(toolSessionId); + String voteChangable=request.getParameter(VOTE_CHANGABLE); + logger.debug("voteChangable: " + voteChangable); + voteLearningForm.setVoteChangable(voteChangable); + + String lockOnFinish=request.getParameter(LOCK_ON_FINISH); + logger.debug("lockOnFinish: " + lockOnFinish); + voteLearningForm.setLockOnFinish(lockOnFinish); + + + VoteSession voteSession=voteService.retrieveVoteSession(new Long(toolSessionID)); logger.debug("retrieving voteSession: " + voteSession); VoteContent voteContent=voteSession.getVoteContent(); logger.debug("retrieving voteContent: " + voteContent); + voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle()); + voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions()); + + Long toolContentID=voteContent.getVoteContentId(); + logger.debug("toolContentID: " + toolContentID); + + setContentInUse(request,voteService, toolContentID); + + Long toolSessionUid=voteSession.getUid(); logger.debug("toolSessionUid: " + toolSessionUid); - String userID=(String)request.getSession().getAttribute(USER_ID); - logger.debug("userID: " + userID); VoteQueUsr existingVoteQueUsr=voteService.getVoteUserBySession(new Long(userID), voteSession.getUid()); logger.debug("existingVoteQueUsr: " + existingVoteQueUsr); @@ -161,11 +280,17 @@ logger.debug("voteSession uid:" + voteSession.getUid()); logger.debug("calling prepareChartData:" + voteContent.getVoteContentId() + " " + voteSession.getUid()); - MonitoringUtil.prepareChartData(request, voteService, null, voteContent.getVoteContentId(), voteSession.getUid()); + MonitoringUtil.prepareChartData(request, voteService, null, voteContent.getVoteContentId().toString(), + voteSession.getUid().toString(), voteGeneralLearnerFlowDTO); logger.debug("end of prepareChartData:" + voteContent.getVoteContentId() + " " + voteSession.getUid()); - - voteLearningForm.resetCommands(); + voteLearningForm.resetCommands(); + + + logger.debug("view-only voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); + + logger.debug("fwding to ALL_NOMINATIONS: "+ ALL_NOMINATIONS); return (mapping.findForward(ALL_NOMINATIONS)); } @@ -181,22 +306,71 @@ logger.debug("dispatching viewAnswers..."); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO= new VoteGeneralLearnerFlowDTO(); + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); voteLearningForm.setMaxNominationCountReached(new Boolean(false).toString()); - IVoteService voteService =VoteUtils.getToolService(request); - setContentInUse(request); + voteGeneralLearnerFlowDTO.setNominationsSubmited(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(false).toString()); + + IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); + logger.debug("retrieving voteService from session: " + voteService); + + String toolSessionID=request.getParameter(TOOL_SESSION_ID); + logger.debug("toolSessionID: " + toolSessionID); + voteLearningForm.setToolSessionID(toolSessionID); + + String userID=request.getParameter(USER_ID); + logger.debug("userID: " + userID); + voteLearningForm.setUserID(userID); + + String revisitingUser=request.getParameter(REVISITING_USER); + logger.debug("revisitingUser: " + revisitingUser); + voteLearningForm.setRevisitingUser(revisitingUser); + + String previewOnly=request.getParameter(PREVIEW_ONLY); + logger.debug("previewOnly: " + previewOnly); + voteLearningForm.setPreviewOnly(previewOnly); + + String maxNominationCount=request.getParameter(MAX_NOMINATION_COUNT); + logger.debug("maxNominationCount: " + maxNominationCount); + voteLearningForm.setMaxNominationCount(maxNominationCount); + + String allowTextEntry=request.getParameter(ALLOW_TEXT_ENTRY); + logger.debug("allowTextEntry: " + allowTextEntry); + voteLearningForm.setAllowTextEntry(allowTextEntry); + + String voteChangable=request.getParameter(VOTE_CHANGABLE); + logger.debug("voteChangable: " + voteChangable); + voteLearningForm.setVoteChangable(voteChangable); + + String lockOnFinish=request.getParameter(LOCK_ON_FINISH); + logger.debug("lockOnFinish: " + lockOnFinish); + voteLearningForm.setLockOnFinish(lockOnFinish); + + + VoteSession voteSession=voteService.retrieveVoteSession(new Long(toolSessionID)); + logger.debug("retrieving voteSession: " + voteSession); + + VoteContent voteContent=voteSession.getVoteContent(); + logger.debug("retrieving voteContent: " + voteContent); + + voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle()); + voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions()); + + + Long toolContentID=voteContent.getVoteContentId(); + logger.debug("toolContentID: " + toolContentID); + + setContentInUse(request, voteService, toolContentID); - String isRevisitingUser=voteLearningForm.getRevisitingUser(); - logger.debug("isRevisitingUser: " + isRevisitingUser); - - if (isRevisitingUser.equals("true")) + if (revisitingUser.equals("true")) { - logger.debug("this is a revisiting user, get the nominations from the db: " + isRevisitingUser); - Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); + logger.debug("this is a revisiting user, get the nominations from the db: " + revisitingUser); + logger.debug("toolContentID: " + toolContentID); - VoteQueUsr voteQueUsr=LearningUtil.getUser(request); + VoteQueUsr voteQueUsr=LearningUtil.getUser(request, voteService); logger.debug("voteQueUsr: " + voteQueUsr); List attempts=voteService.getAttemptsForUser(voteQueUsr.getUid()); @@ -221,10 +395,14 @@ } else { - logger.debug("this is not a revisiting user: " + isRevisitingUser); + logger.debug("this is not a revisiting user: " + revisitingUser); } voteLearningForm.resetCommands(); + + logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); + logger.debug("fwd'ing to : " + VIEW_ANSWERS); return (mapping.findForward(VIEW_ANSWERS)); } @@ -238,14 +416,74 @@ { VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching redoQuestionsOk..."); - + + IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); + logger.debug("retrieving voteService from session: " + voteService); + VoteLearningForm voteLearningForm = (VoteLearningForm) form; + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO= new VoteGeneralLearnerFlowDTO(); + + String toolSessionID=request.getParameter(TOOL_SESSION_ID); + logger.debug("toolSessionID: " + toolSessionID); + voteLearningForm.setToolSessionID(toolSessionID); + + String userID=request.getParameter(USER_ID); + logger.debug("userID: " + userID); + voteLearningForm.setUserID(userID); + + String revisitingUser=request.getParameter(REVISITING_USER); + logger.debug("revisitingUser: " + revisitingUser); + voteLearningForm.setRevisitingUser(revisitingUser); + + String previewOnly=request.getParameter(PREVIEW_ONLY); + logger.debug("previewOnly: " + previewOnly); + voteLearningForm.setPreviewOnly(previewOnly); + + String maxNominationCount=request.getParameter(MAX_NOMINATION_COUNT); + logger.debug("maxNominationCount: " + maxNominationCount); + voteLearningForm.setMaxNominationCount(maxNominationCount); + + String allowTextEntry=request.getParameter(ALLOW_TEXT_ENTRY); + logger.debug("allowTextEntry: " + allowTextEntry); + voteLearningForm.setAllowTextEntry(allowTextEntry); + + + String voteChangable=request.getParameter(VOTE_CHANGABLE); + logger.debug("voteChangable: " + voteChangable); + voteLearningForm.setVoteChangable(voteChangable); + + String lockOnFinish=request.getParameter(LOCK_ON_FINISH); + logger.debug("lockOnFinish: " + lockOnFinish); + voteLearningForm.setLockOnFinish(lockOnFinish); + + + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); voteLearningForm.setMaxNominationCountReached(new Boolean(false).toString()); + + voteGeneralLearnerFlowDTO.setNominationsSubmited(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(false).toString()); - setContentInUse(request); + + VoteSession voteSession=voteService.retrieveVoteSession(new Long(toolSessionID)); + logger.debug("retrieving voteSession: " + voteSession); + + VoteContent voteContent=voteSession.getVoteContent(); + logger.debug("retrieving voteContent: " + voteContent); + + voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle()); + voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions()); + + Long toolContentID=voteContent.getVoteContentId(); + logger.debug("toolContentID: " + toolContentID); + + setContentInUse(request, voteService, toolContentID); logger.debug("requested redoQuestionsOk, user is sure to redo the questions."); + voteLearningForm.resetCommands(); + + logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); return redoQuestions(mapping, form, request, response); } @@ -259,22 +497,73 @@ logger.debug("dispatching learnerFinished"); logger.debug("requested learner finished, the learner should be directed to next activity."); + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO= new VoteGeneralLearnerFlowDTO(); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); voteLearningForm.setMaxNominationCountReached(new Boolean(false).toString()); - IVoteService voteService =VoteUtils.getToolService(request); - - Long toolSessionId = (Long) request.getSession().getAttribute(TOOL_SESSION_ID); - String userID=(String) request.getSession().getAttribute(USER_ID); - logger.debug("attempting to leave/complete session with toolSessionId:" + toolSessionId + " and userID:"+userID); + voteGeneralLearnerFlowDTO.setNominationsSubmited(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(false).toString()); + + IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); + logger.debug("retrieving voteService from session: " + voteService); + + String toolSessionID=request.getParameter(TOOL_SESSION_ID); + logger.debug("toolSessionID: " + toolSessionID); + voteLearningForm.setToolSessionID(toolSessionID); + + String userID=request.getParameter(USER_ID); + logger.debug("userID: " + userID); + voteLearningForm.setUserID(userID); + + String revisitingUser=request.getParameter(REVISITING_USER); + logger.debug("revisitingUser: " + revisitingUser); + voteLearningForm.setRevisitingUser(revisitingUser); + + String previewOnly=request.getParameter(PREVIEW_ONLY); + logger.debug("previewOnly: " + previewOnly); + voteLearningForm.setPreviewOnly(previewOnly); + + String maxNominationCount=request.getParameter(MAX_NOMINATION_COUNT); + logger.debug("maxNominationCount: " + maxNominationCount); + voteLearningForm.setMaxNominationCount(maxNominationCount); + + + String allowTextEntry=request.getParameter(ALLOW_TEXT_ENTRY); + logger.debug("allowTextEntry: " + allowTextEntry); + voteLearningForm.setAllowTextEntry(allowTextEntry); + + String voteChangable=request.getParameter(VOTE_CHANGABLE); + logger.debug("voteChangable: " + voteChangable); + voteLearningForm.setVoteChangable(voteChangable); + + String lockOnFinish=request.getParameter(LOCK_ON_FINISH); + logger.debug("lockOnFinish: " + lockOnFinish); + voteLearningForm.setLockOnFinish(lockOnFinish); + + VoteSession voteSession=voteService.retrieveVoteSession(new Long(toolSessionID)); + logger.debug("retrieving voteSession: " + voteSession); + + VoteContent voteContent=voteSession.getVoteContent(); + logger.debug("retrieving voteContent: " + voteContent); + + voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle()); + voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions()); + + logger.debug("attempting to leave/complete session with toolSessionID:" + toolSessionID + " and userID:"+userID); + + logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); + + VoteUtils.cleanUpSessionAbsolute(request); String nextUrl=null; try { - nextUrl=voteService.leaveToolSession(toolSessionId, new Long(userID)); + nextUrl=voteService.leaveToolSession(new Long(toolSessionID), new Long(userID)); logger.debug("nextUrl: "+ nextUrl); } catch (DataMissingException e) @@ -319,10 +608,57 @@ VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching continueOptionsCombined..."); + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO= new VoteGeneralLearnerFlowDTO(); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + + IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); + logger.debug("retrieving voteService from session: " + voteService); + + String toolSessionID=request.getParameter(TOOL_SESSION_ID); + logger.debug("toolSessionID: " + toolSessionID); + voteLearningForm.setToolSessionID(toolSessionID); + + String userID=request.getParameter(USER_ID); + logger.debug("userID: " + userID); + voteLearningForm.setUserID(userID); + + String revisitingUser=request.getParameter(REVISITING_USER); + logger.debug("revisitingUser: " + revisitingUser); + voteLearningForm.setRevisitingUser(revisitingUser); + + + String previewOnly=request.getParameter(PREVIEW_ONLY); + logger.debug("previewOnly: " + previewOnly); + voteLearningForm.setPreviewOnly(previewOnly); + + + String maxNominationCount=request.getParameter(MAX_NOMINATION_COUNT); + logger.debug("maxNominationCount: " + maxNominationCount); + voteLearningForm.setMaxNominationCount(maxNominationCount); + + String allowTextEntry=request.getParameter(ALLOW_TEXT_ENTRY); + logger.debug("allowTextEntry: " + allowTextEntry); + voteLearningForm.setAllowTextEntry(allowTextEntry); + + String voteChangable=request.getParameter(VOTE_CHANGABLE); + logger.debug("voteChangable: " + voteChangable); + voteLearningForm.setVoteChangable(voteChangable); + + String lockOnFinish=request.getParameter(LOCK_ON_FINISH); + logger.debug("lockOnFinish: " + lockOnFinish); + voteLearningForm.setLockOnFinish(lockOnFinish); + + + VoteSession voteSession=voteService.retrieveVoteSession(new Long(toolSessionID)); + logger.debug("retrieving voteSession: " + voteSession); + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); voteLearningForm.setMaxNominationCountReached(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setNominationsSubmited(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(false).toString()); + + Collection voteDisplayOrderIds = voteLearningForm.votesAsCollection(); logger.debug("Checkbox votes "+voteDisplayOrderIds); @@ -337,9 +673,6 @@ ++castVoteCount; } logger.debug("castVoteCount post user entry count: " + castVoteCount); - - - String maxNominationCount=voteLearningForm.getMaxNominationCount(); logger.debug("maxNominationCount: " + maxNominationCount); int intMaxNominationCount=0; @@ -351,39 +684,41 @@ if (castVoteCount > intMaxNominationCount ) { voteLearningForm.setMaxNominationCountReached(new Boolean(true).toString()); + voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(true).toString()); persistInRequestError(request, "error.maxNominationCount.reached"); logger.debug("give warning, max nom count reached..."); logger.debug("fwd'ing to: " + LOAD_LEARNER); return (mapping.findForward(LOAD_LEARNER)); } - IVoteService voteService =VoteUtils.getToolService(request); - setContentInUse(request); - - Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); + VoteContent voteContent=voteSession.getVoteContent(); + logger.debug("retrieving voteContent: " + voteContent); + + voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle()); + voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions()); + + Long toolContentID=voteContent.getVoteContentId(); + logger.debug("toolContentID: " + toolContentID); + + Long toolContentUID=voteContent.getUid(); + logger.debug("toolContentUID: " + toolContentUID); logger.debug("userEntry: " + userEntry); - + + setContentInUse(request,voteService, toolContentID); + boolean userEntryAvailable=false; if ((userEntry != null) && (userEntry.length() > 0)) { logger.debug("userEntry available: " + userEntry); userEntryAvailable=true; } logger.debug("userEntryAvailable " + userEntryAvailable); - - Long toolSessionId=(Long)request.getSession().getAttribute(TOOL_SESSION_ID); - logger.debug("toolSessionId: " + toolSessionId); - - VoteSession voteSession=voteService.retrieveVoteSession(toolSessionId); - logger.debug("retrieving voteSession: " + voteSession); - - Long toolSessionUid=voteSession.getUid(); + + Long toolSessionUid=voteSession.getUid(); logger.debug("toolSessionUid: " + toolSessionUid); boolean isUserDefined=false; - String userID=(String)request.getSession().getAttribute(USER_ID); logger.debug("userID: " + userID); VoteQueUsr existingVoteQueUsr=voteService.getVoteUserBySession(new Long(userID), voteSession.getUid()); logger.debug("existingVoteQueUsr: " + existingVoteQueUsr); @@ -397,7 +732,7 @@ VoteQueUsr voteQueUsr=null; if (isUserDefined == false) { - voteQueUsr=LearningUtil.createUser(request); + voteQueUsr=LearningUtil.createUser(request, voteService, new Long(toolSessionID)); logger.debug("created user in the db"); logger.debug("new create"); } @@ -413,47 +748,46 @@ if (existingVoteQueUsr != null) { logger.debug("attempt removing attempts for user id and session id:" + existingVoteQueUsr.getUid() + " " + voteSession.getUid() ); - voteService.removeAttemptsForUserandSession(existingVoteQueUsr.getUid(), voteSession.getUid() ); + voteService.removeAttemptsForUserandSession(existingVoteQueUsr.getUid(), voteSession.getUid()); logger.debug("votes deleted for user: " + voteQueUsr.getUid()); } // To mimize changes to working code, convert the String[] array to the mapGeneralCheckedOptionsContent structure - VoteContent voteContent=voteSession.getVoteContent(); - Map mapGeneralCheckedOptionsContent = LearningUtil.buildQuestionContentMap(request, voteContent, voteDisplayOrderIds); - + Map mapGeneralCheckedOptionsContent = LearningUtil.buildQuestionContentMap(request, voteService, voteContent, voteDisplayOrderIds); logger.debug("mapGeneralCheckedOptionsContent size: " + mapGeneralCheckedOptionsContent.size()); if (mapGeneralCheckedOptionsContent.size() > 0) { - LearningUtil.createAttempt(request, voteQueUsr, mapGeneralCheckedOptionsContent, userEntry, false, voteSession); + LearningUtil.createAttempt(request, voteService, voteQueUsr, mapGeneralCheckedOptionsContent, + userEntry, false, voteSession, toolContentUID); } if ((mapGeneralCheckedOptionsContent.size() == 0 && (userEntryAvailable == true))) { logger.debug("mapGeneralCheckedOptionsContent size is 0"); Map mapLeanerCheckedOptionsContent= new TreeMap(new VoteComparator()); - //mapLeanerCheckedOptionsContent.put("101", userEntry); - + logger.debug("after mapsize check mapLeanerCheckedOptionsContent " + mapLeanerCheckedOptionsContent); if (userEntry.length() > 0) { logger.debug("creating entry for: " + userEntry); - LearningUtil.createAttempt(request, voteQueUsr, mapLeanerCheckedOptionsContent, userEntry, true, voteSession); + LearningUtil.createAttempt(request, voteService, voteQueUsr, mapLeanerCheckedOptionsContent, userEntry, + true, voteSession, toolContentUID); } } if ((mapGeneralCheckedOptionsContent.size() > 0) && (userEntryAvailable == true)) { logger.debug("mapGeneralCheckedOptionsContent size is > 0" + userEntry); Map mapLeanerCheckedOptionsContent= new TreeMap(new VoteComparator()); - //mapLeanerCheckedOptionsContent.put("102", userEntry); - + logger.debug("after mapsize check mapLeanerCheckedOptionsContent " + mapLeanerCheckedOptionsContent); if (userEntry.length() > 0) { logger.debug("creating entry for: " + userEntry); - LearningUtil.createAttempt(request, voteQueUsr, mapLeanerCheckedOptionsContent, userEntry, false, voteSession); + LearningUtil.createAttempt(request, voteService, voteQueUsr, mapLeanerCheckedOptionsContent, userEntry, + false, voteSession, toolContentUID); } } @@ -464,14 +798,21 @@ request.setAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT, mapGeneralCheckedOptionsContent); logger.debug("final mapGeneralCheckedOptionsContent: " + mapGeneralCheckedOptionsContent); voteLearningForm.setMapGeneralCheckedOptionsContent(mapGeneralCheckedOptionsContent); + voteGeneralLearnerFlowDTO.setMapGeneralCheckedOptionsContent(mapGeneralCheckedOptionsContent); voteLearningForm.setNominationsSubmited(new Boolean(true).toString()); + voteGeneralLearnerFlowDTO.setNominationsSubmited(new Boolean(true).toString()); - logger.debug("calling prepareChartData: " + toolContentId); - MonitoringUtil.prepareChartData(request, voteService, null, toolContentId, toolSessionUid); + logger.debug("calling prepareChartData: " + toolContentID); + MonitoringUtil.prepareChartData(request, voteService, null, toolContentID.toString(), toolSessionUid.toString(), voteGeneralLearnerFlowDTO); + logger.debug("fwding to INDIVIDUAL_REPORT: " + INDIVIDUAL_REPORT); voteLearningForm.resetCommands(); + + logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); + return (mapping.findForward(INDIVIDUAL_REPORT)); } @@ -483,20 +824,68 @@ { logger.debug("dispatching redoQuestions..."); VoteUtils.cleanUpUserExceptions(request); + + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO= new VoteGeneralLearnerFlowDTO(); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + + IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); + logger.debug("retrieving voteService from session: " + voteService); + + String toolSessionID=request.getParameter(TOOL_SESSION_ID); + logger.debug("toolSessionID: " + toolSessionID); + voteLearningForm.setToolSessionID(toolSessionID); + + String userID=request.getParameter(USER_ID); + logger.debug("userID: " + userID); + voteLearningForm.setUserID(userID); + + String revisitingUser=request.getParameter(REVISITING_USER); + logger.debug("revisitingUser: " + revisitingUser); + voteLearningForm.setRevisitingUser(revisitingUser); + + String previewOnly=request.getParameter(PREVIEW_ONLY); + logger.debug("previewOnly: " + previewOnly); + voteLearningForm.setPreviewOnly(previewOnly); + + + String maxNominationCount=request.getParameter(MAX_NOMINATION_COUNT); + logger.debug("maxNominationCount: " + maxNominationCount); + voteLearningForm.setMaxNominationCount(maxNominationCount); + + + String allowTextEntry=request.getParameter(ALLOW_TEXT_ENTRY); + logger.debug("allowTextEntry: " + allowTextEntry); + voteLearningForm.setAllowTextEntry(allowTextEntry); + + String voteChangable=request.getParameter(VOTE_CHANGABLE); + logger.debug("voteChangable: " + voteChangable); + voteLearningForm.setVoteChangable(voteChangable); + + String lockOnFinish=request.getParameter(LOCK_ON_FINISH); + logger.debug("lockOnFinish: " + lockOnFinish); + voteLearningForm.setLockOnFinish(lockOnFinish); + + + VoteSession voteSession=voteService.retrieveVoteSession(new Long(toolSessionID)); + logger.debug("retrieving voteSession: " + voteSession); + + VoteContent voteContent=voteSession.getVoteContent(); + logger.debug("retrieving voteContent: " + voteContent); + + voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle()); + voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions()); + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); voteLearningForm.setMaxNominationCountReached(new Boolean(false).toString()); - IVoteService voteService =VoteUtils.getToolService(request); - - Long toolContentId=(Long)request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId:" + toolContentId); - - VoteContent voteContent=voteService.retrieveVote(toolContentId); - logger.debug("voteContent:" + voteContent); + voteGeneralLearnerFlowDTO.setNominationsSubmited(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(false).toString()); + Long toolContentID=voteContent.getVoteContentId(); + logger.debug("toolContentID:" + toolContentID); + Map mapQuestionsContent= new TreeMap(new VoteComparator()); - mapQuestionsContent=LearningUtil.buildQuestionContentMap(request,voteContent,null); + mapQuestionsContent=LearningUtil.buildQuestionContentMap(request, voteService, voteContent,null); logger.debug("mapQuestionsContent: " + mapQuestionsContent); request.setAttribute(MAP_QUESTION_CONTENT_LEARNER, mapQuestionsContent); @@ -508,22 +897,23 @@ voteLearningForm.setUserEntry(""); - String previewOnly=(String)request.getSession().getAttribute(PREVIEW_ONLY); logger.debug("previewOnly : " + previewOnly); logger.debug("fwd'ing to LOAD_LEARNER : " + LOAD_LEARNER); voteLearningForm.resetCommands(); + + logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); + return (mapping.findForward(LOAD_LEARNER)); } - protected void setContentInUse(HttpServletRequest request) + protected void setContentInUse(HttpServletRequest request, IVoteService voteService, Long toolContentID) { - IVoteService voteService =VoteUtils.getToolService(request); - Long toolContentId=(Long)request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId:" + toolContentId); + logger.debug("toolContentID:" + toolContentID); - VoteContent voteContent=voteService.retrieveVote(toolContentId); + VoteContent voteContent=voteService.retrieveVote(toolContentID); logger.debug("voteContent:" + voteContent); voteContent.setContentInUse(true); logger.debug("content has been set to inuse"); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java =================================================================== diff -u -r96c010334a799ab269945c37537e46dd15f2a2bc -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java (.../VoteLearningForm.java) (revision 96c010334a799ab269945c37537e46dd15f2a2bc) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java (.../VoteLearningForm.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest; +import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; @@ -88,7 +89,25 @@ protected Map mapGeneralCheckedOptionsContent; + protected String userID; + protected String toolSessionID; + protected String learningMode; + protected String toolContentUID; + protected String previewOnly; + + /** + * @return Returns the learningMode. + */ + public String getLearningMode() { + return learningMode; + } + /** + * @param learningMode The learningMode to set. + */ + public void setLearningMode(String learningMode) { + this.learningMode = learningMode; + } /** The check boxes selected on the first voting screen */ protected String[] checkedVotes; @@ -659,4 +678,73 @@ Map mapGeneralCheckedOptionsContent) { this.mapGeneralCheckedOptionsContent = mapGeneralCheckedOptionsContent; } + /** + * @return Returns the userID. + */ + public String getUserID() { + return userID; + } + /** + * @param userID The userID to set. + */ + public void setUserID(String userID) { + this.userID = userID; + } + + public String toString() { + return new ToStringBuilder(this) + .append("activityInstructions: ", activityInstructions) + .append("activityTitle: ", activityTitle) + .append("revisitingUser: ", revisitingUser) + .append("userEntry: ", userEntry) + .append("castVoteCount: ", castVoteCount) + .append("maxNominationCountReached: ", maxNominationCountReached) + .append("activityRunOffline: ", activityRunOffline) + .append("toolSessionID: ", toolSessionID) + .append("learningMode: ", learningMode) + .append("toolContentID: ", toolContentID) + .append("nominationsSubmited: ", nominationsSubmited) + .append("toolContentUID: ", toolContentUID) + .append("previewOnly: ", previewOnly) + .append("mapGeneralCheckedOptionsContent: ", mapGeneralCheckedOptionsContent) + .toString(); + } + + /** + * @return Returns the toolSessionID. + */ + public String getToolSessionID() { + return toolSessionID; + } + /** + * @param toolSessionID The toolSessionID to set. + */ + public void setToolSessionID(String toolSessionID) { + this.toolSessionID = toolSessionID; + } + /** + * @return Returns the toolContentUID. + */ + public String getToolContentUID() { + return toolContentUID; + } + /** + * @param toolContentUID The toolContentUID to set. + */ + public void setToolContentUID(String toolContentUID) { + this.toolContentUID = toolContentUID; + } + + /** + * @return Returns the previewOnly. + */ + public String getPreviewOnly() { + return previewOnly; + } + /** + * @param previewOnly The previewOnly to set. + */ + public void setPreviewOnly(String previewOnly) { + this.previewOnly = previewOnly; + } } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java =================================================================== diff -u -r9393c098e5dfd603e2d37347cd1e531a25aa424a -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java (.../VoteLearningStarterAction.java) (revision 9393c098e5dfd603e2d37347cd1e531a25aa424a) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java (.../VoteLearningStarterAction.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -19,53 +19,17 @@ * * http://www.gnu.org/licenses/gpl.txt * ***********************************************************************/ -package org.lamsfoundation.lams.tool.vote.web; -import java.io.IOException; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.apache.log4j.Logger; -import org.apache.struts.Globals; -import org.apache.struts.action.Action; -import org.apache.struts.action.ActionForm; -import org.apache.struts.action.ActionForward; -import org.apache.struts.action.ActionMapping; -import org.apache.struts.action.ActionMessage; -import org.apache.struts.action.ActionMessages; -import org.lamsfoundation.lams.tool.vote.VoteAppConstants; -import org.lamsfoundation.lams.tool.vote.VoteApplicationException; -import org.lamsfoundation.lams.tool.vote.VoteComparator; -import org.lamsfoundation.lams.tool.vote.VoteUtils; -import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; -import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; -import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; -import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; -import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; -import org.lamsfoundation.lams.tool.vote.service.IVoteService; -import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy; -import org.lamsfoundation.lams.usermanagement.dto.UserDTO; -import org.lamsfoundation.lams.web.session.SessionManager; -import org.lamsfoundation.lams.web.util.AttributeNames; - - /** * * @author Ozgur Demirtas * - * /&userId=&toolSessionId=123&mode=teacher + * /&userId=&toolSessionID=123&mode=teacher * Tool Session: * * A tool session is the concept by which which the tool and the LAMS core manage a set of learners interacting with the tool. - * The tool session id (toolSessionId) is generated by the LAMS core and given to the tool. + * The tool session id (toolSessionID) is generated by the LAMS core and given to the tool. * A tool session represents the use of a tool for a particulate activity for a group of learners. * So if an activity is ungrouped, then one tool session exist for for a tool activity in a learning design. * @@ -82,7 +46,7 @@ * If the tool is a multistage tool, for example asking a series of questions, the tool must keep track of what the learner has already done. * If the user logs out and comes back to the tool later, then the tool should resume from where the learner stopped. * When the user is completed with tool, then the tool notifies the progress engine by calling - * org.lamsfoundation.lams.learning.service.completeToolSession(Long toolSessionId, User learner). + * org.lamsfoundation.lams.learning.service.completeToolSession(Long toolSessionID, User learner). * * If the tool's content DefineLater flag is set to true, then the learner should see a "Please wait for the teacher to define this part...." * style message. @@ -93,19 +57,136 @@ * If the tool has a LockOnFinish flag, then the tool should lock learner's entries once they have completed the activity. * If they return to the activity (e.g. via the progress bar) then the entries should be read only. * + * + + + + + + + + + + + + + + + + + + + + + + + + + + + + + * */ /** * * Note: Because of Voting learning reporting structure, Show Learner Report is always ON even if in authoring it is set to false. */ +package org.lamsfoundation.lams.tool.vote.web; + +import java.io.IOException; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.log4j.Logger; +import org.apache.struts.Globals; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.lamsfoundation.lams.tool.vote.VoteAppConstants; +import org.lamsfoundation.lams.tool.vote.VoteApplicationException; +import org.lamsfoundation.lams.tool.vote.VoteComparator; +import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; +import org.lamsfoundation.lams.tool.vote.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.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; + public class VoteLearningStarterAction extends Action implements VoteAppConstants { static Logger logger = Logger.getLogger(VoteLearningStarterAction.class.getName()); /* * By now, the passed tool session id MUST exist in the db through the calling of: - * public void createToolSession(Long toolSessionId, Long toolContentId) by the container. + * public void createToolSession(Long toolSessionID, Long toolContentId) by the container. * * * make sure this session exists in tool's session table by now. @@ -119,42 +200,45 @@ Map mapQuestionsContent= new TreeMap(new VoteComparator()); Map mapAnswers= new TreeMap(new VoteComparator()); - IVoteService voteService = VoteUtils.getToolService(request); + IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); logger.debug("retrieving voteService from session: " + voteService); - if (voteService == null) - { - voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); - logger.debug("retrieving voteService from proxy: " + voteService); - request.getSession().setAttribute(TOOL_SERVICE, voteService); - } + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO= new VoteGeneralLearnerFlowDTO(); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setRevisitingUser(new Boolean(false).toString()); voteLearningForm.setUserEntry(""); voteLearningForm.setCastVoteCount(0); voteLearningForm.setMaxNominationCountReached(new Boolean(false).toString()); voteLearningForm.setActivityRunOffline(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setRevisitingUser(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setUserEntry(""); + voteGeneralLearnerFlowDTO.setCastVoteCount("0"); + voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(false).toString()); + voteGeneralLearnerFlowDTO.setActivityRunOffline(new Boolean(false).toString()); + + /* * save time zone information to session scope. */ - VoteUtils.persistInSessionTimeZone(request); - ActionForward validateParameters=validateParameters(request, mapping); + VoteUtils.saveTimeZone(request); + ActionForward validateParameters=validateParameters(request, mapping, voteLearningForm); logger.debug("validateParameters: " + validateParameters); if (validateParameters != null) { return validateParameters; } - Long toolSessionID=(Long) request.getSession().getAttribute(AttributeNames.PARAM_TOOL_SESSION_ID); + String toolSessionID=voteLearningForm.getToolSessionID(); logger.debug("retrieved toolSessionID: " + toolSessionID); /* * by now, we made sure that the passed tool session id exists in the db as a new record * Make sure we can retrieve it and the relavent content */ - VoteSession voteSession=voteService.retrieveVoteSession(toolSessionID); + VoteSession voteSession=voteService.retrieveVoteSession(new Long(toolSessionID)); logger.debug("retrieving voteSession: " + voteSession); if (voteSession == null) @@ -177,7 +261,6 @@ VoteUtils.cleanUpSessionAbsolute(request); logger.debug("error: The tool expects voteContent."); persistInRequestError(request,"error.content.doesNotExist"); - request.getSession().setAttribute(USER_EXCEPTION_CONTENT_DOESNOTEXIST, new Boolean(true).toString()); return (mapping.findForward(ERROR_LIST)); } @@ -186,14 +269,17 @@ * The content we retrieved above must have been created before in Authoring time. * And the passed tool session id already refers to it. */ - setupAttributes(request, voteContent, voteLearningForm); + setupAttributes(request, voteContent, voteLearningForm, voteGeneralLearnerFlowDTO); - request.getSession().setAttribute(TOOL_CONTENT_ID, voteContent.getVoteContentId()); logger.debug("using TOOL_CONTENT_ID: " + voteContent.getVoteContentId()); + voteLearningForm.setToolContentID(voteContent.getVoteContentId().toString()); + voteGeneralLearnerFlowDTO.setToolContentID(voteContent.getVoteContentId().toString()); - request.getSession().setAttribute(TOOL_CONTENT_UID, voteContent.getUid()); logger.debug("using TOOL_CONTENT_UID: " + voteContent.getUid()); + voteLearningForm.setToolContentUID(voteContent.getUid().toString()); + voteGeneralLearnerFlowDTO.setToolContentUID(voteContent.getUid().toString()); + /* Is the request for a preview by the author? Preview The tool must be able to show the specified content as if it was running in a lesson. It will be the learner url with tool access mode set to ToolAccessMode.AUTHOR @@ -204,20 +290,30 @@ */ /* ? CHECK THIS: how do we determine whether preview is requested? Mode is not enough on its own.*/ + + logger.debug("before checking for preview voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); + /*handle PREVIEW mode*/ - String mode=(String) request.getSession().getAttribute(LEARNING_MODE); + String mode=voteLearningForm.getLearningMode(); logger.debug("mode: " + mode); if ((mode != null) && (mode.equals("author"))) { logger.debug("Author requests for a preview of the content."); logger.debug("existing voteContent:" + voteContent); - commonContentSetup(request, voteContent); + commonContentSetup(request, voteService, voteContent, voteGeneralLearnerFlowDTO); /* PREVIEW_ONLY for jsp*/ - request.getSession().setAttribute(PREVIEW_ONLY, new Boolean(true).toString()); + //request.getSession().setAttribute(PREVIEW_ONLY, new Boolean(true).toString()); + voteLearningForm.setPreviewOnly(new Boolean(true).toString()); + voteGeneralLearnerFlowDTO.setPreviewOnly(new Boolean(true).toString()); + VoteLearningAction voteLearningAction= new VoteLearningAction(); logger.debug("presenting standard learner screen for preview mode..."); + + logger.debug("preview voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); return (mapping.findForward(LOAD_LEARNER)); } @@ -231,15 +327,19 @@ if ((learnerProgressUserId != null) && (mode.equals("teacher"))) { logger.debug("start generating learner progress report."); - Long currentToolSessionId=(Long)request.getSession().getAttribute(TOOL_SESSION_ID); + String currentToolSessionId=voteLearningForm.getToolSessionID(); logger.debug("currentToolSessionId: " + currentToolSessionId); /* the report should have only this user's entries(with userId)*/ VoteMonitoringAction voteMonitoringAction= new VoteMonitoringAction(); - voteMonitoringAction.refreshSummaryData(request, voteContent, voteService, true, true, currentToolSessionId.toString(), learnerProgressUserId, true); + voteMonitoringAction.refreshSummaryData(request, voteContent, voteService, true, true, currentToolSessionId.toString(), + learnerProgressUserId, true, voteGeneralLearnerFlowDTO); - request.getSession().setAttribute(REQUEST_LEARNING_REPORT, new Boolean(true).toString()); - request.getSession().setAttribute(REQUEST_LEARNING_REPORT_PROGRESS, new Boolean(true).toString()); + voteGeneralLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); + voteGeneralLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); + + logger.debug("learner progress voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); logger.debug("fwd'ing to for learner progress" + INDIVIDUAL_LEARNER_REPORT); return (mapping.findForward(INDIVIDUAL_LEARNER_REPORT)); @@ -254,9 +354,12 @@ { VoteUtils.cleanUpSessionAbsolute(request); logger.debug("warning to learner: the activity is offline."); - request.getSession().setAttribute(USER_EXCEPTION_CONTENT_RUNOFFLINE, new Boolean(true).toString()); voteLearningForm.setActivityRunOffline(new Boolean(true).toString()); + voteGeneralLearnerFlowDTO.setActivityRunOffline(new Boolean(true).toString()); persistInRequestError(request,"label.learning.runOffline"); + + logger.debug("runOffline voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); return (mapping.findForward(ERROR_LIST)); } @@ -272,7 +375,7 @@ /* * fetch question content from content */ - mapQuestionsContent=LearningUtil.buildQuestionContentMap(request,voteContent,null); + mapQuestionsContent=LearningUtil.buildQuestionContentMap(request, voteService, voteContent,null); logger.debug("mapQuestionsContent: " + mapQuestionsContent); request.setAttribute(MAP_QUESTION_CONTENT_LEARNER, mapQuestionsContent); @@ -286,7 +389,7 @@ * his answers must be displayed read-only * */ - String userID=(String) request.getSession().getAttribute(USER_ID); + String userID=voteLearningForm.getUserID(); logger.debug("userID:" + userID); logger.debug("voteSession uid :" + voteSession.getUid()); @@ -304,8 +407,9 @@ logger.debug("voteQueUsr is not available in the db:" + voteQueUsr); } - String learningMode=(String) request.getSession().getAttribute(LEARNING_MODE); + String learningMode=voteLearningForm.getLearningMode(); logger.debug("users learning mode is: " + learningMode); + /*if the user's session id AND user id exists in the tool tables go to redo questions.*/ if ((voteQueUsr != null) && learningMode.equals("learner")) { @@ -315,15 +419,14 @@ logger.debug("voteUserSession: " + voteUserSession); String userSessionId=voteUserSession.getVoteSessionId().toString(); logger.debug("userSessionId: " + userSessionId); - Long toolSessionId=(Long)request.getSession().getAttribute(TOOL_SESSION_ID); - logger.debug("current toolSessionId: " + toolSessionId); + logger.debug("current toolSessionID: " + toolSessionID); - if (toolSessionId.toString().equals(userSessionId)) + if (toolSessionID.toString().equals(userSessionId)) { logger.debug("the learner has already responsed to this content, just generate a read-only report. Use redo questions for this."); logger.debug("start building MAP_GENERAL_CHECKED_OPTIONS_CONTENT"); - Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); + String toolContentId=voteLearningForm.getToolContentID(); logger.debug("toolContentId: " + toolContentId); List attempts=voteService.getAttemptsForUser(voteQueUsr.getUid()); @@ -377,12 +480,16 @@ } - logger.debug("the user's session id AND user id exists in the tool tables go to redo questions. " + toolSessionId + " voteQueUsr: " + + logger.debug("the user's session id AND user id exists in the tool tables go to redo questions. " + toolSessionID + " voteQueUsr: " + voteQueUsr + " user id: " + voteQueUsr.getQueUsrId()); voteLearningForm.setRevisitingUser(new Boolean(true).toString()); - + voteGeneralLearnerFlowDTO.setRevisitingUser(new Boolean(true).toString()); logger.debug("preparing chart data for readonly mode"); - MonitoringUtil.prepareChartData(request, voteService, null, voteContent.getVoteContentId(), toolSessionId); + MonitoringUtil.prepareChartData(request, voteService, null, voteContent.getVoteContentId().toString(), toolSessionID, voteGeneralLearnerFlowDTO); + + logger.debug("view-only voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); + request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO,voteGeneralLearnerFlowDTO); + logger.debug("fwd'ing to: " + ALL_NOMINATIONS); return (mapping.findForward(ALL_NOMINATIONS)); } @@ -405,15 +512,16 @@ * @param request * @param voteContent */ - protected void commonContentSetup(HttpServletRequest request, VoteContent voteContent) + protected void commonContentSetup(HttpServletRequest request, IVoteService voteService, VoteContent voteContent, + VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO) { - Map mapQuestionsContent=LearningUtil.buildQuestionContentMap(request,voteContent,null); + Map mapQuestionsContent=LearningUtil.buildQuestionContentMap(request,voteService, voteContent,null); logger.debug("mapQuestionsContent: " + mapQuestionsContent); request.setAttribute(MAP_QUESTION_CONTENT_LEARNER, mapQuestionsContent); logger.debug("MAP_QUESTION_CONTENT_LEARNER: " + request.getAttribute(MAP_QUESTION_CONTENT_LEARNER)); logger.debug("voteContent has : " + mapQuestionsContent.size() + " entries."); - request.getSession().setAttribute(TOTAL_QUESTION_COUNT, new Long(mapQuestionsContent.size()).toString()); + voteGeneralLearnerFlowDTO.setTotalQuestionCount(new Long(mapQuestionsContent.size()).toString()); } @@ -424,7 +532,8 @@ * @param request * @param voteContent */ - protected void setupAttributes(HttpServletRequest request, VoteContent voteContent, VoteLearningForm voteLearningForm) + protected void setupAttributes(HttpServletRequest request, VoteContent voteContent, + VoteLearningForm voteLearningForm, VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO) { logger.debug("IS_CONTENT_IN_USE: " + voteContent.isContentInUse()); @@ -446,22 +555,28 @@ voteLearningForm.setActivityTitle(voteContent.getTitle()); voteLearningForm.setActivityInstructions(voteContent.getInstructions()); voteLearningForm.setActivityRunOffline(new Boolean(voteContent.isRunOffline()).toString()); - voteLearningForm.setMaxNominationCount(voteContent.getMaxNominationCount()); voteLearningForm.setAllowTextEntry(new Boolean(voteContent.isAllowText()).toString()); logger.debug("allow text entry is: " + voteLearningForm.getAllowTextEntry()); voteLearningForm.setLockOnFinish(new Boolean(voteContent.isLockOnFinish()).toString()); voteLearningForm.setVoteChangable(new Boolean(voteContent.isVoteChangable()).toString()); logger.debug("ACTIVITY_TITLE: " + voteContent.getTitle()); - request.getSession().setAttribute(ACTIVITY_TITLE,voteContent.getTitle()); - logger.debug("ACTIVITY_INSTRUCTIONS: " + voteContent.getInstructions()); - request.getSession().setAttribute(ACTIVITY_INSTRUCTIONS,voteContent.getInstructions()); + + voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle()); + voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions()); + voteGeneralLearnerFlowDTO.setActivityRunOffline(new Boolean(voteContent.isRunOffline()).toString()); + voteGeneralLearnerFlowDTO.setMaxNominationCount(voteContent.getMaxNominationCount()); + voteGeneralLearnerFlowDTO.setAllowTextEntry(new Boolean(voteContent.isAllowText()).toString()); + voteGeneralLearnerFlowDTO.setLockOnFinish(new Boolean(voteContent.isLockOnFinish()).toString()); + voteGeneralLearnerFlowDTO.setVoteChangable(new Boolean(voteContent.isVoteChangable()).toString()); + voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle()); + voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions()); } - protected ActionForward validateParameters(HttpServletRequest request, ActionMapping mapping) + protected ActionForward validateParameters(HttpServletRequest request, ActionMapping mapping, VoteLearningForm voteLearningForm) { /* * obtain and setup the current user's data @@ -478,7 +593,7 @@ { userID = user.getUserID().toString(); logger.debug("retrieved userId: " + userID); - request.getSession().setAttribute(USER_ID, userID); + voteLearningForm.setUserID(userID); } } @@ -487,26 +602,24 @@ * process incoming tool session id and later derive toolContentId from it. */ String strToolSessionId=request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID); - long toolSessionId=0; + long toolSessionID=0; if ((strToolSessionId == null) || (strToolSessionId.length() == 0)) { VoteUtils.cleanUpSessionAbsolute(request); - request.getSession().setAttribute(USER_EXCEPTION_TOOLSESSIONID_REQUIRED, new Boolean(true).toString()); persistInRequestError(request, "error.toolSessionId.required"); return (mapping.findForward(ERROR_LIST)); } else { try { - toolSessionId=new Long(strToolSessionId).longValue(); - logger.debug("passed TOOL_SESSION_ID : " + new Long(toolSessionId)); - request.getSession().setAttribute(TOOL_SESSION_ID,new Long(toolSessionId)); + toolSessionID=new Long(strToolSessionId).longValue(); + logger.debug("passed TOOL_SESSION_ID : " + new Long(toolSessionID)); + voteLearningForm.setToolSessionID(new Long(toolSessionID).toString()); } catch(NumberFormatException e) { VoteUtils.cleanUpSessionAbsolute(request); - request.getSession().setAttribute(USER_EXCEPTION_NUMBERFORMAT, new Boolean(true).toString()); persistInRequestError(request, "error.sessionId.numberFormatException"); logger.debug("add error.sessionId.numberFormatException to ActionMessages."); return (mapping.findForward(ERROR_LIST)); @@ -531,7 +644,7 @@ return (mapping.findForward(ERROR_LIST)); } logger.debug("session LEARNING_MODE set to:" + mode); - request.getSession().setAttribute(LEARNING_MODE, mode); + voteLearningForm.setLearningMode(mode); return null; } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java =================================================================== diff -u -r6ccf686e9130dce846ee9229dd7a607277f02437 -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java (.../VoteMonitoringAction.java) (revision 6ccf686e9130dce846ee9229dd7a607277f02437) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java (.../VoteMonitoringAction.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -40,6 +40,7 @@ import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.vote.VoteAppConstants; import org.lamsfoundation.lams.tool.vote.VoteApplicationException; +import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO; import org.lamsfoundation.lams.tool.vote.VoteMonitoredAnswersDTO; import org.lamsfoundation.lams.tool.vote.VoteMonitoredUserDTO; import org.lamsfoundation.lams.tool.vote.VoteUtils; @@ -162,9 +163,10 @@ VoteSession voteSession=voteService.retrieveVoteSession(new Long(currentMonitoredToolSession)); logger.debug("voteSession uid:" + voteSession.getUid()); - MonitoringUtil.prepareChartData(request, voteService, voteMonitoringForm, voteContent.getVoteContentId(), voteSession.getUid()); + MonitoringUtil.prepareChartData(request, voteService, voteMonitoringForm, voteContent.getVoteContentId().toString(), + voteSession.getUid().toString(), null); - refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true); + refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true, null); request.getSession().setAttribute(SELECTION_CASE, new Long(1)); } @@ -186,9 +188,11 @@ public void refreshSummaryData(HttpServletRequest request, VoteContent voteContent, IVoteService voteService, - boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId, boolean showUserEntriesBySession) + boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId, + boolean showUserEntriesBySession, VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO) { - logger.debug("doing refreshSummaryData."); + logger.debug("doing refreshSummaryData." + voteGeneralLearnerFlowDTO); + if (voteService == null) { logger.debug("will retrieve voteService"); @@ -250,6 +254,8 @@ List listMonitoredAnswersContainerDTO=MonitoringUtil.buildGroupsQuestionData(request, voteContent, isUserNamesVisible, isLearnerRequest, currentSessionId, userId, voteService); request.getSession().setAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO, listMonitoredAnswersContainerDTO); + + logger.debug("LIST_MONITORED_ANSWERS_CONTAINER_DTO: " + request.getSession().getAttribute(LIST_MONITORED_ANSWERS_CONTAINER_DTO)); /* ends here. */ @@ -264,6 +270,15 @@ request.getSession().setAttribute(EXISTS_OPEN_VOTES, new Boolean(true).toString()); } + + if (voteGeneralLearnerFlowDTO !=null) + { + logger.debug("placing dtos within the voteGeneralLearnerFlowDTO: "); + voteGeneralLearnerFlowDTO.setListMonitoredAnswersContainerDto(listMonitoredAnswersContainerDTO); + voteGeneralLearnerFlowDTO.setListUserEntries(listUserEntries);; + } + + logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO); } @@ -861,7 +876,7 @@ String currentMonitoredToolSession=voteMonitoringForm.getSelectedToolSessionId(); logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); - refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true); + refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true, null); if (currentMonitoredToolSession.equals("All")) { @@ -943,7 +958,7 @@ String currentMonitoredToolSession=voteMonitoringForm.getSelectedToolSessionId(); logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); - refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true); + refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true, null); if (currentMonitoredToolSession.equals("All")) { @@ -1000,7 +1015,7 @@ String currentMonitoredToolSession=voteMonitoringForm.getSelectedToolSessionId(); logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession); - refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true); + refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true, null); if (currentMonitoredToolSession.equals("All")) { Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java =================================================================== diff -u -r6ccf686e9130dce846ee9229dd7a607277f02437 -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java (.../VoteMonitoringStarterAction.java) (revision 6ccf686e9130dce846ee9229dd7a607277f02437) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java (.../VoteMonitoringStarterAction.java) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -145,7 +145,7 @@ request.getSession().setAttribute(REQUEST_LEARNING_REPORT, new Boolean(false).toString()); request.getSession().setAttribute(USER_EXCEPTION_NO_TOOL_SESSIONS, new Boolean(true).toString()); - VoteUtils.persistInSessionTimeZone(request); + VoteUtils.saveTimeZone(request); /* we have made sure TOOL_CONTENT_ID is passed */ Long toolContentId =(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); @@ -241,7 +241,7 @@ VoteMonitoringAction voteMonitoringAction= new VoteMonitoringAction(); logger.debug("refreshing summary data..."); - voteMonitoringAction.refreshSummaryData(request, voteContent, voteService, true, false, null, null, false); + voteMonitoringAction.refreshSummaryData(request, voteContent, voteService, true, false, null, null, false, null); logger.debug("refreshing stats data..."); voteMonitoringAction.refreshStatsData(request); Index: lams_tool_vote/web/WEB-INF/struts-config.xml =================================================================== diff -u -r0409f98dc17dfd380badf33ae103a47d0fffc4e5 -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 0409f98dc17dfd380badf33ae103a47d0fffc4e5) +++ lams_tool_vote/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -143,7 +143,7 @@ @@ -223,7 +223,7 @@ Index: lams_tool_vote/web/learning/AllNominations.jsp =================================================================== diff -u -r670348809a75968ac0a35dc2a9dab12a4558211b -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/web/learning/AllNominations.jsp (.../AllNominations.jsp) (revision 670348809a75968ac0a35dc2a9dab12a4558211b) +++ lams_tool_vote/web/learning/AllNominations.jsp (.../AllNominations.jsp) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -50,24 +50,31 @@

- +

- + + + + + + + + - +
- + - +
images/success.gif" align="left" width=20 height=20> @@ -109,7 +116,7 @@
@@ -119,17 +126,17 @@ - + - + - + @@ -157,7 +164,7 @@ - +  ( ) Index: lams_tool_vote/web/learning/AnswersContent.jsp =================================================================== diff -u -r42c1b74cbc393836dc6e71afbb4223c27690e40e -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 42c1b74cbc393836dc6e71afbb4223c27690e40e) +++ lams_tool_vote/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -99,42 +99,48 @@

- +

- - - - + + + + + + + + + + +
+ - + - + - -
- +
- +
Index: lams_tool_vote/web/learning/ExitLearning.jsp =================================================================== diff -u -r42c1b74cbc393836dc6e71afbb4223c27690e40e -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/web/learning/ExitLearning.jsp (.../ExitLearning.jsp) (revision 42c1b74cbc393836dc6e71afbb4223c27690e40e) +++ lams_tool_vote/web/learning/ExitLearning.jsp (.../ExitLearning.jsp) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -50,17 +50,24 @@

- +

- - -
+ + + + + + + + + +
Index: lams_tool_vote/web/learning/IndividualLearnerResults.jsp =================================================================== diff -u -r42c1b74cbc393836dc6e71afbb4223c27690e40e -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision 42c1b74cbc393836dc6e71afbb4223c27690e40e) +++ lams_tool_vote/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -50,7 +50,7 @@

- +

@@ -59,9 +59,17 @@ - - - + + + + + + + + + + +
Index: lams_tool_vote/web/learning/LearnerRep.jsp =================================================================== diff -u -r6ccf686e9130dce846ee9229dd7a607277f02437 -r793f2f3e75e63dda9c5b717317c8ad9553546e93 --- lams_tool_vote/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision 6ccf686e9130dce846ee9229dd7a607277f02437) +++ lams_tool_vote/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision 793f2f3e75e63dda9c5b717317c8ad9553546e93) @@ -57,7 +57,7 @@

- +

@@ -66,7 +66,7 @@
- +
@@ -79,15 +79,15 @@ -
+
- + - + + + + - + + + + @@ -126,7 +132,7 @@ - + @@ -147,7 +153,10 @@ - + + + +
    
: @@ -109,12 +109,18 @@ - +