'Deletes a CCX course.
Args:
request (Request): Django request object.
ccx_course_id (string): URI element specifying the CCX course location.'

def delete(self, request, ccx_course_id=None):

    (ccx_course_object, ccx_course_key, error_code, http_status) = self.get_object(ccx_course_id, is_ccx=True)
    if (ccx_course_object is None):
        return Response(status=http_status, data={'error_code': error_code})
    ccx_course_overview = CourseOverview.get_from_id(ccx_course_key)
    with transaction.atomic():
        CcxFieldOverride.objects.filter(ccx=ccx_course_object).delete()
        CourseEnrollment.objects.filter(course_id=ccx_course_key).delete()
        ccx_course_overview.delete()
        ccx_course_object.delete()
    return Response(status=status.HTTP_204_NO_CONTENT)
