|
static | build_query_from_filter (array $filter) |
| Build query from filter value.
|
|
static | get_category_record ($categoryid, $contextid) |
| Fetch the question category record matching the provided category and context IDs.
|
|
static | get_condition_key () |
| Each condition will need a unique key to be identified and sequenced by the api.
|
|
static | get_current_category ($categoryandcontext) |
| Look up the category record based on category ID and context.
|
|
static | get_filter_from_list (array $filters) |
| Given an array of filters, pick the entry that matches the condition key and return it.
|
|
static | print_choose_category_message () |
| Print the text if category id not available.
|
|
static | validate_category_param (string $categoryandcontext) |
| Return category and context ID from compound parameter.
|
|
|
array array | $filter |
| Filter properties for this condition.
|
|
bool | $includesubcategories |
| Include questions in subcategories of the specified category?
|
|
int | $maxinfolength |
| The maximum displayed length of the category info.
|
|
int const | JOINTYPE_DEFAULT = datafilter::JOINTYPE_ANY |
| The default filter type.
|
|
|
string | $cat |
| categoryID,contextID as used with question_bank_view->display().
|
|
stdClass | $category |
| The category record.
|
|
array | $contexts |
| of contexts.
|
|
stdClass | $course |
| The course record.
|
|
array array | $params = [] |
| query param used in where.
|
|
string string | $where = '' |
| SQL fragment to add to the where clause.
|
|
◆ __construct()
qbank_managecategories\category_condition::__construct |
( |
view | $qbank = null | ) |
|
◆ allow_custom()
qbank_managecategories\category_condition::allow_custom |
( |
| ) |
|
◆ allow_empty()
qbank_managecategories\category_condition::allow_empty |
( |
| ) |
|
◆ allow_multiple()
qbank_managecategories\category_condition::allow_multiple |
( |
| ) |
|
◆ build_query_from_filter()
static qbank_managecategories\category_condition::build_query_from_filter |
( |
array | $filter | ) |
|
|
static |
◆ display_category_form()
qbank_managecategories\category_condition::display_category_form |
( |
| $contexts, |
|
|
| $pageurl, |
|
|
| $current ) |
|
protected |
Display the drop down to select the category.
- Parameters
-
array | $contexts | of contexts that can be accessed from here. |
moodle_url | $pageurl | the URL of this page. |
string | $current | 'categoryID,contextID'. |
- Deprecated
- since Moodle 4.3
- Todo
- Final deprecation on Moodle 4.7 MDL-78090
◆ display_options()
qbank_managecategories\category_condition::display_options |
( |
| ) |
|
◆ display_options_adv()
qbank_managecategories\category_condition::display_options_adv |
( |
| ) |
|
◆ get_category_record()
static qbank_managecategories\category_condition::get_category_record |
( |
| $categoryid, |
|
|
| $contextid ) |
|
static |
Fetch the question category record matching the provided category and context IDs.
- Parameters
-
int | $categoryid | |
int | $contextid | |
- Return values
-
- Exceptions
-
◆ get_condition_class()
core_question\local\bank\condition::get_condition_class |
( |
| ) |
|
|
inherited |
Return this condition class.
- Return values
-
◆ get_condition_key()
static qbank_managecategories\category_condition::get_condition_key |
( |
| ) |
|
|
static |
Each condition will need a unique key to be identified and sequenced by the api.
Use a unique string for the condition identifier, use string directly, dont need to use language pack. Using language pack might break the filter object for multilingual support.
- Return values
-
Reimplemented from core_question\local\bank\condition.
◆ get_course_id()
qbank_managecategories\category_condition::get_course_id |
( |
| ) |
|
Returns course id.
- Return values
-
◆ get_current_category()
static qbank_managecategories\category_condition::get_current_category |
( |
| $categoryandcontext | ) |
|
|
static |
Look up the category record based on category ID and context.
- Parameters
-
string | $categoryandcontext | categoryID,contextID as used with question_bank_view->display() |
- Return values
-
stdClass | The category record |
- Deprecated
- since Moodle 4.3
- Todo
- Final deprecation in Moodle 4.7 MDL-78090
◆ get_default_category()
qbank_managecategories\category_condition::get_default_category |
( |
| ) |
|
Return default category.
- Return values
-
◆ get_filter_class()
qbank_managecategories\category_condition::get_filter_class |
( |
| ) |
|
◆ get_filter_from_list()
static core_question\local\bank\condition::get_filter_from_list |
( |
array | $filters | ) |
|
|
staticinherited |
Given an array of filters, pick the entry that matches the condition key and return it.
- Parameters
-
array | $filters | Array of filters, keyed by condition. |
- Return values
-
?array | The filter that matches this condition |
◆ get_filteroptions()
qbank_managecategories\category_condition::get_filteroptions |
( |
| ) |
|
◆ get_initial_values()
qbank_managecategories\category_condition::get_initial_values |
( |
| ) |
|
◆ get_join_list()
qbank_managecategories\category_condition::get_join_list |
( |
| ) |
|
◆ get_title()
qbank_managecategories\category_condition::get_title |
( |
| ) |
|
◆ is_required()
qbank_managecategories\category_condition::is_required |
( |
| ) |
|
◆ params()
core_question\local\bank\condition::params |
( |
| ) |
|
|
inherited |
Return parameters to be bound to the above WHERE clause fragment.
- Return values
-
array | parameter name => value. |
◆ print_category_info()
qbank_managecategories\category_condition::print_category_info |
( |
| $category | ) |
|
|
protected |
Print the category description.
- Parameters
-
stdClass | $category | the category information form the database. |
- Deprecated
- since Moodle 4.3 MDL-72321 - please do not use this function any more.
- Todo
- Final deprecation on Moodle 4.7 MDL-78090
◆ print_choose_category_message()
static qbank_managecategories\category_condition::print_choose_category_message |
( |
| ) |
|
|
static |
◆ validate_category_param()
static qbank_managecategories\category_condition::validate_category_param |
( |
string | $categoryandcontext | ) |
|
|
static |
Return category and context ID from compound parameter.
- Parameters
-
string | $categoryandcontext | Comma-separated list of category and context IDs. |
- Return values
-
◆ where()
core_question\local\bank\condition::where |
( |
| ) |
|
|
inherited |
Return an SQL fragment to be ANDed into the WHERE clause to filter which questions are shown.
- Return values
-
string | SQL fragment. Must use named parameters. |
The documentation for this class was generated from the following file:
- question/bank/managecategories/classes/category_condition.php