MDL-11517 reserved word MOD used in table alias in questions backup code
[moodle-pu.git] / user / filters / yesno.php
blob0b5b4545e1eb2d7aa988802e7ebbc88cda128e6c
1 <?php //$Id$
3 require_once($CFG->dirroot . '/user/filters/radios.php');
5 /**
6 * Generic yes/no filter with radio buttons for integer fields.
7 */
8 class user_filter_yesno extends user_filter_radios {
9 /**
10 * Constructor
11 * @param string $name the name of the filter instance
12 * @param string $label the label of the filter instance
13 * @param string $field the field used for filtering data
14 * @param int $value the value used for filtering data
16 function user_filter_yesno($name, $label, $field, $value=-1) {
17 parent::user_filter_radios($name, $label, $field, array(0=>get_string('no'), 1=>get_string('yes')), true, $value);