"MDL-14129, fix print_error call under course/, see tracker"

This commit is contained in:
dongsheng 2008-05-07 06:02:51 +00:00
parent 211c6890c5
commit ba6018a902
17 changed files with 146 additions and 117 deletions

View file

@ -24,19 +24,19 @@
}
if (!$site = get_site()) {
print_error("Site isn't defined!");
print_error("siteisnotdefined", 'debug');
}
if (empty($id)) {
print_error("Category not known!");
print_error("unknowcategory");
}
if (!$context = get_context_instance(CONTEXT_COURSECAT, $id)) {
print_error("Category not known!");
print_error("unknowcategory");
}
if (!$category = get_record("course_categories", "id", $id)) {
print_error("Category not known!");
print_error("unknowcategory");
}
if (has_capability('moodle/course:create', $context)) {
@ -170,7 +170,7 @@
require_capability('moodle/category:update', get_context_instance(CONTEXT_COURSECAT, $moveto));
if (! $destcategory = get_record("course_categories", "id", $data->moveto)) {
print_error("Error finding the category");
print_error("cannotfindcategory", '', '', $data->moveto);
}