fix: show currency and certificate price in all course cards

This commit is contained in:
Jannat Patel
2022-04-29 15:05:29 +05:30
parent 32cdaa8baa
commit 503c74c488
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
<div class="cards-parent mt-10">
{% for course_row in courses %}
{% set course = frappe.db.get_value("LMS Course", course_row.course,
["name", "upcoming", "title", "image", "enable_certification", "paid_certificate", "price_certificate"], as_dict=True) %}
["name", "upcoming", "title", "image", "enable_certification", "paid_certificate", "price_certificate", "currency"], as_dict=True) %}
{{ widgets.CourseCard(course=course, read_only=False) }}
{% endfor %}
</div>

View File

@@ -127,7 +127,7 @@ def get_enrolled_courses():
memberships = get_course_membership(frappe.session.user, member_type="Student")
for membership in memberships:
course = frappe.db.get_value("LMS Course", membership.course,
["name", "upcoming", "title", "image", "enable_certification"], as_dict=True)
["name", "upcoming", "title", "image", "enable_certification", "paid_certificate", "price_certificate", "currency"], as_dict=True)
progress = cint(membership.progress)
if progress < 100:
in_progress.append(course)