]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-4384, fixed undefined function call, hide the add sub category form in non-editin...
authortoyomoyo <toyomoyo>
Mon, 20 Aug 2007 01:59:50 +0000 (01:59 +0000)
committertoyomoyo <toyomoyo>
Mon, 20 Aug 2007 01:59:50 +0000 (01:59 +0000)
course/category.php
course/index.php

index 2fc9e66cb7849dea8edde77d8fafd6dfe7de43d8..25f02d240f5d6327f80086574a38a2d86bd1556f 100644 (file)
     }
 
 /// print option to add a subcategory
-    if (has_capability('moodle/category:create', $context)) {
+    if (has_capability('moodle/category:create', $context) && $creatorediting) {
         $cat->id = $id;
         $mform->set_data($cat);
         $mform->display();
index 44ac487f933b27cd90893cfdf73901b55968963d..6ac5a79ef634dee5cd0c14909374858a2d557027 100644 (file)
@@ -75,7 +75,6 @@
                           $strcategories, '', '', true, update_categories_button());
             print_heading($strcategories);
             print_box_start('categorybox');
-            print_category_create_form();
             print_whole_category_list();
             print_box_end();
             print_course_search();
@@ -85,7 +84,6 @@
                     build_navigation(array(array('name'=>$strfulllistofcourses, 'link'=>'','type'=>'misc'))),
                          '', '', true, update_categories_button());
             print_box_start('courseboxes');
-            print_category_create_form();
             print_courses(0);
             print_box_end();
         }