diff --git a/core/module/course/course.php b/core/module/course/course.php index 384d352..3dd1da2 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -1755,12 +1755,12 @@ class course extends common */ public function permissionControl($funtion, $courseId) { - switch (self::$actions[$funtion]) { + switch ($this->getUser('group') ) { case self::GROUP_ADMIN: - return ($this->getUser('group') === self::$actions[$funtion]); + return true; case self::GROUP_EDITOR: return ( - $this->getUser('group') >= self::$actions[$funtion] + $this->getUser('group') === self::$actions[$funtion] && $this->getData(['enrolment', $courseId]) && ($this->getUser('id') === $this->getData(['course', $courseId, 'author']) || array_key_exists($this->getUser('id'), $this->getData(['enrolment', $courseId])) )