fix: improved UI of certified participants page
This commit is contained in:
@@ -411,13 +411,13 @@ def get_certified_participants(filters=None, start=0, page_length=30):
|
||||
or_filters["course_title"] = ["like", f"%{category}%"]
|
||||
or_filters["batch_title"] = ["like", f"%{category}%"]
|
||||
|
||||
participants = frappe.get_all(
|
||||
participants = frappe.db.get_all(
|
||||
"LMS Certificate",
|
||||
filters=filters,
|
||||
or_filters=or_filters,
|
||||
fields=["member"],
|
||||
fields=["member", "COUNT(*) as certificate_count"],
|
||||
group_by="member",
|
||||
order_by="creation desc",
|
||||
order_by="MAX(creation) desc",
|
||||
start=start,
|
||||
page_length=page_length,
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ def get_context():
|
||||
|
||||
|
||||
def get_meta(app_path, title, favicon, description):
|
||||
meta = {}
|
||||
meta = frappe._dict()
|
||||
if app_path:
|
||||
meta = get_meta_from_document(app_path)
|
||||
|
||||
@@ -46,7 +46,7 @@ def get_meta(app_path, title, favicon, description):
|
||||
meta["keywords"] = f"{meta.get('keywords', '')} {row.value}"
|
||||
elif row.key == "link":
|
||||
meta["link"] = row.value
|
||||
|
||||
print(meta)
|
||||
if not meta.get("description"):
|
||||
meta["description"] = description
|
||||
|
||||
@@ -273,3 +273,10 @@ def get_meta_from_document(app_path):
|
||||
"keywords": "All Programs, Programs, Learn",
|
||||
"link": "/programs",
|
||||
}
|
||||
|
||||
if app_path == "certified-participants":
|
||||
return {
|
||||
"title": _("Certified Participants"),
|
||||
"keywords": "All Certified Participants, Certified Participants, Learn, Certification",
|
||||
"link": "/certified-participants",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user