Redirect after page deletion to avoid page error when refreshing

This commit is contained in:
Mark Nelson 2017-08-08 11:04:19 +08:00
parent 0f2b2f2fca
commit f382805d89

View file

@ -91,6 +91,8 @@ if ($tid) {
case 'deletepage' : case 'deletepage' :
if (!empty($confirm)) { // Check they have confirmed the deletion. if (!empty($confirm)) { // Check they have confirmed the deletion.
$template->delete_page($actionid); $template->delete_page($actionid);
$url = new \moodle_url('/mod/customcert/edit.php', array('tid' => $tid));
redirect($url);
} else { } else {
// Set deletion flag to true. // Set deletion flag to true.
$deleting = true; $deleting = true;