From bb48379f04178ffee375b31fe4b729eaaae47d07 Mon Sep 17 00:00:00 2001
From: srosse <stephane.rosse@frentix.com>
Date: Mon, 2 Sep 2019 19:51:54 +0200
Subject: [PATCH] OO-4155: managed close in repository entry settings (patch D.
 Haag)

---
 .../repository/ui/RepositoryEntrySettingsController.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/olat/repository/ui/RepositoryEntrySettingsController.java b/src/main/java/org/olat/repository/ui/RepositoryEntrySettingsController.java
index 379391d16a6..a43d9da3715 100644
--- a/src/main/java/org/olat/repository/ui/RepositoryEntrySettingsController.java
+++ b/src/main/java/org/olat/repository/ui/RepositoryEntrySettingsController.java
@@ -46,6 +46,7 @@ import org.olat.core.id.context.StateEntry;
 import org.olat.core.util.Util;
 import org.olat.core.util.resource.OresHelper;
 import org.olat.repository.RepositoryEntry;
+import org.olat.repository.RepositoryEntryManagedFlag;
 import org.olat.repository.RepositoryEntryStatusEnum;
 import org.olat.repository.RepositoryManager;
 import org.olat.repository.RepositoryModule;
@@ -146,7 +147,9 @@ public class RepositoryEntrySettingsController extends BasicController implement
 			reviewLink = initStatus(statusDropdown, RepositoryEntryStatusEnum.review, entryStatus);
 			coachPublishLink = initStatus(statusDropdown, RepositoryEntryStatusEnum.coachpublished, entryStatus);
 			publishLink = initStatus(statusDropdown, RepositoryEntryStatusEnum.published, entryStatus);
-			closeLink = initStatus(statusDropdown, RepositoryEntryStatusEnum.closed, entryStatus);
+			if(!RepositoryEntryManagedFlag.isManaged(entry, RepositoryEntryManagedFlag.close)) {
+				closeLink = initStatus(statusDropdown, RepositoryEntryStatusEnum.closed, entryStatus);
+			}
 		}
 		
 		stackPanel.setDirty(true);
-- 
GitLab