'Check if the given user is eligible for the provided credit course
Args:
course_key(CourseKey): The course identifier
username(str): The username of the user
Returns:
Bool True if the user eligible for credit course else False'

@classmethod
def is_user_eligible_for_credit(cls, course_key, username):

    return cls.objects.filter(course__course_key=course_key, course__enabled=True, username=username, deadline__gt=datetime.datetime.now(pytz.UTC)).exists()
