-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 12.3.3
-
Fix Version/s: 12.4
-
Component/s: Participant Folder
-
Labels:None
-
Funded by:
When editing the access condition (not visibility) the changes are not saved and no change event is fired. This patch fixes that:
diff --git a/src/main/java/org/olat/course/nodes/pf/ui/PFEditController.java b/src/main/java/org/olat/course/nodes/pf/ui/PFEditController.java --- a/src/main/java/org/olat/course/nodes/pf/ui/PFEditController.java +++ b/src/main/java/org/olat/course/nodes/pf/ui/PFEditController.java @@ -51,11 +51,13 @@ private PFEditFormController modConfigCtr; private TabbedPane myTabbedPane; private ConditionEditController accessibilityCondCtr; + private PFCourseNode pfNode; public PFEditController(UserRequest ureq, WindowControl wControl, PFCourseNode pfNode, ICourse course, UserCourseEnvironment euce) { super(ureq, wControl); + this.pfNode = pfNode; configVC = createVelocityContainer("edit"); // Accessibility precondition @@ -96,7 +98,13 @@ @Override protected void event(UserRequest ureq, Controller source, Event event) { - if (source == modConfigCtr) { + if (source == accessibilityCondCtr) { + if (event == Event.CHANGED_EVENT) { + Condition cond = accessibilityCondCtr.getCondition(); + pfNode.setPreConditionAccess(cond); + fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT); + } + } else if (source == modConfigCtr) { if (Event.DONE_EVENT.equals(event)) { fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT); }