Last active
July 7, 2021 22:17
-
-
Save scytacki/0480f5ec66904be276f10785fe54ee3f to your computer and use it in GitHub Desktop.
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
Admin::Project.where("landing_page_content LIKE '%renderMaterialsCollection(101%'") |
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
non_cohort_resources = [] | |
ExternalActivity.where(is_official: false, publication_status: "published").find_each{|r| non_cohort_resources << r if r.cohorts.blank?}; nil | |
puts "name, id, link, times assigned, assignment 1, assignment 2, assignment 3, assignment 4, assignment 5" | |
non_cohort_resources.select{|r| r.offerings.length > 9}.each{ |r| | |
sorted_offerings = r.offerings.map{|o| o.created_at.strftime("%Y-%m-%d")}.sort | |
row = [ | |
"\"#{r.name}\"", | |
r.id, | |
"https://learn.concord.org/resources/#{r.id}", | |
r.offerings.length | |
] | |
row += sorted_offerings[-5..-1] | |
puts row.join(", ") | |
}; nil | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment