Generate template from existing certificate

Generate template from existing certificate

by Michael Gies -
Number of replies: 4

Moodle version: Moodle 3.11.4 (Build: 20211214)

Custom certificate version: 3.11.1 2021051701


Hi everyone,

I may have got it wrong, because it seems meant to be the other way round: create a template and apply it to courses, but, unfortunately, I first set up a certificate in a course and now I would like to copy it to other courses. 

Is there a way or work around or a possibility to save it as a model, perhaps tricking the database ?

Thanks

Average of ratings: -
In reply to Michael Gies

Re: Generate template from existing certificate

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
You could just import to the other courses.
In reply to Emma Richardson

Re: Generate template from existing certificate

by Michael Gies -
Hi Emma,

thank you for your reply but I cannot find an import feature in mod_customcert. I guess that I need to export it before I can import it and don't find that feature either.
Can you be more precise about the steps to make, please?
Thanks
In reply to Michael Gies

Re: Generate template from existing certificate

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
I think Emma means backup and restore.

You could hack with the database and change the "customcert_templates" table so the contextid is 1 (site wide), but I havent tried that so maybe remember what the context id is before changing it to 1 so you can change it back if everything is broken.
Average of ratings: Useful (1)
In reply to Mark Nelson

Re: Generate template from existing certificate

by Michael Gies -
Great Mark,

it works.
Do you know a way how to allow students to receive a certificate without beeing able to download it from moodle again? This is because we give certificates not for a course but for a lesson and thus have defined some variables in the course to print on the certificate. For each lesson, after the former certificates are printed, the teacher changes those variable for the next lesson and right now, the students (or theeacher) when downloading the certificate again, they get a new one with the updated values of another lesson.
Or do you think you will implement a way to store the issued certificates for each student so they don't change each time they are downloaded?
This would be a great improovement I think and teachers could still cancel a certificate to issue it again with different values when needed....

Michael