From a2182579527ae0ed78c7488043b0e7314913e8a6 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Wed, 26 Jul 2023 11:09:35 +0530 Subject: [PATCH] fix: course card descriptions --- lms/lms/utils.py | 11 ++++++++++- lms/lms/web_template/course_cards/course_cards.html | 3 ++- lms/overrides/user.py | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lms/lms/utils.py b/lms/lms/utils.py index efece300..db62cdcd 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -533,7 +533,16 @@ def get_courses_under_review(): return frappe.get_all( "LMS Course", {"status": "Under Review"}, - ["name", "upcoming", "title", "image", "enable_certification", "status", "published"], + [ + "name", + "upcoming", + "title", + "short_introduction", + "image", + "enable_certification", + "status", + "published", + ], ) diff --git a/lms/lms/web_template/course_cards/course_cards.html b/lms/lms/web_template/course_cards/course_cards.html index 16aa2b8f..0567cf2a 100644 --- a/lms/lms/web_template/course_cards/course_cards.html +++ b/lms/lms/web_template/course_cards/course_cards.html @@ -6,7 +6,8 @@
{% 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", "currency"], as_dict=True) %} + ["name", "short_introduction", "upcoming", "title", "image", "currency", + "enable_certification", "paid_certificate", "price_certificate"], as_dict=True) %} {{ widgets.CourseCard(course=course, read_only=False) }} {% endfor %}
diff --git a/lms/overrides/user.py b/lms/overrides/user.py index ea0a6a87..4cff5608 100644 --- a/lms/overrides/user.py +++ b/lms/overrides/user.py @@ -100,6 +100,7 @@ def get_enrolled_courses(): "name", "upcoming", "title", + "short_introduction", "image", "enable_certification", "paid_certificate", @@ -145,6 +146,7 @@ def get_authored_courses(member=None, only_published=True): "name", "upcoming", "title", + "short_introduction", "image", "enable_certification", "status",