'Check whether students should be auto-enrolled in the course.
If a course is behind a paywall (e.g. professional ed or white-label),
then users should NOT be auto-enrolled.  Instead, the user will
be enrolled when he/she completes the payment flow.
Otherwise, users can be enrolled in the default mode "honor"
with the option to upgrade later.
Args:
course_id (CourseKey): The course to check.
Keyword Args:
modes_dict (dict): If provided, use these course modes.
Useful for avoiding unnecessary database queries.
Returns:
bool'

@classmethod
def can_auto_enroll(cls, course_id, modes_dict=None):

    if (modes_dict is None):
        modes_dict = cls.modes_for_course_dict(course_id)
    if cls.has_professional_mode(modes_dict):
        return False
    if cls.is_white_label(course_id, modes_dict=modes_dict):
        return False
    return ((cls.AUDIT in modes_dict) or (cls.HONOR in modes_dict))
