@frappe.whitelist()
def get_result(student, assessment_plan):
 results = frappe.get_all(u'Assessment Result', filters={u'student': student, u'assessment_plan': assessment_plan, u'docstatus': 1})
 if results:
  return frappe.get_doc(u'Assessment Result', results[0])
 else:
  return None

@ frappe . whitelist ( ) def get_result ( student , assessment_plan ) : results = frappe . get_all ( u'Assessment Result' , filters = { u'student' : student , u'assessment_plan' : assessment_plan , u'docstatus' : 1 } ) if results : return frappe . get_doc ( u'Assessment Result' , results [ 0 ] ) else : return None
gets the results for a test .