From 401a3ed23c8c9582079bee51e0c699d7b1664244 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Wed, 24 Apr 2024 10:34:08 +0000
Subject: [PATCH] fix other regressions from  83773002, re #4030

Merge request studip/studip!2916
---
 app/controllers/course/grouping.php | 2 +-
 app/controllers/questionnaire.php   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/controllers/course/grouping.php b/app/controllers/course/grouping.php
index 1729d995292..3cef6731f95 100644
--- a/app/controllers/course/grouping.php
+++ b/app/controllers/course/grouping.php
@@ -37,7 +37,7 @@ class Course_GroupingController extends AuthenticatedController
             throw new AccessDeniedException(_('Sie haben leider nicht die notwendige Berechtigung für diese Aktion.'));
         }
 
-        if ($GLOBALS['perm']->have_studip_perm('admin', $this->course_id)) {
+        if ($GLOBALS['perm']->have_studip_perm('admin', $this->course->id)) {
             $widget = new CourseManagementSelectWidget();
             Sidebar::get()->addWidget($widget);
         }
diff --git a/app/controllers/questionnaire.php b/app/controllers/questionnaire.php
index 2da457ce624..fe2ed3aef12 100644
--- a/app/controllers/questionnaire.php
+++ b/app/controllers/questionnaire.php
@@ -54,7 +54,7 @@ class QuestionnaireController extends AuthenticatedController
         }
 
         Navigation::activateItem("/course/admin/questionnaires");
-        if ($GLOBALS['perm']->have_studip_perm('admin', $this->course_id)) {
+        if ($GLOBALS['perm']->have_studip_perm('admin', $this->range_id)) {
             // Ensure the select widget is added last
             NotificationCenter::on('SidebarWillRender', function () {
                 $widget = new CourseManagementSelectWidget();
-- 
GitLab