diff --git a/.hgtags b/.hgtags index d02992120567a017c6d032c36350a022367c230d..97a77fccb5327953efaf9f7e4aed985c70a012c3 100644 --- a/.hgtags +++ b/.hgtags @@ -192,6 +192,7 @@ dda2b6a8c3454872516fac37667698425802fc97 OpenOLAT 11.5.1 614f0f09f5a7a915a3a364e3f5641e9179dc7735 OpenOLAT 12.0.0 03f92c40a74397b179cce2b4b2d3346c29a20e64 OpenOLAT 12.0.1 9266c599d0a13634e44724540a37fb4161e29f98 OpenOLAT 11.5.4 +362aa1c29fa5cde07960ac648098ddf4c6f19ed7 OpenOLAT 11.5.5 15761fa18b4b2eebe3e4592e4289527989c7f256 OpenOLAT 12.0.2 cd13b2d55dde9f3f3ba9f31e10f9d02493740891 OpenOLAT 12.1.0 cd13b2d55dde9f3f3ba9f31e10f9d02493740891 OpenOLAT 12.1.0 diff --git a/src/main/java/org/olat/ims/qti21/ui/editor/interactions/HottextEditorController.java b/src/main/java/org/olat/ims/qti21/ui/editor/interactions/HottextEditorController.java index dd3832de783717383c3d232925a4c92cb05dcba8..bb54cb42d3cac9687469275813d6267b466664e6 100644 --- a/src/main/java/org/olat/ims/qti21/ui/editor/interactions/HottextEditorController.java +++ b/src/main/java/org/olat/ims/qti21/ui/editor/interactions/HottextEditorController.java @@ -152,10 +152,12 @@ public class HottextEditorController extends FormBasicController { protected void formOK(UserRequest ureq) { //title itemBuilder.setTitle(titleEl.getValue()); - //set the question with the text entries - String questionText = textEl.getRawValue(); - itemBuilder.setQuestion(questionText); - + + if(!restrictedEdit) { + //set the question with the text entries + String questionText = textEl.getRawValue(); + itemBuilder.setQuestion(questionText); + } fireEvent(ureq, new AssessmentItemEvent(AssessmentItemEvent.ASSESSMENT_ITEM_CHANGED, itemBuilder.getAssessmentItem(), QTI21QuestionType.hottext)); } diff --git a/src/main/java/org/olat/ims/qti21/ui/editor/interactions/MatchEditorController.java b/src/main/java/org/olat/ims/qti21/ui/editor/interactions/MatchEditorController.java index bae0eae92dfdda1364eeaa8c77c5ef552ff42de5..1773c431a5f4f35ef7d0e62c0ac2ea7581a2cf8e 100644 --- a/src/main/java/org/olat/ims/qti21/ui/editor/interactions/MatchEditorController.java +++ b/src/main/java/org/olat/ims/qti21/ui/editor/interactions/MatchEditorController.java @@ -243,42 +243,6 @@ public class MatchEditorController extends FormBasicController { } commitTemporaryAssociations(ureq); - /* - if(singleMultiEl.isOneSelected() && singleMultiEl.isSelected(0)) { - Map<String,String> sourseTargetMap = new HashMap<>(); - String[] directedPairsIds = ureq.getHttpReq().getParameterValues("qtiworks_response_" + itemBuilder.getResponseIdentifier()); - if(directedPairsIds == null || directedPairsIds.length == 0) { - for(MatchWrapper sourceWrapper:sourceWrappers) { - sourceWrapper.setErrorSingleChoice(true); - allOk &= false; - } - } else { - for(String directedPairIds: directedPairsIds) { - String[] pairs = directedPairIds.split(" "); - String sourceId = pairs[0]; - String targetId = pairs[1]; - if(sourseTargetMap.containsKey(sourceId)) { - for(MatchWrapper sourceWrapper:sourceWrappers) { - if(sourceId.equals(sourceWrapper.getIdentifierString())) { - sourceWrapper.setErrorSingleChoice(true); - } - } - allOk &= false; - } else { - sourseTargetMap.put(sourceId, targetId); - } - } - - for(MatchWrapper sourceWrapper:sourceWrappers) { - String sourceId = sourceWrapper.getIdentifierString(); - if(!sourseTargetMap.containsKey(sourceId)) { - sourceWrapper.setErrorSingleChoice(true); - allOk &= false; - } - } - } - } - */ if(layoutEl != null) { layoutEl.clearError(); @@ -376,6 +340,8 @@ public class MatchEditorController extends FormBasicController { } private void commitAssociations(UserRequest ureq) { + if(restrictedEdit) return; + temporaryAssociations.clear(); itemBuilder.clearAssociations();