protected function get_default_add_context() {
        if (calendar_user_can_add_event($this->calendar->course)) {
            return \context_course::instance($this->calendar->course->id);
        }

        return null;
    }
protected function get_default_add_context() {
        if (calendar_user_can_add_event($this->calendar->course)) {
            return \context_course::instance($this->calendar->course->id);
        }

        return null;
    }
protected function get_default_add_context ( ) { if ( calendar_user_can_add_event ( $ this -> calendar -> course ) ) { return \ context_course :: instance ( $ this -> calendar -> course -> id ) ; } return null ; }
Get the default context for use when adding a new event.

@return null|\context
Get the default context for use when adding a new event .