fix: polished the course certification flow

This commit is contained in:
Jannat Patel
2025-02-25 12:46:35 +05:30
parent 4f1dcbfb78
commit 63bf6a5574
9 changed files with 44 additions and 25 deletions

View File

@@ -869,15 +869,20 @@ def get_evaluator(course, batch=None):
@frappe.whitelist()
def get_upcoming_evals(student, courses):
def get_upcoming_evals(student, courses, batch=None):
filters = {
"member": student,
"course": ["in", courses],
"date": [">=", frappe.utils.nowdate()],
"status": "Upcoming",
}
if batch:
filters["batch_name"] = batch
upcoming_evals = frappe.get_all(
"LMS Certificate Request",
{
"member": student,
"course": ["in", courses],
"date": [">=", frappe.utils.nowdate()],
"status": "Upcoming",
},
filters,
[
"name",
"date",