Skip to content
Snippets Groups Projects
Commit 8708e253 authored by srosse's avatar srosse
Browse files

OO-2993: add validation for hostpot which need at least one correct answer

parent 900260f0
No related branches found
No related tags found
No related merge requests found
...@@ -210,6 +210,14 @@ public class HotspotEditorController extends FormBasicController { ...@@ -210,6 +210,14 @@ public class HotspotEditorController extends FormBasicController {
backgroundEl.validate(status); backgroundEl.validate(status);
allOk &= status.isEmpty(); allOk &= status.isEmpty();
} }
correctHotspotsEl.clearError();
if(!restrictedEdit) {
if(correctHotspotsEl.getSelectedKeys().size() == 0) {
correctHotspotsEl.setErrorKey("error.need.correct.answer", null);
allOk &= false;
}
}
return allOk & super.validateFormLogic(ureq); return allOk & super.validateFormLogic(ureq);
} }
......
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