original_string: protected function init_qtype_lists() {
          if (!is_null($this->excludedqtypes)) {
              return; // Already done.
          }
          $excludedqtypes = array();
          $manualqtypes = array();
          foreach (question_bank::get_all_qtypes() as $qtype) {
              $quotedname = "'" . $qtype->name() . "'";
              if (!$qtype->is_usable_by_random()) {
                  $excludedqtypes[] = $quotedname;
              } else if ($qtype->is_manual_graded()) {
                  $manualqtypes[] = $quotedname;
              }
          }
          $this->excludedqtypes = implode(',', $excludedqtypes);
          $this->manualqtypes = implode(',', $manualqtypes);
      }
code: protected function init_qtype_lists() {
          if (!is_null($this->excludedqtypes)) {
              return; // Already done.
          }
          $excludedqtypes = array();
          $manualqtypes = array();
          foreach (question_bank::get_all_qtypes() as $qtype) {
              $quotedname = "'" . $qtype->name() . "'";
              if (!$qtype->is_usable_by_random()) {
                  $excludedqtypes[] = $quotedname;
              } else if ($qtype->is_manual_graded()) {
                  $manualqtypes[] = $quotedname;
              }
          }
          $this->excludedqtypes = implode(',', $excludedqtypes);
          $this->manualqtypes = implode(',', $manualqtypes);
      }
code_tokens: protected function init_qtype_lists ( ) { if ( ! is_null ( $ this -> excludedqtypes ) ) { return ; // Already done. } $ excludedqtypes = array ( ) ; $ manualqtypes = array ( ) ; foreach ( question_bank :: get_all_qtypes ( ) as $ qtype ) { $ quotedname = "'" . $ qtype -> name ( ) . "'" ; if ( ! $ qtype -> is_usable_by_random ( ) ) { $ excludedqtypes [ ] = $ quotedname ; } else if ( $ qtype -> is_manual_graded ( ) ) { $ manualqtypes [ ] = $ quotedname ; } } $ this -> excludedqtypes = implode ( ',' , $ excludedqtypes ) ; $ this -> manualqtypes = implode ( ',' , $ manualqtypes ) ; }
docstring: This method needs to be called before the ->excludedqtypes and
  ->manualqtypes fields can be used.
docstring_tokens: This method needs to be called before the - > excludedqtypes and - > manualqtypes fields can be used .