MDL-40010 notes: passing an object rather than an id to avoid debugging message

This commit is contained in:
Mark Nelson 2013-06-04 18:19:30 +08:00
parent b6f8a93642
commit ec16252734

View File

@ -41,7 +41,7 @@ if (empty($CFG->enablenotes)) {
if (data_submitted() && confirm_sesskey()) {
//if data was submitted and is valid, then delete note
$returnurl = $CFG->wwwroot . '/notes/index.php?course=' . $course->id . '&user=' . $note->userid;
if (!note_delete($noteid)) {
if (!note_delete($note)) {
print_error('cannotdeletepost', 'notes', $returnurl);
}
redirect($returnurl);