diff --git a/src/main/java/org/olat/course/assessment/ui/AssessmentModeEditController.java b/src/main/java/org/olat/course/assessment/ui/AssessmentModeEditController.java
index a6f79530026ed821db3946802a85e8d9c7367717..123b125d521322717b9a6c410b372adcafb83631 100644
--- a/src/main/java/org/olat/course/assessment/ui/AssessmentModeEditController.java
+++ b/src/main/java/org/olat/course/assessment/ui/AssessmentModeEditController.java
@@ -458,7 +458,7 @@ public class AssessmentModeEditController extends FormBasicController {
 		courseElementsRestrictionEl.clearError();
 		if(courseElementsRestrictionEl.isAtLeastSelected(1)) {
 			if(elementKeys.isEmpty()) {
-				endEl.setErrorKey("form.legende.mandatory", null);
+				courseElementsRestrictionEl.setErrorKey("form.legende.mandatory", null);
 				allOk &= false;
 			}
 		}