protected function check_combined_feedback_file_access($qa, $options, $filearea, $args = null) {
        $state = $qa->get_state();

        if ($args === null) {
            debugging('You must pass $args as the fourth argument to check_combined_feedback_file_access.',
                    DEBUG_DEVELOPER);
            $args = array($this->id); // Fake it for now, so the rest of this method works.
        }

        if (!$state->is_finished()) {
            $response = $qa->get_last_qt_data();
            if (!$this->is_gradable_response($response)) {
                return false;
            }
            list($notused, $state) = $this->grade_response($response);
        }

        return $options->feedback && $state->get_feedback_class() . 'feedback' == $filearea &&
                $args[0] == $this->id;
    }