Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java,v
diff -u -r1.21 -r1.22
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java 25 Feb 2006 19:27:26 -0000 1.21
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/LearningUtil.java 22 Mar 2006 22:01:11 -0000 1.22
@@ -798,6 +798,7 @@
public static int getLearnerMarkAtLeast(Integer passMark, Map mapQuestionWeights)
{
+ logger.debug("doing getLearnerMarkAtLeast");
logger.debug("passMark:" + passMark);
logger.debug("mapQuestionWeights:" + mapQuestionWeights);
@@ -818,19 +819,27 @@
public static int calculateMinimumQuestionCountToPass(Integer passMark, Map mapQuestionWeights)
{
+ logger.debug("calculating minimumQuestionCountToPass: mapQuestionWeights: " + mapQuestionWeights + " passmark: " + passMark);
logger.debug("passMark: " + passMark);
logger.debug("original mapQuestionWeights: " + mapQuestionWeights);
int minimumQuestionCount=0;
int totalHighestWeights=0;
while (totalHighestWeights <= passMark.intValue())
{
+ logger.debug("totalHighestWeights versus passMark: " + totalHighestWeights + " versus" + passMark);
int highestWeight=getHighestWeight(mapQuestionWeights);
+ logger.debug("highestWeight: " + highestWeight);
totalHighestWeights=totalHighestWeights + highestWeight;
logger.debug("totalHighestWeights: " + totalHighestWeights);
mapQuestionWeights=rebuildWeightsMapExcludeHighestWeight(mapQuestionWeights, highestWeight);
logger.debug("mapQuestionWeights: " + mapQuestionWeights);
++minimumQuestionCount;
+ if (mapQuestionWeights.size() == 0)
+ {
+ logger.debug("no more weights: ");
+ break;
+ }
}
logger.debug("returning minimumQuestionCount: " + minimumQuestionCount);
return minimumQuestionCount;
@@ -839,6 +848,15 @@
public static int getHighestWeight(Map mapQuestionWeights)
{
+
+ if (mapQuestionWeights.size() == 1)
+ {
+ logger.debug("using map with 1 question only");
+ /*the only alternative is 100*/
+ return 100;
+ }
+
+ logger.debug("using map with > 1 questions");
Iterator itMap = mapQuestionWeights.entrySet().iterator();
int highestWeight=0;
while (itMap.hasNext())
@@ -856,6 +874,9 @@
public static Map rebuildWeightsMapExcludeHighestWeight(Map mapQuestionWeights, int highestWeight)
{
+ logger.debug("doing rebuildWeightsMapExcludeHighestWeight: " + mapQuestionWeights);
+ logger.debug("doing highestWeight: " + highestWeight);
+
Map mapWeightsExcludeHighestWeight= new TreeMap(new McComparator());
Iterator itMap = mapQuestionWeights.entrySet().iterator();
@@ -865,6 +886,8 @@
Map.Entry pair = (Map.Entry)itMap.next();
String weight=pair.getValue().toString();
int intWeight=new Integer(weight).intValue();
+ logger.debug("intWeight: " + intWeight);
+ logger.debug("intWeight versus highestWeight:" + intWeight + " versus" + highestWeight);
if (intWeight != highestWeight)
{
mapWeightsExcludeHighestWeight.put(mapIndex.toString(),weight);
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java,v
diff -u -r1.15 -r1.16
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java 21 Mar 2006 09:29:39 -0000 1.15
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningAction.java 22 Mar 2006 22:01:11 -0000 1.16
@@ -441,6 +441,9 @@
logger.debug("updated highestAttemptOrder:" + intHighestAttemptOrder);
request.getSession().setAttribute(LEARNER_LAST_ATTEMPT_ORDER, new Integer(intHighestAttemptOrder).toString());
+ logger.debug("before getLearnerMarkAtLeast: passMark" + passMark);
+ logger.debug("before getLearnerMarkAtLeast: mapQuestionWeights" + mapQuestionWeights);
+
int learnerMarkAtLeast=LearningUtil.getLearnerMarkAtLeast(passMark,mapQuestionWeights);
logger.debug("learnerMarkAtLeast:" + learnerMarkAtLeast);
request.getSession().setAttribute(LEARNER_MARK_ATLEAST, new Integer(learnerMarkAtLeast).toString());
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.45 -r1.46
--- lams_tool_lamc/web/WEB-INF/struts-config.xml 19 Mar 2006 13:28:30 -0000 1.45
+++ lams_tool_lamc/web/WEB-INF/struts-config.xml 22 Mar 2006 22:01:11 -0000 1.46
@@ -54,43 +54,43 @@
@@ -122,31 +122,31 @@
@@ -177,19 +177,19 @@
@@ -199,7 +199,7 @@
type="org.lamsfoundation.lams.tool.mc.web.McLearningStarterAction"
name="McLearningForm"
scope="session"
- validate="true"
+ validate="false"
unknown="false"
input="/learningIndex.jsp">
@@ -265,7 +265,7 @@
input="/learning/AnswersContent.jsp"
parameter="method"
unknown="false"
- validate="true">
+ validate="false">
@@ -398,7 +398,7 @@
input="/monitoring/MonitoringMaincontent.jsp"
parameter="method"
unknown="false"
- validate="true">
+ validate="false">
Index: lams_tool_lamc/web/learning/IndividualLearnerResults.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/Attic/IndividualLearnerResults.jsp,v
diff -u -r1.6 -r1.7
--- lams_tool_lamc/web/learning/IndividualLearnerResults.jsp 17 Mar 2006 10:34:47 -0000 1.6
+++ lams_tool_lamc/web/learning/IndividualLearnerResults.jsp 22 Mar 2006 22:01:11 -0000 1.7
@@ -187,10 +187,10 @@
-
-
-
-
+
+
+
+
Index: lams_tool_lamc/web/learning/Preview.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/Attic/Preview.jsp,v
diff -u -r1.3 -r1.4
--- lams_tool_lamc/web/learning/Preview.jsp 24 Feb 2006 20:25:27 -0000 1.3
+++ lams_tool_lamc/web/learning/Preview.jsp 22 Mar 2006 22:01:11 -0000 1.4
@@ -166,15 +166,6 @@
-
-
-
-
-
-
-
- |
-