mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-12497 fixed regressionwhen saving site letters, fixed redirect; merged from MOODLE_19_STABLE
This commit is contained in:
parent
2f4b82f410
commit
7955c18a5a
@ -40,7 +40,7 @@ if ($context->contextlevel == CONTEXT_SYSTEM or $context->contextlevel == CONTEX
|
||||
require_login();
|
||||
admin_externalpage_setup('letters');
|
||||
$admin = true;
|
||||
$returnurl = "$CFG->wwwroot/$CFG->admin";
|
||||
$returnurl = "$CFG->wwwroot/grade/edit/letter/edit.php"; // stay in the same page
|
||||
|
||||
|
||||
} else if ($context->contextlevel == CONTEXT_COURSE) {
|
||||
@ -81,7 +81,7 @@ if ($mform->is_cancelled()) {
|
||||
redirect($returnurl);
|
||||
|
||||
} else if ($data = $mform->get_data()) {
|
||||
if (empty($data->override)) {
|
||||
if (!$admin and empty($data->override)) {
|
||||
delete_records('grade_letters', 'contextid', $context->id);
|
||||
redirect($returnurl);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user