MDL-50816 notes: Delete never met condition code
This commit is contained in:
+1
-3
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user