From 377da1a0e2b032f4644c8f40a5bac17f0c25732c Mon Sep 17 00:00:00 2001 From: stronk7 Date: Fri, 30 Mar 2007 15:35:15 +0000 Subject: [PATCH] Adding a missing parameter to the "add new course" button. MDL-9129 --- course/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/course/index.php b/course/index.php index 75137f28a3f..fa7fa302de2 100644 --- a/course/index.php +++ b/course/index.php @@ -64,7 +64,9 @@ print_single_button('request.php', NULL, get_string('courserequest'), 'get'); } if (has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) { // Print link to create a new course - print_single_button('edit.php', NULL, get_string('addnewcourse'), 'get'); + /// Get the 1st available category + $options = array('category' => get_field('course_categories', 'id', 'parent', '0')); + print_single_button('edit.php', $options, get_string('addnewcourse'), 'get'); } if (has_capability('moodle/site:approvecourse', get_context_instance(CONTEXT_SYSTEM, SITEID)) and !empty($CFG->enablecourserequests)) { print_single_button('pending.php',NULL, get_string('coursespending'),'get');