original_string: public function export_to_xml($question, qformat_xml $format, $extra=null) {
          $expout = '';
          $expout .= $format->write_combined_feedback($question->options,
                                                      $question->id,
                                                      $question->contextid);
          $extraquestionfields = $this->extra_question_fields();
          array_shift($extraquestionfields);
          foreach ($extraquestionfields as $extra) {
              $expout .= "    <{$extra}>" . $question->options->$extra . "</{$extra}>\n";
          }
          return $expout;
      }
code: public function export_to_xml($question, qformat_xml $format, $extra=null) {
          $expout = '';
          $expout .= $format->write_combined_feedback($question->options,
                                                      $question->id,
                                                      $question->contextid);
          $extraquestionfields = $this->extra_question_fields();
          array_shift($extraquestionfields);
          foreach ($extraquestionfields as $extra) {
              $expout .= "    <{$extra}>" . $question->options->$extra . "</{$extra}>\n";
          }
          return $expout;
      }
code_tokens: public function export_to_xml ( $ question , qformat_xml $ format , $ extra = null ) { $ expout = '' ; $ expout .= $ format -> write_combined_feedback ( $ question -> options , $ question -> id , $ question -> contextid ) ; $ extraquestionfields = $ this -> extra_question_fields ( ) ; array_shift ( $ extraquestionfields ) ; foreach ( $ extraquestionfields as $ extra ) { $ expout .= "    <{$extra}>" . $ question -> options -> $ extra . "</{$extra}>\n" ; } return $ expout ; }
docstring: Exports the question to Moodle XML format.
  
  @param object $question question to be exported into XML format
  @param qformat_xml $format format class exporting the question
  @param object $extra extra information (not required for exporting this question in this format)
  @return string containing the question data in XML format
docstring_tokens: Exports the question to Moodle XML format .