Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Professor bug #73

Merged
merged 4 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/controllers/items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class ItemsController < ApplicationController
#This controller's function is for the items that are stored in the library database. It has operations that create, delete,
#and edit the items

before_action :check_admin, except: [:new, :index, :show, :search, :filter, :not_admin] #WIP must verify that the user is an admin in order for to run any procudure in this controller. An admin
before_action :check_admin, except: [:create, :check_user, :new, :index, :show, :search, :filter, :not_admin] #WIP must verify that the user is an admin in order for to run any procudure in this controller. An admin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need the WIP comment anymore because it is a WI - done 🎉

before_action :check_user, only: [:new]
#should be the only user that is able to add/edit/delete items in the database

Expand Down Expand Up @@ -178,6 +178,7 @@ def filter

def admin_filter
if session[:filter]!=nil and not session[:filter].blank? and not session[:filter]=="All"
@approveds = @approveds.where(category: session[:filter])
@pendings = @pendings.where(category: session[:filter])
@denieds = @denieds.where(category: session[:filter])
end
Expand Down
11 changes: 10 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
sessions: 'user/sessions'
#registrations: 'user/registrations'
}

devise_scope :user do
get '/users/sign_out' => 'devise/sessions#destroy'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to change these GET's to POST's

end

# get pages for semi-static non-resource/user pages
get '/contact_us', to: 'non_library_pages#contact_us'
Expand Down Expand Up @@ -48,8 +52,13 @@
patch :demote, on: :member
end

get 'items/:id/deny', to: 'items#deny'
get 'items/:id/approve', to: 'items#approve'
get 'items/:id/pending', to: 'items#pending'

get 'admin/:id/promote', to: 'admin#promote'
get 'admin/:id/demote', to: 'admin#demote'


# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html

root :to => "non_library_pages#about_us"
Expand Down
2 changes: 2 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Seeds for All Resources page (code in app/views/items/index.html.erb)

# Seed items:
=begin
Item.create(author: "Francis Su",
title: "Mathematics for Human Flourishing",
description: "Su describes his relationship with an inmate, and the inamate's discovery of mathematics while in prison.",
Expand Down Expand Up @@ -51,6 +52,7 @@
description: "Saad has gifted the world an unparalleled resource for digging up the deepest and most disguised layers of white supremacy. This book is best experienced as a journey, and the chapters are presented in bite-size lessons so readers can sit with the content, allow for introspection, and engage in essential conversations with friends and family members.",
url: "https://bookshop.org/a/3433/9781728209807",
category: "Book")
=end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These entries are duplicative of the entries in the CSV file


#65 add extra resources from resources.csv
require 'csv'
Expand Down
14 changes: 7 additions & 7 deletions lib/seeds/resources.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ title,author,description,category,url
Mathematics for Human Flourishing,Francis Su,"Su describes his relationship with an inmate, and the inamate's discovery of mathematics while in prison.",online,https://mathyawp.wordpress.com/2017/01/08/mathematics-for-human-flourishing/
Invisible Labor,Eric Anthony Grollman,,online,https://www.insidehighered.com/advice/2015/12/15/column-about-exploitation-minority-scholars-academe
Does STEM Stand Out? Examining Racial/Ethnic Gaps in Persistence Across Postsecondary Fields,"Riegle-Crumb, King, & Irizarry",,online,https://journals.sagepub.com/doi/pdf/10.3102/0013189X19831006
Is Science for Us? Black Students and Parents Views of Science and Science Careers,LOUISE ARCHER JENNIFER DEWITT JONATHAN OSBORNE,,online,https://onlinelibrary.wiley.com/doi/full/10.1002/sce.21146
Is Science for Us? Black Students and Parents Views of Science and Science Careers,LOUISE ARCHER JENNIFER DEWITT JONATHAN OSBORNE,,online,https://onlinelibrary.wiley.com/doi/full/10.1002/sce.21146
"Science, Feminism, and Black Liberation: An Interview with Sam Anderson",Emily Hamilton,"""The role of science in the struggle for Black liberation, and why it's critical for Black voices to shape fields that have excluded them.""",online,https://magazine.scienceforthepeople.org/vol23-1/science-feminism-and-black-liberation-an-interview-with-sam-anderson/
Tips for Department Inclusivity,Colleen Lewis,,online,https://www.csteachingtips.org/tips-department-inclusivity
CULTURAL APPROPRIATIONS OF TECHNICAL CAPITAL,"Andre Brock, Lynette Kvasny and Kayla Hales","""In an article from 2010, Andre Brock, Lynette Kvasny and Kayla Hales discuss how Black women use technical capital and blogs to articulate their cultural capital and visions of Black womanhood""",online,https://www.tandfonline.com/doi/full/10.1080/1369118X.2010.498897
Intersecting Oppressions and Online Communities,Kishonna L. Gray,Examining the experiences of Women of Color in Xbox Live,online,https://www.tandfonline.com/doi/full/10.1080/1369118X.2010.498897
Decentering Technology in discourse on discrimination,Seeta Pe�a Gangadharan and J?drzej Niklas,"""Arguing for a contextualisation of algorithmic discrimination within broader processes of economic and political marginalisation""",online,https://www.tandfonline.com/doi/full/10.1080/1369118X.2019.1593484
Race Matters,David J. Asai,"""Despite their initial high interest in science, students who belong to excluded racial and ethnic groups leave science at unacceptably high rates. ��Fixing the student�� approaches are not sufficient at stemming the loss. It is time to change the culture of science by putting inclusive diversity at the center.""",online,https://www.cell.com/cell/pdf/S0092-8674(20)30337-8.pdf?_returnURL=https%3A%2F%2Flinkinghub.elsevier.com%2Fretrieve%2Fpii%2FS0092867420303378%3Fshowall%3Dtrue
Decentering Technology in discourse on discrimination,Seeta Peña Gangadharan and Jędrzej Niklas,"""Arguing for a contextualisation of algorithmic discrimination within broader processes of economic and political marginalisation""",online,https://www.tandfonline.com/doi/full/10.1080/1369118X.2019.1593484
Race Matters,David J. Asai,"""Despite their initial high interest in science, students who belong to excluded racial and ethnic groups leave science at unacceptably high rates. ‘‘Fixing the student’’ approaches are not sufficient at stemming the loss. It is time to change the culture of science by putting inclusive diversity at the center.""",online,https://www.cell.com/cell/pdf/S0092-8674(20)30337-8.pdf?_returnURL=https%3A%2F%2Flinkinghub.elsevier.com%2Fretrieve%2Fpii%2FS0092867420303378%3Fshowall%3Dtrue
Machine Bias,"Julia Angwin, Jeff Larson, Surya Mattu and Lauren Kirchner",,online,https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing
Cognitive Reserve and Racial Privlige in STEM,Melise Edwards,"Discussion of ""cognitive freedom"" which comes from feeling safe and comfortable in your learning enviornment",online,https://meliseedwards.com/2020/05/10/cognitive-reserve-in-stem-disproportionate-labor-and-outcomes-for-students-of-color/
"Self-Guided Curriculum: Race, Racism and the American Experience","University of Missouri, Office of Inclusion, Diversity, and Equity","A 10 day self-guided exercise to challenge stereo-typical thought processes, especially around racism ",online,https://diversity.missouri.edu/education-development/self-guided-curriculum-race-racism-and-the-american-experience/
When Twice as Good Isn't Enough,Alicia Nicki Washington,,online,https://dl.acm.org/doi/10.1145/3328778.3366792
Science has a Racism Problem,The Cell Editorial Team,,online,https://www.cell.com/action/showPdf?pii=S0092-8674%2820%2930740-6
Unraveling the effects of cultural diversity in teams: A meta-analysis of research on multicultural work groups,"G�nter K Stahl, Martha L Maznevski, Andreas Voigt & Karsten Jonsen ",,online,https://link.springer.com/article/10.1057/jibs.2009.85
These labs are remarkably diverse heres why theyre winning at science,Kendall Powell,,online,https://www.nature.com/articles/d41586-018-05316-5
Unraveling the effects of cultural diversity in teams: A meta-analysis of research on multicultural work groups,"Günter K Stahl, Martha L Maznevski, Andreas Voigt & Karsten Jonsen ",,online,https://link.springer.com/article/10.1057/jibs.2009.85
These labs are remarkably diverse heres why theyre winning at science,Kendall Powell,,online,https://www.nature.com/articles/d41586-018-05316-5
Why Diversity Matters,"Vivian Hunt, Dennis Layton, and Sara Prince",,online,https://www.mckinsey.com/business-functions/organization/our-insights/why-diversity-matters
People of Color in the Academy: Patterns of Discrimination in Faculty Hiring and Retention,Leland Ware,credit for the find: Debosmita Pathak,online,https://lawdigitalcommons.bc.edu/cgi/viewcontent.cgi?article=1163&context=twlj
"Talking about Race, Learning about Racism: The Application of Racial Identity Development Theory in the Classroom",Beverly Daniel Tatum,credit for the find: Debosmita Pathak,online,https://equity.ucla.edu/wp-content/uploads/2017/01/Tatum-Talking-About-Race.pdf
Expand All @@ -24,7 +24,7 @@ Weapons of Math Destruction: How Big Data Increases Inequality and Threatens Dem
Algorithms of Opression: How Search Engines Reinforce Racism,Safyia Noble,Search Algorithms,book,https://bookshop.org/books/algorithms-of-oppression-how-search-engines-reinforce-racism/9781479837243
#HashtagActivism: Networks of Race and Gender Justice,"Sarah J. Jackson, Moya Bailey, and Brooke Foucault Welles",Use of Social Networks in Protesting,book,https://bookshop.org/books/hashtagactivism-networks-of-race-and-gender-justice/9780262043373
"Automating Inequality: How High-Tech Tools Profile, Police, and Punish the Poor",Virginia Eubanks,General Technology,book,https://bookshop.org/books/automating-inequality-how-high-tech-tools-profile-police-and-punish-the-poor/9781250215789
Presumed Incompetent: The Intersections of Race and Class for Women in Academia,Yolanda Flores Niemann (Editor) Gabriella Guti�rrez Y. Muhs (Editor) Carmen G. Gonz�lez (Editor) Angela P Harris (Editor),40 Female Professors of color tell their stories,book,https://bookshop.org/books/presumed-incompetent-ii-race-class-power-and-resistance-of-women-in-academia/9781607329657
Presumed Incompetent: The Intersections of Race and Class for Women in Academia,Yolanda Flores Niemann (Editor) Gabriella Gutiérrez Y. Muhs (Editor) Carmen G. González (Editor) Angela P Harris (Editor),40 Female Professors of color tell their stories,book,https://bookshop.org/books/presumed-incompetent-ii-race-class-power-and-resistance-of-women-in-academia/9781607329657
The Ethical Algorithm: The Science of Socially Aware Algorithm Design,"Michael Kerns, Aaron Roth",Machine Learning,book,https://bookshop.org/books/the-ethical-algorithm-the-science-of-socially-aware-algorithm-design/9780190948207
Making Science Fair: How Can We Achieve Equal Opportunity for Men and Women in Science?,Robert Leslie,"Science education pipeline, Addresses all underrepresented groups ... not just gender divide",book,https://bookshop.org/books/making-science-fair-how-can-we-achieve-equal-opportunity-for-men-and-women-in-science/9780761837954
The Age of Surveillance Capitalism: The Fight for a Human Future at the New Frontier of Power,Shoshana Zuboff,,book,https://bookshop.org/books/the-age-of-surveillance-capitalism-the-fight-for-a-human-future-at-the-new-frontier-of-power/9781610395694
Expand All @@ -38,4 +38,4 @@ About Race,"Anna Holmes, Baratunde Thurston, Raquel Cepeda and Tanner Colby",,po
Interrupting Bias and Creating Institutional Change,Colleen Lewis,"Interactive workshop on responding to bias, Practice stepping in when your peers are subject to bias and microagressions.",video,https://www.youtube.com/watch?v=nFVetasEV_A&feature=youtu.be&t=57
Race to the Future? Reimagining the Default Settings of Technology and Society,Ruha Benjamin,Systemic bias with a wealth of useful examples.,video,https://www.ncwit.org/video/race-future-reimagining-default-settings-technology-and-society-ruha-benjamin-video-playback
How to make better decisions in groups,Dr Dan Bang and Professor Chris Frith,Why Diversity?,video,https://royalsociety.org/topics-policy/publications/2018/making-better-decisions-in-groups/
How we're Priming Some Kids for College and Others for Prison,Alice Goffman,"Education, Ted Talk",video,https://www.ted.com/talks/alice_goffman_how_we_re_priming_some_kids_for_college_and_others_for_prison?referrer=playlist-talks_to_help_you_understand_r
How we're Priming Some Kids for College and Others for Prison,Alice Goffman,"Education, Ted Talk",video,https://www.ted.com/talks/alice_goffman_how_we_re_priming_some_kids_for_college_and_others_for_prison?referrer=playlist-talks_to_help_you_understand_r