site admin in unable to see the issued certificates

site admin in unable to see the issued certificates

by Payman Zafar -
Number of replies: 2

Hi,

I installed the customcert plugin on Moodle version 3.5.3, and added a certificate as an activity to one course.

Everyone is able to issue & download the certificate from My Certificates link, but as a site administrator I am only able to download my own certificate. I do not see the list of issued certificates. I used different group modes (No groups, Separate groups,  Visible groups) without any difference. It shows "Nothing to display" as in the attached image.


Meanwhile, I checked the view.php code, and in the below code, changed the !$canmanage to $canmanage, and now I can see the issue date of my own certificate as in the attached image.

if ($issues && !$canmanage) {
        // Get the most recent issue (there should only be one).
        $issue = reset($issues);
        $issuestring = get_string('receiveddate', 'customcert') . ': ' . userdate($issue->timecreated);
        $issuehtml = $OUTPUT->box($issuestring);
    }

Attachment Untitled.jpg
Attachment Untitled1.jpg
Average of ratings: -
In reply to Payman Zafar

Re: site admin in unable to see the issued certificates

by Payman Zafar -

Hi,

I checked this activity permissions. Teacher, Manager & Non-editing teacher have "Manage a custom certificate" permission.

Next I prohibited these 3 roles from this capability, but nothing changed. I checked the permission for a Manager, and he still has the above capability. It seems that it does not change the permission, or check permission shows the result with mistake. As in my previous post, $canmanage is not True, so I think the second assumption is correct.


In reply to Payman Zafar

Re: site admin in unable to see the issued certificates

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

The reason the following code "if ($issues && !$canmanage) {" exists is because it did not make sense to show the date a person who can manage the certificate was issued it. They are in control of the certificate. Re: the report table you want to check if $canviewreport is true and then check if your customcert_issues table has any data in it.

Average of ratings: Useful (1)