def is_course_passed(course, grade_summary=None, student=None, request=None):
 nonzero_cutoffs = [cutoff for cutoff in course.grade_cutoffs.values() if (cutoff > 0)]
 success_cutoff = (min(nonzero_cutoffs) if nonzero_cutoffs else None)
 if (grade_summary is None):
  grade_summary = CourseGradeFactory().create(student, course).summary
 return (success_cutoff and (grade_summary['percent'] >= success_cutoff))

def is_course_passed ( course , grade_summary = None , student = None , request = None ) : nonzero_cutoffs = [ cutoff for cutoff in course . grade_cutoffs . values ( ) if ( cutoff > 0 ) ] success_cutoff = ( min ( nonzero_cutoffs ) if nonzero_cutoffs else None ) if ( grade_summary is None ) : grade_summary = CourseGradeFactory ( ) . create ( student , course ) . summary return ( success_cutoff and ( grade_summary [ 'percent' ] >= success_cutoff ) )
check users course passing status .