mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
"MDL-14129, fix print_error"
This commit is contained in:
parent
aad6739758
commit
38eac4d5c3
5 changed files with 30 additions and 27 deletions
|
@ -8,17 +8,17 @@
|
|||
|
||||
/// locate note information
|
||||
if (!$note = note_load($noteid)) {
|
||||
print_error('Incorrect note id specified');
|
||||
print_error('invalidid', 'notes');
|
||||
}
|
||||
|
||||
/// locate course information
|
||||
if (!$course = $DB->get_record('course', array('id'=>$note->courseid))) {
|
||||
print_error('Incorrect course id found');
|
||||
print_error('invalidcourseid');
|
||||
}
|
||||
|
||||
/// locate user information
|
||||
if (!$user = $DB->get_record('user', array('id'=>$note->userid))) {
|
||||
print_error('Incorrect user id found');
|
||||
print_error('invaliduserid');
|
||||
}
|
||||
|
||||
/// require login to access notes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue