Fixed reference to 'mod/certificate' capability

This commit is contained in:
Mark Nelson 2018-06-19 19:05:25 +08:00
parent 3f4e2be973
commit 9f4492e7e9

View file

@ -67,7 +67,7 @@ class mobile {
$issues = $DB->get_records('customcert_issues', ['userid' => $USER->id, 'customcertid' => $certificate->id]);
$candownload = true;
if ($certificate->requiredtime && !has_capability('mod/certificate:manage', $context)) {
if ($certificate->requiredtime && !has_capability('mod/customcert:manage', $context)) {
if (\mod_customcert\certificate::get_course_time($certificate->course) < ($certificate->requiredtime * 60)) {
$candownload = false;
}