Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 333 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: category_condition  - X-Ref

This class controls from which category questions are listed.

__construct(view $qbank = null)   X-Ref
Constructor to initialize the category filter condition.

param: view $qbank qbank view

get_default_category()   X-Ref
Return default category

return: \stdClass default category

get_condition_key()   X-Ref
No description

get_course_id()   X-Ref
Returns course id.

return: string Course id.

display_options()   X-Ref
Called by question_bank_view to display the GUI for selecting a category


display_options_adv()   X-Ref
Displays the recursion checkbox GUI.
question_bank_view places this within the section that is hidden by default


display_category_form($contexts, $pageurl, $current)   X-Ref
Display the drop down to select the category.

param: array $contexts of contexts that can be accessed from here.
param: \moodle_url $pageurl the URL of this page.
param: string $current 'categoryID,contextID'.

print_choose_category_message()   X-Ref
Print the text if category id not available.


get_current_category($categoryandcontext)   X-Ref
Look up the category record based on category ID and context

param: string $categoryandcontext categoryID,contextID as used with question_bank_view->display()
return: \stdClass The category record

validate_category_param(string $categoryandcontext)   X-Ref
Return category and context ID from compound parameter.

param: string $categoryandcontext Comma-separated list of category and context IDs.
return: int[]|null[]

get_category_record($categoryid, $contextid)   X-Ref
Fetch the question category record matching the provided category and context IDs.

param: int $categoryid
param: int $contextid
return: \stdClass

print_category_info($category)   X-Ref
Print the category description

param: \stdClass $category the category information form the database.

build_query_from_filter(array $filter)   X-Ref
No description

get_title()   X-Ref
No description

get_filter_class()   X-Ref
No description

allow_custom()   X-Ref
No description

allow_multiple()   X-Ref
No description

allow_empty()   X-Ref
No description

get_join_list()   X-Ref
No description

get_initial_values()   X-Ref
No description

get_filteroptions()   X-Ref
No description

is_required()   X-Ref
No description