sensei-certificates icon indicating copy to clipboard operation
sensei-certificates copied to clipboard

Certificate data field enhancements

Open misenhower opened this issue 8 years ago • 21 comments

In one of the integrations I'm working with we needed the ability to add some additional data fields to the generated certificates. We're using these fields to display some additional (custom) course metadata such as the instructor name, course number, number of credit hours, etc.

I was able to accomplish this by adding an extra meta box to the certificate template edit page and hooking into sensei_process_certificate_template_meta and sensei_certificates_before_pdf_output, but this approach was cumbersome and required a lot of duplication of code from the main Certificates plugin into my own plugin.

I'd suggest the following changes to help improve the Certificates plugin for this type of scenario:

  • Replace the hard-coded (and mostly duplicated) field output/update code in writepanel-certificate_data.php with dynamically-generated fields based off a filtered array of field data (similar to how get_customer_meta_fields() and the woocommerce_customer_meta_fields filter work in WooCommerce).
  • Modify generate_pdf() in class-woothemes-sensei-certificate-templates.php to use these dynamically-specified fields and add a filter for the field content (instead of just using str_replace on each field) to allow more template {{tags}} to be added.

I'm not sure if this is the type of thing you'd like to support with this plugin, but I'd be happy to make these changes and submit them as a pull request if you're interested.

misenhower avatar Apr 19 '16 01:04 misenhower

Thanks @misenhower - this isn't something we'll be implementing as a priority, but we will consider any pull requests if they make sense for the majority of users.

Perhaps you could describe your use case in more detail, so we can judge the demand for this change?

danjjohnson avatar Apr 21 '16 11:04 danjjohnson

Here's a screenshot showing the functionality I added for my client:

additionalcertificatedata

These fields appear on the Certificate Template page and can be positioned on the certificate like the other, built-in certificate data fields. They also support extra {{tags}} that are replaced with custom course metadata.

This system works, but it required a lot of duplicated code and I don't think it's going to be easily maintainable in the long run. The changes I have in mind for the Sensei Certificates plugin wouldn't affect the default functionality of the plugin, it would just add some filters to enable something like this in a much cleaner fashion.

I'll put together a pull request when I have a chance a little later. Thanks!

misenhower avatar Apr 21 '16 15:04 misenhower

Sounds good. Feel free to submit a PR, and we'll review it when we get chance.

danjjohnson avatar Apr 21 '16 18:04 danjjohnson

Hello, did this enhancement got added or not?

rodrigofarcas avatar Aug 13 '20 01:08 rodrigofarcas

Hello, did this enhancement got added or not?

No. This functionality is still desperately needed for this plugin.

PDowney avatar Aug 13 '20 02:08 PDowney

This is still a much needed addition. I am really surprised that something this basic hasn't been included. All i need to do is add a points system onto a certificate. There should just be a basic hook system that i can put an acf field into.

square-socket avatar Nov 30 '20 18:11 square-socket

This is still a much needed addition. I am really surprised that something this basic hasn't been included. All i need to do is add a points system onto a certificate. There should just be a basic hook system that i can put an acf field into.

I very much agree. The lack of more full-featured certificate functionality is specifically why I steer my corporate clients towards other LMS platforms that have the features they need.

PDowney avatar Nov 30 '20 19:11 PDowney

This is still a much needed addition. I am really surprised that something this basic hasn't been included. All i need to do is add a points system onto a certificate. There should just be a basic hook system that i can put an acf field into.

I very much agree. The lack of more full-featured certificate functionality is specifically why I steer my corporate clients towards other LMS platforms that have the features they need.

What would you reccomend?

square-socket avatar Nov 30 '20 19:11 square-socket

I need this functionality desperately! I just need to add one field from my customer data and that's all. This should be made a priority issue

iandoyle345 avatar Jan 10 '21 04:01 iandoyle345

I need this functionality desperately! I just need to add one field from my customer data and that's all. This should be made a priority issue

This has been a request since 2016, it's safe to say that it's not coming. If you desperately require this functionality, you'll want to code it in yourself or look into a different LMS.

PDowney avatar Jan 11 '21 22:01 PDowney

@mis

Here's a screenshot showing the functionality I added for my client:

additionalcertificatedata

These fields appear on the Certificate Template page and can be positioned on the certificate like the other, built-in certificate data fields. They also support extra {{tags}} that are replaced with custom course metadata.

This system works, but it required a lot of duplicated code and I don't think it's going to be easily maintainable in the long run. The changes I have in mind for the Sensei Certificates plugin wouldn't affect the default functionality of the plugin, it would just add some filters to enable something like this in a much cleaner fashion.

I'll put together a pull request when I have a chance a little later. Thanks!

@misenhower How do you manage to do this ? Have you modified the plugin ? or created your separate addon OR in the functions.php file ? Can you suggest me hook ? I don't want to modify plugin , rather I want to implement in a separate addon or functions.php file

parthavi-patel avatar Feb 22 '21 06:02 parthavi-patel

https://wordpress.org/support/topic/print-serial-number-on-certificate/

cena avatar Oct 13 '21 13:10 cena

Serial number on certificates requested in https://wordpress.org/support/topic/certificado-sensei-numero-de-serie/

ctdealba avatar Feb 08 '22 17:02 ctdealba

5812629-zen

Ability to add custom fields/data to Certificates for students of a professional course; eg, registration number, etc.

cena avatar Dec 23 '22 18:12 cena

6025705-zen

User requesting the ability to show a certificate hash for authenticity.

danmaze avatar Mar 08 '23 13:03 danmaze

Possibly the most important needed thing for the Certificate generation is adding custom fields (like hash), please bump this issue up

Tison avatar Mar 18 '23 11:03 Tison

Possibly the most important needed thing for the Certificate generation is adding custom fields (like hash), please bump this issue up

Considering that there are now at least 20 security-related pull requests that have been ignored, I would assume this plugin is no longer being developed and additional feature requests will be ignored.

PDowney avatar Mar 18 '23 23:03 PDowney

Possibly the most important needed thing for the Certificate generation is adding custom fields (like hash), please bump this issue up

Considering that there are now at least 20 security-related pull requests that have been ignored, I would assume this plugin is no longer being developed and additional feature requests will be ignored.

Ironically as I got your email update I am just starting to develop a new medical course using sensei, and I have the exact same problem that I had when i did this back in 2020. but i can see that there has been a load of new development on sensei since I last looked at it. they are developing it, just also ignoring our update requests. Last time we hardcoded the course points into the Sensei LMS Certificates plugin and then changed its version number to 9999 so it could never update.

square-socket avatar Mar 19 '23 06:03 square-socket

@square-socket Thank you for replying here. How did you hardcode the course points in the certificate? Can you share that code?

Tison avatar Mar 19 '23 12:03 Tison

https://builtbyexternal.wordpress.com/2023/07/03/sensei-course-and-lesson-page/#comment-538

donnapep avatar Jul 04 '23 19:07 donnapep

+1 from

  • 7320973-zen
  • 7558104-zen

StefMattana avatar Jan 11 '24 14:01 StefMattana