original_string: public function process_common($questiondata) {
  
          // This routine initialises the question object.
          $question = $this->defaultquestion();
  
          // Determine if the question is already escaped html.
          $this->ishtml = $this->getpath($questiondata,
                  array('#', 'BODY', 0, '#', 'FLAGS', 0, '#', 'ISHTML', 0, '@', 'value'),
                  false, false);
  
          // Put questiontext in question object.
          $text = $this->getpath($questiondata,
                  array('#', 'BODY', 0, '#', 'TEXT', 0, '#'),
                  '', true, get_string('importnotext', 'qformat_blackboard_six'));
  
          $questiontext = $this->cleaned_text_field($text);
          $question->questiontext = $questiontext['text'];
          $question->questiontextformat = $questiontext['format']; // Needed because add_blank_combined_feedback uses it.
          if (isset($questiontext['itemid'])) {
              $question->questiontextitemid = $questiontext['itemid'];
          }
  
          // Put name in question object. We must ensure it is not empty and it is less than 250 chars.
          $id = $this->getpath($questiondata, array('@', 'id'), '',  true);
          $question->name = $this->create_default_question_name($question->questiontext,
                  get_string('defaultname', 'qformat_blackboard_six' , $id));
  
          $question->generalfeedback = '';
          $question->generalfeedbackformat = FORMAT_HTML;
          $question->generalfeedbackfiles = array();
  
          // TODO : read the mark from the POOL TITLE QUESTIONLIST section.
          $question->defaultmark = 1;
          return $question;
      }
code: public function process_common($questiondata) {
  
          // This routine initialises the question object.
          $question = $this->defaultquestion();
  
          // Determine if the question is already escaped html.
          $this->ishtml = $this->getpath($questiondata,
                  array('#', 'BODY', 0, '#', 'FLAGS', 0, '#', 'ISHTML', 0, '@', 'value'),
                  false, false);
  
          // Put questiontext in question object.
          $text = $this->getpath($questiondata,
                  array('#', 'BODY', 0, '#', 'TEXT', 0, '#'),
                  '', true, get_string('importnotext', 'qformat_blackboard_six'));
  
          $questiontext = $this->cleaned_text_field($text);
          $question->questiontext = $questiontext['text'];
          $question->questiontextformat = $questiontext['format']; // Needed because add_blank_combined_feedback uses it.
          if (isset($questiontext['itemid'])) {
              $question->questiontextitemid = $questiontext['itemid'];
          }
  
          // Put name in question object. We must ensure it is not empty and it is less than 250 chars.
          $id = $this->getpath($questiondata, array('@', 'id'), '',  true);
          $question->name = $this->create_default_question_name($question->questiontext,
                  get_string('defaultname', 'qformat_blackboard_six' , $id));
  
          $question->generalfeedback = '';
          $question->generalfeedbackformat = FORMAT_HTML;
          $question->generalfeedbackfiles = array();
  
          // TODO : read the mark from the POOL TITLE QUESTIONLIST section.
          $question->defaultmark = 1;
          return $question;
      }
code_tokens: public function process_common ( $ questiondata ) { // This routine initialises the question object. $ question = $ this -> defaultquestion ( ) ; // Determine if the question is already escaped html. $ this -> ishtml = $ this -> getpath ( $ questiondata , array ( '#' , 'BODY' , 0 , '#' , 'FLAGS' , 0 , '#' , 'ISHTML' , 0 , '@' , 'value' ) , false , false ) ; // Put questiontext in question object. $ text = $ this -> getpath ( $ questiondata , array ( '#' , 'BODY' , 0 , '#' , 'TEXT' , 0 , '#' ) , '' , true , get_string ( 'importnotext' , 'qformat_blackboard_six' ) ) ; $ questiontext = $ this -> cleaned_text_field ( $ text ) ; $ question -> questiontext = $ questiontext [ 'text' ] ; $ question -> questiontextformat = $ questiontext [ 'format' ] ; // Needed because add_blank_combined_feedback uses it. if ( isset ( $ questiontext [ 'itemid' ] ) ) { $ question -> questiontextitemid = $ questiontext [ 'itemid' ] ; } // Put name in question object. We must ensure it is not empty and it is less than 250 chars. $ id = $ this -> getpath ( $ questiondata , array ( '@' , 'id' ) , '' , true ) ; $ question -> name = $ this -> create_default_question_name ( $ question -> questiontext , get_string ( 'defaultname' , 'qformat_blackboard_six' , $ id ) ) ; $ question -> generalfeedback = '' ; $ question -> generalfeedbackformat = FORMAT_HTML ; $ question -> generalfeedbackfiles = array ( ) ; // TODO : read the mark from the POOL TITLE QUESTIONLIST section. $ question -> defaultmark = 1 ; return $ question ; }
docstring: Do question import processing common to every qtype.
  
  @param array $questiondata the xml tree related to the current question
  @return object initialized question object.
docstring_tokens: Do question import processing common to every qtype .