3 require_once "$CFG->libdir/form/select.php";
6 * HTML class for a drop down element to select visibility in an activity mod update form
11 class MoodleQuickForm_modvisible
extends MoodleQuickForm_select
{
16 * @param string $elementName Select name attribute
17 * @param mixed $elementLabel Label(s) for the select
18 * @param mixed $attributes Either a typical HTML attribute string or an associative array
19 * @param array $options ignored
23 function MoodleQuickForm_modvisible($elementName=null, $elementLabel=null, $attributes=null, $options=null)
25 HTML_QuickForm_element
::HTML_QuickForm_element($elementName, $elementLabel, $attributes, null);
26 $this->_type
= 'modvisible';
32 * Called by HTML_QuickForm whenever form event is made on this element
34 * @param string $event Name of event
35 * @param mixed $arg event arguments
36 * @param object $caller calling object
40 function onQuickFormEvent($event, $arg, &$caller)
45 $choices[1] = get_string('show');
46 $choices[0] = get_string('hide');
47 $this->load($choices);
51 return parent
::onQuickFormEvent($event, $arg, $caller);