32
32
* This function helps standardize error handling by rendering the page
33
33
* properly and showing the error message in an alert box.
34
34
*
35
+ * Code fragment to define the version of the customcert module
36
+ *
37
+ * @package mod_customcert
38
+ * @copyright 2013 Mark Nelson <[email protected] >
39
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
35
40
* @param string $message The error message to display.
36
41
* @package mod_customcert
37
42
*/
@@ -60,7 +65,8 @@ function display_error_page($message) {
60
65
display_error_page ('The verification token is invalid for this certificate. Please check the URL and try again. ' );
61
66
}
62
67
63
- // Retrieve the certificate issue entry using the provided certificate code.
68
+ // Retrieve the certificate issue entry
69
+ // using the provided certificate code.
64
70
// This helps fetch the associated user ID to verify ownership.
65
71
$ issue = $ DB ->get_record ('customcert_issues ' , ['code ' => $ certcode ], '* ' );
66
72
@@ -87,7 +93,8 @@ function display_error_page($message) {
87
93
$ template = new \mod_customcert \template ($ template );
88
94
89
95
// Generate and output the certificate PDF.
90
- // 'false' indicates that the PDF is displayed inline instead of being force-downloaded.
96
+ // 'false' indicates that the PDF is displayed inline,
97
+ // instead of being force-downloaded.
91
98
// The second parameter ensures the certificate is generated for the correct user.
92
99
$ template ->generate_pdf (false , $ issue ->userid );
93
100
} catch (Exception $ e ) {
0 commit comments