@expect_json
@login_required
def cohorting_settings(request, course_key_string):
 course_key = CourseKey.from_string(course_key_string)
 get_course_with_access(request.user, 'staff', course_key)
 settings = {}
 verified_track_cohort_enabled = VerifiedTrackCohortedCourse.is_verified_track_cohort_enabled(course_key)
 settings['enabled'] = verified_track_cohort_enabled
 if verified_track_cohort_enabled:
  settings['verified_cohort_name'] = VerifiedTrackCohortedCourse.verified_cohort_name_for_course(course_key)
 return JsonResponse(settings)

@ expect_json @ login_required def cohorting_settings ( request , course_key_string ) : course_key = CourseKey . from_string ( course_key_string ) get_course_with_access ( request . user , 'staff' , course_key ) settings = { } verified_track_cohort_enabled = VerifiedTrackCohortedCourse . is_verified_track_cohort_enabled ( course_key ) settings [ 'enabled' ] = verified_track_cohort_enabled if verified_track_cohort_enabled : settings [ 'verified_cohort_name' ] = VerifiedTrackCohortedCourse . verified_cohort_name_for_course ( course_key ) return JsonResponse ( settings )
the handler for verified track cohorting requests .