@ensure_csrf_cookie
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@coach_dashboard
def ccx_invite(request, course, ccx=None):
 if (not ccx):
  raise Http404
 action = request.POST.get('enrollment-button')
 identifiers_raw = request.POST.get('student-ids')
 identifiers = _split_input_list(identifiers_raw)
 email_students = ('email-students' in request.POST)
 course_key = CCXLocator.from_course_locator(course.id, unicode(ccx.id))
 email_params = get_email_params(course, auto_enroll=True, course_key=course_key, display_name=ccx.display_name)
 ccx_students_enrolling_center(action, identifiers, email_students, course_key, email_params, ccx.coach)
 url = reverse('ccx_coach_dashboard', kwargs={'course_id': course_key})
 return redirect(url)

@ ensure_csrf_cookie @ cache_control ( no_cache = True , no_store = True , must_revalidate = True ) @ coach_dashboard def ccx_invite ( request , course , ccx = None ) : if ( not ccx ) : raise Http404 action = request . POST . get ( 'enrollment-button' ) identifiers_raw = request . POST . get ( 'student-ids' ) identifiers = _split_input_list ( identifiers_raw ) email_students = ( 'email-students' in request . POST ) course_key = CCXLocator . from_course_locator ( course . id , unicode ( ccx . id ) ) email_params = get_email_params ( course , auto_enroll = True , course_key = course_key , display_name = ccx . display_name ) ccx_students_enrolling_center ( action , identifiers , email_students , course_key , email_params , ccx . coach ) url = reverse ( 'ccx_coach_dashboard' , kwargs = { 'course_id' : course_key } ) return redirect ( url )
invite users to new ccx .