Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_question\bank\search\condition Class Reference

An abstract class for filtering/searching questions. More...

Inheritance diagram for core_question\bank\search\condition:
core_question\bank\search\category_condition core_question\bank\search\hidden_condition core_question\bank\search\tag_condition mod_quiz\question\bank\filter\custom_category_condition

Public Member Functions

 display_options ()
 Display GUI for selecting criteria for this condition.
 
 display_options_adv ()
 Display GUI for selecting criteria for this condition.
 
 params ()
 Return parameters to be bound to the above WHERE clause fragment.
 
 where ()
 Return an SQL fragment to be ANDed into the WHERE clause to filter which questions are shown.
 

Detailed Description

An abstract class for filtering/searching questions.

See also {

See also
question_bank_view\init_search_conditions()}.
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ display_options()

core_question\bank\search\condition::display_options ( )

Display GUI for selecting criteria for this condition.

Displayed always, whether Show More is open or not.

Compare display_options_adv(), which displays when Show More is open.

Return values
bool|stringHTML form fragment

Reimplemented in core_question\bank\search\category_condition, core_question\bank\search\tag_condition, and mod_quiz\question\bank\filter\custom_category_condition.

◆ display_options_adv()

core_question\bank\search\condition::display_options_adv ( )

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.

Return values
bool|stringHTML form fragment

Reimplemented in core_question\bank\search\category_condition, and core_question\bank\search\hidden_condition.

◆ params()

core_question\bank\search\condition::params ( )

Return parameters to be bound to the above WHERE clause fragment.

Return values
arrayparameter name => value.

Reimplemented in core_question\bank\search\category_condition, and core_question\bank\search\tag_condition.

◆ where()

core_question\bank\search\condition::where ( )
abstract

Return an SQL fragment to be ANDed into the WHERE clause to filter which questions are shown.

Return values
stringSQL fragment. Must use named parameters.

Reimplemented in core_question\bank\search\category_condition, core_question\bank\search\hidden_condition, and core_question\bank\search\tag_condition.


The documentation for this class was generated from the following file: