public function import_combined_feedback($qo, $questionxml, $withshownumpartscorrect = false) {
        $fields = array('correctfeedback', 'partiallycorrectfeedback', 'incorrectfeedback');
        foreach ($fields as $field) {
            $qo->$field = $this->import_text_with_files($questionxml,
                    array('#', $field, 0), '', $this->get_format($qo->questiontextformat));
        }

        if ($withshownumpartscorrect) {
            $qo->shownumcorrect = array_key_exists('shownumcorrect', $questionxml['#']);

            // Backwards compatibility.
            if (array_key_exists('correctresponsesfeedback', $questionxml['#'])) {
                $qo->shownumcorrect = $this->trans_single($this->getpath($questionxml,
                        array('#', 'correctresponsesfeedback', 0, '#'), 1));
            }
        }
    }
public function import_combined_feedback($qo, $questionxml, $withshownumpartscorrect = false) {
        $fields = array('correctfeedback', 'partiallycorrectfeedback', 'incorrectfeedback');
        foreach ($fields as $field) {
            $qo->$field = $this->import_text_with_files($questionxml,
                    array('#', $field, 0), '', $this->get_format($qo->questiontextformat));
        }

        if ($withshownumpartscorrect) {
            $qo->shownumcorrect = array_key_exists('shownumcorrect', $questionxml['#']);

            // Backwards compatibility.
            if (array_key_exists('correctresponsesfeedback', $questionxml['#'])) {
                $qo->shownumcorrect = $this->trans_single($this->getpath($questionxml,
                        array('#', 'correctresponsesfeedback', 0, '#'), 1));
            }
        }
    }
public function import_combined_feedback ( $ qo , $ questionxml , $ withshownumpartscorrect = false ) { $ fields = array ( 'correctfeedback' , 'partiallycorrectfeedback' , 'incorrectfeedback' ) ; foreach ( $ fields as $ field ) { $ qo -> $ field = $ this -> import_text_with_files ( $ questionxml , array ( '#' , $ field , 0 ) , '' , $ this -> get_format ( $ qo -> questiontextformat ) ) ; } if ( $ withshownumpartscorrect ) { $ qo -> shownumcorrect = array_key_exists ( 'shownumcorrect' , $ questionxml [ '#' ] ) ; // Backwards compatibility. if ( array_key_exists ( 'correctresponsesfeedback' , $ questionxml [ '#' ] ) ) { $ qo -> shownumcorrect = $ this -> trans_single ( $ this -> getpath ( $ questionxml , array ( '#' , 'correctresponsesfeedback' , 0 , '#' ) , 1 ) ) ; } } }
Import the common overall feedback fields.
@param object $question the part of the XML relating to this question.
@param object $qo the question data to add the fields to.
@param bool $withshownumpartscorrect include the shownumcorrect field.
Import the common overall feedback fields .