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