aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Siegfried <david.siegfried@uni-vechta.de>2025-01-14 10:12:20 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2025-01-14 10:12:20 +0000
commit2db1e291df63e436a04db51c9a6d7fa59d0d5a14 (patch)
tree7a70e5b329b43e8eccb20ea6bcdf0aaed9149b07
parent60f2b28874a7e3082b7806858f23bcc4a9ac064e (diff)
prevent errors in LVGroupsWizardStep, fixes #5123
Closes #5123 Merge request studip/studip!3826
-rw-r--r--lib/classes/coursewizardsteps/LVGroupsWizardStep.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/classes/coursewizardsteps/LVGroupsWizardStep.php b/lib/classes/coursewizardsteps/LVGroupsWizardStep.php
index 6fae1df..99e5084 100644
--- a/lib/classes/coursewizardsteps/LVGroupsWizardStep.php
+++ b/lib/classes/coursewizardsteps/LVGroupsWizardStep.php
@@ -119,8 +119,6 @@ class LVGroupsWizardStep implements CourseWizardStep
public function getLVGroupTreeLevel($parentId, $parentClass)
{
$level = [];
- $children = [];
- $searchtree = [];
$course = Course::findCurrent();
if ($course) {
@@ -474,8 +472,7 @@ class LVGroupsWizardStep implements CourseWizardStep
$coursetype = 1;
foreach ($values as $class)
{
- if ($class['coursetype'])
- {
+ if (!empty($class['coursetype'])) {
$coursetype = $class['coursetype'];
break;
}
@@ -487,8 +484,6 @@ class LVGroupsWizardStep implements CourseWizardStep
public function is_locked($values)
{
- global $perm;
-
// Has user access to this function? Access state is configured in global config.
$access_right = Config::get()->MVV_ACCESS_ASSIGN_LVGRUPPEN;
@@ -506,7 +501,7 @@ class LVGroupsWizardStep implements CourseWizardStep
$st->execute([$GLOBALS['user']->id, $inst_id]);
return !$st->fetchColumn();
}
- return !$perm->have_studip_perm($access_right, $inst_id);
+ return $inst_id && !$GLOBALS['perm']->have_studip_perm($access_right, $inst_id);
}