'A simple wrapper around the method of the same name in api.eligibility.py. The only difference is
that a user_id is passed in.
For more information, see documentation on this method name in api.eligibility.py'

def set_credit_requirement_status(self, user_id, course_key_or_id, req_namespace, req_name, status='satisfied', reason=None):

    from openedx.core.djangoapps.credit.api.eligibility import is_credit_course, set_credit_requirement_status as api_set_credit_requirement_status
    course_key = _get_course_key(course_key_or_id)
    if (not is_credit_course(course_key)):
        return
    log_msg = 'set_credit_requirement_status    was    called    with    user_id={user_id},    course_key_or_id={course_key_or_id}    req_namespace={req_namespace},    req_name={req_name},    status={status},    reason={reason}'.format(user_id=user_id, course_key_or_id=course_key_or_id, req_namespace=req_namespace, req_name=req_name, status=status, reason=reason)
    log.info(log_msg)
    try:
        user = User.objects.get(id=user_id)
    except ObjectDoesNotExist:
        return None
    api_set_credit_requirement_status(user, course_key, req_namespace, req_name, status, reason)
