public function process_question(array $data, array $raw) {

        // Convert match options.
        if (isset($data['randomsamatch'])) {
            $randomsamatch = $data['randomsamatch'][0];
        } else {
            $randomsamatch = array('choose' => 4);
        }
        $randomsamatch['id'] = $this->converter->get_nextid();
        $randomsamatch['subcats'] = 1;
        $randomsamatch['correctfeedback'] = '';
        $randomsamatch['correctfeedbackformat'] = FORMAT_HTML;
        $randomsamatch['partiallycorrectfeedback'] = '';
        $randomsamatch['partiallycorrectfeedbackformat'] = FORMAT_HTML;
        $randomsamatch['incorrectfeedback'] = '';
        $randomsamatch['incorrectfeedbackformat'] = FORMAT_HTML;
        $this->write_xml('randomsamatch', $randomsamatch, array('/randomsamatch/id'));
    }
public function process_question(array $data, array $raw) {

        // Convert match options.
        if (isset($data['randomsamatch'])) {
            $randomsamatch = $data['randomsamatch'][0];
        } else {
            $randomsamatch = array('choose' => 4);
        }
        $randomsamatch['id'] = $this->converter->get_nextid();
        $randomsamatch['subcats'] = 1;
        $randomsamatch['correctfeedback'] = '';
        $randomsamatch['correctfeedbackformat'] = FORMAT_HTML;
        $randomsamatch['partiallycorrectfeedback'] = '';
        $randomsamatch['partiallycorrectfeedbackformat'] = FORMAT_HTML;
        $randomsamatch['incorrectfeedback'] = '';
        $randomsamatch['incorrectfeedbackformat'] = FORMAT_HTML;
        $this->write_xml('randomsamatch', $randomsamatch, array('/randomsamatch/id'));
    }
public function process_question ( array $ data , array $ raw ) { // Convert match options. if ( isset ( $ data [ 'randomsamatch' ] ) ) { $ randomsamatch = $ data [ 'randomsamatch' ] [ 0 ] ; } else { $ randomsamatch = array ( 'choose' => 4 ) ; } $ randomsamatch [ 'id' ] = $ this -> converter -> get_nextid ( ) ; $ randomsamatch [ 'subcats' ] = 1 ; $ randomsamatch [ 'correctfeedback' ] = '' ; $ randomsamatch [ 'correctfeedbackformat' ] = FORMAT_HTML ; $ randomsamatch [ 'partiallycorrectfeedback' ] = '' ; $ randomsamatch [ 'partiallycorrectfeedbackformat' ] = FORMAT_HTML ; $ randomsamatch [ 'incorrectfeedback' ] = '' ; $ randomsamatch [ 'incorrectfeedbackformat' ] = FORMAT_HTML ; $ this -> write_xml ( 'randomsamatch' , $ randomsamatch , array ( '/randomsamatch/id' ) ) ; }
Appends the randomsamatch specific information to the question.

@param array $data grouped question data
@param array $raw grouped raw QUESTION data
Appends the randomsamatch specific information to the question .