Index: lams_tool_vote/conf/language/ApplicationResources.properties
===================================================================
diff -u -r53db9379d8fb01523176dd7f71712a5deaaa730b -raaf728a804e41624949c6b869bd25e0d5d8fc83b
--- lams_tool_vote/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 53db9379d8fb01523176dd7f71712a5deaaa730b)
+++ lams_tool_vote/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -25,30 +25,22 @@
label.authoring.vote.basic =Please define the nominations.
label.monitoring =Voting Monitoring
label.vote.questions =Voting Questions
-label.vote.posting =Posting
label.allowText =Allow Text Entry
label.maxNomCount =Maximum Nomination Count
label.vote.nominations =Nominations
-label.authoring.vote.basic.editOptions =Please define the question and/or its options.
label.advanced.definitions =Advanced Definitions
label.vote.changable =Allow learner to change vote
label.vote.lockedOnFinish =Locked on finish
label.authoring.title =Title
label.authoring.instructions =Instructions
label.Questions =Questions
-label.weight =Weight
-label.addNewQuestion =Add New Question
label.moveDown =Down
label.add.question =Add New
label.add.option =Add New
button.removeQuestion =Delete
label.other =Other
button.delete =Delete
-label.vote.options =Candidate Answers
-label.vote.options.col =Candidate Answers:
label.fileContent =File Content
-label.assessment =Assessment
-label.learner.message =Answer the questions until you reach the passmark.
label.withRetries =Voting with Retries
label.withoutRetries =Voting without Retries
label.individual.results.withRetries =Results for Voting with Retries
@@ -57,16 +49,10 @@
label.learner.viewAnswers =Learner's Answers
label.withRetries.results.summary =Voting with Retries Summary
label.withoutRetries.results.summary =Voting without Retries Summary
-label.learnersFinished =learners have finished. Minimum passmark is
-label.learnersFinished.simple =learners have finished.
-label.topMark =Top Mark:
-label.avMark =Average Mark:
-label.loMark =Lowest Mark:
count.total.user =Total Users Count:
count.finished.user =Finished User Count:
count.max.attempt =Maximum Attempt Count:
label.attempts =Attempts
-label.mark =Mark:
label.you.answered =You answered:
label.learner.answered =Learner answered:
label.redo.questions =Redo Questions
@@ -93,31 +79,18 @@
button.continue =Continue
button.getPreviousQuestion =Previous
label.percent =%
-label.option =Option
-label.option1 =Option 1
-label.options =Options
-label.option.correct =Correct
-label.candidateAnswers =Candidate Answers
-label.isCorrect =Correct?
sbmt.successful =The content has been created successfully.
label.monitoringReport.title =Monitoring Report Title
-label.question.only =Question
-label.question =Question:
-label.question.col =Question:
-label.question1 =Question 1
label.nomination1 =Nomination 1
radiobox.defineLater =Define Later
radiobox.synchInMonitor =Sync in Monitor
radiobox.forceOffline =Force Offline
-radiobox.usernameVisible =Username Visible
radiobox.questionsSequenced =Questions Sequenced
-radiobox.passmark =Pass Mark
radiobox.showFeedback =Show Feedback
radiobox.sln =Show Learner's Report
radiobox.onepq =1 page per question
radiobox.retries =Allow Retries
label.report.title =Report Title
-label.report.endLearningMessage =End of Activity Message
label.offlineInstructions =Offline Instructions
label.offlineInstructions.col =Offline Instructions:
label.onlineInstructions =Online Instructions
@@ -128,8 +101,6 @@
label.uploadedOnlineFiles =Uploaded Online Files:
option.on =ON
option.off =OFF
-option.correct =Correct
-option.incorrect =Incorrect
label.feedback.incorrect =Feedback if answered incorrectly:
label.feedback.correct =Feedback if answered correctly:
label.learner.redo =Are you sure you want to answer the questions again?
Index: lams_tool_vote/db/model/lams_tool_vote.clay
===================================================================
diff -u -rf92fcda740b6473979111a76d36f0b9180c06a86 -raaf728a804e41624949c6b869bd25e0d5d8fc83b
--- lams_tool_vote/db/model/lams_tool_vote.clay (.../lams_tool_vote.clay) (revision f92fcda740b6473979111a76d36f0b9180c06a86)
+++ lams_tool_vote/db/model/lams_tool_vote.clay (.../lams_tool_vote.clay) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -449,7 +449,7 @@
-
+
@@ -490,19 +490,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -523,7 +510,7 @@
-
+
Index: lams_tool_vote/db/sql/create_lams_tool_vote.sql
===================================================================
diff -u -rf92fcda740b6473979111a76d36f0b9180c06a86 -raaf728a804e41624949c6b869bd25e0d5d8fc83b
--- lams_tool_vote/db/sql/create_lams_tool_vote.sql (.../create_lams_tool_vote.sql) (revision f92fcda740b6473979111a76d36f0b9180c06a86)
+++ lams_tool_vote/db/sql/create_lams_tool_vote.sql (.../create_lams_tool_vote.sql) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -64,11 +64,10 @@
uid BIGINT(20) NOT NULL AUTO_INCREMENT
, que_usr_id BIGINT(20) NOT NULL
, vote_que_content_id BIGINT(20) NOT NULL
- , vote_que_option_id BIGINT(20) NOT NULL
, attempt_time DATETIME
, time_zone VARCHAR(255)
, userEntry VARCHAR(255)
- , isNominated TINYINT NOT NULL
+ , isNominated TINYINT NOT NULL DEFAULT 0
, PRIMARY KEY (uid)
, INDEX (que_usr_id)
, CONSTRAINT FK_tl_vote_usr_attempt_1 FOREIGN KEY (que_usr_id)
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java
===================================================================
diff -u -r53db9379d8fb01523176dd7f71712a5deaaa730b -raaf728a804e41624949c6b869bd25e0d5d8fc83b
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java (.../LearningUtil.java) (revision 53db9379d8fb01523176dd7f71712a5deaaa730b)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/LearningUtil.java (.../LearningUtil.java) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -134,6 +134,7 @@
public static void createAttempt(HttpServletRequest request, VoteQueUsr voteQueUsr, Map mapGeneralCheckedOptionsContent)
{
+ logger.debug("doing createAttempt: " + mapGeneralCheckedOptionsContent);
IVoteService voteService =VoteUtils.getToolService(request);
Date attempTime=VoteUtils.getGMTDateTime();
String timeZone= VoteUtils.getCurrentTimeZone();
@@ -148,7 +149,6 @@
while (itCheckedMap.hasNext())
{
Map.Entry checkedPairs = (Map.Entry)itCheckedMap.next();
- Map mapCheckedOptions=(Map) checkedPairs.getValue();
Long questionDisplayOrder=new Long(checkedPairs.getKey().toString());
logger.debug("questionDisplayOrder: " + questionDisplayOrder);
@@ -158,35 +158,24 @@
logger.debug("voteQueContent: " + voteQueContent);
if (voteQueContent != null)
{
- createIndividualOptions(request, mapCheckedOptions, voteQueContent, voteQueUsr, attempTime, timeZone);
+ createIndividualOptions(request, voteQueContent, voteQueUsr, attempTime, timeZone);
}
}
}
}
- public static void createIndividualOptions(HttpServletRequest request, Map mapCheckedOptions, VoteQueContent voteQueContent, VoteQueUsr voteQueUsr, Date attempTime, String timeZone)
+ public static void createIndividualOptions(HttpServletRequest request, VoteQueContent voteQueContent, VoteQueUsr voteQueUsr, Date attempTime, String timeZone)
{
+ logger.debug("doing createIndividualOptions");
IVoteService voteService =VoteUtils.getToolService(request);
logger.debug("voteQueContent: " + voteQueContent);
- logger.debug("mapCheckedOptions: " + mapCheckedOptions);
-
if (voteQueContent != null)
{
- if (mapCheckedOptions != null)
- {
- Iterator itCheckedMap = mapCheckedOptions.entrySet().iterator();
- while (itCheckedMap.hasNext())
- {
- Map.Entry checkedPairs = (Map.Entry)itCheckedMap.next();
- //VoteOptsContent voteOptsContent= voteService.getOptionContentByOptionText(checkedPairs.getValue().toString(), voteQueContent.getUid());
- //logger.debug("voteOptsContent: " + voteOptsContent);
-
- VoteUsrAttempt voteUsrAttempt=new VoteUsrAttempt(attempTime, timeZone, voteQueContent, voteQueUsr);
- voteService.createVoteUsrAttempt(voteUsrAttempt);
- logger.debug("created voteUsrAttempt in the db :" + voteUsrAttempt);
- }
- }
+ VoteUsrAttempt voteUsrAttempt=new VoteUsrAttempt(attempTime, timeZone, voteQueContent, voteQueUsr);
+ logger.debug("voteUsrAttempt: " + voteUsrAttempt);
+ voteService.createVoteUsrAttempt(voteUsrAttempt);
+ logger.debug("created voteUsrAttempt in the db :" + voteUsrAttempt);
}
}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java
===================================================================
diff -u -rc5172424555b18ee103dd5609fd36e2d886d035a -raaf728a804e41624949c6b869bd25e0d5d8fc83b
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java (.../VoteAuthoringForm.java) (revision c5172424555b18ee103dd5609fd36e2d886d035a)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java (.../VoteAuthoringForm.java) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -64,9 +64,6 @@
protected String submitOfflineFile;
protected String submitOnlineFile;
- // dispatch controls which method is called by the Lookup map */
- protected String dispatch;
-
/* tab controller, these may go away once the Flash wraps the jsp */
protected String choice;
protected String choiceBasic;
@@ -81,8 +78,8 @@
protected String isRemoveContent;
protected String toolContentId;
- protected String toolContentID;
+
/* instructions content */
protected String onlineInstructions;
protected String offlineInstructions;
@@ -130,7 +127,6 @@
this.submitOfflineFile=null;
this.submitOnlineFile=null;
- this.dispatch=null;
this.summaryMonitoring=null;
this.instructionsMonitoring=null;
@@ -159,8 +155,6 @@
this.submitOnlineFile=null;
this.offlineFile=null;
- this.dispatch=null;
-
this.choice=null;
this.choiceBasic=null;
this.choiceAdvanced=null;
@@ -175,7 +169,7 @@
this.deletableOptionIndex=null;
this.isRemoveContent=null;
this.toolContentId=null;
- this.toolContentID=null;
+
this.onlineInstructions=null;
this.offlineInstructions=null;
@@ -766,13 +760,6 @@
this.receivedFile = receivedFile;
}
- public String getDispatch() {
- return dispatch;
- }
-
- public void setDispatch(String buttonValue) {
- this.dispatch = buttonValue;
- }
/**
* @return Returns the offlineFile.
@@ -810,20 +797,8 @@
public void setCurrentTab(String currentTab) {
this.currentTab = currentTab;
}
+
/**
- * @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 submit.
*/
public String getSubmit() {
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java
===================================================================
diff -u -r53db9379d8fb01523176dd7f71712a5deaaa730b -raaf728a804e41624949c6b869bd25e0d5d8fc83b
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 53db9379d8fb01523176dd7f71712a5deaaa730b)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -120,8 +120,10 @@
HttpServletResponse response) throws IOException,
ServletException
{
- VoteUtils.cleanUpUserExceptions(request);
+ VoteUtils.cleanUpUserExceptions(request);
logger.debug("dispatching continueOptionsCombined...");
+
+ setContentInUse(request);
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
IVoteService voteService =VoteUtils.getToolService(request);
@@ -132,11 +134,9 @@
Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID);
logger.debug("toolContentId: " + toolContentId);
- logger.debug("will assess");
-
//Map mapLeanerAssessmentResults=LearningUtil.assess(request, mapGeneralCheckedOptionsContent, toolContentId);
- Map mapLeanerAssessmentResults=null;
- logger.debug("mapLeanerAssessmentResults: " + mapLeanerAssessmentResults);
+ //Map mapLeanerAssessmentResults=null;
+ //logger.debug("mapLeanerAssessmentResults: " + mapLeanerAssessmentResults);
logger.debug("assesment complete");
@@ -159,6 +159,30 @@
}
+ public ActionForward selectOption(ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response) throws IOException,
+ ServletException
+ {
+ logger.debug("dispatching selectOption...");
+ VoteUtils.cleanUpUserExceptions(request);
+ VoteLearningForm voteLearningForm = (VoteLearningForm) form;
+ IVoteService voteService =VoteUtils.getToolService(request);
+
+ voteLearningForm.resetParameters();
+ LearningUtil.readParameters(request, voteLearningForm);
+
+
+ logger.debug("doing getOptionCheckBoxSelected");
+ setContentInUse(request);
+ voteLearningForm.resetCommands();
+ LearningUtil.selectOptionsCheckBox(request,voteLearningForm, voteLearningForm.getQuestionIndex());
+ voteLearningForm.resetCommands();
+ return (mapping.findForward(LOAD_LEARNER));
+ }
+
+
public ActionForward displayVote(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
@@ -276,8 +300,9 @@
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/VoteLearningForm.java
===================================================================
diff -u -r53db9379d8fb01523176dd7f71712a5deaaa730b -raaf728a804e41624949c6b869bd25e0d5d8fc83b
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java (.../VoteLearningForm.java) (revision 53db9379d8fb01523176dd7f71712a5deaaa730b)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java (.../VoteLearningForm.java) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -38,6 +38,8 @@
protected String checked;
protected String userEntry;
+ protected String dispatch;
+ protected String toolContentID;
protected String continueOptions;
protected String nextOptions;
@@ -387,5 +389,32 @@
public void setUserEntry(String userEntry) {
this.userEntry = userEntry;
}
+
+ /**
+ * @return Returns the dispatch.
+ */
+ public String getDispatch() {
+ return dispatch;
+ }
+ /**
+ * @param dispatch The dispatch to set.
+ */
+ public void setDispatch(String dispatch) {
+ this.dispatch = dispatch;
+ }
+
+ /**
+ * @return Returns the toolContentID.
+ */
+ public String getToolContentID() {
+ return toolContentID;
+ }
+ /**
+ * @param toolContentID The toolContentID to set.
+ */
+ public void setToolContentID(String toolContentID) {
+ this.toolContentID = toolContentID;
+ }
+
}
Index: lams_tool_vote/web/WEB-INF/struts-config.xml
===================================================================
diff -u -r4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92 -raaf728a804e41624949c6b869bd25e0d5d8fc83b
--- lams_tool_vote/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92)
+++ lams_tool_vote/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -257,10 +257,8 @@
name="VoteLearningForm"
scope="session"
input="/learning/AnswersContent.jsp"
- parameter="method"
- unknown="false"
- validate="false">
-
+ parameter="dispatch">
+
-
-
+
+
+
+
-
@@ -85,7 +86,8 @@
{
document.forms[0].checked.value=false;
}
- document.forms[0].submit();" CHECKED>
+
+ submitMethod('selectOption');" CHECKED>
@@ -119,7 +121,7 @@
{
document.forms[0].checked.value=false;
}
- document.forms[0].submit();">
+ submitMethod('selectOption');">
@@ -155,9 +157,11 @@
-
-
-
+
+
+
Index: lams_tool_vote/web/learning/IndividualLearnerResults.jsp
===================================================================
diff -u -r4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92 -raaf728a804e41624949c6b869bd25e0d5d8fc83b
--- lams_tool_vote/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision 4df80ebcc0bd8e038e6d0e9bb0f6eb8c087f2a92)
+++ lams_tool_vote/web/learning/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -32,60 +32,21 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-  
-
-
-
-
-
-
-
-
-  
-  
-  
-
-
-
-
-
-
-
-
@@ -147,57 +108,7 @@
-
-
-
-
-
-
-
-
- images/tick.gif" align=right width=20 height=20>
-
-
-
-
-
-
-
- images/cross.gif" align=right width=20 height=20>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -222,12 +133,10 @@
-
-
-
-
-
-
+
+
+
+
Index: lams_tool_vote/web/learning/learningHeader.jsp
===================================================================
diff -u
--- lams_tool_vote/web/learning/learningHeader.jsp (revision 0)
+++ lams_tool_vote/web/learning/learningHeader.jsp (revision aaf728a804e41624949c6b869bd25e0d5d8fc83b)
@@ -0,0 +1,66 @@
+<%--
+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" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ includes/javascript/tabcontroller.js">
+ includes/javascript/common.js">