Moodle 3.1.6 - ModCertificate - Get issued certificates for user other than current

Moodle 3.1.6 - ModCertificate - Get issued certificates for user other than current

by Juan Matías de la Cámara Beovide -
Number of replies: 0

Hello.


I'm developing a script that needs to check, via web-service, whether a student has a certificate issued for a course.

The module's webservices can get the certificates for current user only, but since I'm running a script that reads usernames from a list I need to get certificates for any user.

Is there a way to do that?

The workflow for my script:

1. read a user name
2. checks if user is enrolled
3. if it is not then it checks if user has a certificate (i.e. he/she has already completed the course, and no, the Moodle instance I am using just issues a certificate but it does not use the completion status)
4. if user is not enrolled and has no certificate then it enrolls the user


Thanks in advance!
Average of ratings: -