Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java,v
diff -u -r1.35 -r1.36
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java 19 Nov 2005 12:52:15 -0000 1.35
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java 20 Nov 2005 12:38:17 -0000 1.36
@@ -100,8 +100,9 @@
public static final String INDIVIDUAL_REPORT ="individualReport";
public static final String VIEW_SUMMARY ="viewSummary";
public static final String REDO_QUESTIONS ="redoQuestions";
-
+ public static final String SINGLE_QUESTION_ANSWERS ="singleQuestionAnswers";
+
public static final String ALL_INSTRUCTIONS ="allInstructions";
public static final String EDIT_OPTS_CONTENT ="editOptsContent";
public static final String ADD_OPTS_CONTENT ="addOptsContent";
@@ -290,7 +291,9 @@
public static final String MONITORING_REPORT_TITLE ="monitoringReportTitle";
public static final String REPORT_TITLE_LEARNER ="reportTitleLearner";
public static final String END_LEARNING_MESSAGE ="endLearningMessage";
+ public static final String TOTAL_COUNT_REACHED ="totalCountReached";
+
public static final String IS_TOOL_ACTIVITY_OFFLINE ="isToolActivityOffline";
public static final String IS_USERNAME_VISIBLE ="isUsernameVisible";
public static final String IS_CONTENT_IN_USE ="isContentInUse";
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/Attic/McResources.properties,v
diff -u -r1.29 -r1.30
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McResources.properties 18 Nov 2005 17:03:04 -0000 1.29
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McResources.properties 20 Nov 2005 12:38:17 -0000 1.30
@@ -43,6 +43,8 @@
button.submit =Submit
button.done =Done
button.getNextQuestion =Next
+button.next =Next
+button.nextQuestion =Next Question
button.continue =Continue
button.getPreviousQuestion =Previous
button.editQuestion =Edit
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java,v
diff -u -r1.57 -r1.58
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 19 Nov 2005 12:52:15 -0000 1.57
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 20 Nov 2005 12:38:17 -0000 1.58
@@ -2095,7 +2095,7 @@
ServletException
{
logger.debug("displayMc starting..");
-
+
McLearningForm mcLearningForm = (McLearningForm) form;
IMcService mcService =McUtils.getToolService(request);
@@ -2131,11 +2131,34 @@
mcLearningForm.resetCommands();
return (mapping.findForward(INDIVIDUAL_REPORT));
}
- else if (mcLearningForm.getContinueOptions() != null)
+ else if (mcLearningForm.getNextOptions() != null)
{
- logger.debug("requested continue options...");
+ logger.debug("requested next options...");
+
+ String currentQuestionIndex=(String)request.getSession().getAttribute(CURRENT_QUESTION_INDEX);
+ logger.debug("currentQuestionIndex:" + currentQuestionIndex);
+
+ String totalQuestionCount=(String)request.getSession().getAttribute(TOTAL_QUESTION_COUNT);
+ logger.debug("totalQuestionCount:" + totalQuestionCount);
+
+ int intTotalQuestionCount=new Integer(totalQuestionCount).intValue();
+ int intCurrentQuestionIndex=new Integer(currentQuestionIndex).intValue();
+
+ if (intTotalQuestionCount-1 == intCurrentQuestionIndex)
+ {
+ logger.debug("totalQuestionCount has been reached :" + totalQuestionCount);
+ request.getSession().setAttribute(TOTAL_COUNT_REACHED, new Boolean(true).toString());
+ }
+
+
mcLearningForm.resetCommands();
- return continueOptions(request, mcLearningForm, mapping);
+ //return getNextOptions(request, mcLearningForm, mapping);
+
+
+ int newQuestionIndex=new Integer(currentQuestionIndex).intValue() + 1;
+ request.getSession().setAttribute(CURRENT_QUESTION_INDEX, new Integer(newQuestionIndex).toString());
+ logger.debug("updated questionIndex:" + request.getSession().getAttribute(CURRENT_QUESTION_INDEX));
+ return (mapping.findForward(LOAD_LEARNER));
}
else if (mcLearningForm.getOptionCheckBoxSelected() != null)
{
@@ -2146,6 +2169,8 @@
else if (mcLearningForm.getRedoQuestions() != null)
{
logger.debug("requested redoQuestions...");
+ request.getSession().setAttribute(CURRENT_QUESTION_INDEX, "1");
+ request.getSession().setAttribute(TOTAL_COUNT_REACHED, new Boolean(false).toString());
mcLearningForm.resetCommands();
return (mapping.findForward(REDO_QUESTIONS));
//return redoQuestions(request, mcLearningForm, mapping);
@@ -2176,7 +2201,7 @@
* @param mapping
* @return
*/
- protected ActionForward continueOptions(HttpServletRequest request, McLearningForm mcLearningForm, ActionMapping mapping)
+ protected ActionForward getNextOptions(HttpServletRequest request, McLearningForm mcLearningForm, ActionMapping mapping)
{
logger.debug("requested continueOptions...");
boolean continueOptions=LearningUtil.continueOptions(request);
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningForm.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningForm.java,v
diff -u -r1.6 -r1.7
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningForm.java 18 Nov 2005 17:03:03 -0000 1.6
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningForm.java 20 Nov 2005 12:38:17 -0000 1.7
@@ -17,6 +17,7 @@
protected String checked;
protected String continueOptions;
+ protected String nextOptions;
protected String continueOptionsCombined;
protected String redoQuestions;
protected String viewSummary;
@@ -26,6 +27,7 @@
public void resetCommands()
{
this.setContinueOptions(null);
+ this.setNextOptions(null);
this.setContinueOptionsCombined(null);
this.setRedoQuestions( null);
this.setViewSummary(null);
@@ -177,4 +179,16 @@
public void setRedoQuestionsOk(String redoQuestionsOk) {
this.redoQuestionsOk = redoQuestionsOk;
}
+ /**
+ * @return Returns the nextOptions.
+ */
+ public String getNextOptions() {
+ return nextOptions;
+ }
+ /**
+ * @param nextOptions The nextOptions to set.
+ */
+ public void setNextOptions(String nextOptions) {
+ this.nextOptions = nextOptions;
+ }
}
Index: lams_tool_lamc/web/SequentialAnswersContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/Attic/SequentialAnswersContent.jsp,v
diff -u -r1.5 -r1.6
--- lams_tool_lamc/web/SequentialAnswersContent.jsp 15 Nov 2005 16:01:29 -0000 1.5
+++ lams_tool_lamc/web/SequentialAnswersContent.jsp 20 Nov 2005 12:38:17 -0000 1.6
@@ -5,7 +5,7 @@
<%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %>
-
+
Index: lams_tool_lamc/web/SingleQuestionAnswersContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/Attic/SingleQuestionAnswersContent.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_lamc/web/SingleQuestionAnswersContent.jsp 20 Nov 2005 12:38:17 -0000 1.1
@@ -0,0 +1,177 @@
+<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
+<%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic-el" %>
+<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
+<%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %>
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ ( )
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+  
+ |
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
Index: lams_tool_lamc/web/answersContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/Attic/answersContent.jsp,v
diff -u -r1.5 -r1.6
--- lams_tool_lamc/web/answersContent.jsp 16 Nov 2005 15:23:03 -0000 1.5
+++ lams_tool_lamc/web/answersContent.jsp 20 Nov 2005 12:38:17 -0000 1.6
@@ -36,7 +36,7 @@
-
+
Index: lams_tool_lamc/web/WEB-INF/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/WEB-INF/struts-config.xml,v
diff -u -r1.12 -r1.13
--- lams_tool_lamc/web/WEB-INF/struts-config.xml 18 Nov 2005 17:03:04 -0000 1.12
+++ lams_tool_lamc/web/WEB-INF/struts-config.xml 20 Nov 2005 12:38:17 -0000 1.13
@@ -154,6 +154,12 @@
/>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file