From 79137823fa380275a64eec340a4745593a829a55 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 28 Feb 2013 16:41:34 +1300 Subject: [PATCH] MDL-38251 course: fixed add category button on top level --- course/manage.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/course/manage.php b/course/manage.php index 177e922c1c1..0110db1bbfc 100644 --- a/course/manage.php +++ b/course/manage.php @@ -373,7 +373,12 @@ if ($canmanage) { // Print button for creating new categories. $url = new moodle_url('/course/editcategory.php', array('parent' => $id)); - echo $OUTPUT->single_button($url, get_string('addsubcategory'), 'get'); + if ($id) { + $title = get_string('addsubcategory'); + } else { + $title = get_string('addnewcategory'); + } + echo $OUTPUT->single_button($url, $title, 'get'); echo $OUTPUT->container_end(); }