Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added custom attributes to certificate #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ccs24
Copy link

@ccs24 ccs24 commented Feb 11, 2024

No description provided.

@ccs24
Copy link
Author

ccs24 commented Feb 11, 2024

Sorry I have missed description. When we issue a new certificate for our participant, we have to add some additional information that depends on the course, e.g. course start date and end date, number of hours, trainer's name, etc. We have this data defined in Accredible as custom attributes, but they can't currently be filled in the Moodle module.

That's why I added additional functionality that makes this possible:

  1. I added a field in the database to store this additional information in json format
  2. When downloading the list of attributes from Accredible, I omitted the restriction that the data must be text
  3. I modified the form for editing certificate settings to display this data as text fields (I added the temporary slugify function to manage data)
  4. When saving data from the form, data from these additional fields are saved in the json format
  5. To make them appear in the issued certificate, I modified the function that retrieves dynamic data for certificates and added the function of adding information from additional database fields.

I hope that the proposed changes will be useful to more users of this module (and Accredible)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants