def get_course_enrollment(username, course_id):
 course_key = CourseKey.from_string(course_id)
 try:
  enrollment = CourseEnrollment.objects.get(user__username=username, course_id=course_key)
  return CourseEnrollmentSerializer(enrollment).data
 except CourseEnrollment.DoesNotExist:
  return None

def get_course_enrollment ( username , course_id ) : course_key = CourseKey . from_string ( course_id ) try : enrollment = CourseEnrollment . objects . get ( user__username = username , course_id = course_key ) return CourseEnrollmentSerializer ( enrollment ) . data except CourseEnrollment . DoesNotExist : return None
stubbed out enrollment data request .