def _get_course_creator_status(user):
 if user.is_staff:
  course_creator_status = 'granted'
 elif settings.FEATURES.get('DISABLE_COURSE_CREATION', False):
  course_creator_status = 'disallowed_for_this_site'
 elif settings.FEATURES.get('ENABLE_CREATOR_GROUP', False):
  course_creator_status = get_course_creator_status(user)
  if (course_creator_status is None):
   add_user_with_status_unrequested(user)
   course_creator_status = get_course_creator_status(user)
 else:
  course_creator_status = 'granted'
 return course_creator_status

def _get_course_creator_status ( user ) : if user . is_staff : course_creator_status = 'granted' elif settings . FEATURES . get ( 'DISABLE_COURSE_CREATION' , False ) : course_creator_status = 'disallowed_for_this_site' elif settings . FEATURES . get ( 'ENABLE_CREATOR_GROUP' , False ) : course_creator_status = get_course_creator_status ( user ) if ( course_creator_status is None ) : add_user_with_status_unrequested ( user ) course_creator_status = get_course_creator_status ( user ) else : course_creator_status = 'granted' return course_creator_status
helper method for returning the course creator status for a particular user .