MDL-16166 centralised enabling of subsystems, fixed some warnings and general cleanup
This commit is contained in:
@@ -32,6 +32,10 @@ if (!has_capability('moodle/notes:manage', $context)) {
|
||||
print_error('nopermissiontodelete', 'notes');
|
||||
}
|
||||
|
||||
if (empty($CFG->enablenotes)) {
|
||||
print_error('notesdisabled', 'notes');
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user