Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_course_grade_cutoff(course):
- #FIX: there now grades like A, B, C
- #dumb fix for russian npoudeh cutoff, should be fixed better
- synonym = u'\u041f\u0440\u043e\u0439\u0434\u0435\u043d'
- if 'Pass' in course.grade_cutoffs:
- return course.grade_cutoffs['Pass']
- elif synonym in course.grade_cutoffs:
- return course.grade_cutoffs[synonym]
- else:
- almost_worst_grade = sorted(course.grade_cutoffs.keys())[-2]
- return course.grade_cutoffs[almost_worst_grade]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement