mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +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,16 +9,16 @@
|
|||
$name = optional_param('name', false, PARAM_RAW); // Course short name
|
||||
|
||||
if (!$id and !$name) {
|
||||
print_error("Must specify course id or short name");
|
||||
print_error("unspecifycourseid");
|
||||
}
|
||||
|
||||
if ($name) {
|
||||
if (! $course = get_record("course", "shortname", $name) ) {
|
||||
print_error("That's an invalid short course name");
|
||||
print_error("invalidshortname");
|
||||
}
|
||||
} else {
|
||||
if (! $course = get_record("course", "id", $id) ) {
|
||||
print_error("That's an invalid course id");
|
||||
print_error("invalidcourseid");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue