public static function step_shown($tourid, $context, $pageurl, $stepid, $stepindex) {
        $params = self::validate_parameters(self::step_shown_parameters(), [
                'tourid'    => $tourid,
                'context'   => $context,
                'pageurl'   => $pageurl,
                'stepid'    => $stepid,
                'stepindex' => $stepindex,
            ]);

        $context = \context_helper::instance_by_id($params['context']);
        self::validate_context($context);

        $step = step::instance($params['stepid']);
        if ($step->get_tourid() != $params['tourid']) {
            throw new \moodle_exception('Incorrect tour specified.');
        }

        \tool_usertours\event\step_shown::create([
            'contextid' => $context->id,
            'objectid'  => $params['stepid'],

            'other'     => [
                'pageurl'   => $params['pageurl'],
                'tourid'    => $params['tourid'],
                'stepindex' => $params['stepindex'],
            ],
        ])->trigger();

        return [];
    }