#55 Fixed references to capabilities from mod_certificate
This commit is contained in:
parent
39284f7891
commit
583368656e
3 changed files with 3 additions and 3 deletions
2
view.php
2
view.php
|
@ -42,7 +42,7 @@ $pageurl = new moodle_url('/mod/customcert/view.php', array('id' => $cm->id));
|
|||
\mod_customcert\page_helper::page_setup($pageurl, $context, format_string($customcert->name));
|
||||
|
||||
// Check if the user can view the certificate based on time spent in course.
|
||||
if ($customcert->requiredtime && !has_capability('mod/certificate:manage', $context)) {
|
||||
if ($customcert->requiredtime && !has_capability('mod/customcert:manage', $context)) {
|
||||
if (\mod_customcert\certificate::get_course_time($course->id) < ($customcert->requiredtime * 60)) {
|
||||
$a = new stdClass;
|
||||
$a->requiredtime = $customcert->requiredtime;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue