protected function recode_legacy_response_data($question, $qsession, $qstates) {
        $qsession->questionid = $question->id;

        foreach ($qstates as &$state) {
            $state->question = $question->id;
            $state->answer = $this->restore_recode_legacy_answer($state, $question->qtype);
        }

        return array($qsession, $qstates);
    }
protected function recode_legacy_response_data($question, $qsession, $qstates) {
        $qsession->questionid = $question->id;

        foreach ($qstates as &$state) {
            $state->question = $question->id;
            $state->answer = $this->restore_recode_legacy_answer($state, $question->qtype);
        }

        return array($qsession, $qstates);
    }
protected function recode_legacy_response_data ( $ question , $ qsession , $ qstates ) { $ qsession -> questionid = $ question -> id ; foreach ( $ qstates as & $ state ) { $ state -> question = $ question -> id ; $ state -> answer = $ this -> restore_recode_legacy_answer ( $ state , $ question -> qtype ) ; } return array ( $ qsession , $ qstates ) ; }
Recode any ids in the response data
@param object $question the question data
@param object $qsession the question sessions.
@param array $qstates the question states.
Recode any ids in the response data