This class controls from which category questions are listed.
More...
|
| __construct ($cat, $recurse, $contexts, $baseurl, $course, $maxinfolength=null) |
| Constructor.
|
|
| display_options () |
| Called by question_bank_view to display the GUI for selecting a category.
|
|
| display_options_adv () |
| Displays the recursion checkbox GUI.
|
|
| params () |
| Return parameters to be bound to the above WHERE clause fragment.
|
|
| where () |
| SQL fragment to add to the where clause.
|
|
|
moodle_url | $baseurl |
| The URL the form is submitted to.
|
|
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.
|
|
int | $maxinfolength |
| The maximum displayed length of the category info.
|
|
array | $params |
| query param used in where.
|
|
bool | $recurse |
| Whether to include questions from sub-categories.
|
|
string | $where |
| SQL fragment to add to the where clause.
|
|
This class controls from which category questions are listed.
- Copyright
- 2013 Ray Morris
- Author
- 2021 Safat Shahin safat.nosp@m.shah.nosp@m.in@ca.nosp@m.taly.nosp@m.st-au.nosp@m..net
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_question\bank\search\category_condition::__construct |
( |
| $cat, |
|
|
| $recurse, |
|
|
| $contexts, |
|
|
| $baseurl, |
|
|
| $course, |
|
|
| $maxinfolength = null ) |
Constructor.
- Parameters
-
string | $cat | categoryID,contextID as used with question_bank_view->display() |
bool | $recurse | Whether to include questions from sub-categories |
array | $contexts | Context objects as used by question_category_options() |
moodle_url | $baseurl | The URL the form is submitted to |
stdClass | $course | Course record |
integer | $maxinfolength | The maximum displayed length of the category info. |
◆ display_category_form()
core_question\bank\search\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.0
◆ display_options()
core_question\bank\search\category_condition::display_options |
( |
| ) |
|
◆ display_options_adv()
core_question\bank\search\category_condition::display_options_adv |
( |
| ) |
|
◆ get_current_category()
core_question\bank\search\category_condition::get_current_category |
( |
| $categoryandcontext | ) |
|
|
protected |
Look up the category record based on cateogry ID and context.
- Parameters
-
string | $categoryandcontext | categoryID,contextID as used with question_bank_view->display() |
- Return values
-
stdClass | The category record |
◆ params()
core_question\bank\search\category_condition::params |
( |
| ) |
|
◆ print_category_info()
core_question\bank\search\category_condition::print_category_info |
( |
| $category | ) |
|
|
protected |
Print the category description.
- Parameters
-
stdClass | $category | the category information form the database. |
◆ where()
core_question\bank\search\category_condition::where |
( |
| ) |
|
The documentation for this class was generated from the following file:
- question/classes/bank/search/category_condition.php