public static function get_edit_step_link($tourid, $stepid = null, $targettype = null) {
        $link = new \moodle_url('/admin/tool/usertours/configure.php');

        if ($stepid) {
            $link->param('action', manager::ACTION_EDITSTEP);
            $link->param('id', $stepid);
        } else {
            $link->param('action', manager::ACTION_NEWSTEP);
            $link->param('tourid', $tourid);
        }

        return $link;
    }