From 600ca064170648f43425c0e56a697a5912a694a7 Mon Sep 17 00:00:00 2001 From: Ron Lucke <lucke@elan-ev.de> Date: Mon, 22 May 2023 11:12:19 +0000 Subject: [PATCH] fix #2033 Closes #2033 Merge request studip/studip!1805 --- lib/models/Courseware/StructuralElement.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/models/Courseware/StructuralElement.php b/lib/models/Courseware/StructuralElement.php index 3cfca284999..813d6cb6a7a 100644 --- a/lib/models/Courseware/StructuralElement.php +++ b/lib/models/Courseware/StructuralElement.php @@ -371,9 +371,10 @@ class StructuralElement extends \SimpleORMap */ public function hasEditingPermission($user): bool { + $unit = $unit = $this->findUnit(); return $GLOBALS['perm']->have_perm('root', $user->id) || $GLOBALS['perm']->have_studip_perm( - \CourseConfig::get($this->range_id)->COURSEWARE_EDITING_PERMISSION[$this->getCoursewareCourse($this->range_id)->id] ?? 'tutor', + $unit->config['editing_permission'], $this->range_id, $user->id ); -- GitLab