'fetches the available course modes from the CourseMode model'

def from_course_mode(self, **kwargs):

    course = kwargs.get('course', None)
    if (not course):
        raise ValueError("Context    dictionary    does    not    contain    expected    argument    'course'")
    return [mode.slug for mode in CourseMode.modes_for_course(course.id)]
