protected function process_response_files($name, $draftidname, $postdata = null, $text = null) {
        if ($postdata) {
            // For simulated posts, get the draft itemid from there.
            $draftitemid = $this->get_submitted_var($draftidname, PARAM_INT, $postdata);
        } else {
            $draftitemid = file_get_submitted_draft_itemid($draftidname);
        }

        if (!$draftitemid) {
            return null;
        }

        $filearea = str_replace($this->get_field_prefix(), '', $name);
        $filearea = str_replace('-', 'bf_', $filearea);
        $filearea = 'response_' . $filearea;
        return new question_file_saver($draftitemid, 'question', $filearea, $text);
    }