mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
DL-13337 - Add confirmation before deleting outcomes (and POST for action..)
merged from MOODLE_19_STABLE
This commit is contained in:
parent
87518137bf
commit
f3f2468cf5
@ -100,8 +100,22 @@ switch ($action) {
|
||||
break;
|
||||
}
|
||||
|
||||
//TODO: add confirmation
|
||||
$deleteconfirmed = optional_param('deleteconfirmed', 0, PARAM_BOOL);
|
||||
|
||||
if(!$deleteconfirmed){
|
||||
print_header(get_string('outcomedelete', 'grades'));
|
||||
notice_yesno(get_string('outcomeconfirmdelete', 'grades', $outcome->fullname),
|
||||
"index.php?id={$courseid}", "index.php?id={$courseid}",
|
||||
array('outcomeid' => $outcome->id,
|
||||
'action'=> 'delete',
|
||||
'sesskey' => $USER->sesskey,
|
||||
'deleteconfirmed'=> 1)
|
||||
);
|
||||
print_footer();
|
||||
die;
|
||||
}else{
|
||||
$outcome->delete();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -342,7 +342,9 @@ $string['options'] = 'Options';
|
||||
$string['outcome'] = 'Outcome';
|
||||
$string['outcomecategory'] = 'Create outcomes in category';
|
||||
$string['outcomecategorynew'] = 'New category';
|
||||
$string['outcomeconfirmdelete'] = 'Are you sure you wish to delete the outcome \"$a\"?';
|
||||
$string['outcomecreate'] = 'Add a new outcome';
|
||||
$string['outcomedelete'] = 'Delete Outcome';
|
||||
$string['outcomeidhelp'] = 'The outcome this grade item represents.';
|
||||
$string['outcomeitem'] = 'Outcome item';
|
||||
$string['outcomeitemsedit'] = 'Edit outcome item';
|
||||
|
Loading…
x
Reference in New Issue
Block a user