Index: lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/VoteContent.hbm.xml =================================================================== diff -u -rc5172424555b18ee103dd5609fd36e2d886d035a -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/VoteContent.hbm.xml (.../VoteContent.hbm.xml) (revision c5172424555b18ee103dd5609fd36e2d886d035a) +++ lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/VoteContent.hbm.xml (.../VoteContent.hbm.xml) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -76,15 +76,6 @@ /> - - - - - 0)) - { - request.getSession().setAttribute(RICHTEXT_REPORT_TITLE,richTextReportTitle); - } - - if ((richTextEndLearningMessage != null) && (richTextEndLearningMessage.length() > 0)) - { - request.getSession().setAttribute(RICHTEXT_END_LEARNING_MSG,richTextEndLearningMessage); - } - } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java =================================================================== diff -u -r52a1e39117be580c8b8992c55da0411a49151ff8 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java (.../VoteUsrAttemptDAO.java) (revision 52a1e39117be580c8b8992c55da0411a49151ff8) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteUsrAttemptDAO.java (.../VoteUsrAttemptDAO.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -28,7 +28,6 @@ import org.apache.log4j.Logger; import org.hibernate.FlushMode; import org.lamsfoundation.lams.tool.vote.dao.IVoteUsrAttemptDAO; -import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; import org.springframework.orm.hibernate3.HibernateTemplate; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteContent.java =================================================================== diff -u -rc5172424555b18ee103dd5609fd36e2d886d035a -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteContent.java (.../VoteContent.java) (revision c5172424555b18ee103dd5609fd36e2d886d035a) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteContent.java (.../VoteContent.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -60,9 +60,7 @@ /** nullable persistent field */ private String instructions; - private String posting; - - /** nullable persistent field */ + /** nullable persistent field */ private boolean defineLater; /** nullable persistent field */ @@ -74,19 +72,8 @@ /** nullable persistent field */ private Date updateDate; + /** nullable persistent field */ - private boolean questionsSequenced; - - /** nullable persistent field */ - private boolean usernameVisible; - - /** nullable persistent field */ - private String reportTitle; - - /** nullable persistent field */ - private String monitoringReportTitle; - - /** nullable persistent field */ private long createdBy; private boolean voteChangable; @@ -107,15 +94,7 @@ /** nullable persistent field */ private String onlineInstructions; - /** nullable persistent field */ - private String endLearningMessage; - - /** nullable persistent field */ - private boolean retries; - - private boolean showReport; - - + /** persistent field */ private Set voteQueContents; @@ -126,35 +105,27 @@ private Set voteAttachments; /** full constructor */ - public VoteContent(Long voteContentId, String content, String title, String instructions, String posting, boolean defineLater, boolean runOffline, - Date creationDate, Date updateDate, boolean questionsSequenced, boolean voteChangable, boolean allowText, String maxNominationCount, boolean usernameVisible, String reportTitle, - String monitoringReportTitle, long createdBy, boolean lockOnFinish, boolean contentInUse, String offlineInstructions, - String onlineInstructions, String endLearningMessage, boolean showReport, boolean retries, Set voteQueContents, Set voteSessions, + public VoteContent(Long voteContentId, String content, String title, String instructions, boolean defineLater, boolean runOffline, + Date creationDate, Date updateDate, boolean voteChangable, boolean allowText, String maxNominationCount, + long createdBy, boolean lockOnFinish, boolean contentInUse, String offlineInstructions, + String onlineInstructions, Set voteQueContents, Set voteSessions, Set voteAttachments) { this.voteContentId = voteContentId; this.content=content; this.title = title; this.instructions = instructions; - this.posting = posting; this.defineLater = defineLater; this.runOffline = runOffline; this.creationDate = creationDate; this.updateDate = updateDate; - this.questionsSequenced = questionsSequenced; this.voteChangable=voteChangable; this.maxNominationCount=maxNominationCount; this.allowText=allowText; - this.usernameVisible = usernameVisible; - this.reportTitle = reportTitle; - this.monitoringReportTitle = monitoringReportTitle; this.createdBy = createdBy; this.lockOnFinish = lockOnFinish; this.contentInUse = contentInUse; this.offlineInstructions = offlineInstructions; this.onlineInstructions = onlineInstructions; - this.endLearningMessage = endLearningMessage; - this.retries=retries; - this.showReport = showReport; this.voteQueContents = voteQueContents; this.voteSessions = voteSessions; this.voteAttachments = voteAttachments; @@ -191,26 +162,18 @@ vote.getContent(), vote.getTitle(), vote.getInstructions(), - vote.getPosting(), vote.isDefineLater(), vote.isRunOffline(), vote.getCreationDate(), vote.getUpdateDate(), - vote.isQuestionsSequenced(), vote.isVoteChangable(), vote.isAllowText(), vote.getMaxNominationCount(), - vote.isUsernameVisible(), - vote.getReportTitle(), - vote.getMonitoringReportTitle(), vote.getCreatedBy(), vote.isLockOnFinish(), vote.isContentInUse(), vote.getOfflineInstructions(), vote.getOnlineInstructions(), - vote.getEndLearningMessage(), - vote.isShowReport(), - vote.isRetries(), new TreeSet(), new TreeSet(), new TreeSet() @@ -318,38 +281,6 @@ this.updateDate = updateDate; } - public boolean isQuestionsSequenced() { - return this.questionsSequenced; - } - - public void setQuestionsSequenced(boolean questionsSequenced) { - this.questionsSequenced = questionsSequenced; - } - - public boolean isUsernameVisible() { - return this.usernameVisible; - } - - public void setUsernameVisible(boolean usernameVisible) { - this.usernameVisible = usernameVisible; - } - - public String getReportTitle() { - return this.reportTitle; - } - - public void setReportTitle(String reportTitle) { - this.reportTitle = reportTitle; - } - - public String getMonitoringReportTitle() { - return this.monitoringReportTitle; - } - - public void setMonitoringReportTitle(String monitoringReportTitle) { - this.monitoringReportTitle = monitoringReportTitle; - } - public long getCreatedBy() { return this.createdBy; } @@ -383,14 +314,6 @@ this.onlineInstructions = onlineInstructions; } - public String getEndLearningMessage() { - return this.endLearningMessage; - } - - public void setEndLearningMessage(String endLearningMessage) { - this.endLearningMessage = endLearningMessage; - } - /** * @return Returns the voteQueContents. @@ -433,31 +356,6 @@ .toString(); } - /** - * @return Returns the retries. - */ - public boolean isRetries() { - return retries; - } - /** - * @param retries The retries to set. - */ - public void setRetries(boolean retries) { - this.retries = retries; - } - - /** - * @return Returns the showReport. - */ - public boolean isShowReport() { - return showReport; - } - /** - * @param showReport The showReport to set. - */ - public void setShowReport(boolean showReport) { - this.showReport = showReport; - } /** * @return Returns the voteAttachments. @@ -520,18 +418,6 @@ public void setVoteContentId(Long voteContentId) { this.voteContentId = voteContentId; } - /** - * @return Returns the posting. - */ - public String getPosting() { - return posting; - } - /** - * @param posting The posting to set. - */ - public void setPosting(String posting) { - this.posting = posting; - } /** * @return Returns the voteChangable. Fisheye: Tag 261d9a36d11a99322125fa55faaddffc16a041b3 refers to a dead (removed) revision in file `lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteOptsContent.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.java =================================================================== diff -u -r6cfdabe63a1d792f3135529031f9a969768a6b10 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.java (.../VoteQueContent.java) (revision 6cfdabe63a1d792f3135529031f9a969768a6b10) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteQueContent.java (.../VoteQueContent.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -64,45 +64,37 @@ /** persistent field */ private Set voteUsrAttempts; - /** persistent field */ - private Set voteOptionsContents; - /** full constructor */ - public VoteQueContent(Long voteQueContentId, String question, VoteContent voteContent, Set voteUsrAttempts, Set voteOptionsContents) { + public VoteQueContent(Long voteQueContentId, String question, VoteContent voteContent, Set voteUsrAttempts) { this.voteQueContentId = voteQueContentId; this.question = question; this.voteContent=voteContent; this.voteUsrAttempts = voteUsrAttempts; - this.voteOptionsContents = voteOptionsContents; } - public VoteQueContent(String question, VoteContent voteContent, Set voteUsrAttempts, Set voteOptionsContents) { + public VoteQueContent(String question, VoteContent voteContent, Set voteUsrAttempts) { this.question = question; this.voteContent=voteContent; this.voteUsrAttempts = voteUsrAttempts; - this.voteOptionsContents = voteOptionsContents; } - public VoteQueContent(String question, int displayOrder, VoteContent voteContent, Set voteUsrAttempts, Set voteOptionsContents) { + public VoteQueContent(String question, int displayOrder, VoteContent voteContent, Set voteUsrAttempts) { this.question = question; this.displayOrder=displayOrder; this.voteContent=voteContent; this.voteUsrAttempts = voteUsrAttempts; - this.voteOptionsContents = voteOptionsContents; } - public VoteQueContent(Long voteQueContentId, String question, Set voteUsrAttempts, Set voteOptionsContents) { + public VoteQueContent(Long voteQueContentId, String question, Set voteUsrAttempts) { this.voteQueContentId = voteQueContentId; this.question = question; this.voteUsrAttempts = voteUsrAttempts; - this.voteOptionsContents = voteOptionsContents; } - public VoteQueContent(String question, Set voteUsrAttempts, Set voteOptionsContents) { + public VoteQueContent(String question, Set voteUsrAttempts) { this.question = question; this.voteUsrAttempts = voteUsrAttempts; - this.voteOptionsContents = voteOptionsContents; } @@ -112,11 +104,10 @@ } /** minimal constructor */ - public VoteQueContent(Long voteQueContentId, org.lamsfoundation.lams.tool.vote.pojos.VoteContent voteContent, Set voteUsrAttempts, Set voteOptionsContents) { + public VoteQueContent(Long voteQueContentId, org.lamsfoundation.lams.tool.vote.pojos.VoteContent voteContent, Set voteUsrAttempts) { this.voteQueContentId = voteQueContentId; this.voteContent = voteContent; this.voteUsrAttempts = voteUsrAttempts; - this.voteOptionsContents = voteOptionsContents; } @@ -134,7 +125,6 @@ VoteQueContent newQueContent = new VoteQueContent(queContent.getQuestion(), displayOrder, newMcContent, - new TreeSet(), new TreeSet()); return newQueContent; @@ -177,16 +167,6 @@ } - public Set getVoteOptionsContents() { - if (this.voteOptionsContents == null) - setVoteOptionsContents(new HashSet()); - return this.voteOptionsContents; - } - - public void setMcOptionsContents(Set voteOptionsContents) { - this.voteOptionsContents = voteOptionsContents; - } - public String toString() { return new ToStringBuilder(this) .append("uid", getUid()) @@ -258,13 +238,8 @@ public void setVoteUsrAttempts(Set voteUsrAttempts) { this.voteUsrAttempts = voteUsrAttempts; } + /** - * @param voteOptionsContents The voteOptionsContents to set. - */ - public void setVoteOptionsContents(Set voteOptionsContents) { - this.voteOptionsContents = voteOptionsContents; - } - /** * @return Returns the displayOrder. */ public int getDisplayOrder() { Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java =================================================================== diff -u -r52a1e39117be580c8b8992c55da0411a49151ff8 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java (.../VoteUsrAttempt.java) (revision 52a1e39117be580c8b8992c55da0411a49151ff8) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/pojos/VoteUsrAttempt.java (.../VoteUsrAttempt.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -66,8 +66,6 @@ /** persistent field */ private org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr voteQueUsr; - /** persistent field */ - private org.lamsfoundation.lams.tool.vote.pojos.VoteOptsContent voteOptionsContent; /** full constructor */ public VoteUsrAttempt(Long attemptId, Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent voteQueContent, @@ -231,20 +229,8 @@ org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr voteQueUsr) { this.voteQueUsr = voteQueUsr; } + /** - * @return Returns the voteOptionsContent. - */ - public org.lamsfoundation.lams.tool.vote.pojos.VoteOptsContent getVoteOptionsContent() { - return voteOptionsContent; - } - /** - * @param voteOptionsContent The voteOptionsContent to set. - */ - public void setVoteOptionsContent( - org.lamsfoundation.lams.tool.vote.pojos.VoteOptsContent voteOptionsContent) { - this.voteOptionsContent = voteOptionsContent; - } - /** * @return Returns the userEntry. */ public String getUserEntry() { Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java =================================================================== diff -u -r52a1e39117be580c8b8992c55da0411a49151ff8 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java (.../IVoteService.java) (revision 52a1e39117be580c8b8992c55da0411a49151ff8) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/IVoteService.java (.../IVoteService.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -36,7 +36,6 @@ import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.vote.VoteApplicationException; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; -import org.lamsfoundation.lams.tool.vote.pojos.VoteOptsContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; @@ -95,8 +94,6 @@ public void removeQuestionContentByVoteUid(final Long mcContentUid) throws VoteApplicationException; - public VoteOptsContent getVoteOptionsContentByUID(Long uid) throws VoteApplicationException; - public void cleanAllQuestionsSimple(final Long mcContentUid) throws VoteApplicationException; public void resetAllQuestions(final Long mcContentUid) throws VoteApplicationException; Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java =================================================================== diff -u -r52a1e39117be580c8b8992c55da0411a49151ff8 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision 52a1e39117be580c8b8992c55da0411a49151ff8) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/service/VoteServicePOJO.java (.../VoteServicePOJO.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -62,7 +62,6 @@ import org.lamsfoundation.lams.tool.vote.dao.IVoteUserDAO; import org.lamsfoundation.lams.tool.vote.dao.IVoteUsrAttemptDAO; import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; -import org.lamsfoundation.lams.tool.vote.pojos.VoteOptsContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; @@ -856,20 +855,7 @@ } - public VoteOptsContent getVoteOptionsContentByUID(Long uid) throws VoteApplicationException - { - try - { - return getVoteOptionsContentByUID(uid); - } - catch (DataAccessException e) - { - throw new VoteApplicationException("Exception occured when lams is getting opt content by uid" - + e.getMessage(),e); - } - } - public List getSessionsFromContent(VoteContent voteContent) throws VoteApplicationException { try @@ -1882,19 +1868,6 @@ this.cred = cred; } - /* - !!! COMPLETE THIS !!! - public IVoteUploadedFileDAO getVoteUploadedFileDAO() { - return voteUploadedFileDAO; - } - - public void setQaUploadedFileDAO(IVoteUploadedFileDAO voteUploadedFileDAO) { - this.voteUploadedFileDAO = voteUploadedFileDAO; - } - - */ - - /** * @return Returns the repositoryId. */ Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/AuthoringUtil.java =================================================================== diff -u -rc5172424555b18ee103dd5609fd36e2d886d035a -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision c5172424555b18ee103dd5609fd36e2d886d035a) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -64,39 +64,6 @@ protected static void setRadioboxes(VoteContent voteContent, VoteAuthoringForm voteAuthoringForm) { - if (voteContent.isQuestionsSequenced()) - { - voteAuthoringForm.setQuestionsSequenced(ON); - logger.debug("setting questionsSequenced to true"); - } - else - { - voteAuthoringForm.setQuestionsSequenced(OFF); - logger.debug("setting questionsSequenced to false"); - } - - if (voteContent.isRetries()) - { - voteAuthoringForm.setRetries(ON); - logger.debug("setting retries to true"); - } - else - { - voteAuthoringForm.setRetries(OFF); - logger.debug("setting retries to false"); - } - - - if (voteContent.isShowReport()) - { - voteAuthoringForm.setSln(ON); - logger.debug("setting sln to true"); - } - else - { - voteAuthoringForm.setSln(OFF); - logger.debug("setting sln to false"); - } } @@ -1075,9 +1042,6 @@ String allowText=voteAuthoringForm.getAllowText(); logger.debug("allowText: " + allowText); - String retries = voteAuthoringForm.getRetries(); - logger.debug("retries: " + retries); - String maxNomcount= voteAuthoringForm.getMaxNominationCount(); logger.debug("maxNomcount: " + maxNomcount); @@ -1096,9 +1060,6 @@ String activeModule=(String)request.getSession().getAttribute(ACTIVE_MODULE); logger.debug("activeModule: " + activeModule); - boolean questionsSequencedBoolean=false; - boolean synchInMonitorBoolean=false; - boolean retriesBoolean=false; boolean voteChangableBoolean=false; boolean lockedOnFinishBoolean=false; boolean allowTextBoolean=false; @@ -1113,9 +1074,6 @@ if (allowText.equalsIgnoreCase(ON)) allowTextBoolean=true; - - if (retries.equalsIgnoreCase(ON)) - retriesBoolean=true; } @@ -1177,7 +1135,6 @@ voteContent.setLockOnFinish(lockedOnFinishBoolean); voteContent.setAllowText(allowTextBoolean); voteContent.setMaxNominationCount(maxNomcount); - voteContent.setRetries(retriesBoolean); voteContent.setOnlineInstructions(richTextOnlineInstructions); voteContent.setOfflineInstructions(richTextOfflineInstructions); } @@ -1228,7 +1185,6 @@ VoteQueContent queContent= new VoteQueContent(pairs.getValue().toString(), diplayOrder, voteContent, - null, null); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java =================================================================== diff -u -r52a1e39117be580c8b8992c55da0411a49151ff8 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java (.../LearningUtil.java) (revision 52a1e39117be580c8b8992c55da0411a49151ff8) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java (.../LearningUtil.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -60,28 +60,12 @@ VoteQueContent voteQueContent=(VoteQueContent)contentIterator.next(); if (voteQueContent != null) { - //int displayOrder=voteQueContent.getDisplayOrder().intValue(); int displayOrder=voteQueContent.getDisplayOrder(); if (displayOrder != 0) { /* add the question to the questions Map in the displayOrder*/ mapQuestionsContent.put(new Integer(displayOrder).toString(),voteQueContent.getQuestion()); } - - /* prepare the first question's candidate answers for presentation*/ - if (displayOrder == 1) - { - /* - logger.debug("first question... "); - Long uid=voteQueContent.getUid(); - logger.debug("uid : " + uid); - List listVoteOptions=voteService.findVoteOptionsContentByQueId(uid); - logger.debug("listVoteOptions : " + listVoteOptions); - Map mapOptionsContent=VoteUtils.generateOptionsMap(listVoteOptions); - request.getSession().setAttribute(MAP_OPTIONS_CONTENT, mapOptionsContent); - logger.debug("updated Options Map: " + request.getSession().getAttribute(MAP_OPTIONS_CONTENT)); - */ - } } } return mapQuestionsContent; @@ -162,11 +146,19 @@ } else if ((voteQueContent == null) && (questionDisplayOrder.toString().equals("101"))) { - logger.debug("creating user entry record"); + logger.debug("creating user entry record, 101"); VoteQueContent localVoteQueContent=voteService.getToolDefaultQuestionContent(1); logger.debug("localVoteQueContent: " + localVoteQueContent); createIndividualOptions(request, localVoteQueContent, voteQueUsr, attempTime, timeZone, userEntry, nominationCount, true); } + 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, nominationCount, false); + } + } } @@ -311,7 +303,5 @@ mapGeneralCheckedOptionsContent=(Map) request.getSession().getAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT); logger.debug("final mapGeneralCheckedOptionsContent: " + mapGeneralCheckedOptionsContent); } - - } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java =================================================================== diff -u -r52a1e39117be580c8b8992c55da0411a49151ff8 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 52a1e39117be580c8b8992c55da0411a49151ff8) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/MonitoringUtil.java (.../MonitoringUtil.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -205,6 +205,7 @@ public static Map populateSessionUsersAttempts(HttpServletRequest request,Long sessionId, List listUsers, String questionUid, boolean isUserNamesVisible, boolean isLearnerRequest, String userId) { + logger.debug("doing populateSessionUsersAttempts for: " +questionUid); logger.debug("isUserNamesVisible: " + isUserNamesVisible); logger.debug("isLearnerRequest: " + isLearnerRequest); logger.debug("userId: " + userId); @@ -223,6 +224,7 @@ logger.debug("request is not for learner progress report"); if ((isUserNamesVisible) && (!isLearnerRequest)) { + logger.debug("summary reporting case 1" ); logger.debug("isUserNamesVisible true, isLearnerRequest false" ); logger.debug("getting alll the user' data"); while (itUsers.hasNext()) @@ -251,8 +253,34 @@ voteMonitoredUserDTO.setUserName(voteQueUsr.getUsername()); voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setQuestionUid(questionUid); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + + logger.debug("attempt: " + voteUsrResp); + VoteQueContent localVoteQueContent=voteUsrResp.getVoteQueContent(); + logger.debug("localVoteQueContent: " + localVoteQueContent); + logger.debug("localVoteQueContent question : " + localVoteQueContent.getQuestion()); + voteMonitoredUserDTO.setResponse(localVoteQueContent.getQuestion()); + voteMonitoredUserDTO.setQuestionUid(questionUid); + + + boolean isSingleUserEntry=voteUsrResp.isSingleUserEntry(); + logger.debug("isSingleUserEntry: " + isSingleUserEntry); + logger.debug("userEntry: " + voteUsrResp.getUserEntry()); + if ((isSingleUserEntry == false) && (voteUsrResp.getUserEntry().length() > 0)) + { + logger.debug("userEntry available and must be added " + voteUsrResp.getUserEntry()); + VoteMonitoredUserDTO userEntryVoteMonitoredUserDTO = new VoteMonitoredUserDTO(); + + userEntryVoteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime().toString()); + userEntryVoteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); + userEntryVoteMonitoredUserDTO.setUserName(voteQueUsr.getUsername()); + userEntryVoteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); + userEntryVoteMonitoredUserDTO.setSessionId(sessionId.toString()); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + + userEntryVoteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + listMonitoredUserContainerDTO.add(userEntryVoteMonitoredUserDTO); + } listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); } } @@ -261,6 +289,7 @@ } else if ((isUserNamesVisible) && (isLearnerRequest)) { + logger.debug("summary reporting case 2" ); logger.debug("just populating data normally just like monitoring summary, except that the data is ony for a specific session" ); logger.debug("isUserNamesVisible true, isLearnerRequest true" ); String userID= (String)request.getSession().getAttribute(USER_ID); @@ -294,8 +323,34 @@ voteMonitoredUserDTO.setUserName(voteQueUsr.getUsername()); voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setQuestionUid(questionUid); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + //voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + + logger.debug("attempt: " + voteUsrResp); + VoteQueContent localVoteQueContent=voteUsrResp.getVoteQueContent(); + logger.debug("localVoteQueContent: " + localVoteQueContent); + logger.debug("localVoteQueContent question : " + localVoteQueContent.getQuestion()); + voteMonitoredUserDTO.setResponse(localVoteQueContent.getQuestion()); + voteMonitoredUserDTO.setQuestionUid(questionUid); + + boolean isSingleUserEntry=voteUsrResp.isSingleUserEntry(); + logger.debug("isSingleUserEntry: " + isSingleUserEntry); + logger.debug("userEntry: " + voteUsrResp.getUserEntry()); + if ((isSingleUserEntry == false) && (voteUsrResp.getUserEntry().length() > 0)) + { + logger.debug("userEntry available and must be added " + voteUsrResp.getUserEntry()); + VoteMonitoredUserDTO userEntryVoteMonitoredUserDTO = new VoteMonitoredUserDTO(); + + userEntryVoteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime().toString()); + userEntryVoteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); + userEntryVoteMonitoredUserDTO.setUserName(voteQueUsr.getUsername()); + userEntryVoteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); + userEntryVoteMonitoredUserDTO.setSessionId(sessionId.toString()); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + + userEntryVoteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + listMonitoredUserContainerDTO.add(userEntryVoteMonitoredUserDTO); + } listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); } } @@ -304,6 +359,7 @@ } else if ((!isUserNamesVisible) && (isLearnerRequest)) { + logger.debug("summary reporting case 3" ); logger.debug("populating data normally exception are for a specific session and other user names are not visible."); logger.debug("isUserNamesVisible false, isLearnerRequest true" ); logger.debug("getting only current user's data" ); @@ -348,9 +404,36 @@ voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setQuestionUid(questionUid); + //voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + + logger.debug("attempt: " + voteUsrResp); + VoteQueContent localVoteQueContent=voteUsrResp.getVoteQueContent(); + logger.debug("localVoteQueContent: " + localVoteQueContent); + logger.debug("localVoteQueContent question : " + localVoteQueContent.getQuestion()); + voteMonitoredUserDTO.setResponse(localVoteQueContent.getQuestion()); + voteMonitoredUserDTO.setQuestionUid(questionUid); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + + boolean isSingleUserEntry=voteUsrResp.isSingleUserEntry(); + logger.debug("isSingleUserEntry: " + isSingleUserEntry); + logger.debug("userEntry: " + voteUsrResp.getUserEntry()); + if ((isSingleUserEntry == false) && (voteUsrResp.getUserEntry().length() > 0)) + { + logger.debug("userEntry available and must be added " + voteUsrResp.getUserEntry()); + VoteMonitoredUserDTO userEntryVoteMonitoredUserDTO = new VoteMonitoredUserDTO(); + + userEntryVoteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime().toString()); + userEntryVoteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); + userEntryVoteMonitoredUserDTO.setUserName(voteQueUsr.getUsername()); + userEntryVoteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); + userEntryVoteMonitoredUserDTO.setSessionId(sessionId.toString()); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + + userEntryVoteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + listMonitoredUserContainerDTO.add(userEntryVoteMonitoredUserDTO); + } listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); + } } } @@ -359,6 +442,7 @@ } else { + logger.debug("summary reporting case 4" ); logger.debug("request is for learner progress report: " + userId); while (itUsers.hasNext()) { @@ -390,8 +474,34 @@ voteMonitoredUserDTO.setUserName(voteQueUsr.getUsername()); voteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); voteMonitoredUserDTO.setSessionId(sessionId.toString()); - voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); - voteMonitoredUserDTO.setQuestionUid(questionUid); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + //voteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + + logger.debug("attempt: " + voteUsrResp); + VoteQueContent localVoteQueContent=voteUsrResp.getVoteQueContent(); + logger.debug("localVoteQueContent: " + localVoteQueContent); + logger.debug("localVoteQueContent question : " + localVoteQueContent.getQuestion()); + voteMonitoredUserDTO.setResponse(localVoteQueContent.getQuestion()); + voteMonitoredUserDTO.setQuestionUid(questionUid); + + boolean isSingleUserEntry=voteUsrResp.isSingleUserEntry(); + logger.debug("isSingleUserEntry: " + isSingleUserEntry); + logger.debug("userEntry: " + voteUsrResp.getUserEntry()); + if ((isSingleUserEntry == false) && (voteUsrResp.getUserEntry().length() > 0)) + { + logger.debug("userEntry available and must be added " + voteUsrResp.getUserEntry()); + VoteMonitoredUserDTO userEntryVoteMonitoredUserDTO = new VoteMonitoredUserDTO(); + + userEntryVoteMonitoredUserDTO.setAttemptTime(voteUsrResp.getAttemptTime().toString()); + userEntryVoteMonitoredUserDTO.setTimeZone(voteUsrResp.getTimeZone()); + userEntryVoteMonitoredUserDTO.setUserName(voteQueUsr.getUsername()); + userEntryVoteMonitoredUserDTO.setQueUsrId(voteQueUsr.getUid().toString()); + userEntryVoteMonitoredUserDTO.setSessionId(sessionId.toString()); + voteMonitoredUserDTO.setUserEntry(voteUsrResp.getUserEntry()); + + userEntryVoteMonitoredUserDTO.setResponse(voteUsrResp.getUserEntry()); + listMonitoredUserContainerDTO.add(userEntryVoteMonitoredUserDTO); + } listMonitoredUserContainerDTO.add(voteMonitoredUserDTO); } } @@ -446,6 +556,12 @@ while (listIterator.hasNext()) { VoteMonitoredUserDTO data=(VoteMonitoredUserDTO)listIterator.next(); + logger.debug("using data: " + data); + logger.debug("using data: " + data.getResponse()); + logger.debug("using session id: " + data.getSessionId()); + logger.debug("using question uid: " + data.getQuestionUid()) ; + + map.put(mapIndex.toString(), data); mapIndex=new Long(mapIndex.longValue()+1); } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java =================================================================== diff -u -rf92fcda740b6473979111a76d36f0b9180c06a86 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java (.../VoteAction.java) (revision f92fcda740b6473979111a76d36f0b9180c06a86) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java (.../VoteAction.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -144,11 +144,9 @@ String richTextTitle = request.getParameter("title"); String richTextInstructions = request.getParameter("instructions"); - String richTextPosting = request.getParameter("posting"); VoteUtils.persistRichText(request); - //request.getSession().setAttribute(EDITACTIVITY_EDITMODE, new Boolean(true)); authoringUtil.reconstructOptionContentMapForAdd(mapOptionsContent, request); logger.debug("richTextInstructions: " + request.getSession().getAttribute(ACTIVITY_INSTRUCTIONS)); @@ -187,7 +185,6 @@ Map mapOptionsContent=(Map)request.getSession().getAttribute(MAP_OPTIONS_CONTENT); logger.debug("mapOptionsContent: " + mapOptionsContent); - //request.getSession().setAttribute(EDITACTIVITY_EDITMODE, new Boolean(true)); authoringUtil.reconstructOptionContentMapForRemove(mapOptionsContent, request, voteAuthoringForm); mapOptionsContent=(Map)request.getSession().getAttribute(MAP_OPTIONS_CONTENT); @@ -465,23 +462,6 @@ logger.debug("add error.defaultoption.empt to ActionMessages: "); } - Boolean renderMonitoringEditActivity=(Boolean)request.getSession().getAttribute(RENDER_MONITORING_EDITACTIVITY); - if ((renderMonitoringEditActivity != null) && (!renderMonitoringEditActivity.booleanValue())) - { - - if ((voteAuthoringForm.getReportTitle() == null) || (voteAuthoringForm.getReportTitle().length() == 0)) - { - errors.add(Globals.ERROR_KEY, new ActionMessage("error.reportTitle")); - logger.debug("add reportTitle to ActionMessages: "); - } - - if ((voteAuthoringForm.getMonitoringReportTitle() == null) || (voteAuthoringForm.getMonitoringReportTitle().length() == 0)) - { - errors.add(Globals.ERROR_KEY, new ActionMessage("error.monitorReportTitle")); - logger.debug("add monitorReportTitle to ActionMessages: "); - } - } - saveErrors(request,errors); return errors; } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java =================================================================== diff -u -raaf728a804e41624949c6b869bd25e0d5d8fc83b -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java (.../VoteAuthoringForm.java) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java (.../VoteAuthoringForm.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -89,20 +89,7 @@ protected String richTextOfflineInstructions; protected String richTextOnlineInstructions; - /* advanced content */ - protected String synchInMonitor; - protected String showFeedback; - protected String retries; - protected String sln; - protected String passmark; - - protected String reportTitle; - protected String monitoringReportTitle; - protected String endLearningMessage; - protected String usernameVisible; - protected String questionsSequenced; - /* proxy controllers for Monitoring tabs */ protected String summaryMonitoring; protected String instructionsMonitoring; @@ -170,22 +157,12 @@ this.isRemoveContent=null; this.toolContentId=null; - this.onlineInstructions=null; this.offlineInstructions=null; this.richTextOfflineInstructions=null; this.richTextOnlineInstructions=null; - this.endLearningMessage=null; - this.synchInMonitor=null; - this.reportTitle=null; - this.monitoringReportTitle=null; - this.questionsSequenced=null; - this.showFeedback=null; - this.retries=null; - this.sln=null; - this.passmark=null; this.voteChangable=null; this.lockOnFinish=null; this.allowText=null; @@ -201,12 +178,6 @@ public void resetRadioBoxes() { - this.synchInMonitor =OPTION_OFF; - this.questionsSequenced =OPTION_OFF; - this.retries =OPTION_OFF; - this.sln =OPTION_OFF; - this.showFeedback =OPTION_OFF; - this.usernameVisible =OPTION_OFF; this.voteChangable =OPTION_OFF; this.lockOnFinish =OPTION_OFF; this.allowText =OPTION_OFF; @@ -347,18 +318,6 @@ this.onlineInstructions = onlineInstructions; } - /** - * @return Returns the syncInMonitor. - */ - public String getSynchInMonitor() { - return synchInMonitor; - } - /** - * @param syncInMonitor The syncInMonitor to set. - */ - public void setSynchInMonitor(String synchInMonitor) { - this.synchInMonitor = synchInMonitor; - } /** * @return Returns the choiceAdvanced. @@ -408,31 +367,8 @@ public void setChoice(String choice) { this.choice = choice; } + /** - * @return Returns the reportTitle. - */ - public String getReportTitle() { - return reportTitle; - } - /** - * @param reportTitle The reportTitle to set. - */ - public void setReportTitle(String reportTitle) { - this.reportTitle = reportTitle; - } - /** - * @return Returns the usernameVisible. - */ - public String getUsernameVisible() { - return usernameVisible; - } - /** - * @param usernameVisible The usernameVisible to set. - */ - public void setUsernameVisible(String usernameVisible) { - this.usernameVisible = usernameVisible; - } - /** * @return Returns the submitTabDone. */ public String getSubmitTabDone() { @@ -446,42 +382,6 @@ } /** - * @return Returns the questionsSequenced. - */ - public String getQuestionsSequenced() { - return questionsSequenced; - } - /** - * @param questionsSequenced The questionsSequenced to set. - */ - public void setQuestionsSequenced(String questionsSequenced) { - this.questionsSequenced = questionsSequenced; - } - /** - * @return Returns the endLearningMessage. - */ - public String getEndLearningMessage() { - return endLearningMessage; - } - /** - * @param endLearningMessage The endLearningMessage to set. - */ - public void setEndLearningMessage(String endLearningMessage) { - this.endLearningMessage = endLearningMessage; - } - /** - * @return Returns the monitoringReportTitle. - */ - public String getMonitoringReportTitle() { - return monitoringReportTitle; - } - /** - * @param monitoringReportTitle The monitoringReportTitle to set. - */ - public void setMonitoringReportTitle(String monitoringReportTitle) { - this.monitoringReportTitle = monitoringReportTitle; - } - /** * @return Returns the editActivityMonitoring. */ public String getEditActivityMonitoring() { @@ -663,43 +563,8 @@ public void setOptionIndex(String optionIndex) { this.optionIndex = optionIndex; } + /** - * @return Returns the retries. - */ - public String getRetries() { - return retries; - } - /** - * @param retries The retries to set. - */ - public void setRetries(String retries) { - this.retries = retries; - } - /** - * @return Returns the showFeedback. - */ - public String getShowFeedback() { - return showFeedback; - } - /** - * @param showFeedback The showFeedback to set. - */ - public void setShowFeedback(String showFeedback) { - this.showFeedback = showFeedback; - } - /** - * @return Returns the passmark. - */ - public String getPassmark() { - return passmark; - } - /** - * @param passmark The passmark to set. - */ - public void setPassmark(String passmark) { - this.passmark = passmark; - } - /** * @return Returns the selectedIndex. */ public String getSelectedIndex() { @@ -723,19 +588,8 @@ public void setDeletableOptionIndex(String deletableOptionIndex) { this.deletableOptionIndex = deletableOptionIndex; } + /** - * @return Returns the sln. - */ - public String getSln() { - return sln; - } - /** - * @param sln The sln to set. - */ - public void setSln(String sln) { - this.sln = sln; - } - /** * @return Returns the fileItem. */ public String getFileItem() { Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java =================================================================== diff -u -r52a1e39117be580c8b8992c55da0411a49151ff8 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 52a1e39117be580c8b8992c55da0411a49151ff8) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -23,6 +23,8 @@ 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; @@ -44,7 +46,9 @@ 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.VoteUsrAttempt; import org.lamsfoundation.lams.tool.vote.service.IVoteService; import org.lamsfoundation.lams.web.action.LamsDispatchAction; @@ -149,10 +153,35 @@ Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); logger.debug("toolContentId: " + toolContentId); - + + VoteQueUsr voteQueUsr=LearningUtil.getUser(request); + logger.debug("voteQueUsr: " + voteQueUsr); + + List attempts=voteService.getAttemptsForUser(voteQueUsr.getUid()); + logger.debug("attempts: " + attempts); + Map mapQuestionsContent= new TreeMap(new VoteComparator()); + Iterator listIterator=attempts.iterator(); + int order=0; + while (listIterator.hasNext()) + { + VoteUsrAttempt attempt=(VoteUsrAttempt)listIterator.next(); + logger.debug("attempt: " + attempt); + VoteQueContent voteQueContent=attempt.getVoteQueContent(); + logger.debug("voteQueContent: " + voteQueContent); + order++; + if (voteQueContent != null) + { + mapQuestionsContent.put(new Integer(order).toString(),voteQueContent.getQuestion()); + } + } + request.getSession().setAttribute(MAP_VIEWONLY_QUESTION_CONTENT_LEARNER, mapQuestionsContent); + logger.debug("MAP_VIEWONLY_QUESTION_CONTENT_LEARNER: " + request.getSession().getAttribute(MAP_VIEWONLY_QUESTION_CONTENT_LEARNER)); + + voteLearningForm.resetCommands(); - return (mapping.findForward(INDIVIDUAL_REPORT)); + logger.debug("fwd'ing to : " + VIEW_ANSWERS); + return (mapping.findForward(VIEW_ANSWERS)); } @@ -301,30 +330,44 @@ } } - logger.debug("new nominationCount: " + nominationCount+1); - + int newNominationCount=nominationCount+1; + logger.debug("newNominationCount: " + newNominationCount); logger.debug("creating attemps with mapGeneralCheckedOptionsContent " + mapGeneralCheckedOptionsContent); voteService.removeAttemptsForUser(voteQueUsr.getUid()); logger.debug("nominations deleted for user: " + voteQueUsr.getUid()); - LearningUtil.createAttempt(request, voteQueUsr, mapGeneralCheckedOptionsContent, userEntry, nominationCount++, false); + LearningUtil.createAttempt(request, voteQueUsr, mapGeneralCheckedOptionsContent, userEntry, newNominationCount, false); + + logger.debug("using nominationCount: " + nominationCount); - if (mapGeneralCheckedOptionsContent.size() == 0) + if ((mapGeneralCheckedOptionsContent.size() == 0 && (userEntryAvailable == true))) { logger.debug("mapGeneralCheckedOptionsContent size is 0"); Map mapLeanerCheckedOptionsContent= new TreeMap(new VoteComparator()); mapLeanerCheckedOptionsContent.put("101", userEntry); - //request.getSession().setAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT, mapLeanerCheckedOptionsContent); + logger.debug("after mapsize check mapLeanerCheckedOptionsContent " + mapLeanerCheckedOptionsContent); logger.debug("using nominationCount: " + nominationCount); if (userEntry.length() > 0) { logger.debug("creating entry for: " + userEntry); LearningUtil.createAttempt(request, voteQueUsr, mapLeanerCheckedOptionsContent, userEntry, nominationCount, true); } - - - } + 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); + logger.debug("using nominationCount: " + nominationCount); + if (userEntry.length() > 0) + { + logger.debug("creating entry for: " + userEntry); + LearningUtil.createAttempt(request, voteQueUsr, mapLeanerCheckedOptionsContent, userEntry, nominationCount, false); + } + } + logger.debug("created user attempt in the db"); voteLearningForm.resetCommands(); @@ -364,6 +407,17 @@ request.getSession().setAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT, mapGeneralCheckedOptionsContent); voteLearningForm.setUserEntry(""); + + String previewOnly=(String)request.getSession().getAttribute(PREVIEW_ONLY); + logger.debug("previewOnly : " + previewOnly); + if (previewOnly != null) + { + if (previewOnly.equals("true")) + { + logger.debug("request is for previewOnly : " + previewOnly); + return (mapping.findForward(PREVIEW)); + } + } return (mapping.findForward(LOAD_LEARNER)); } @@ -393,126 +447,6 @@ } - public ActionForward displayVote(ActionMapping mapping, - ActionForm form, - HttpServletRequest request, - HttpServletResponse response) throws IOException, - ServletException - { - VoteUtils.cleanUpUserExceptions(request); - VoteLearningForm voteLearningForm = (VoteLearningForm) form; - IVoteService voteService =VoteUtils.getToolService(request); - - voteLearningForm.resetParameters(); - LearningUtil.readParameters(request, voteLearningForm); - - if (voteLearningForm.getContinueOptionsCombined() != null) - { - setContentInUse(request); - return continueOptionsCombined(mapping, form, request, response); - } - else if (voteLearningForm.getOptionCheckBoxSelected() != null) - { - logger.debug("doing getOptionCheckBoxSelected"); - setContentInUse(request); - voteLearningForm.resetCommands(); - LearningUtil.selectOptionsCheckBox(request,voteLearningForm, voteLearningForm.getQuestionIndex()); - } - - else if (voteLearningForm.getRedoQuestions() != null) - { - setContentInUse(request); - //return redoQuestions(mapping, form, request, response); - return null; - } - else if (voteLearningForm.getRedoQuestionsOk() != null) - { - setContentInUse(request); - logger.debug("requested redoQuestionsOk, user is sure to redo the questions."); - voteLearningForm.resetCommands(); - //return redoQuestions(request, voteLearningForm, mapping); - return null; - } - else if (voteLearningForm.getViewAnswers() != null) - { - setContentInUse(request); - //return viewAnswers(mapping, form, request, response); - return null; - } - else if (voteLearningForm.getViewSummary() != null) - { - setContentInUse(request); - //return viewSummary(mapping, form, request, response); - return null; - } - else if (voteLearningForm.getLearnerFinished() != null) - { - logger.debug("requested learner finished, the learner should be directed to next activity."); - - 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); - - VoteUtils.cleanUpSessionAbsolute(request); - - String nextUrl=null; - try - { - nextUrl=voteService.leaveToolSession(toolSessionId, new Long(userID)); - logger.debug("nextUrl: "+ nextUrl); - } - catch (DataMissingException e) - { - logger.debug("failure getting nextUrl: "+ e); - voteLearningForm.resetCommands(); - //throw new ServletException(e); - return (mapping.findForward(LEARNING_STARTER)); - } - catch (ToolException e) - { - logger.debug("failure getting nextUrl: "+ e); - voteLearningForm.resetCommands(); - //throw new ServletException(e); - return (mapping.findForward(LEARNING_STARTER)); - } - catch (Exception e) - { - logger.debug("unknown exception getting nextUrl: "+ e); - voteLearningForm.resetCommands(); - //throw new ServletException(e); - return (mapping.findForward(LEARNING_STARTER)); - } - - logger.debug("success getting nextUrl: "+ nextUrl); - voteLearningForm.resetCommands(); - - /* pay attention here*/ - logger.debug("redirecting to the nextUrl: "+ nextUrl); - response.sendRedirect(nextUrl); - - return null; - } - else if (voteLearningForm.getDonePreview() != null) - { - logger.debug("requested donePreview."); - voteLearningForm.resetCommands(); - VoteUtils.cleanUpSessionAbsolute(request); - return (mapping.findForward(LEARNING_STARTER)); - } - else if (voteLearningForm.getDoneLearnerProgress() != null) - { - logger.debug("requested doneLearnerProgress."); - voteLearningForm.resetCommands(); - VoteUtils.cleanUpSessionAbsolute(request); - return (mapping.findForward(LEARNING_STARTER)); - } - - voteLearningForm.resetCommands(); - return (mapping.findForward(LOAD_LEARNER)); - } - - - protected void setContentInUse(HttpServletRequest request) { IVoteService voteService =VoteUtils.getToolService(request); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java =================================================================== diff -u -r52a1e39117be580c8b8992c55da0411a49151ff8 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java (.../VoteLearningStarterAction.java) (revision 52a1e39117be580c8b8992c55da0411a49151ff8) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java (.../VoteLearningStarterAction.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -262,8 +262,7 @@ request.getSession().setAttribute(CURRENT_QUESTION_INDEX, "1"); VoteLearningAction voteLearningAction= new VoteLearningAction(); - //return voteLearningAction.redoQuestions(request, voteLearningForm, mapping); - return null; + return voteLearningAction.redoQuestions(mapping, form, request, response); } /* by now, we know that the mode is either teacher or learner @@ -439,40 +438,29 @@ protected void setupAttributes(HttpServletRequest request, VoteContent voteContent, VoteLearningForm voteLearningForm) { - logger.debug("IS_RETRIES: " + new Boolean(voteContent.isRetries()).toString()); - //request.getSession().setAttribute(IS_RETRIES, new Boolean(voteContent.isRetries()).toString()); - logger.debug("IS_CONTENT_IN_USE: " + voteContent.isContentInUse()); - //request.getSession().setAttribute(ACTIVITY_TITLE, voteContent.getTitle()); - //request.getSession().setAttribute(ACTIVITY_INSTRUCTIONS, voteContent.getInstructions()); - Map mapGeneralCheckedOptionsContent= new TreeMap(new VoteComparator()); request.getSession().setAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT, mapGeneralCheckedOptionsContent); /* * Is the tool activity been checked as Run Offline in the property inspector? */ logger.debug("IS_TOOL_ACTIVITY_OFFLINE: " + voteContent.isRunOffline()); - //request.getSession().setAttribute(IS_TOOL_ACTIVITY_OFFLINE, new Boolean(voteContent.isRunOffline()).toString()); - - - logger.debug("advanced properties isRetries: " + new Boolean(voteContent.isRetries()).toString()); + logger.debug("advanced properties maxNominationCount: " + voteContent.getMaxNominationCount()); logger.debug("advanced properties isAllowText(): " + new Boolean(voteContent.isAllowText()).toString()); logger.debug("advanced properties isVoteChangable(): " + new Boolean(voteContent.isVoteChangable()).toString()); - logger.debug("advanced properties isRunOffline(): " + new Boolean(voteContent.isRunOffline()).toString()); - logger.debug("advanced properties isRetries(): " + new Boolean(voteContent.isRetries()).toString()); logger.debug("advanced properties isLockOnFinish(): " + new Boolean(voteContent.isLockOnFinish()).toString()); voteLearningForm.setActivityTitle(voteContent.getTitle()); voteLearningForm.setActivityInstructions(voteContent.getInstructions()); - voteLearningForm.setActivityRetries(new Boolean(voteContent.isRetries()).toString()); 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()); } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java =================================================================== diff -u -rf92fcda740b6473979111a76d36f0b9180c06a86 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java (.../VoteStarterAction.java) (revision f92fcda740b6473979111a76d36f0b9180c06a86) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java (.../VoteStarterAction.java) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -521,13 +521,11 @@ { request.getSession().setAttribute(ACTIVITY_TITLE, "Questions and Answers"); request.getSession().setAttribute(ACTIVITY_INSTRUCTIONS, "Please answer the questions."); - request.getSession().setAttribute(POSTING, "sample posting"); } else { request.getSession().setAttribute(ACTIVITY_TITLE, voteContent.getTitle()); request.getSession().setAttribute(ACTIVITY_INSTRUCTIONS, voteContent.getInstructions()); - request.getSession().setAttribute(POSTING, voteContent.getPosting()); } @@ -588,14 +586,6 @@ logger.debug("final title: " + voteAuthoringForm.getTitle()); logger.debug("final ins: " + voteAuthoringForm.getInstructions()); - //determine the status of radio boxes - voteAuthoringForm.setUsernameVisible(voteContent.isUsernameVisible()?ON:OFF); - voteAuthoringForm.setRetries(voteContent.isRetries()?ON:OFF); - voteAuthoringForm.setQuestionsSequenced(voteContent.isQuestionsSequenced()?ON:OFF); - - request.getSession().setAttribute(RICHTEXT_REPORT_TITLE, voteContent.getReportTitle()); - request.getSession().setAttribute(RICHTEXT_END_LEARNING_MSG, voteContent.getEndLearningMessage()); - request.getSession().setAttribute(RICHTEXT_OFFLINEINSTRUCTIONS, voteContent.getOfflineInstructions()); request.getSession().setAttribute(RICHTEXT_ONLINEINSTRUCTIONS, voteContent.getOnlineInstructions()); Index: lams_tool_vote/web/WEB-INF/struts-config.xml =================================================================== diff -u -raaf728a804e41624949c6b869bd25e0d5d8fc83b -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b) +++ lams_tool_vote/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -230,6 +230,12 @@ redirect="false" /> + + + + + + + - - - - : - - - - - - - - - - - - - - - Index: lams_tool_vote/web/learning/AllNominations.jsp =================================================================== diff -u --- lams_tool_vote/web/learning/AllNominations.jsp (revision 0) +++ lams_tool_vote/web/learning/AllNominations.jsp (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -0,0 +1,90 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA + + http://www.gnu.org/licenses/gpl.txt +--%> +<%@ taglib uri="tags-bean" prefix="bean"%> +<%@ taglib uri="tags-html" prefix="html"%> +<%@ taglib uri="tags-logic" prefix="logic" %> +<%@ taglib uri="tags-logic-el" prefix="logic-el" %> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="fck-editor" prefix="FCK" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_vote/web/learning/AnswersContent.jsp =================================================================== diff -u -r73662d4e9b04a3e3c6b1357ed57870152faa5b61 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 73662d4e9b04a3e3c6b1357ed57870152faa5b61) +++ lams_tool_vote/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -41,133 +41,139 @@ -
+ +
+ CHART FOR ALL RESULTS +
+ + + + +       + + + + + +       + + + + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - - - - - - - - - - - - - - - - + + + - + + + + + + + + - - - + + + + + + + + - if (this.checked == 1) - { - document.forms[0].checked.value=true; - } - else - { - document.forms[0].checked.value=false; - } - submitMethod('selectOption');"> - - - - - - -
- - - - onclick="javascript:document.forms[0].optionCheckBoxSelected.value=1; - document.forms[0].questionIndex.value=; - document.forms[0].optionValue.value=''; - - if (this.checked == 1) - { - document.forms[0].checked.value=true; - } - else - { - document.forms[0].checked.value=false; - } - - submitMethod('selectOption');" CHECKED> - - - - - -
+ +
+ +
+ +
- - - - onclick="javascript:document.forms[0].optionCheckBoxSelected.value=1; - document.forms[0].questionIndex.value=; - document.forms[0].optionValue.value=''; + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + - + onclick="javascript:document.forms[0].optionCheckBoxSelected.value=1; + document.forms[0].questionIndex.value=; + document.forms[0].optionValue.value=''; + + if (this.checked == 1) + { + document.forms[0].checked.value=true; + } + else + { + document.forms[0].checked.value=false; + } + + submitMethod('selectOption');" CHECKED> + + + + + +
+ + - + onclick="javascript:document.forms[0].optionCheckBoxSelected.value=1; + document.forms[0].questionIndex.value=; + document.forms[0].optionValue.value=''; + + if (this.checked == 1) + { + document.forms[0].checked.value=true; + } + else + { + document.forms[0].checked.value=false; + } + submitMethod('selectOption');"> + + + + + +
+
+ + : + + + +
- - - -
-
- - : - - - -
- - - - - -
- - + + + + + + + + + + + + + + + + + + +
Index: lams_tool_vote/web/learning/ExitLearning.jsp =================================================================== diff -u --- lams_tool_vote/web/learning/ExitLearning.jsp (revision 0) +++ lams_tool_vote/web/learning/ExitLearning.jsp (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -0,0 +1,51 @@ +<%@ taglib uri="tags-bean" prefix="bean"%> +<%@ taglib uri="tags-html" prefix="html"%> +<%@ taglib uri="tags-logic" prefix="logic" %> +<%@ taglib uri="tags-logic-el" prefix="logic-el" %> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="fck-editor" prefix="FCK" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ + +
+ + + Index: lams_tool_vote/web/learning/IndividualLearnerResults.jsp =================================================================== diff -u -r73662d4e9b04a3e3c6b1357ed57870152faa5b61 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision 73662d4e9b04a3e3c6b1357ed57870152faa5b61) +++ lams_tool_vote/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -18,6 +18,9 @@ + + + @@ -33,24 +36,17 @@ - + - - + Index: lams_tool_vote/web/learning/Preview.jsp =================================================================== diff -u -r4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/web/learning/Preview.jsp (.../Preview.jsp) (revision 4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92) +++ lams_tool_vote/web/learning/Preview.jsp (.../Preview.jsp) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -18,7 +18,6 @@ http://www.gnu.org/licenses/gpl.txt --%> - <%@ taglib uri="tags-bean" prefix="bean"%> <%@ taglib uri="tags-html" prefix="html"%> <%@ taglib uri="tags-logic" prefix="logic" %> @@ -32,153 +31,73 @@ - + - - <bean:message key="label.preview"/> - + - - -
- - - - - +
- -
- - - - - - - - - - - - - - - + + + - - - - - - - - - +
- -
- -
- -
- ( ) - -
+ + + + + - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - -
+ +
- - - - - + +
+ + + + + + + + + + + +
+ + -> + + +
+ + : + + + +
+
- - - - - - - + + + + + + + + - - - - - +
+ - - -
- - - - - - - -
- - - - - - -
- - - - - - - - - - - -   - - - - - - -
-
- - - - - - - - - Index: lams_tool_vote/web/learning/RedoQuestions.jsp =================================================================== diff -u -r4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/web/learning/RedoQuestions.jsp (.../RedoQuestions.jsp) (revision 4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92) +++ lams_tool_vote/web/learning/RedoQuestions.jsp (.../RedoQuestions.jsp) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -18,7 +18,6 @@ http://www.gnu.org/licenses/gpl.txt --%> - <%@ taglib uri="tags-bean" prefix="bean"%> <%@ taglib uri="tags-html" prefix="html"%> <%@ taglib uri="tags-logic" prefix="logic" %> @@ -31,72 +30,59 @@ - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + + + + + Fisheye: Tag 261d9a36d11a99322125fa55faaddffc16a041b3 refers to a dead (removed) revision in file `lams_tool_vote/web/learning/ResultsSummary.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_vote/web/learning/ViewAnswers.jsp =================================================================== diff -u -r4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/web/learning/ViewAnswers.jsp (.../ViewAnswers.jsp) (revision 4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92) +++ lams_tool_vote/web/learning/ViewAnswers.jsp (.../ViewAnswers.jsp) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -18,7 +18,6 @@ http://www.gnu.org/licenses/gpl.txt --%> - <%@ taglib uri="tags-bean" prefix="bean"%> <%@ taglib uri="tags-html" prefix="html"%> <%@ taglib uri="tags-logic" prefix="logic" %> @@ -31,182 +30,60 @@ - + + + + + + - + + + +
- + +
- -
- -
- -
 
- - - - + CHART FOR ALL RESULTS
-   -
- - - + + +       - - - + + +
- - - - - + - - - - - - - - - - - - - + - + - - - - - + + - - - - - - - - - - - - - - - - - - - -
- - + +
- + +  
- -
-
-
- - - - - + +
- - - - - - - - - - - - - - - - - - - -
- - images/dot.jpg" align=left>   - - -
- - - -
- - - - - + + + + - - - - - - - - - - - - - -
+ + + + +       + + + + +
- - : - - - - - - - - -
- - - -
-
-
-
-   -
- - - - - - - - - - - - - - - -
- - - - - - - - - - - -
-
Index: lams_tool_vote/web/monitoring/SummaryContent.jsp =================================================================== diff -u -rbc445cd305b92a8737e721c1ab90ed6138dc1715 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision bc445cd305b92a8737e721c1ab90ed6138dc1715) +++ lams_tool_vote/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -90,7 +90,7 @@     - + @@ -109,7 +109,7 @@ - + Index: lams_tool_vote/web/monitoring/UserResponses.jsp =================================================================== diff -u -rbc445cd305b92a8737e721c1ab90ed6138dc1715 -r261d9a36d11a99322125fa55faaddffc16a041b3 --- lams_tool_vote/web/monitoring/UserResponses.jsp (.../UserResponses.jsp) (revision bc445cd305b92a8737e721c1ab90ed6138dc1715) +++ lams_tool_vote/web/monitoring/UserResponses.jsp (.../UserResponses.jsp) (revision 261d9a36d11a99322125fa55faaddffc16a041b3) @@ -32,11 +32,11 @@ - +