original_string: public function process_essay($xml, &$questions) {
  
          if ($this->getpath($xml, array('POOL', '#', 'QUESTION_ESSAY'), false, false)) {
              $essayquestions = $this->getpath($xml,
                      array('POOL', '#', 'QUESTION_ESSAY'), false, false);
          } else {
              return;
          }
  
          foreach ($essayquestions as $thisquestion) {
  
              $question = $this->process_common($thisquestion);
  
              $question->qtype = 'essay';
  
              $question->answer = '';
              $answer = $this->getpath($thisquestion,
                      array('#', 'ANSWER', 0, '#', 'TEXT', 0, '#'), '', true);
              $question->graderinfo = $this->cleaned_text_field($answer);
              $question->responsetemplate = $this->text_field('');
              $question->feedback = '';
              $question->responseformat = 'editor';
              $question->responserequired = 1;
              $question->responsefieldlines = 15;
              $question->attachments = 0;
              $question->attachmentsrequired = 0;
              $question->fraction = 0;
  
              $questions[] = $question;
          }
      }
code: public function process_essay($xml, &$questions) {
  
          if ($this->getpath($xml, array('POOL', '#', 'QUESTION_ESSAY'), false, false)) {
              $essayquestions = $this->getpath($xml,
                      array('POOL', '#', 'QUESTION_ESSAY'), false, false);
          } else {
              return;
          }
  
          foreach ($essayquestions as $thisquestion) {
  
              $question = $this->process_common($thisquestion);
  
              $question->qtype = 'essay';
  
              $question->answer = '';
              $answer = $this->getpath($thisquestion,
                      array('#', 'ANSWER', 0, '#', 'TEXT', 0, '#'), '', true);
              $question->graderinfo = $this->cleaned_text_field($answer);
              $question->responsetemplate = $this->text_field('');
              $question->feedback = '';
              $question->responseformat = 'editor';
              $question->responserequired = 1;
              $question->responsefieldlines = 15;
              $question->attachments = 0;
              $question->attachmentsrequired = 0;
              $question->fraction = 0;
  
              $questions[] = $question;
          }
      }
code_tokens: public function process_essay ( $ xml , & $ questions ) { if ( $ this -> getpath ( $ xml , array ( 'POOL' , '#' , 'QUESTION_ESSAY' ) , false , false ) ) { $ essayquestions = $ this -> getpath ( $ xml , array ( 'POOL' , '#' , 'QUESTION_ESSAY' ) , false , false ) ; } else { return ; } foreach ( $ essayquestions as $ thisquestion ) { $ question = $ this -> process_common ( $ thisquestion ) ; $ question -> qtype = 'essay' ; $ question -> answer = '' ; $ answer = $ this -> getpath ( $ thisquestion , array ( '#' , 'ANSWER' , 0 , '#' , 'TEXT' , 0 , '#' ) , '' , true ) ; $ question -> graderinfo = $ this -> cleaned_text_field ( $ answer ) ; $ question -> responsetemplate = $ this -> text_field ( '' ) ; $ question -> feedback = '' ; $ question -> responseformat = 'editor' ; $ question -> responserequired = 1 ; $ question -> responsefieldlines = 15 ; $ question -> attachments = 0 ; $ question -> attachmentsrequired = 0 ; $ question -> fraction = 0 ; $ questions [ ] = $ question ; } }
docstring: Process Essay Questions
  @param array $xml the xml tree
  @param array $questions the questions already parsed
docstring_tokens: Process Essay Questions