MDL-11800, multilang support for category description

This commit is contained in:
toyomoyo 2007-11-28 02:56:51 +00:00
parent e225e5fa2c
commit 7aabbf3b58

View File

@ -33,7 +33,9 @@
if (!$category = get_record("course_categories", "id", $id)) { if (!$category = get_record("course_categories", "id", $id)) {
error("Category not known!"); error("Category not known!");
} }
$category->name = format_text($category->name,FORMAT_HTML);//for multilang filter to catch up
if (has_capability('moodle/course:create', $context)) { if (has_capability('moodle/course:create', $context)) {
if ($categoryedit !== -1) { if ($categoryedit !== -1) {
$USER->categoryediting = $categoryedit; $USER->categoryediting = $categoryedit;
@ -91,7 +93,6 @@
} }
} }
/// Print headings /// Print headings
$numcategories = count_records("course_categories"); $numcategories = count_records("course_categories");
@ -145,7 +146,7 @@
/// Print current category description /// Print current category description
if (!$creatorediting && $category->description) { if (!$creatorediting && $category->description) {
print_box_start(); print_box_start();
echo $category->description; echo format_text($category->description,FORMAT_HTML); // for multilang filter
print_box_end(); print_box_end();
} }