diff --git a/src/main/java/org/olat/course/nodes/st/assessment/STRootPassedEvaluator.java b/src/main/java/org/olat/course/nodes/st/assessment/STRootPassedEvaluator.java index 3bd663879868abd4bc951050b0b25342ee52af3d..86d2135efdfec82383044fb491daeb1df58262ad 100644 --- a/src/main/java/org/olat/course/nodes/st/assessment/STRootPassedEvaluator.java +++ b/src/main/java/org/olat/course/nodes/st/assessment/STRootPassedEvaluator.java @@ -90,10 +90,11 @@ public class STRootPassedEvaluator implements RootPassedEvaluator { // All passed if (config.getBooleanSafe(STCourseNode.CONFIG_PASSED_ALL)) { Counts counts = passCounter.getCounts(courseNode, scoreAccounting); - if (counts.isAllAssessed() && counts.getPassable() > 0) { - if (counts.getPassable() == counts.getPassed()) { + if (counts.getPassable() > 0) { + if (counts.isAllAssessed() && counts.getPassable() == counts.getPassed()) { return Boolean.TRUE; - } else if (getActivePassedConfigs(config) == 1) { + } + if (counts.getFailed() > 0 && getActivePassedConfigs(config) == 1) { return Boolean.FALSE; } } diff --git a/src/test/java/org/olat/course/nodes/st/assessment/STRootPassedEvaluatorTest.java b/src/test/java/org/olat/course/nodes/st/assessment/STRootPassedEvaluatorTest.java index 77870d927e9c141811207a1cae2a4c306256062f..a8e6afed2eb405256bd05cab851b982d856c1b9d 100644 --- a/src/test/java/org/olat/course/nodes/st/assessment/STRootPassedEvaluatorTest.java +++ b/src/test/java/org/olat/course/nodes/st/assessment/STRootPassedEvaluatorTest.java @@ -213,7 +213,7 @@ public class STRootPassedEvaluatorTest { courseNode.getModuleConfiguration().setBooleanEntry(STCourseNode.CONFIG_PASSED_ALL, true); ScoreAccounting scoreAccounting = new MappedScoreAccounting(); - Counts counts = new CountsImpl(3, 2, 1); + Counts counts = new CountsImpl(3, 1, 1); PassCounter passCounter = mock(PassCounter.class); when(passCounter.getCounts(any(), any())).thenReturn(counts); STRootPassedEvaluator sut = new STRootPassedEvaluator(passCounter);