function is_capable() { return ($this->cps_user and $this->cps_user->getSectionsForMoodleCourse(null, true)) || parent::is_capable(); }
function is_capable() { global $USER; $mentors = lookup_mentors($this->obj); return in_array($USER->id, array_keys($mentors)) || parent::is_capable(); }