From f9c202d4fab2d8654172a2847db49e46360ed74d Mon Sep 17 00:00:00 2001 From: Rasmus Fuhse Date: Fri, 7 Nov 2025 10:41:29 +0000 Subject: =?UTF-8?q?Resolve=20"Der=20OER=5FPUBLIC=5FSTATUS=20wird=20nicht?= =?UTF-8?q?=20=C3=BCberall=20respektiert"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #6031 Merge request studip/studip!4596 (cherry picked from commit 5081d774b076867eada91bad5b60c88a8481da1c) f7e2beaf re #6031 : respect OER_PUBLIC_STATUS Co-authored-by: Rasmus Fuhse --- lib/filesystem/StandardFile.php | 1 + lib/navigation/StartNavigation.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php index 126ef22..493e8cd 100644 --- a/lib/filesystem/StandardFile.php +++ b/lib/filesystem/StandardFile.php @@ -297,6 +297,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface !$this->isEditable($GLOBALS['user']->id) && in_array($this->fileref->content_terms_of_use_id, ['SELFMADE_NONPUB', 'FREE_LICENSE']) && $this->fileref->folder->range_type === 'course' + && $GLOBALS['perm']->have_perm(Config::get()->OER_PUBLIC_STATUS) ) { $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id), diff --git a/lib/navigation/StartNavigation.php b/lib/navigation/StartNavigation.php index e5779a5..4db6943 100644 --- a/lib/navigation/StartNavigation.php +++ b/lib/navigation/StartNavigation.php @@ -258,7 +258,7 @@ class StartNavigation extends Navigation $this->addSubNavigation('contents', $navigation); // oer - if (Config::get()->OERCAMPUS_ENABLED) { + if (Config::get()->OERCAMPUS_ENABLED && $perm->have_perm(Config::get()->OER_PUBLIC_STATUS)) { $this->addSubNavigation('oer', new Navigation(_('OER Campus'), 'dispatch.php/oer/market')); } -- cgit v1.0