original_string: public function import_question_tags($qo, $questionxml) {
          global $CFG;
  
          if (core_tag_tag::is_enabled('core_question', 'question')) {
  
              $qo->tags = [];
              if (!empty($questionxml['#']['tags'][0]['#']['tag'])) {
                  foreach ($questionxml['#']['tags'][0]['#']['tag'] as $tagdata) {
                      $qo->tags[] = $this->getpath($tagdata, array('#', 'text', 0, '#'), '', true);
                  }
              }
  
              $qo->coursetags = [];
              if (!empty($questionxml['#']['coursetags'][0]['#']['tag'])) {
                  foreach ($questionxml['#']['coursetags'][0]['#']['tag'] as $tagdata) {
                      $qo->coursetags[] = $this->getpath($tagdata, array('#', 'text', 0, '#'), '', true);
                  }
              }
          }
      }
code: public function import_question_tags($qo, $questionxml) {
          global $CFG;
  
          if (core_tag_tag::is_enabled('core_question', 'question')) {
  
              $qo->tags = [];
              if (!empty($questionxml['#']['tags'][0]['#']['tag'])) {
                  foreach ($questionxml['#']['tags'][0]['#']['tag'] as $tagdata) {
                      $qo->tags[] = $this->getpath($tagdata, array('#', 'text', 0, '#'), '', true);
                  }
              }
  
              $qo->coursetags = [];
              if (!empty($questionxml['#']['coursetags'][0]['#']['tag'])) {
                  foreach ($questionxml['#']['coursetags'][0]['#']['tag'] as $tagdata) {
                      $qo->coursetags[] = $this->getpath($tagdata, array('#', 'text', 0, '#'), '', true);
                  }
              }
          }
      }
code_tokens: public function import_question_tags ( $ qo , $ questionxml ) { global $ CFG ; if ( core_tag_tag :: is_enabled ( 'core_question' , 'question' ) ) { $ qo -> tags = [ ] ; if ( ! empty ( $ questionxml [ '#' ] [ 'tags' ] [ 0 ] [ '#' ] [ 'tag' ] ) ) { foreach ( $ questionxml [ '#' ] [ 'tags' ] [ 0 ] [ '#' ] [ 'tag' ] as $ tagdata ) { $ qo -> tags [ ] = $ this -> getpath ( $ tagdata , array ( '#' , 'text' , 0 , '#' ) , '' , true ) ; } } $ qo -> coursetags = [ ] ; if ( ! empty ( $ questionxml [ '#' ] [ 'coursetags' ] [ 0 ] [ '#' ] [ 'tag' ] ) ) { foreach ( $ questionxml [ '#' ] [ 'coursetags' ] [ 0 ] [ '#' ] [ 'tag' ] as $ tagdata ) { $ qo -> coursetags [ ] = $ this -> getpath ( $ tagdata , array ( '#' , 'text' , 0 , '#' ) , '' , true ) ; } } } }
docstring: Import all the question tags
  
  @param object $qo the question data that is being constructed.
  @param array $questionxml The xml representing the question.
  @return array of objects representing the tags in the file.
docstring_tokens: Import all the question tags