feat: certificate evaluation
This commit is contained in:
@@ -189,15 +189,21 @@
|
||||
|
||||
{% set certificate = is_certified(course.name) %}
|
||||
{% set progress = frappe.utils.cint(membership.progress) %}
|
||||
{% if membership and course.enable_certification %}
|
||||
{% 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 %}
|
||||
{% elif course.grant_certificate_after == "Evaluation" %}
|
||||
<a class="button wide-button is-secondary mt-2" href="/courses/{{ course.name }}/{{ certificate }}">
|
||||
{{ _("Apply for Certificate") }}
|
||||
</a>
|
||||
{% elif progress == 100 %}
|
||||
<div class="button wide-button is-secondary mt-4" id="certification" data-course="{{ course.name }}">
|
||||
{{ _("Get Certificate") }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ def get_context(context):
|
||||
|
||||
course = frappe.db.get_value("LMS Course", course_name,
|
||||
["name", "title", "image", "short_introduction", "description", "published", "upcoming",
|
||||
"disable_self_learning", "video_link", "enable_certification", "status"],
|
||||
"disable_self_learning", "video_link", "enable_certification", "status", "grant_certificate_after"],
|
||||
as_dict=True)
|
||||
|
||||
related_courses = frappe.get_all("Related Courses", {"parent": course.name}, ["course"])
|
||||
|
||||
Reference in New Issue
Block a user