Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-3407

Participant folder: change of access is not recognized

    XMLWordPrintable

    Details

      Description

      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);	
       				}
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            stephan Stephan Clemenz
            Tester:
            Mandy Menzel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 25 minutes
                25m