fix: batch ui and ux

This commit is contained in:
Jannat Patel
2023-08-29 09:55:40 +05:30
parent cd82527ef3
commit b940ddca25
33 changed files with 341 additions and 222 deletions

View File

@@ -12,7 +12,7 @@ def get_context(context):
context.no_cache = 1
student = frappe.form_dict["username"]
class_name = frappe.form_dict["classname"]
batch_name = frappe.form_dict["batchname"]
context.is_moderator = has_course_moderator_role()
context.is_evaluator = has_course_evaluator_role()
@@ -29,13 +29,11 @@ def get_context(context):
):
raise frappe.PermissionError(_("You don't have permission to access this page."))
context.class_info = frappe.db.get_value(
"LMS Batch", class_name, ["name"], as_dict=True
)
context.batch = frappe.db.get_value("LMS Batch", batch_name, ["name"], as_dict=True)
context.courses = frappe.get_all(
"Batch Course", {"parent": class_name}, pluck="course"
"Batch Course", {"parent": batch_name}, pluck="course"
)
context.assessments = get_assessments(class_name, context.student.name)
context.assessments = get_assessments(batch_name, context.student.name)
context.upcoming_evals = get_upcoming_evals(context.student.name, context.courses)