diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2023-03-03 12:49:48 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2023-03-03 12:49:48 +0000 |
| commit | 79bf990f77bc4f10e6f9aacd662997a21738ab8a (patch) | |
| tree | 0592495039d458550e4dac24ee90efc55f10fb39 /app/controllers/course/statusgroups.php | |
| parent | ba77e51b1e5e58475f178ad6a55c984d8f5ab4b5 (diff) | |
prevent php-warnings, closes #2249
Closes #2249
Merge request studip/studip!1482
Diffstat (limited to 'app/controllers/course/statusgroups.php')
| -rw-r--r-- | app/controllers/course/statusgroups.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/course/statusgroups.php b/app/controllers/course/statusgroups.php index 5e09f51..5536ab9 100644 --- a/app/controllers/course/statusgroups.php +++ b/app/controllers/course/statusgroups.php @@ -34,9 +34,9 @@ class Course_StatusgroupsController extends AuthenticatedController $this->config = CourseConfig::get($this->course_id); // Check perms - $this->is_dozent = $perm->have_studip_perm('dozent', $this->course_id); - $this->is_tutor = $perm->have_studip_perm('tutor', $this->course_id); - $this->is_autor = $perm->have_studip_perm('autor', $this->course_id); + $this->is_dozent = $GLOBALS['perm']->have_studip_perm('dozent', $this->course_id); + $this->is_tutor = $GLOBALS['perm']->have_studip_perm('tutor', $this->course_id); + $this->is_autor = $GLOBALS['perm']->have_studip_perm('autor', $this->course_id); // Hide groups page? if (!$this->is_tutor && $this->config->COURSE_MEMBERS_HIDE) { @@ -106,7 +106,7 @@ class Course_StatusgroupsController extends AuthenticatedController $groupdata = [ 'group' => $g, 'members' => [], - 'membercount' => $membercounts[$g->id] ?: 0, + 'membercount' => $membercounts[$g->id] ?? 0, 'invisible_users' => 0 ]; @@ -118,7 +118,7 @@ class Course_StatusgroupsController extends AuthenticatedController if ($this->sort_group == $g->id) { $sorted = $this->sortMembers($g->members, $this->sort_by, $this->order); } else { - $sorted = $sorted = $this->sortMembers($g->members); + $sorted = $this->sortMembers($g->members); } foreach ($sorted as $member) { @@ -783,7 +783,7 @@ class Course_StatusgroupsController extends AuthenticatedController $numbering = Request::int('startnumber', 1); } for ($i = 0 ; $i < Request::int('number') ; $i++) { - $group = Statusgruppen::createOrUpdate('', Request::get('prefix').' '. + Statusgruppen::createOrUpdate('', Request::get('prefix').' '. $numbering++, null, $this->course_id, Request::int('size', 0), Request::int('selfassign', 0) + Request::int('exclusive', 0), @@ -1059,7 +1059,7 @@ class Course_StatusgroupsController extends AuthenticatedController // Get selected action for group members. $actions = Request::getArray('members_action'); - $action = $actions[$group_id]; + $action = $actions[$group_id] ?? ''; switch ($action) { case 'move': |
