app/models/people/person.rb
# Uses the place_into function but adds the ability to create a placement if it should
Uses the place_into function but adds the ability to create a placement if it should
Uses the place_into function but adds the ability to create a placement if it should
def place_into!(position, service_learning_course, unit = nil, update_service_learning_risk_paper_date = false, send_confirmation_email = "1", force = true)
    ServiceLearningPosition.transaction do
      if force
        service_learning_course_id = service_learning_course.nil? ? nil : service_learning_course.id
        position.placements.create(:service_learning_course_id => service_learning_course_id)
        position = position.reload
      end    
      return place_into(position, service_learning_course, unit, update_service_learning_risk_paper_date, send_confirmation_email)
    end
  end
def place_into! ( position , service_learning_course , unit = nil , update_service_learning_risk_paper_date = false , send_confirmation_email = "1" , force = true ) ServiceLearningPosition . transaction do if force service_learning_course_id = service_learning_course . nil? ? nil : service_learning_course . id position . placements . create ( :service_learning_course_id => service_learning_course_id ) position = position . reload end return place_into ( position , service_learning_course , unit , update_service_learning_risk_paper_date , send_confirmation_email ) end end
Uses the place_into function but adds the ability to create a placement if it should
Uses the place_into function but adds the ability to create a placement if it should
position
service_learning_course
unit
update_service_learning_risk_paper_date
send_confirmation_email
force