public function cancel_process() {
        // Delete temporary restore course if exists.
        if ($this->controller->get_target() == backup::TARGET_NEW_COURSE) {
            $this->cleanup();
        }
        parent::cancel_process();
    }