Refactor import()

Take call to Survey::getCommunityId() out of loop