Skip to content

Commit 9b6ab3a

Browse files
committed
Fixed errors
1 parent b60c152 commit 9b6ab3a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

view_user_cert.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
* @copyright 2013 Mark Nelson <[email protected]>
3939
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
4040
* @param string $message The error message to display.
41-
* @package mod_customcert
4241
*/
4342
function display_error_page($message) {
4443
global $OUTPUT;
@@ -71,7 +70,8 @@ function display_error_page($message) {
7170
$issue = $DB->get_record('customcert_issues', ['code' => $certcode], '*');
7271

7372
if (!$issue) {
74-
display_error_page('The certificate with the provided code could not be found. Please verify the certificate code and try again.');
73+
display_error_page('Certificate with this code not found. '
74+
. 'Please check the code and try again.');
7575
}
7676

7777
// Fetch the certificate associated with the retrieved issue.
@@ -99,7 +99,8 @@ function display_error_page($message) {
9999
$template->generate_pdf(false, $issue->userid);
100100
} catch (Exception $e) {
101101
// Catch any errors that may occur while generating the certificate PDF.
102-
display_error_page('There was an error generating the certificate PDF. Please try again later or contact support if the problem persists.');
102+
display_error_page('Error generating certificate PDF. '
103+
. 'Try again later or contact support.');
103104
}
104105

105106
// Prevent further execution after rendering the certificate.

0 commit comments

Comments
 (0)