'Looks at the currently active configuration model to determine whether the bulk email feature is available.
If the flag is not enabled, the feature is not available.
If the flag is enabled, course-specific authorization is required, and the course_id is either not provided
or not authorixed, the feature is not available.
If the flag is enabled, course-specific authorization is required, and the provided course_id is authorized,
the feature is available.
If the flag is enabled and course-specific authorization is not required, the feature is available.'

@classmethod
def feature_enabled(cls, course_id=None):

    if (not BulkEmailFlag.is_enabled()):
        return False
    elif BulkEmailFlag.current().require_course_email_auth:
        if (course_id is None):
            return False
        else:
            return CourseAuthorization.instructor_email_enabled(course_id)
    else:
        return True
