Added functionality to preview the custom certificate

This commit is contained in:
Mark Nelson 2013-05-17 11:05:42 +08:00
parent 4962b72938
commit a513ba8038
6 changed files with 11 additions and 2 deletions

View file

@ -181,6 +181,11 @@ if ($data = $mform->get_data()) {
}
}
// Check if we want to preview this custom certificate.
if (!empty($data->previewbtn)) {
customcert_generate_pdf($customcert, $USER->id);
}
// Redirect to the editing page to show form with recent updates.
$url = new moodle_url('/mod/customcert/edit.php', array('cmid' => $cmid));
redirect($url);