def _course_notifications_json_get(course_action_state_id):
 try:
  action_state = CourseRerunState.objects.find_first(id=course_action_state_id)
 except CourseActionStateItemNotFoundError:
  return HttpResponseBadRequest()
 action_state_info = {'action': action_state.action, 'state': action_state.state, 'should_display': action_state.should_display}
 return JsonResponse(action_state_info)

def _course_notifications_json_get ( course_action_state_id ) : try : action_state = CourseRerunState . objects . find_first ( id = course_action_state_id ) except CourseActionStateItemNotFoundError : return HttpResponseBadRequest ( ) action_state_info = { 'action' : action_state . action , 'state' : action_state . state , 'should_display' : action_state . should_display } return JsonResponse ( action_state_info )
return the action and the action state for the given id .