protected function get_link_params() {
        $params = [];
        if (SITEID !== $this->calendar->course->id) {
            $params['course'] = $this->calendar->course->id;
        } else if (null !== $this->calendar->categoryid && $this->calendar->categoryid > 0) {
            $params['category'] = $this->calendar->categoryid;
        } else {
            $params['course'] = SITEID;
        }

        return $params;
    }