Created
September 29, 2023 14:28
-
-
Save defong/3b15a9072df5ecdcff71fb140818c168 to your computer and use it in GitHub Desktop.
[DfE] 2243-publish-teacher-training-courses-support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider = RecruitmentCycle.current.providers.find_by(provider_code: "27O") | |
courses = provider.courses.where(course_code: ["2RFG", "F392", "T695"]) | |
courses.each do |course| | |
course.enrichments.max_by(&:created_at).update(status: "published", last_published_timestamp_utc: Time.now.utc) | |
course.site_statuses.each do |site_status| | |
site_status.update(vac_status: :no_vacancies, status: :running) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment