new element type 'selectyesno' and some clean up to code for modvisible and modgroupmode elements.

This commit is contained in:
jamiesensei 2006-11-12 11:30:12 +00:00
parent d24206d657
commit e0f4068409
4 changed files with 61 additions and 53 deletions

View file

@ -3,15 +3,13 @@ global $CFG;
require_once "$CFG->libdir/form/select.php";
/**
* HTML class for a editor format drop down element
* HTML class for a drop down element to select visibility in an activity mod update form
*
* @author Jamie Pratt
* @access public
*/
class MoodleQuickForm_modvisible extends MoodleQuickForm_select{
/**
* Class constructor
*
@ -48,36 +46,9 @@ class MoodleQuickForm_modvisible extends MoodleQuickForm_select{
$choices[0] = get_string('hide');
$this->load($choices);
break;
/*case 'updateValue' :
$value = $this->_findValue($caller->_constantValues);
if (null === $value) {
$value = $this->_findValue($caller->_submitValues);
if (null === $value && (!$caller->isSubmitted() || !$this->getMultiple())) {
$value = $this->_findValue($caller->_defaultValues);
}
}
if (null !== $value) {
$this->setValue($value);
}else{
$this->setValue($this->_modVisible($this->_options['hiddensection'],
$this->_options['cm']));
}
return true;
break;*/
}
return parent::onQuickFormEvent($event, $arg, $caller);
}
/* function _modVisible($hiddensection, $cm){
if ($cm) {
$visible = $cm->visible;
} else {
$visible = true;
}
if ($hiddensection) {
$visible = false;
}
return $visible;
}*/
}
?>