@ensure_csrf_cookie
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@coach_dashboard
def set_grading_policy(request, course, ccx=None):
 if (not ccx):
  raise Http404
 override_field_for_ccx(ccx, course, 'grading_policy', json.loads(request.POST['policy']))
 responses = SignalHandler.course_published.send(sender=ccx, course_key=CCXLocator.from_course_locator(course.id, unicode(ccx.id)))
 for (rec, response) in responses:
  log.info('Signal fired when course is published. Receiver: %s. Response: %s', rec, response)
 url = reverse('ccx_coach_dashboard', kwargs={'course_id': CCXLocator.from_course_locator(course.id, unicode(ccx.id))})
 return redirect(url)

@ ensure_csrf_cookie @ cache_control ( no_cache = True , no_store = True , must_revalidate = True ) @ coach_dashboard def set_grading_policy ( request , course , ccx = None ) : if ( not ccx ) : raise Http404 override_field_for_ccx ( ccx , course , 'grading_policy' , json . loads ( request . POST [ 'policy' ] ) ) responses = SignalHandler . course_published . send ( sender = ccx , course_key = CCXLocator . from_course_locator ( course . id , unicode ( ccx . id ) ) ) for ( rec , response ) in responses : log . info ( 'Signal fired when course is published. Receiver: %s. Response: %s' , rec , response ) url = reverse ( 'ccx_coach_dashboard' , kwargs = { 'course_id' : CCXLocator . from_course_locator ( course . id , unicode ( ccx . id ) ) } ) return redirect ( url )
set grading policy for the ccx .