mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
"MDL-14129, fix print_error call under course/, see tracker"
This commit is contained in:
parent
211c6890c5
commit
ba6018a902
17 changed files with 146 additions and 117 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue