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

Do not show link to certificate with no template #173

Merged
merged 2 commits into from Mar 18, 2019

Conversation

Projects
None yet
2 participants
@alexsanford
Copy link
Contributor

commented Mar 14, 2019

Closes #107

There were a few possible solutions to this problem.

Sensei Certificates does create a certificate for every user who completes a course, but the "View Certificate" link does not show up on the frontend unless the certificate has a template. If a course does not have a template, but later a template is added, then the users who completed the course before it was added will get links to their certificates at that point.

With that in mind, I don't think that preventing the creation of the certificate is the right answer. Instead, I changed the "View Certificate" link in the backend table to only display when the course has a certificate template. Otherwise, the admin user is prompted to add the template in order to view the certificate.

To test, follow the instructions in #107

@alexsanford alexsanford self-assigned this Mar 14, 2019

@alexsanford alexsanford requested review from jom and donnapep Mar 14, 2019

@alexsanford alexsanford added this to the 2.0.0 milestone Mar 14, 2019

@donnapep
Copy link
Contributor

left a comment

Few changes needed.

Show resolved Hide resolved classes/class-woothemes-sensei-certificates.php Outdated
Show resolved Hide resolved classes/class-woothemes-sensei-certificates.php Outdated
@donnapep
Copy link
Contributor

left a comment

👍

@alexsanford alexsanford merged commit 402ea42 into master Mar 18, 2019

@alexsanford alexsanford deleted the fix/certificate-with-no-template branch Mar 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.