Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
|
Question bank search class to allow searching/filtering by tags on a question. More...
Public Member Functions | |
__construct (array $contexts, array $selectedtagids=[]) | |
Constructor. | |
display_options () | |
Print HTML to display the list of tags to filter by. | |
display_options_adv () | |
Display GUI for selecting criteria for this condition. | |
params () | |
Named SQL params to be used with the SQL WHERE snippet. | |
where () | |
Get the SQL WHERE snippet to be used in the SQL to retrieve the list of questions. | |
Question bank search class to allow searching/filtering by tags on a question.
core_question\bank\search\tag_condition::__construct | ( | array | $contexts, |
array | $selectedtagids = [] ) |
Constructor.
array | $contexts | List of contexts to show tags from |
int[] | $selectedtagids | List of IDs for tags to filter by. |
coding_exception | |
dml_exception |
core_question\bank\search\tag_condition::display_options | ( | ) |
Print HTML to display the list of tags to filter by.
Reimplemented from core_question\bank\search\condition.
|
inherited |
Display GUI for selecting criteria for this condition.
Displayed when Show More is open.
Compare display_options(), which displays always, whether Show More is open or not.
bool|string | HTML form fragment |
Reimplemented in core_question\bank\search\category_condition, and core_question\bank\search\hidden_condition.
core_question\bank\search\tag_condition::params | ( | ) |
Named SQL params to be used with the SQL WHERE snippet.
array |
Reimplemented from core_question\bank\search\condition.
core_question\bank\search\tag_condition::where | ( | ) |
Get the SQL WHERE snippet to be used in the SQL to retrieve the list of questions.
This SQL snippet will add the logic for the tag condition.
string |
Reimplemented from core_question\bank\search\condition.