protected function add_autosaved_step(question_attempt_step $step) {
        $this->steps[] = $step;
        $this->autosavedstep = $step;
        end($this->steps);
        $this->observer->notify_step_added($step, $this, -key($this->steps));
    }