def _can_access_descriptor_with_milestones(user, descriptor, course_key):
 if milestones_helpers.get_course_content_milestones(course_key, unicode(descriptor.location), 'requires', user.id):
  debug('Deny: user has not completed all milestones for content')
  return ACCESS_DENIED
 else:
  return ACCESS_GRANTED

def _can_access_descriptor_with_milestones ( user , descriptor , course_key ) : if milestones_helpers . get_course_content_milestones ( course_key , unicode ( descriptor . location ) , 'requires' , user . id ) : debug ( 'Deny: user has not completed all milestones for content' ) return ACCESS_DENIED else : return ACCESS_GRANTED
returns if the object is blocked by an unfulfilled milestone .