public function get_time_restriction_status() {
        if ($this->can_manage()) {
            return false;
        }

        if (!$this->is_accessible()) {
            if ($this->properties->deadline != 0 && time() > $this->properties->deadline) {
                $status = ['reason' => 'lessonclosed', 'time' => $this->properties->deadline];
            } else {
                $status = ['reason' => 'lessonopen', 'time' => $this->properties->available];
            }
            return (object) $status;
        }
        return false;
    }