private function get_provide_event_action_num_params(string $modulename) {
        $functionname = 'mod_' . $modulename . '_core_calendar_provide_event_action';
        $reflection = new \ReflectionFunction($functionname);
        return $reflection->getNumberOfParameters();
    }