mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +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
|
@ -9,11 +9,11 @@
|
|||
require_login();
|
||||
|
||||
if (!can_delete_course($id)) {
|
||||
print_error('You do not have the permission to delete this course.');
|
||||
print_error('cannotdeletecourse');
|
||||
}
|
||||
|
||||
if (!$site = get_site()) {
|
||||
print_error("Site not found!");
|
||||
print_error("siteisnotdefined", 'debug');
|
||||
}
|
||||
|
||||
$strdeletecourse = get_string("deletecourse");
|
||||
|
@ -21,7 +21,7 @@
|
|||
$strcategories = get_string("categories");
|
||||
|
||||
if (! $course = get_record("course", "id", $id)) {
|
||||
print_error("Course ID was incorrect (can't find it)");
|
||||
print_error("invalidcourseid");
|
||||
}
|
||||
|
||||
$category = get_record("course_categories", "id", $course->category);
|
||||
|
@ -49,7 +49,7 @@
|
|||
}
|
||||
|
||||
if ($delete != md5($course->timemodified)) {
|
||||
print_error("The check variable was wrong - try again");
|
||||
print_error("invalidmd5");
|
||||
}
|
||||
|
||||
if (!confirm_sesskey()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue