diff --git a/lang/en/customcert.php b/lang/en/customcert.php index 285d994..9b79409 100644 --- a/lang/en/customcert.php +++ b/lang/en/customcert.php @@ -107,6 +107,7 @@ $string['receiveddate'] = 'Received date'; $string['refpoint'] = 'Reference point location'; $string['refpoint_help'] = 'The reference point is the location of an element from which its x and y coordinates are determined. It is indicated by the \'+\' that appears in the centre or corners of the element.'; $string['replacetemplate'] = 'Replace'; +$string['requiredtimenotmet'] = 'You must spend at least a minimum of {$a->requiredtime} minutes in the course before you can access this certificate.'; $string['rightmargin'] = 'Right margin'; $string['rightmargin_help'] = 'This is the right margin of the certificate PDF in mm.'; $string['save'] = 'Save'; diff --git a/view.php b/view.php index 0d36238..4b847cc 100644 --- a/view.php +++ b/view.php @@ -46,7 +46,7 @@ if ($customcert->requiredtime && !has_capability('mod/customcert:manage', $conte if (\mod_customcert\certificate::get_course_time($course->id) < ($customcert->requiredtime * 60)) { $a = new stdClass; $a->requiredtime = $customcert->requiredtime; - notice(get_string('requiredtimenotmet', 'certificate', $a), "$CFG->wwwroot/course/view.php?id=$course->id"); + notice(get_string('requiredtimenotmet', 'customcert', $a), "$CFG->wwwroot/course/view.php?id=$course->id"); die; } }