MDL-50816 notes: Delete never met condition code

This commit is contained in:
Juan Leyva
2015-07-15 15:27:33 +02:00
parent d783a8fba7
commit fc0103cc80
3 changed files with 3 additions and 10 deletions
+1 -3
View File
@@ -48,9 +48,7 @@ if (!has_capability('moodle/notes:manage', $context)) {
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($note)) {
print_error('cannotdeletepost', 'notes', $returnurl);
}
note_delete($note);
redirect($returnurl);
} else {