This file contains 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
|
This file contains 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
# `existing_provider_and_publish_courses_count.csv` | |
# This contains a list of register providers and their related publish courses breakdown. | |
# So can create trainee and and use these as courses details | |
# `new_provider_and_publish_courses.csv` | |
# This contains a list of new providers that is not on register, and their related publish courses breakdown. | |
# So can create provider then create trainee and and use these as courses details | |
# `existing_provider_with_no_new_publish_courses.csv` | |
# This contains a list of register providers that did not have any new publish courses |
This file contains 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
xml_response = Hesa::Client.get(url: "https://datacollection.hesa.ac.uk/apis/itt/1.1/CensusData/C23053/2023-10-26") | |
student_nodes = Nokogiri::XML::Reader(xml_response).filter_map do |node| | |
Nokogiri::XML(node.outer_xml).at("./Student") if node.name == "Student" && node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT | |
end | |
students = student_nodes.map do |student_node| | |
# student_attributes = Hash.from_xml(student_node.to_s)["Student"] | |
Hesa::Parsers::IttRecord.to_attributes(student_node:) |
This file contains 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
corrections_required = [ | |
["31009504/2/01","21100057900000137","2110750097246"], | |
["29002623/2/01","19100057900000123","1910750059931"], | |
["27034456/2/01","17100057900000163","1710750123984"], | |
["29020818/3/01","19100057900000536","1910750071885"], | |
["31021585/2/01","21100057900000023","2110750005355"], | |
["29024742/2/01","19100057900000570","1910750074015"], | |
["28012376/2/01","18100057900000148","1810750151559"], | |
["29005947/3/01","19100057900000824","1910750026715"], | |
["28016860/3/01","18100057900000182","1810750164696"], |
This file contains 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
-- NOTE: index scan indicator for busy table | |
SELECT | |
relname | |
, idx_scan | |
, last_idx_scan | |
FROM | |
pg_stat_user_tables | |
ORDER BY | |
idx_scan DESC | |
, relname ASC; |
This file contains 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
############################# | |
# NOTE: OPTION 2 | |
# Not checked need to be checked | |
############################# | |
raise "no checked" | |
course = RecruitmentCycle.current.previous.providers.find_by(provider_code: "EEU").first | |
dupes = [["L050", course], "R301",course, "E293", course, "K596", course] |
This file contains 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
Please could Computing (3379) at Carmel College (1KF) have its withdrawal reverted | |
course = RecruitmentCycle.current.providers.find_by(provider_code: "1KF").courses.find_by(course_code: "3379") | |
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 |
This file contains 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
copier = Courses::CopyToProviderService.new(sites_copy_to_course: Sites::CopyToCourseService, enrichments_copy_to_course: Enrichments::CopyToCourseService.new, force: true) | |
[ | |
["1KN", "4B5"], | |
["1KY", "5B3"], | |
["1BK", "3M1"], | |
["2CC", "2O2"], | |
["1CU", "3V2"], | |
].each do |source, target| |
This file contains 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
# https://www.publish-teacher-training-courses.service.gov.uk/publish/organisations/1A8/2024/courses/372X | |
# https://www.publish-teacher-training-courses.service.gov.uk/publish/organisations/1A8/2024/courses/3735 | |
# | |
# to no | |
courses = RecruitmentCycle.current.providers.find_by(provider_code: "1A8").courses.where(course_code: ["372X", "3735" ] ) | |
courses.update!(can_sponsor_student_visa: false) |
This file contains 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
# https://www.publish-teacher-training-courses.service.gov.uk/publish/organisations/2JJ/2024/courses | |
# | |
# Change to yes | |
courses = RecruitmentCycle.current.providers.find_by(provider_code: "2JJ").courses | |
courses.update!(can_sponsor_student_visa: true) |
NewerOlder