protected function get_question_ids($categoryid, $includesubcategories, $tagids = []) {
        $this->ensure_questions_for_category_loaded($categoryid, $includesubcategories, $tagids);
        $categorykey = $this->get_category_key($categoryid, $includesubcategories, $tagids);
        $cachedvalues = $this->availablequestionscache[$categorykey];
        $questionids = [];

        foreach ($cachedvalues as $usecount => $ids) {
            $questionids = array_merge($questionids, array_keys($ids));
        }

        return $questionids;
    }
protected function get_question_ids($categoryid, $includesubcategories, $tagids = []) {
        $this->ensure_questions_for_category_loaded($categoryid, $includesubcategories, $tagids);
        $categorykey = $this->get_category_key($categoryid, $includesubcategories, $tagids);
        $cachedvalues = $this->availablequestionscache[$categorykey];
        $questionids = [];

        foreach ($cachedvalues as $usecount => $ids) {
            $questionids = array_merge($questionids, array_keys($ids));
        }

        return $questionids;
    }
protected function get_question_ids ( $ categoryid , $ includesubcategories , $ tagids = [ ] ) { $ this -> ensure_questions_for_category_loaded ( $ categoryid , $ includesubcategories , $ tagids ) ; $ categorykey = $ this -> get_category_key ( $ categoryid , $ includesubcategories , $ tagids ) ; $ cachedvalues = $ this -> availablequestionscache [ $ categorykey ] ; $ questionids = [ ] ; foreach ( $ cachedvalues as $ usecount => $ ids ) { $ questionids = array_merge ( $ questionids , array_keys ( $ ids ) ) ; } return $ questionids ; }
Get the list of available question ids for the given criteria.

@param int $categoryid The id of a category in the question bank.
@param bool $includesubcategories Whether to pick a question from exactly
that category, or that category and subcategories.
@param array $tagids An array of tag ids. If an array is provided, then
only the questions that are tagged with ALL the provided tagids will be loaded.
@return int[] The list of question ids
Get the list of available question ids for the given criteria .