#203 Don't show 'Awarded on' date to managers
This commit is contained in:
parent
c18c84b0df
commit
de2709ae54
3 changed files with 20 additions and 13 deletions
|
@ -67,7 +67,8 @@ class mobile {
|
|||
$issues = $DB->get_records('customcert_issues', ['userid' => $USER->id, 'customcertid' => $certificate->id]);
|
||||
|
||||
$candownload = true;
|
||||
if ($certificate->requiredtime && !has_capability('mod/customcert:manage', $context)) {
|
||||
$canmanage = has_capability('mod/customcert:manage', $context);
|
||||
if ($certificate->requiredtime && !$canmanage) {
|
||||
if (\mod_customcert\certificate::get_course_time($certificate->course) < ($certificate->requiredtime * 60)) {
|
||||
$candownload = false;
|
||||
}
|
||||
|
@ -100,6 +101,7 @@ class mobile {
|
|||
'groups' => array_values($groups),
|
||||
'hasissues' => !empty($issues),
|
||||
'issues' => array_values($issues),
|
||||
'canmanage' => $canmanage,
|
||||
'candownload' => $candownload,
|
||||
'fileurl' => $fileurl,
|
||||
'showreport' => $showreport,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue