Skip to content
Snippets Groups Projects
Commit 847182e7 authored by srosse's avatar srosse
Browse files

OO-1047: only apply the fix to the single choice, set maxvalue for other type of choices as before

parent c1c071e7
No related branches found
No related tags found
No related merge requests found
...@@ -132,9 +132,6 @@ public class ChoiceQuestion extends Question implements QTIObject { ...@@ -132,9 +132,6 @@ public class ChoiceQuestion extends Question implements QTIObject {
} }
} }
// set min/max score first has it can be overridden
QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
// get type of multiple choice // get type of multiple choice
if (instance.getType() == TYPE_MC) { if (instance.getType() == TYPE_MC) {
// if does not contain any ANDs, assume only one combination // if does not contain any ANDs, assume only one combination
...@@ -146,7 +143,9 @@ public class ChoiceQuestion extends Question implements QTIObject { ...@@ -146,7 +143,9 @@ public class ChoiceQuestion extends Question implements QTIObject {
} else { } else {
instance.setSingleCorrect(false); instance.setSingleCorrect(false);
} }
QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
} else if (instance.getType() == TYPE_SC) { } else if (instance.getType() == TYPE_SC) {
QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
Collection<Float> values = points.values(); Collection<Float> values = points.values();
if (values.size() > 0) { if (values.size() > 0) {
instance.setSingleCorrect(true); instance.setSingleCorrect(true);
...@@ -178,6 +177,9 @@ public class ChoiceQuestion extends Question implements QTIObject { ...@@ -178,6 +177,9 @@ public class ChoiceQuestion extends Question implements QTIObject {
choice.setPoints(maxValue / 4); choice.setPoints(maxValue / 4);
} }
} }
QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
} else {
QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment