diff options
Diffstat (limited to 'lib/classes/coursewizardsteps/LVGroupsWizardStep.php')
| -rw-r--r-- | lib/classes/coursewizardsteps/LVGroupsWizardStep.php | 9 |
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); } |
