protected function delete_step($stepid) {
        require_sesskey();

        $step = step::instance($stepid);
        $tour = $step->get_tour();

        $step->remove();
        redirect($tour->get_view_link());
    }