fix: certification flow

This commit is contained in:
Jannat Patel
2022-02-17 11:38:27 +05:30
parent 91099188f2
commit 69f322d34c
6 changed files with 45 additions and 14 deletions

View File

@@ -176,6 +176,18 @@
</a>
{% endif %}
{% set certificate = is_certified(course.name) %}
{% set progress = frappe.utils.cint(membership.progress) %}
{% if certificate %}
<a class="button wide-button is-secondary mt-2" href="/courses/{{ course.name }}/{{ certificate }}">
{{ _("Get Certificate") }}
</a>
{% elif course.enable_certification and progress == 100 %}
<div class="button wide-button is-secondary mt-4" id="certification" data-course="{{ course.name }}">
{{ _("Get Certificate") }}
</div>
{% endif %}
<div class="overlay-heading"> {{ _("Course Include:") }} </div>
{% if get_lessons(course.name) | length %}
<div class="mt-3">