def award_enrollment_badge(user):
 config = CourseEventBadgesConfiguration.current().enrolled_settings
 enrollments = user.courseenrollment_set.filter(is_active=True).count()
 award_badge(config, enrollments, user)

def award_enrollment_badge ( user ) : config = CourseEventBadgesConfiguration . current ( ) . enrolled_settings enrollments = user . courseenrollment_set . filter ( is_active = True ) . count ( ) award_badge ( config , enrollments , user )
awards badges based on the number of courses a user is enrolled in .