From 847182e7958b926f6de156b719e0eec56bd7bd92 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Wed, 2 Apr 2014 17:16:29 +0200
Subject: [PATCH] OO-1047: only apply the fix to the single choice, set
 maxvalue for other type of choices as before

---
 .../ims/qti/editor/beecom/objects/ChoiceQuestion.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/olat/ims/qti/editor/beecom/objects/ChoiceQuestion.java b/src/main/java/org/olat/ims/qti/editor/beecom/objects/ChoiceQuestion.java
index 549793ae162..edc1b82475f 100644
--- a/src/main/java/org/olat/ims/qti/editor/beecom/objects/ChoiceQuestion.java
+++ b/src/main/java/org/olat/ims/qti/editor/beecom/objects/ChoiceQuestion.java
@@ -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
 				if (instance.getType() == TYPE_MC) {
 					// if does not contain any ANDs, assume only one combination
@@ -146,7 +143,9 @@ public class ChoiceQuestion extends Question implements QTIObject {
 					} else {
 						instance.setSingleCorrect(false);
 					}
+					QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
 				} else if (instance.getType() == TYPE_SC) {
+					QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
 					Collection<Float> values = points.values();
 					if (values.size() > 0) {
 						instance.setSingleCorrect(true);
@@ -178,6 +177,9 @@ public class ChoiceQuestion extends Question implements QTIObject {
 							choice.setPoints(maxValue / 4);
 						}
 					}
+					QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
+				} else {
+					QTIEditHelper.configureMinMaxScore(instance, (Element) resprocessingXML.selectSingleNode(".//decvar"));
 				}
 
 					
-- 
GitLab