From 39536381d501aefdab1cd595e19f77cfca520a40 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Wed, 10 Oct 2007 06:21:37 +0000 Subject: [PATCH] MDL-11543 Printing nice list of categories for parent category drop-down --- course/editcategory_form.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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')); -- 2.39.5