def _get_course_credit_requirements(course_key):
 credit_xblock_requirements = _get_credit_course_requirement_xblocks(course_key)
 min_grade_requirement = _get_min_grade_requirement(course_key)
 proctored_exams_requirements = _get_proctoring_requirements(course_key)
 block_requirements = (credit_xblock_requirements + proctored_exams_requirements)
 sorted_block_requirements = sorted(block_requirements, key=(lambda x: ((x['start_date'] is None), x['start_date'], x['display_name'])))
 credit_requirements = (min_grade_requirement + sorted_block_requirements)
 return credit_requirements

def _get_course_credit_requirements ( course_key ) : credit_xblock_requirements = _get_credit_course_requirement_xblocks ( course_key ) min_grade_requirement = _get_min_grade_requirement ( course_key ) proctored_exams_requirements = _get_proctoring_requirements ( course_key ) block_requirements = ( credit_xblock_requirements + proctored_exams_requirements ) sorted_block_requirements = sorted ( block_requirements , key = ( lambda x : ( ( x [ 'start_date' ] is None ) , x [ 'start_date' ] , x [ 'display_name' ] ) ) ) credit_requirements = ( min_grade_requirement + sorted_block_requirements ) return credit_requirements
returns the list of credit requirements for the given course .