original_string: public static function get($course, $hiddenparams, array $allowedqtypes = null) {
          $realqtypes = array();
          $fakeqtypes = array();
  
          foreach (question_bank::get_creatable_qtypes() as $qtypename => $qtype) {
              if ($allowedqtypes && !in_array($qtypename, $allowedqtypes)) {
                  continue;
              }
              if ($qtype->is_real_question_type()) {
                  $realqtypes[] = $qtype;
              } else {
                  $fakeqtypes[] = $qtype;
              }
          }
  
          return new static($realqtypes, $fakeqtypes, $course, $hiddenparams, context_course::instance($course->id));
      }
code: public static function get($course, $hiddenparams, array $allowedqtypes = null) {
          $realqtypes = array();
          $fakeqtypes = array();
  
          foreach (question_bank::get_creatable_qtypes() as $qtypename => $qtype) {
              if ($allowedqtypes && !in_array($qtypename, $allowedqtypes)) {
                  continue;
              }
              if ($qtype->is_real_question_type()) {
                  $realqtypes[] = $qtype;
              } else {
                  $fakeqtypes[] = $qtype;
              }
          }
  
          return new static($realqtypes, $fakeqtypes, $course, $hiddenparams, context_course::instance($course->id));
      }
code_tokens: public static function get ( $ course , $ hiddenparams , array $ allowedqtypes = null ) { $ realqtypes = array ( ) ; $ fakeqtypes = array ( ) ; foreach ( question_bank :: get_creatable_qtypes ( ) as $ qtypename => $ qtype ) { if ( $ allowedqtypes && ! in_array ( $ qtypename , $ allowedqtypes ) ) { continue ; } if ( $ qtype -> is_real_question_type ( ) ) { $ realqtypes [ ] = $ qtype ; } else { $ fakeqtypes [ ] = $ qtype ; } } return new static ( $ realqtypes , $ fakeqtypes , $ course , $ hiddenparams , context_course :: instance ( $ course -> id ) ) ; }
docstring: Get an instance of the question bank chooser.
  
  @param stdClass $course The course.
  @param array $hiddenparams Hidden parameters.
  @param array|null $allowedqtypes Allowed question types.
  @return qbank_chooser
docstring_tokens: Get an instance of the question bank chooser .