MDL-4384, fixed undefined function call, hide the add sub category form in non-editing mode

This commit is contained in:
toyomoyo 2007-08-20 01:59:50 +00:00
parent b299029264
commit 1dc08b85b1
2 changed files with 1 additions and 3 deletions

View File

@ -275,7 +275,7 @@
}
/// 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();

View 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();
}