mdjnelson / moodle-mod_customcert

Enables the creation of dynamically generated certificates with complete customisation via the web browser.
https://moodle.org/plugins/mod_customcert
GNU General Public License v3.0
91 stars 158 forks source link

Custom setting additional date to customize the date display ̣̣(change the hard code way) #456

Open DinhHien0307 opened 3 years ago

DinhHien0307 commented 3 years ago

Hi @mdjnelson I would like to add a new feature for an additional date format. The main idea is to add a new setting as a multi-line text field and the default is 2 options using in the code (hard code).

Description I suggest for the setting:

Custom date formats are available for selection when adding a certificate, listed one per line. Example: %d %m %y. (See PHP documentation.) In addition, the special symbol # can be used to indicate 'st', 'nd', 'rd' or 'th', for 1st 2nd 3rd 4th of the month. Changing this list does not affect existing certificates, only the options available when creating or updating a certificate.

I will submit a pull request for this. Please ask if you have any question

This is the demo: image image

mdjnelson commented 3 years ago

This looks great. Are you editing the same date element or created a new one?

DinhHien0307 commented 3 years ago

Hi @mdjnelson, I am editing the existing date element, I only create a new setting, which you can edit the date format when adding a new date element.

mdjnelson commented 2 years ago

Are you creating a PR for this anytime soon?

DinhHien0307 commented 2 years ago

Hi @mdjnelson I have created a PR for this, please take a look at it.