diff --git a/lms/hooks.py b/lms/hooks.py index e45b76d4..188a9e45 100644 --- a/lms/hooks.py +++ b/lms/hooks.py @@ -193,7 +193,8 @@ jinja = { "lms.lms.utils.format_amount", "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_instructor_role", + "lms.lms.utils.has_course_moderator_role" ], "filters": [] } diff --git a/lms/lms/utils.py b/lms/lms/utils.py index 1eaf9ca3..047b43f7 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -450,5 +450,8 @@ def has_course_moderator_role(): def get_courses_under_review(): - return "jan" + return frappe.get_all("LMS Course", { + "status": "Under Review" + }, ["name", "upcoming", "title", "image", "enable_certification", "status", "published"] + ) diff --git a/lms/lms/widgets/CourseCard.html b/lms/lms/widgets/CourseCard.html index a7555a65..c84ab45d 100644 --- a/lms/lms/widgets/CourseCard.html +++ b/lms/lms/widgets/CourseCard.html @@ -3,7 +3,7 @@