3 require_once "$CFG->libdir/form/select.php";
6 * HTML class for a drop down element to select groupmode in an activity mod update form
11 class MoodleQuickForm_modgroupmode
extends MoodleQuickForm_select
{
15 * @param string Select name attribute
16 * @param mixed Label(s) for the select
17 * @param mixed Either a typical HTML attribute string or an associative array
18 * @param mixed $options ignored
22 function MoodleQuickForm_modgroupmode($elementName=null, $elementLabel=null, $attributes=null, $options=null)
24 HTML_QuickForm_element
::HTML_QuickForm_element($elementName, $elementLabel, $attributes, null);
25 $this->_type
= 'modgroupmode';
31 * Called by HTML_QuickForm whenever form event is made on this element
33 * @param string $event Name of event
34 * @param mixed $arg event arguments
35 * @param object $caller calling object
40 function onQuickFormEvent($event, $arg, &$caller)
46 $choices[NOGROUPS
] = get_string('groupsnone');
47 $choices[SEPARATEGROUPS
] = get_string('groupsseparate');
48 $choices[VISIBLEGROUPS
] = get_string('groupsvisible');
50 $this->setHelpButton(array('groupmode', get_string('groupmode')));
51 $this->load($choices);
54 return parent
::onQuickFormEvent($event, $arg, $caller);