This class controls from which category questions are listed.
More...
|
| __construct ($cat=null, $recurse=false, $contexts, $baseurl, $course, $maxinfolength=null) |
| Constructor. More...
|
|
| display_options () |
| Called by question_bank_view to display the GUI for selecting a category.
|
|
| display_options_adv () |
| Displays the recursion checkbox GUI. More...
|
|
| params () |
| Return parameters to be bound to the above WHERE clause fragment. More...
|
|
| where () |
| Return an SQL fragment to be ANDed into the WHERE clause to filter which questions are shown. More...
|
|
|
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
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_question\bank\search\category_condition::__construct |
( |
|
$cat = null , |
|
|
|
$recurse = false , |
|
|
|
$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'. |
◆ 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 |
( |
| ) |
|
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. |
Reimplemented from core_question\bank\search\condition.
The documentation for this class was generated from the following file: