Merge branch 'MDL-33875' of git://github.com/stronk7/moodle

This commit is contained in:
Dan Poltawski
2012-06-20 13:45:49 +08:00
+3 -1
View File
@@ -102,8 +102,10 @@ class delete_category_form extends moodleform {
/// Give the options for what to do.
$mform->addElement('select', 'fulldelete', get_string('whattodo'), $options);
if (count($options) == 1) {
$optionkeys = array_keys($options);
$option = reset($optionkeys);
$mform->hardFreeze('fulldelete');
$mform->setConstant('fulldelete', reset(array_keys($options)));
$mform->setConstant('fulldelete', $option);
}
if ($displaylist) {