How to send certificate A or certificate B using php?

How to send certificate A or certificate B using php?

door Robin de Rooy -
Aantal antwoorden: 5
Is there a possibility to call a function in php to send a certificate?

So if an event is triggered, I check some conditions myself and issue a specific certificate.

Reason: we have a practical course. Sometimes teacher A takes it, sometimes teacher B.
I need the certificate to have the correct signature in the certificate.
I a new_user_profile_field I can put the teacher: A or B.

Functionality is: if in new_profile_field is teacher A then grant certificate A, if teacher B then grant certificate B.

Kind regards,
Robin de Rooy
Gemiddelde van de beoordelingen:  -
Als antwoord op Robin de Rooy

Re: How to send certificate A or certificate B using php?

door Mark Nelson -
Foto van Core developers Foto van Documentation writers Foto van Particularly helpful Moodlers Foto van Peer reviewers Foto van Plugin developers Foto van Testers
Well, it's possible to do whatever you want as long as you know how to code it. glimlach

This would require a developer to work on and can't be done out of the box. Sorry!
Gemiddelde van de beoordelingen:  -
Als antwoord op Mark Nelson

Re: How to send certificate A or certificate B using php?

door Robin de Rooy -
Thanks for the reply Mark. I am a user and developer, but propably have to dig a little deeper. I just added some pseudo code, or even less, to trigger a larger audience.


Do you have, by chance, a summary of funtions to call? Or a reference to this? Thanks for the input and pointing me in the direction.

Gemiddelde van de beoordelingen:  -
Als antwoord op Robin de Rooy

Re: How to send certificate A or certificate B using php?

door Mark Nelson -
Foto van Core developers Foto van Documentation writers Foto van Particularly helpful Moodlers Foto van Peer reviewers Foto van Plugin developers Foto van Testers
https://github.com/mdjnelson/moodle-mod_customcert/blob/MOODLE_402_STABLE/classes/task/email_certificate_task.php#L192 is where the certificate is generated for emails but I suspect that may not help with choosing how it looks. Perhaps if you change the logic in https://github.com/mdjnelson/moodle-mod_customcert/blob/MOODLE_402_STABLE/element/userfield/classes/element.php#L132 you can get the field to work like you want.
Gemiddelde van de beoordelingen:  -
Als antwoord op Mark Nelson

Re: How to send certificate A or certificate B using php?

door Robin de Rooy -
Thanks, I will have a look.


My plan is to select a different certificate template, not a single field.

Something like, after 'exam_X_finished' event (cron):

Select case profile_field_examinator

 case examinator_A

  Use_cert_template(cert_template_A)

 case examinator_B

  Use_cert_template(cert_template_B)

case examinator_C

 Use_cert_template(cert_template_C)

End select

Gemiddelde van de beoordelingen:  -