Пример #1
0
    
        // print option to add a subcategory
        if (has_capability('moodle/category:create', $context) && $creatorediting) {
            $cat->id = $id;
            $mform->set_data($cat);
            $mform->display();
        }
        */
}
// Print the form
$site = get_site();
$straddnewcategory = get_string("addnewcategory");
$stradministration = get_string("administration");
$strcategories = get_string("categories");
$navlinks = array();
if (!empty($category->name)) {
    $navlinks[] = array('name' => $strtitle, 'link' => null, 'type' => 'misc');
    $title = $strtitle;
    $fullname = $category->name;
} else {
    $navlinks[] = array('name' => $stradministration, 'link' => "{$CFG->wwwroot}/{$CFG->admin}/index.php", 'type' => 'misc');
    $navlinks[] = array('name' => $strcategories, 'link' => 'index.php', 'type' => 'misc');
    $navlinks[] = array('name' => $straddnewcategory, 'link' => null, 'type' => 'misc');
    $title = "{$site->shortname}: {$straddnewcategory}";
    $fullname = $site->fullname;
}
$navigation = build_navigation($navlinks);
print_header($title, $fullname, $navigation, $mform->focus());
print_heading($strtitle);
$mform->display();
print_footer();