diff --git a/lms/hooks.py b/lms/hooks.py index 188a9e45..9c94b94c 100644 --- a/lms/hooks.py +++ b/lms/hooks.py @@ -194,7 +194,8 @@ jinja = { "lms.lms.utils.first_lesson_exists", "lms.lms.utils.get_courses_under_review", "lms.lms.utils.has_course_instructor_role", - "lms.lms.utils.has_course_moderator_role" + "lms.lms.utils.has_course_moderator_role", + "lms.lms.utils.get_certificates" ], "filters": [] } diff --git a/lms/lms/utils.py b/lms/lms/utils.py index 22f78197..3e1da754 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -455,3 +455,8 @@ def get_courses_under_review(): }, ["name", "upcoming", "title", "image", "enable_certification", "status", "published"] ) + +def get_certificates(member=None): + return frappe.get_all("LMS Certificate", { + "member": member or frappe.session.user + }, ["course", "member", "issue_date", "expiry_date", "name"]) diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 777074bd..62d0b8a0 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -894,9 +894,9 @@ pre { } } -.profile-card { - flex-direction: column; - padding: 1rem 1.25rem; +.column-card { + flex-direction: column; + padding: 1.25rem; } .empty-state { @@ -1397,19 +1397,19 @@ pre { overflow: inherit; } -.dashboard .nav-link { +.lms-nav .nav-link { color: var(--text-muted); padding: 0 0 var(--padding-md); margin-right: var(--margin-xl); } -.dashboard .nav-link.active { +.lms-nav .nav-link.active { font-weight: 600; border-bottom: 1px solid var(--primary); color: var(--text-color); } -.dashboard .nav-link:hover { +.lms-nav .nav-link:hover { color: inherit; } diff --git a/lms/templates/certificate.html b/lms/templates/certificate.html index e798cc1d..6851422d 100644 --- a/lms/templates/certificate.html +++ b/lms/templates/certificate.html @@ -1,18 +1,25 @@