moodle-mod_customcert icon indicating copy to clipboard operation
moodle-mod_customcert copied to clipboard

Add ability to import/export templates

Open jeremy-schweitzer opened this issue 8 years ago • 10 comments

Right now it appears that certificate templates can be created at the site level (full admin access required) and the course content (teacher role required), but there is not way to export course templates to the site level or import/export site templates from one site to another.

In practice this means that I would have to willing to give (or negotiate this level of access with each site owner) full site admin access to my designer if I wanted to create site wide templates and if we wanted to use the same template across mutiple sites I'd have to have my designer recreate them each time manually.

With the old certificate this was possible by just providing the files to every site that needed to load the custom certificate.

If we could either import/export site templates and/or be able to import course templates to the site level and make them available site wide that would dramatically improve the management options for the certificates and bring it closer to parity with the old plugin.

jeremy-schweitzer avatar Nov 15 '16 18:11 jeremy-schweitzer

This would be great. We have 26 courses with a very similar certificate and would love this feature. Also from the course level "save as template".

Tw0bit avatar Nov 23 '16 01:11 Tw0bit

This makes total sense. Thanks for the report. Going to work on this now.

mdjnelson avatar Feb 02 '17 08:02 mdjnelson

Great - I don't have the dev skills to help development, but if you need help testing let me know. Thanks

jeremy-schweitzer avatar Feb 02 '17 15:02 jeremy-schweitzer

Is there any update for this issue?

azmatksa avatar Oct 07 '20 10:10 azmatksa

This is a huge undertaking. If you or anyone else would like to develop it that would be great. I am just a sole developer who does this in their own time who gets bombarded with requests and questions. Help is appreciated. :)

mdjnelson avatar Oct 14 '20 17:10 mdjnelson

is it possible to backup the templates by the database anb import in another moodle?

Veiote avatar Jan 28 '22 13:01 Veiote

Hi, we just started to use use this great plugin and I would like to contribute - we also would appriciate this feature, but I am not the php-man :-), @mdjnelson : could you give me some hints, so I could talk to our php-man. What would be your idea - how to solve this feature? Perhaps we find some time...

antoniobeermann avatar Jan 29 '22 12:01 antoniobeermann

This is a tricky problem and I am not sure how to approach it tbh. We could use the backup/restore API that comes with Moodle to do it, but how would we trigger that code in a separate page for just downloading a template. I think maybe storing it as XML like we do in the backup and storing any related images/media in a folder that links to the XML elements. Thoughts?

mdjnelson avatar Feb 27 '22 10:02 mdjnelson

What if it's approached from a different direction? When you backup a course and restore it to another site a course specific version of the template is restored. The missing piece is a way to get that certificate configuration to become a template. What if the plugin was extended to allow saving a certificate configuration as a site template?

Then you could simply create an instance of any templates in a course - do a backup/restore to a new site and then save the "certificate" as a new template on that new site.

jeremy-schweitzer avatar May 13 '22 13:05 jeremy-schweitzer

Can we add HTML code instead of image for background image ?

nitin-upadhyay-apeejay avatar Jun 27 '23 06:06 nitin-upadhyay-apeejay