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));
    }
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));
    }
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 ) ) ; }
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
Get an instance of the question bank chooser .