Commit | Line | Data |
---|---|---|
efa5155a RM |
1 | <?php |
2 | ||
3 | /** | |
4 | * An abstract class for filtering/searching questions. | |
5 | * See also init_search_conditions | |
6 | */ | |
7 | abstract class core_question_bank_search_condition { | |
8 | /** | |
9 | * @return string An SQL fragment to be ANDed into the WHERE clause to filter which questions are shown | |
10 | */ | |
11 | public abstract function where(); | |
12 | ||
13 | /** | |
14 | * @return array Parameters to be bound to the above WHERE clause fragment | |
15 | */ | |
16 | public function params() { | |
17 | return array(); | |
18 | } | |
19 | ||
20 | /** | |
21 | * Display GUI for selecting criteria for this condition. Displayed when Show More is open. | |
22 | * | |
23 | * Compare display_options(), which displays always, whether Show More is open or not. | |
24 | * @return string HTML form fragment | |
25 | */ | |
26 | public function display_options_adv() { | |
27 | return; | |
28 | } | |
29 | ||
30 | /** | |
31 | * Display GUI for selecting criteria for this condition. Displayed always, whether Show More is open or not. | |
32 | * | |
33 | * Compare display_options_adv(), which displays when Show More is open. | |
34 | * @return string HTML form fragment | |
35 | */ | |
36 | public function display_options() { | |
37 | return; | |
38 | } | |
39 | } |