original_string: public function process_common($quest) {
          $question = $this->defaultquestion();
          $text = $quest->QUESTION_BLOCK->text;
          $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'];
          }
          $question->name = $this->create_default_question_name($question->questiontext,
                  get_string('defaultname', 'qformat_blackboard_six' , $quest->id));
          $question->generalfeedback = '';
          $question->generalfeedbackformat = FORMAT_HTML;
          $question->generalfeedbackfiles = array();
  
          return $question;
      }
code: public function process_common($quest) {
          $question = $this->defaultquestion();
          $text = $quest->QUESTION_BLOCK->text;
          $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'];
          }
          $question->name = $this->create_default_question_name($question->questiontext,
                  get_string('defaultname', 'qformat_blackboard_six' , $quest->id));
          $question->generalfeedback = '';
          $question->generalfeedbackformat = FORMAT_HTML;
          $question->generalfeedbackfiles = array();
  
          return $question;
      }
code_tokens: public function process_common ( $ quest ) { $ question = $ this -> defaultquestion ( ) ; $ text = $ quest -> QUESTION_BLOCK -> text ; $ 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' ] ; } $ question -> name = $ this -> create_default_question_name ( $ question -> questiontext , get_string ( 'defaultname' , 'qformat_blackboard_six' , $ quest -> id ) ) ; $ question -> generalfeedback = '' ; $ question -> generalfeedbackformat = FORMAT_HTML ; $ question -> generalfeedbackfiles = array ( ) ; return $ question ; }
docstring: Create common parts of question
  @param object $quest rawquestion
  @return object Moodle question.
docstring_tokens: Create common parts of question