diff --git a/edit.php b/edit.php index 1293162..9061157 100644 --- a/edit.php +++ b/edit.php @@ -210,6 +210,7 @@ if ($data = $mform->get_data()) { // Check if we want to preview this custom certificate. if (!empty($data->previewbtn)) { $template->generate_pdf(true); + exit(); } // Redirect to the editing page to show form with recent updates. diff --git a/view.php b/view.php index 4e6014c..64653e2 100644 --- a/view.php +++ b/view.php @@ -137,4 +137,5 @@ if (empty($action)) { // Now we want to generate the PDF. $template = new \mod_customcert\template($template); $template->generate_pdf(); + exit(); }