def get_credit_requirement_status(course_key, username, namespace=None, name=None):
 requirements = CreditRequirement.get_course_requirements(course_key, namespace=namespace, name=name)
 requirement_statuses = CreditRequirementStatus.get_statuses(requirements, username)
 requirement_statuses = dict(((o.requirement, o) for o in requirement_statuses))
 statuses = []
 for requirement in requirements:
  requirement_status = requirement_statuses.get(requirement)
  statuses.append({'namespace': requirement.namespace, 'name': requirement.name, 'display_name': requirement.display_name, 'criteria': requirement.criteria, 'reason': (requirement_status.reason if requirement_status else None), 'status': (requirement_status.status if requirement_status else None), 'status_date': (requirement_status.modified if requirement_status else None), 'order': requirement.order})
 return statuses

def get_credit_requirement_status ( course_key , username , namespace = None , name = None ) : requirements = CreditRequirement . get_course_requirements ( course_key , namespace = namespace , name = name ) requirement_statuses = CreditRequirementStatus . get_statuses ( requirements , username ) requirement_statuses = dict ( ( ( o . requirement , o ) for o in requirement_statuses ) ) statuses = [ ] for requirement in requirements : requirement_status = requirement_statuses . get ( requirement ) statuses . append ( { 'namespace' : requirement . namespace , 'name' : requirement . name , 'display_name' : requirement . display_name , 'criteria' : requirement . criteria , 'reason' : ( requirement_status . reason if requirement_status else None ) , 'status' : ( requirement_status . status if requirement_status else None ) , 'status_date' : ( requirement_status . modified if requirement_status else None ) , 'order' : requirement . order } ) return statuses
retrieve the users status for each credit requirement in the course .