From: nicolasconnault Date: Wed, 10 Oct 2007 06:21:37 +0000 (+0000) Subject: MDL-11543 Printing nice list of categories for parent category drop-down X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=39536381d501aefdab1cd595e19f77cfca520a40;p=moodle.git MDL-11543 Printing nice list of categories for parent category drop-down --- diff --git a/course/editcategory_form.php b/course/editcategory_form.php index 65fdeddc80..78b76c910c 100644 --- a/course/editcategory_form.php +++ b/course/editcategory_form.php @@ -8,11 +8,9 @@ class editcategory_form extends moodleform { $mform =& $this->_form; // get list of categories to use as parents, with site as the first one - $categories = get_categories(); $options = array(get_string('top')); - foreach ($categories as $catid => $cat) { - $options[$catid] = format_string($cat->name); - } + $parents = array(); + make_categories_list($options, $parents); $mform->addElement('select', 'parent', get_string('parentcategory'), $options); $mform->addElement('text', 'name', get_string('categoryname'), array('size'=>'30'));