original_string: public function import_hints($qo, $questionxml, $withparts = false,
              $withoptions = false, $defaultformat = 'html') {
          if (!isset($questionxml['#']['hint'])) {
              return;
          }
  
          foreach ($questionxml['#']['hint'] as $hintxml) {
              $hint = $this->import_hint($hintxml, $defaultformat);
              $qo->hint[] = $hint->hint;
  
              if ($withparts) {
                  $qo->hintshownumcorrect[] = $hint->shownumcorrect;
                  $qo->hintclearwrong[] = $hint->clearwrong;
              }
  
              if ($withoptions) {
                  $qo->hintoptions[] = $hint->options;
              }
          }
      }
code: public function import_hints($qo, $questionxml, $withparts = false,
              $withoptions = false, $defaultformat = 'html') {
          if (!isset($questionxml['#']['hint'])) {
              return;
          }
  
          foreach ($questionxml['#']['hint'] as $hintxml) {
              $hint = $this->import_hint($hintxml, $defaultformat);
              $qo->hint[] = $hint->hint;
  
              if ($withparts) {
                  $qo->hintshownumcorrect[] = $hint->shownumcorrect;
                  $qo->hintclearwrong[] = $hint->clearwrong;
              }
  
              if ($withoptions) {
                  $qo->hintoptions[] = $hint->options;
              }
          }
      }
code_tokens: public function import_hints ( $ qo , $ questionxml , $ withparts = false , $ withoptions = false , $ defaultformat = 'html' ) { if ( ! isset ( $ questionxml [ '#' ] [ 'hint' ] ) ) { return ; } foreach ( $ questionxml [ '#' ] [ 'hint' ] as $ hintxml ) { $ hint = $ this -> import_hint ( $ hintxml , $ defaultformat ) ; $ qo -> hint [ ] = $ hint -> hint ; if ( $ withparts ) { $ qo -> hintshownumcorrect [ ] = $ hint -> shownumcorrect ; $ qo -> hintclearwrong [ ] = $ hint -> clearwrong ; } if ( $ withoptions ) { $ qo -> hintoptions [ ] = $ hint -> options ; } } }
docstring: Import all the question hints
  
  @param object $qo the question data that is being constructed.
  @param array $questionxml The xml representing the question.
  @param bool $withparts whether the extra fields relating to parts should be imported.
  @param bool $withoptions whether the extra options field should be imported.
  @param string $defaultformat the text format to assume for hints that do not specify.
  @return array of objects representing the hints in the file.
docstring_tokens: Import all the question hints