protected function display_category_form($contexts, $pageurl, $current) {
        global $OUTPUT;

        debugging('display_category_form() is deprecated, please use ' .
                '\core_question\bank\search\condition instead.', DEBUG_DEVELOPER);
        // Get all the existing categories now.
        echo '<div class="choosecategory">';
        $catmenu = question_category_options($contexts, false, 0, true);

        $select = new \single_select($this->baseurl, 'category', $catmenu, $current, null, 'catmenu');
        $select->set_label(get_string('selectacategory', 'question'));
        echo $OUTPUT->render($select);
        echo "</div>\n";
    }