Assessment Module Report (#12605)

* updated course wise assessment report

* added new report Final assessment grades
This commit is contained in:
Manas Solanki
2018-01-26 11:20:33 +05:30
committed by Nabin Hait
parent bfa898ff9b
commit 8985077652
9 changed files with 349 additions and 139 deletions

View File

@@ -269,7 +269,10 @@ def get_grade(grading_scale, percentage):
:param Percentage: Score Percentage Percentage
"""
grading_scale_intervals = {}
for d in frappe.get_all("Grading Scale Interval", fields=["grade_code", "threshold"], filters={"parent": grading_scale}):
if not hasattr(frappe.local, 'grading_scale'):
grading_scale = frappe.get_all("Grading Scale Interval", fields=["grade_code", "threshold"], filters={"parent": grading_scale})
frappe.local.grading_scale = grading_scale
for d in frappe.local.grading_scale:
grading_scale_intervals.update({d.threshold:d.grade_code})
intervals = sorted(grading_scale_intervals.keys(), key=float, reverse=True)
for interval in intervals: