This is an update on the development of the new module I have promised for some time now, sorry it has taken so long! It has taken many directions but I think I am heading in the right direction now. It is still in development, so do not use it, but any suggestions or help will be appreciated.
The current certificate module
Highly customisable, users have complete control of the appearance of the certificate as they write the code responsible for the customisation.
- Module settings are limited, does not provide complete control out of the box.
- Difficult to customise beyond what is offered in the settings.
- User needs FTP access to the mod/certificate directory.
- User needs PHP knowledge and an understanding of the TCPDF library.
- You can not expect administrators to grant FTP access to every user who may want to create a certificate type.
- Even if FTP access was granted knowledge on how to use this access is required.
- Once accessed, an understanding of PHP is needed.
Can we upgrade?
Unfortunately no; this is a separate module. However, you can always have both installed on your site if you are currently using the existing one.
- The certificate types are highly customisable as users can write any code they wish in their certificate type and customise it to their liking.
- The new module stores the details of the certificate's appearance in the database. To convert the existing types I would have to interpret the code in each certificate type a user has created and copy this into the database - not possible.
The new custom certificate module
- Highly customisable; without needing FTP access or PHP knowledge!
- All customisations can be done on your browser!
- Still in development!
- I wrote it.
Setting up a custom certificate:
These are the only unique settings for this module on the initial settings page.
The reason not all the customisation is on this page is because it is a core Moodle page, the URL looks like <yoursite>/course/modedit.php?update=65&return=1. The file modedit.php contains a hook that loads the necessary files to install the module but does not allow complete control without editing core code.
Once a custom certificate instance has been added you can then click on the menu item 'Edit custom certificate' to be taking to the editing page.
The editing page:
Here you can add as many pages as you like, as well as elements. Once you have configured the setting as you wish you can save the template and then use this throughout your site so there is no need to customise anymore.
What's an element?
- A customisable item that can be added to the custom certificate.
- The item is a sub-plugin, which means it can do what other plugins do such as installing database tables, capabilities etc.
- Can easily share among the Moodle community. This means instead of users asking how to add a certain field to a certificate which usually ends in needing to write some code, users can simply create a plugin to share.
- What form elements are displayed when it is added to a custom certificate.
- How it validates and saves these elements once submitted, may want to save more data into a separate database table.
- How these elements are rendered on the PDF.
Hope this was clear to you all. Feedback and questions are welcomed.