Skip to content

Commit

Permalink
MDL-49973 changed continue to delete on delete confirmations
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjdavis authored and cameorn1730 committed Sep 14, 2015
1 parent f495510 commit 6537778
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@
echo $OUTPUT->header();
$fullname = fullname($user, true);
echo $OUTPUT->heading(get_string('deleteuser', 'admin'));

$optionsyes = array('delete'=>$delete, 'confirm'=>md5($delete), 'sesskey'=>sesskey());
echo $OUTPUT->confirm(get_string('deletecheckfull', '', "'$fullname'"), new moodle_url($returnurl, $optionsyes), $returnurl);
$deleteurl = new moodle_url($returnurl, $optionsyes);
$deletebutton = new single_button($deleteurl, get_string('delete'), 'post');

echo $OUTPUT->confirm(get_string('deletecheckfull', '', "'$fullname'"), $deletebutton, $returnurl);
echo $OUTPUT->footer();
die;
} else if (data_submitted() and !$user->deleted) {
Expand Down
5 changes: 3 additions & 2 deletions course/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@
$message = "{$strdeletecoursecheck}<br /><br />{$coursefullname} ({$courseshortname})";

$continueurl = new moodle_url('/course/delete.php', array('id' => $course->id, 'delete' => md5($course->timemodified)));
$continuebutton = new single_button($continueurl, get_string('delete'), 'post');

$PAGE->navbar->add($strdeletecheck);
$PAGE->set_title("$SITE->shortname: $strdeletecheck");
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();
echo $OUTPUT->confirm($message, $continueurl, $categoryurl);
echo $OUTPUT->confirm($message, $continuebutton, $categoryurl);
echo $OUTPUT->footer();
exit;
exit;
2 changes: 1 addition & 1 deletion course/editsection.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
echo $OUTPUT->box_start('noticebox');
$optionsyes = array('id' => $id, 'confirm' => 1, 'delete' => 1, 'sesskey' => sesskey());
$deleteurl = new moodle_url('/course/editsection.php', $optionsyes);
$formcontinue = new single_button($deleteurl, get_string('continue'));
$formcontinue = new single_button($deleteurl, get_string('delete'));
$formcancel = new single_button($cancelurl, get_string('cancel'), 'get');
echo $OUTPUT->confirm(get_string('confirmdeletesection', '',
get_section_name($course, $sectioninfo)), $formcontinue, $formcancel);
Expand Down
3 changes: 2 additions & 1 deletion question/classes/bank/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,8 @@ public function process_actions_needing_ui() {
$deleteurl = new \moodle_url($baseurl, array('deleteselected' => $questionlist, 'confirm' => md5($questionlist),
'sesskey' => sesskey()));

echo $OUTPUT->confirm(get_string('deletequestionscheck', 'question', $questionnames), $deleteurl, $baseurl);
$continue = new \single_button($deleteurl, get_string('delete'), 'post');
echo $OUTPUT->confirm(get_string('deletequestionscheck', 'question', $questionnames), $continue, $baseurl);

return true;
}
Expand Down

0 comments on commit 6537778

Please sign in to comment.