Skip to content
Snippets Groups Projects
Commit 2db1e291 authored by David Siegfried's avatar David Siegfried
Browse files

prevent errors in LVGroupsWizardStep, fixes #5123

Closes #5123

Merge request studip/studip!3826
parent 60f2b288
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment